diff --git a/.gn b/.gn index 29bfe8c..84cfd6c 100644 --- a/.gn +++ b/.gn
@@ -331,6 +331,7 @@ "//tools/gn/misc/vim/syntax/gn.vim", "//tools/gn/setup.cc", "//ui/accessibility/BUILD.gn", + "//ui/gfx/BUILD.gn", "//ui/views/BUILD.gn", "//ui/views/mus/BUILD.gn", "//v8/test/cctest/BUILD.gn",
diff --git a/AUTHORS b/AUTHORS index 261d4f40..4b63c63 100644 --- a/AUTHORS +++ b/AUTHORS
@@ -384,6 +384,7 @@ Luiz Von Dentz <luiz.von.dentz@intel.com> Luke Inman-Semerau <luke.semerau@gmail.com> Luke Zarko <lukezarko@gmail.com> +Luoxi Pan <l.panpax@gmail.com> Maarten Lankhorst <m.b.lankhorst@gmail.com> Magnus Danielsson <fuzzac@gmail.com> Mahesh Kulkarni <mahesh.kk@samsung.com>
diff --git a/DEPS b/DEPS index ee43e20..3fac46da 100644 --- a/DEPS +++ b/DEPS
@@ -36,11 +36,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': 'c42475cea23bfdb22b5d6cad6042577e47bd6a5c', + 'skia_revision': 'e930459a18ea099859f7d0076802458be00a6b4c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '8e8649093cb16688093b49a7046de3d67b8f3068', + 'v8_revision': '75f10f91b1b0b392d2a29a7a480bf079db6f43fa', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -48,7 +48,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': '8bad46d40e23671d4a723a2daf4ca1e252bb0617', + 'angle_revision': 'e8d5c5c4360b967691024d5ad081cf7192fbe824', # 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. @@ -88,11 +88,11 @@ # 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': '7c4d195ab2d092b848cc05c9bd17b38365959588', + 'catapult_revision': '243e3dfbc911dba7d7ad2397aa5d975d6b85a854', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. - 'libfuzzer_revision': '7ee243229b1df318115b71b656c14879e8c16a71', # from svn revision 272061 + 'libfuzzer_revision': '3ae6b1d1102488f26d25d045fd82208ce00a8c66', # from svn revision 272061 } # Only these hosts are allowed for dependencies in this DEPS file. @@ -178,7 +178,7 @@ Var('chromium_git') + '/external/bidichecker/lib.git' + '@' + '97f2aa645b74c28c57eca56992235c79850fa9e0', 'src/third_party/webgl/src': - Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'fe43b3cad0afb2c5280ed5d23910a6d744976251', + Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '74a8e958422968916acd2b59c8f8715a260d0a74', 'src/third_party/webdriver/pylib': Var('chromium_git') + '/external/selenium/py.git' + '@' + '5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', @@ -544,6 +544,7 @@ 'src/printing', 'src/third_party/catapult', 'src/third_party/closure_compiler/build', + 'src/third_party/WebKit/Tools/Scripts', # See http://crbug.com/625877. 'src/tools', ], },
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 8a7c75bb..0ab53291 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py
@@ -278,18 +278,6 @@ ), ), ( - '\<MessageLoopProxy\>', - ( - 'MessageLoopProxy is deprecated. ', - 'Please use SingleThreadTaskRunner or ThreadTaskRunnerHandle instead.' - ), - True, - ( - # Internal message_loop related code may still use it. - r'^base[\\\/]message_loop[\\\/].*', - ), - ), - ( '#pragma comment(lib,', ( 'Specify libraries to link with in build files and not in the source.',
diff --git a/WATCHLISTS b/WATCHLISTS index e6e7fa9..06a97487f 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -648,6 +648,12 @@ 'chrome/android/java/res/layout/new_tab_page|'\ 'chrome/android/java/res/layout/most_visited' }, + 'ntp_tiles': { + 'filepath': 'chrome/browser/android/ntp/|'\ + 'chrome/browser/ui/webui/ntp/|'\ + 'chrome/common/search/ntp|'\ + 'components/ntp_tiles/' + }, 'offline_pages': { 'filepath': 'components/offline_pages/'\ '|chrome/browser/android/offline_pages/'\ @@ -1573,6 +1579,7 @@ 'ntp': ['dbeam+watch-ntp@chromium.org', 'pedrosimonetti+watch@chromium.org'], 'ntp_snippets': ['ntp-dev+reviews@chromium.org'], + 'ntp_tiles': ['ntp-dev+reviews@chromium.org'], 'offline_pages': ['dimich+watch@chromium.org', 'fgorski+watch@chromium.org', 'petewil+watch@chromium.org',
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc index 8763e6e..bf157d6 100644 --- a/android_webview/browser/aw_browser_context.cc +++ b/android_webview/browser/aw_browser_context.cc
@@ -73,7 +73,7 @@ std::unique_ptr<net::ProxyConfigService> CreateProxyConfigService() { std::unique_ptr<net::ProxyConfigService> config_service = net::ProxyService::CreateSystemProxyConfigService( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), nullptr /* Ignored on Android */); // TODO(csharrison) Architect the wrapper better so we don't need a cast for @@ -98,7 +98,7 @@ scoped_refptr<base::SequencedTaskRunner> background_task_runner = pool->GetSequencedTaskRunner(pool->GetSequenceToken()); scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); return new policy::URLBlacklistManager(pref_service, background_task_runner, io_task_runner, segment_url_callback,
diff --git a/android_webview/browser/aw_form_database_service.cc b/android_webview/browser/aw_form_database_service.cc index 3a27d4b..6393f1b 100644 --- a/android_webview/browser/aw_form_database_service.cc +++ b/android_webview/browser/aw_form_database_service.cc
@@ -28,16 +28,16 @@ AwFormDatabaseService::AwFormDatabaseService(const base::FilePath path) { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - web_database_ = new WebDatabaseService(path.Append(kWebDataFilename), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)); + web_database_ = new WebDatabaseService( + path.Append(kWebDataFilename), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB)); web_database_->AddTable(base::WrapUnique(new autofill::AutofillTable)); web_database_->LoadDatabase(); autofill_data_ = new autofill::AutofillWebDataService( - web_database_, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), + web_database_, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), base::Bind(&DatabaseErrorCallback)); autofill_data_->Init(); }
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc index ba3e94b..81bb1c6 100644 --- a/android_webview/browser/net/aw_url_request_context_getter.cc +++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -178,7 +178,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); auth_server_whitelist_.Init( prefs::kAuthServerWhitelist, user_pref_service, @@ -243,7 +243,7 @@ cache_params.path = cache_path_; builder.EnableHttpCache(cache_params); builder.SetFileTaskRunner( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)); net::URLRequestContextBuilder::HttpNetworkSessionParams network_session_params; @@ -278,7 +278,7 @@ scoped_refptr<base::SingleThreadTaskRunner> AwURLRequestContextGetter::GetNetworkTaskRunner() const { - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } void AwURLRequestContextGetter::SetHandlersAndInterceptors(
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/PolicyUrlFilteringTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/PolicyUrlFilteringTest.java index 053f76f..044452d 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/PolicyUrlFilteringTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/PolicyUrlFilteringTest.java
@@ -73,11 +73,11 @@ } }); - navigateAndCheckOutcome(mFooTestUrl, 0); + navigateAndCheckOutcome(mFooTestUrl, 0 /* error count before */, 0 /* error count after*/); setFilteringPolicy(testProvider, new String[] {"localhost"}, new String[] {}); - navigateAndCheckOutcome(mFooTestUrl, 1); + navigateAndCheckOutcome(mFooTestUrl, 0 /* error count before */, 1 /* error count after */); assertEquals(ErrorCodeConversionHelper.ERROR_CONNECT, mContentsClient.getOnReceivedErrorHelper().getErrorCode()); } @@ -89,10 +89,10 @@ @Policies.Item(key = sBlacklistPolicyName, stringArray = {"*"}), @Policies.Item(key = sWhitelistPolicyName, stringArray = {sFooWhitelistFilter})}) public void testWhitelistedUrl() throws Throwable { - navigateAndCheckOutcome(mFooTestUrl, 0); + navigateAndCheckOutcome(mFooTestUrl, 0 /* error count before */, 0 /* error count after */); // Make sure it goes through the blacklist - navigateAndCheckOutcome(mBarTestUrl, 1); + navigateAndCheckOutcome(mBarTestUrl, 0 /* error count before */, 1 /* error count after */); assertEquals(ErrorCodeConversionHelper.ERROR_CONNECT, mContentsClient.getOnReceivedErrorHelper().getErrorCode()); } @@ -103,7 +103,7 @@ @Policies.Add({ @Policies.Item(key = sBlacklistPolicyName, string = "shouldBeAJsonArrayNotAString")}) public void testBadPolicyValue() throws Exception { - navigateAndCheckOutcome(mFooTestUrl, 0); + navigateAndCheckOutcome(mFooTestUrl, 0 /* error count before */, 0 /* error count after */); // At the moment this test is written, a failure is a crash, a success is no crash. } @@ -111,14 +111,26 @@ * Synchronously loads the provided URL and checks that the number or reported errors for the * current context is the expected one. */ - private void navigateAndCheckOutcome(String url, int expectedErrorCount) throws Exception { + private void navigateAndCheckOutcome(String url, int startingErrorCount, int expectedErrorCount) + throws Exception { + if (expectedErrorCount < startingErrorCount) { + throw new IllegalArgumentException( + "The navigation error count can't decrease over time"); + } TestCallbackHelperContainer.OnReceivedErrorHelper onReceivedErrorHelper = mContentsClient.getOnReceivedErrorHelper(); TestCallbackHelperContainer.OnPageFinishedHelper onPageFinishedHelper = mContentsClient.getOnPageFinishedHelper(); + assertEquals(startingErrorCount, onReceivedErrorHelper.getCallCount()); + loadUrlSync(mAwContents, onPageFinishedHelper, url); assertEquals(url, onPageFinishedHelper.getUrl()); + + if (expectedErrorCount > startingErrorCount) { + onReceivedErrorHelper.waitForCallback( + startingErrorCount, expectedErrorCount - startingErrorCount); + } assertEquals(expectedErrorCount, onReceivedErrorHelper.getCallCount()); }
diff --git a/android_webview/native/aw_autofill_client.cc b/android_webview/native/aw_autofill_client.cc index cc99778..5c34dc4 100644 --- a/android_webview/native/aw_autofill_client.cc +++ b/android_webview/native/aw_autofill_client.cc
@@ -197,6 +197,12 @@ content::SSLStatus::RAN_INSECURE_CONTENT); } +bool AwAutofillClient::ShouldShowSigninPromo() { + return false; +} + +void AwAutofillClient::StartSigninFlow() {} + void AwAutofillClient::SuggestionSelected(JNIEnv* env, const JavaParamRef<jobject>& object, jint position) {
diff --git a/android_webview/native/aw_autofill_client.h b/android_webview/native/aw_autofill_client.h index bc7f7355..ca4119d 100644 --- a/android_webview/native/aw_autofill_client.h +++ b/android_webview/native/aw_autofill_client.h
@@ -99,6 +99,8 @@ const base::string16& profile_full_name) override; void OnFirstUserGestureObserved() override; bool IsContextSecure(const GURL& form_origin) override; + bool ShouldShowSigninPromo() override; + void StartSigninFlow() override; void SuggestionSelected(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj,
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc index 92673a2f..9d01a230 100644 --- a/android_webview/native/aw_contents.cc +++ b/android_webview/native/aw_contents.cc
@@ -174,7 +174,7 @@ functor_(nullptr), browser_view_renderer_( this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)), web_contents_(std::move(web_contents)), renderer_manager_key_(GLViewRendererManager::GetInstance()->NullKey()) { base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, 1);
diff --git a/android_webview/native/aw_gl_functor.cc b/android_webview/native/aw_gl_functor.cc index b848129..55a7f64 100644 --- a/android_webview/native/aw_gl_functor.cc +++ b/android_webview/native/aw_gl_functor.cc
@@ -33,7 +33,7 @@ : java_ref_(java_ref), render_thread_manager_( this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)) { + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)) { DCHECK_CURRENTLY_ON(BrowserThread::UI); ++g_instance_count; }
diff --git a/android_webview/tools/system_webview_shell/BUILD.gn b/android_webview/tools/system_webview_shell/BUILD.gn index 16ecb86..51d0484c 100644 --- a/android_webview/tools/system_webview_shell/BUILD.gn +++ b/android_webview/tools/system_webview_shell/BUILD.gn
@@ -25,6 +25,7 @@ "apk/src/org/chromium/webview_shell/StartupTimeActivity.java", "apk/src/org/chromium/webview_shell/TelemetryActivity.java", "apk/src/org/chromium/webview_shell/TelemetryMemoryPressureActivity.java", + "apk/src/org/chromium/webview_shell/WebViewCreateDestroyActivity.java", "apk/src/org/chromium/webview_shell/WebViewBrowserActivity.java", "apk/src/org/chromium/webview_shell/WebViewLayoutTestActivity.java", "apk/src/org/chromium/webview_shell/WebViewThreadTestActivity.java",
diff --git a/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml b/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml index e2d4806..8a966ea 100644 --- a/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml +++ b/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml
@@ -58,6 +58,12 @@ android:exported="true"> </activity> <activity + android:name="org.chromium.webview_shell.WebViewCreateDestroyActivity" + android:launchMode="singleTask" + android:label="@string/title_activity_create_destroy" + android:exported="true"> + </activity> + <activity android:name="org.chromium.webview_shell.WebViewBrowserActivity" android:label="@string/title_activity_browser" android:exported="true"
diff --git a/android_webview/tools/system_webview_shell/apk/res/layout/activity_empty.xml b/android_webview/tools/system_webview_shell/apk/res/layout/activity_empty.xml new file mode 100644 index 0000000..868453d --- /dev/null +++ b/android_webview/tools/system_webview_shell/apk/res/layout/activity_empty.xml
@@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/emptyview"> +</RelativeLayout> \ No newline at end of file
diff --git a/android_webview/tools/system_webview_shell/apk/res/values/strings.xml b/android_webview/tools/system_webview_shell/apk/res/values/strings.xml index afc07a0..baee55fc0 100644 --- a/android_webview/tools/system_webview_shell/apk/res/values/strings.xml +++ b/android_webview/tools/system_webview_shell/apk/res/values/strings.xml
@@ -13,6 +13,7 @@ <string name="title_activity_layout_test">WebView Layout Test</string> <string name="title_activity_thread_test">WebView Thread Test</string> <string name="title_activity_page_cycler">WebView Page Cycler Test</string> + <string name="title_activity_create_destroy">WebView Create Destroy</string> <string name="menu_reset_webview">Destroy and create new WebView</string> <string name="menu_clear_cache">Clear cache</string> <string name="menu_about">About WebView</string>
diff --git a/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewCreateDestroyActivity.java b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewCreateDestroyActivity.java new file mode 100644 index 0000000..6727bbc --- /dev/null +++ b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewCreateDestroyActivity.java
@@ -0,0 +1,85 @@ +// 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. + +package org.chromium.webview_shell; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.ViewGroup; +import android.webkit.WebSettings; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.RelativeLayout; + +/** + * This activity always has at most one live webview. Any previously exisisting + * webview instance is destroyed first before creating a new one. This activity + * is designed for testing create/destroy webview sequence, for catching potential + * memory leaks and memory benchmarking. + * + * Note that this activity does not destroy any webviews in other activities. For + * example launching TelemetryActivity followed by WebViewCreateDestroyActivity + * will yield two webview instances in total. + */ +public class WebViewCreateDestroyActivity extends Activity { + private static WebView sWebView; + + @Override + protected void onDestroy() { + destroyWebViewIfExists(); + super.onDestroy(); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_empty); + getWindow().setTitle( + getResources().getString(R.string.title_activity_create_destroy)); + onNewIntent(getIntent()); + } + + @Override + protected void onNewIntent(Intent intent) { + destroyWebViewIfExists(); + openUsingNewWebView(intent); + } + + private void openUsingNewWebView(Intent intent) { + sWebView = new WebView(this); + sWebView.setLayoutParams( + new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT)); + RelativeLayout layout = (RelativeLayout) findViewById(R.id.emptyview); + layout.addView(sWebView); + + WebSettings webSettings = sWebView.getSettings(); + webSettings.setJavaScriptEnabled(true); + webSettings.setUseWideViewPort(true); + webSettings.setLoadWithOverviewMode(true); + + sWebView.setWebViewClient(new WebViewClient() { + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + return false; + } + }); + + String url = getUrlFromIntent(intent); + sWebView.loadUrl(url == null ? "about:blank" : url); + } + + private void destroyWebViewIfExists() { + if (sWebView == null) return; + RelativeLayout layout = (RelativeLayout) findViewById(R.id.emptyview); + layout.removeView(sWebView); + sWebView.destroy(); + sWebView = null; + } + + private static String getUrlFromIntent(Intent intent) { + return intent != null ? intent.getDataString() : null; + } +}
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index d2245475..dbc9d21 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc
@@ -21,6 +21,8 @@ #include "ash/common/shelf/shelf_model.h" #include "ash/common/shell_delegate.h" #include "ash/common/shell_window_ids.h" +#include "ash/common/system/brightness_control_delegate.h" +#include "ash/common/system/keyboard_brightness_control_delegate.h" #include "ash/common/system/system_notifier.h" #include "ash/common/system/tray/system_tray_delegate.h" #include "ash/common/system/tray/system_tray_notifier.h" @@ -48,8 +50,6 @@ #include "ash/shelf/shelf_delegate.h" #include "ash/shelf/shelf_widget.h" #include "ash/shell.h" -#include "ash/system/brightness_control_delegate.h" -#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" #include "ash/system/status_area_widget.h" #include "ash/system/tray/system_tray.h" #include "ash/touch/touch_hud_debug.h" @@ -81,7 +81,6 @@ #if defined(OS_CHROMEOS) #include "ash/display/display_configuration_controller.h" -#include "ash/system/chromeos/keyboard_brightness_controller.h" #include "base/sys_info.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power_manager_client.h" @@ -145,7 +144,7 @@ *shortcut_text += non_breaking_plus; } - *shortcut_text += keys[keys.size() - 1]; + *shortcut_text += keys.back(); } // Gets the notification message after it formats it in such a way that there @@ -554,18 +553,6 @@ } #if defined(OS_CHROMEOS) -void HandleBrightnessDown(BrightnessControlDelegate* delegate, - const ui::Accelerator& accelerator) { - if (delegate) - delegate->HandleBrightnessDown(accelerator); -} - -void HandleBrightnessUp(BrightnessControlDelegate* delegate, - const ui::Accelerator& accelerator) { - if (delegate) - delegate->HandleBrightnessUp(accelerator); -} - bool CanHandleDisableCapsLock(const ui::Accelerator& previous_accelerator) { ui::KeyboardCode previous_key_code = previous_accelerator.key_code(); if (previous_accelerator.type() == ui::ET_KEY_RELEASED || @@ -590,18 +577,6 @@ ime->GetImeKeyboard()->SetCapsLockEnabled(false); } -void HandleKeyboardBrightnessDown(KeyboardBrightnessControlDelegate* delegate, - const ui::Accelerator& accelerator) { - if (delegate) - delegate->HandleKeyboardBrightnessDown(accelerator); -} - -void HandleKeyboardBrightnessUp(KeyboardBrightnessControlDelegate* delegate, - const ui::Accelerator& accelerator) { - if (delegate) - delegate->HandleKeyboardBrightnessUp(accelerator); -} - bool CanHandleLock() { return WmShell::Get()->GetSessionStateDelegate()->CanLockScreen(); } @@ -807,11 +782,6 @@ return GetAcceleratorProcessingRestriction(-1); } -void AcceleratorController::SetBrightnessControlDelegate( - std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate) { - brightness_control_delegate_ = std::move(brightness_control_delegate); -} - void AcceleratorController::SetImeControlDelegate( std::unique_ptr<ImeControlDelegate> ime_control_delegate) { ime_control_delegate_ = std::move(ime_control_delegate); @@ -928,11 +898,6 @@ for (size_t i = 0; i < kDebugAcceleratorDataLength; ++i) reserved_actions_.insert(kDebugAcceleratorData[i].action); } - -#if defined(OS_CHROMEOS) - keyboard_brightness_control_delegate_.reset( - new KeyboardBrightnessController()); -#endif } void AcceleratorController::RegisterAccelerators( @@ -1280,12 +1245,20 @@ HandleUnpin(); break; #if defined(OS_CHROMEOS) - case BRIGHTNESS_DOWN: - HandleBrightnessDown(brightness_control_delegate_.get(), accelerator); + case BRIGHTNESS_DOWN: { + BrightnessControlDelegate* delegate = + WmShell::Get()->brightness_control_delegate(); + if (delegate) + delegate->HandleBrightnessDown(accelerator); break; - case BRIGHTNESS_UP: - HandleBrightnessUp(brightness_control_delegate_.get(), accelerator); + } + case BRIGHTNESS_UP: { + BrightnessControlDelegate* delegate = + WmShell::Get()->brightness_control_delegate(); + if (delegate) + delegate->HandleBrightnessUp(accelerator); break; + } case DEBUG_ADD_REMOVE_DISPLAY: case DEBUG_SHOW_TOAST: case DEBUG_TOGGLE_TOUCH_PAD: @@ -1300,14 +1273,20 @@ case DISABLE_GPU_WATCHDOG: Shell::GetInstance()->gpu_support()->DisableGpuWatchdog(); break; - case KEYBOARD_BRIGHTNESS_DOWN: - HandleKeyboardBrightnessDown(keyboard_brightness_control_delegate_.get(), - accelerator); + case KEYBOARD_BRIGHTNESS_DOWN: { + KeyboardBrightnessControlDelegate* delegate = + WmShell::Get()->keyboard_brightness_control_delegate(); + if (delegate) + delegate->HandleKeyboardBrightnessDown(accelerator); break; - case KEYBOARD_BRIGHTNESS_UP: - HandleKeyboardBrightnessUp(keyboard_brightness_control_delegate_.get(), - accelerator); + } + case KEYBOARD_BRIGHTNESS_UP: { + KeyboardBrightnessControlDelegate* delegate = + WmShell::Get()->keyboard_brightness_control_delegate(); + if (delegate) + delegate->HandleKeyboardBrightnessUp(accelerator); break; + } case LOCK_PRESSED: case LOCK_RELEASED: Shell::GetInstance()->power_button_controller()->OnLockButtonEvent( @@ -1435,11 +1414,4 @@ return RESTRICTION_NONE; } -void AcceleratorController::SetKeyboardBrightnessControlDelegate( - std::unique_ptr<KeyboardBrightnessControlDelegate> - keyboard_brightness_control_delegate) { - keyboard_brightness_control_delegate_ = - std::move(keyboard_brightness_control_delegate); -} - } // namespace ash
diff --git a/ash/accelerators/accelerator_controller.h b/ash/accelerators/accelerator_controller.h index 2ed610d..d6cd74f 100644 --- a/ash/accelerators/accelerator_controller.h +++ b/ash/accelerators/accelerator_controller.h
@@ -27,10 +27,8 @@ namespace ash { struct AcceleratorData; -class BrightnessControlDelegate; class ExitWarningHandler; class ImeControlDelegate; -class KeyboardBrightnessControlDelegate; class ScreenshotDelegate; class VolumeControlDelegate; @@ -101,15 +99,10 @@ // Returns the restriction for the current context. AcceleratorProcessingRestriction GetCurrentAcceleratorRestriction(); - void SetBrightnessControlDelegate( - std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate); void SetImeControlDelegate( std::unique_ptr<ImeControlDelegate> ime_control_delegate); void SetScreenshotDelegate( std::unique_ptr<ScreenshotDelegate> screenshot_delegate); - BrightnessControlDelegate* brightness_control_delegate() const { - return brightness_control_delegate_.get(); - } ScreenshotDelegate* screenshot_delegate() { return screenshot_delegate_.get(); } @@ -166,21 +159,12 @@ AcceleratorProcessingRestriction GetAcceleratorProcessingRestriction( int action); - void SetKeyboardBrightnessControlDelegate( - std::unique_ptr<KeyboardBrightnessControlDelegate> - keyboard_brightness_control_delegate); - std::unique_ptr<ui::AcceleratorManager> accelerator_manager_; // A tracker for the current and previous accelerators. std::unique_ptr<ui::AcceleratorHistory> accelerator_history_; - // TODO(derat): BrightnessControlDelegate is also used by the system tray; - // move it outside of this class. - std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; std::unique_ptr<ImeControlDelegate> ime_control_delegate_; - std::unique_ptr<KeyboardBrightnessControlDelegate> - keyboard_brightness_control_delegate_; std::unique_ptr<ScreenshotDelegate> screenshot_delegate_; // Handles the exit accelerator which requires a double press to exit and
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index e9e5187..88bd52a5 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -8,8 +8,10 @@ #include "ash/aura/wm_window_aura.h" #include "ash/common/accessibility_delegate.h" #include "ash/common/accessibility_types.h" -#include "ash/common/ash_switches.h" +#include "ash/common/session/session_state_delegate.h" #include "ash/common/shell_window_ids.h" +#include "ash/common/system/brightness_control_delegate.h" +#include "ash/common/system/keyboard_brightness_control_delegate.h" #include "ash/common/system/tray/system_tray_delegate.h" #include "ash/common/system/volume_control_delegate.h" #include "ash/common/wm/panels/panel_layout_manager.h" @@ -19,21 +21,16 @@ #include "ash/common/wm_shell.h" #include "ash/display/display_manager.h" #include "ash/ime_control_delegate.h" -#include "ash/screen_util.h" #include "ash/shell.h" -#include "ash/system/brightness_control_delegate.h" -#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" #include "ash/test/ash_test_base.h" #include "ash/test/display_manager_test_api.h" #include "ash/test/test_screenshot_delegate.h" #include "ash/test/test_session_state_animator.h" #include "ash/test/test_shelf_delegate.h" -#include "ash/test/test_shell_delegate.h" #include "ash/test/test_volume_control_delegate.h" #include "ash/wm/lock_state_controller.h" #include "ash/wm/window_state_aura.h" #include "ash/wm/window_util.h" -#include "base/command_line.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/test/test_window_delegate.h" #include "ui/aura/test/test_windows.h" @@ -266,6 +263,16 @@ return window; } + void SetBrightnessControlDelegate( + std::unique_ptr<BrightnessControlDelegate> delegate) { + WmShell::Get()->brightness_control_delegate_ = std::move(delegate); + } + + void SetKeyboardBrightnessControlDelegate( + std::unique_ptr<KeyboardBrightnessControlDelegate> delegate) { + WmShell::Get()->keyboard_brightness_control_delegate_ = std::move(delegate); + } + private: DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest); }; @@ -859,7 +866,7 @@ { DummyBrightnessControlDelegate* delegate = new DummyBrightnessControlDelegate; - GetController()->SetBrightnessControlDelegate( + SetBrightnessControlDelegate( std::unique_ptr<BrightnessControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_brightness_down_count()); EXPECT_TRUE(ProcessInController(brightness_down)); @@ -881,7 +888,7 @@ EXPECT_TRUE(ProcessInController(alt_brightness_up)); DummyKeyboardBrightnessControlDelegate* delegate = new DummyKeyboardBrightnessControlDelegate; - GetController()->SetKeyboardBrightnessControlDelegate( + SetKeyboardBrightnessControlDelegate( std::unique_ptr<KeyboardBrightnessControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_keyboard_brightness_down_count()); EXPECT_TRUE(ProcessInController(alt_brightness_down)); @@ -1237,7 +1244,7 @@ { DummyBrightnessControlDelegate* delegate = new DummyBrightnessControlDelegate; - GetController()->SetBrightnessControlDelegate( + SetBrightnessControlDelegate( std::unique_ptr<BrightnessControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_brightness_down_count()); EXPECT_TRUE(ProcessInController(brightness_down));
diff --git a/ash/accelerators/accelerator_delegate.cc b/ash/accelerators/accelerator_delegate.cc index 33dd036f..e7a38e6 100644 --- a/ash/accelerators/accelerator_delegate.cc +++ b/ash/accelerators/accelerator_delegate.cc
@@ -13,7 +13,6 @@ #include "ui/wm/core/window_util.h" namespace ash { -namespace {} // namespace AcceleratorDelegate::AcceleratorDelegate() {} AcceleratorDelegate::~AcceleratorDelegate() {}
diff --git a/ash/ash.gyp b/ash/ash.gyp index d2dce7d..1cb74aaf8 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp
@@ -114,6 +114,7 @@ 'common/system/audio/tray_audio_delegate.h', 'common/system/audio/volume_view.cc', 'common/system/audio/volume_view.h', + 'common/system/brightness_control_delegate.h', 'common/system/cast/tray_cast.cc', 'common/system/cast/tray_cast.h', 'common/system/chromeos/audio/audio_detailed_view.cc', @@ -127,11 +128,17 @@ 'common/system/chromeos/bluetooth/bluetooth_observer.h', 'common/system/chromeos/bluetooth/tray_bluetooth.cc', 'common/system/chromeos/bluetooth/tray_bluetooth.h', + 'common/system/chromeos/brightness/brightness_controller_chromeos.cc', + 'common/system/chromeos/brightness/brightness_controller_chromeos.h', + 'common/system/chromeos/brightness/tray_brightness.cc', + 'common/system/chromeos/brightness/tray_brightness.h', 'common/system/chromeos/devicetype_utils.cc', 'common/system/chromeos/devicetype_utils.h', 'common/system/chromeos/enterprise/enterprise_domain_observer.h', 'common/system/chromeos/enterprise/tray_enterprise.cc', 'common/system/chromeos/enterprise/tray_enterprise.h', + 'common/system/chromeos/keyboard_brightness_controller.cc', + 'common/system/chromeos/keyboard_brightness_controller.h', 'common/system/chromeos/media_security/media_capture_observer.h', 'common/system/chromeos/network/network_detailed_view.h', 'common/system/chromeos/network/network_observer.h', @@ -204,6 +211,7 @@ 'common/system/ime/ime_observer.h', 'common/system/ime/tray_ime_chromeos.cc', 'common/system/ime/tray_ime_chromeos.h', + 'common/system/keyboard_brightness_control_delegate.h', 'common/system/locale/locale_notification_controller.cc', 'common/system/locale/locale_notification_controller.h', 'common/system/locale/locale_observer.h', @@ -612,13 +620,6 @@ 'sticky_keys/sticky_keys_overlay.cc', 'sticky_keys/sticky_keys_overlay.h', 'sticky_keys/sticky_keys_state.h', - 'system/brightness_control_delegate.h', - 'system/chromeos/brightness/brightness_controller_chromeos.cc', - 'system/chromeos/brightness/brightness_controller_chromeos.h', - 'system/chromeos/brightness/tray_brightness.cc', - 'system/chromeos/brightness/tray_brightness.h', - 'system/chromeos/keyboard_brightness_controller.cc', - 'system/chromeos/keyboard_brightness_controller.h', 'system/chromeos/media_security/multi_profile_media_tray_item.cc', 'system/chromeos/media_security/multi_profile_media_tray_item.h', 'system/chromeos/multi_user/user_switch_util.cc', @@ -631,7 +632,6 @@ 'system/chromeos/rotation/tray_rotation_lock.h', 'system/chromeos/tray_display.cc', 'system/chromeos/tray_display.h', - 'system/keyboard_brightness/keyboard_brightness_control_delegate.h', 'system/status_area_widget.cc', 'system/status_area_widget.h', 'system/toast/toast_data.cc', @@ -899,6 +899,7 @@ 'common/material_design/material_design_controller_unittest.cc', 'common/popup_message_unittest.cc', 'common/shelf/shelf_model_unittest.cc', + 'common/system/chromeos/brightness/tray_brightness_unittest.cc', 'common/system/chromeos/power/power_status_unittest.cc', 'common/system/chromeos/power/power_status_view_unittest.cc', 'common/system/chromeos/power/tray_power_unittest.cc', @@ -963,7 +964,6 @@ 'shell_unittest.cc', 'sticky_keys/sticky_keys_overlay_unittest.cc', 'sticky_keys/sticky_keys_unittest.cc', - 'system/chromeos/brightness/tray_brightness_unittest.cc', 'system/chromeos/media_security/multi_profile_media_tray_item_unittest.cc', 'system/chromeos/multi_user/user_switch_util_unittest.cc', 'system/chromeos/power/power_event_observer_unittest.cc',
diff --git a/ash/common/metrics/OWNERS b/ash/common/metrics/OWNERS new file mode 100644 index 0000000..21cb7090 --- /dev/null +++ b/ash/common/metrics/OWNERS
@@ -0,0 +1 @@ +tdanderson@chromium.org
diff --git a/ash/common/metrics/user_metrics_action.h b/ash/common/metrics/user_metrics_action.h index b538710..ecc687e 100644 --- a/ash/common/metrics/user_metrics_action.h +++ b/ash/common/metrics/user_metrics_action.h
@@ -66,6 +66,7 @@ UMA_STATUS_AREA_DETAILED_CAST_VIEW_LAUNCH_CAST, UMA_STATUS_AREA_DETAILED_DRIVE_VIEW, UMA_STATUS_AREA_DETAILED_NETWORK_VIEW, + UMA_STATUS_AREA_DETAILED_SMS_VIEW, UMA_STATUS_AREA_DETAILED_VPN_VIEW, UMA_STATUS_AREA_DISABLE_AUTO_CLICK, UMA_STATUS_AREA_DISABLE_HIGH_CONTRAST, @@ -88,9 +89,14 @@ UMA_STATUS_AREA_MENU_OPENED, UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED, UMA_STATUS_AREA_NETWORK_SETTINGS_CLICKED, + UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED, + UMA_STATUS_AREA_SCREEN_CAPTURE_DEFAULT_STOP, + UMA_STATUS_AREA_SCREEN_CAPTURE_NOTIFICATION_STOP, UMA_STATUS_AREA_SHOW_NETWORK_CONNECTION_DETAILS, UMA_STATUS_AREA_SHOW_VPN_CONNECTION_DETAILS, UMA_STATUS_AREA_SIGN_OUT, + UMA_STATUS_AREA_SMS_DETAILED_DISMISS_MSG, + UMA_STATUS_AREA_SMS_NOTIFICATION_DISMISS_MSG, UMA_STATUS_AREA_VPN_ADD_BUILT_IN_CLICKED, UMA_STATUS_AREA_VPN_ADD_THIRD_PARTY_CLICKED, UMA_STATUS_AREA_VPN_DISCONNECT_CLICKED, @@ -126,6 +132,12 @@ // Selecting a window in overview mode by pressing the enter key. UMA_WINDOW_OVERVIEW_ENTER_KEY, + + // Closing a window in overview mode by clicking the 'X' button. + UMA_WINDOW_OVERVIEW_CLOSE_BUTTON, + + // Closing a window in overview mode by pressing Ctrl+w shortcut. + UMA_WINDOW_OVERVIEW_CLOSE_KEY, }; } // namespace ash
diff --git a/ash/common/shell_delegate.h b/ash/common/shell_delegate.h index bf4d000..11ffaf3 100644 --- a/ash/common/shell_delegate.h +++ b/ash/common/shell_delegate.h
@@ -51,15 +51,6 @@ class WmShelf; class WmWindow; -class ASH_EXPORT VirtualKeyboardStateObserver { - public: - // Called when keyboard is activated/deactivated. - virtual void OnVirtualKeyboardStateChanged(bool activated) {} - - protected: - virtual ~VirtualKeyboardStateObserver() {} -}; - // Delegate of the Shell. class ASH_EXPORT ShellDelegate { public: @@ -104,15 +95,6 @@ // Create a shell-specific keyboard::KeyboardUI virtual keyboard::KeyboardUI* CreateKeyboardUI() = 0; - // Called when virtual keyboard has been activated/deactivated. - virtual void VirtualKeyboardActivated(bool activated) = 0; - - // Adds or removes virtual keyboard state observer. - virtual void AddVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) = 0; - virtual void RemoveVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) = 0; - // Opens the |url| in a new browser tab. virtual void OpenUrl(const GURL& url) = 0;
diff --git a/ash/common/shell_observer.h b/ash/common/shell_observer.h index cec8926..5ab9196 100644 --- a/ash/common/shell_observer.h +++ b/ash/common/shell_observer.h
@@ -67,6 +67,9 @@ // animating but have been restored. virtual void OnMaximizeModeEnded() {} + // Called when keyboard is activated/deactivated. + virtual void OnVirtualKeyboardStateChanged(bool activated) {} + // Called at the end of Shell::Init. virtual void OnShellInitialized() {}
diff --git a/ash/system/brightness_control_delegate.h b/ash/common/system/brightness_control_delegate.h similarity index 86% rename from ash/system/brightness_control_delegate.h rename to ash/common/system/brightness_control_delegate.h index 153cc92..d85ce419 100644 --- a/ash/system/brightness_control_delegate.h +++ b/ash/common/system/brightness_control_delegate.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 ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_ -#define ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_ +#ifndef ASH_COMMON_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_ +#define ASH_COMMON_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_ #include "base/callback.h" @@ -36,4 +36,4 @@ } // namespace ash -#endif // ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_ +#endif // ASH_COMMON_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_
diff --git a/ash/system/chromeos/brightness/brightness_controller_chromeos.cc b/ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc similarity index 94% rename from ash/system/chromeos/brightness/brightness_controller_chromeos.cc rename to ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc index c9172498..9ee4f779 100644 --- a/ash/system/chromeos/brightness/brightness_controller_chromeos.cc +++ b/ash/common/system/chromeos/brightness/brightness_controller_chromeos.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 "ash/system/chromeos/brightness/brightness_controller_chromeos.h" +#include "ash/common/system/chromeos/brightness/brightness_controller_chromeos.h" #include "base/metrics/user_metrics.h" #include "chromeos/dbus/dbus_thread_manager.h"
diff --git a/ash/system/chromeos/brightness/brightness_controller_chromeos.h b/ash/common/system/chromeos/brightness/brightness_controller_chromeos.h similarity index 77% rename from ash/system/chromeos/brightness/brightness_controller_chromeos.h rename to ash/common/system/chromeos/brightness/brightness_controller_chromeos.h index 663989a..b9338320 100644 --- a/ash/system/chromeos/brightness/brightness_controller_chromeos.h +++ b/ash/common/system/chromeos/brightness/brightness_controller_chromeos.h
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_ -#define ASH_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_ +#ifndef ASH_COMMON_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_ +#define ASH_COMMON_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_ #include "ash/ash_export.h" -#include "ash/system/brightness_control_delegate.h" +#include "ash/common/system/brightness_control_delegate.h" #include "base/compiler_specific.h" #include "base/macros.h" @@ -35,4 +35,4 @@ } // namespace system } // namespace ash -#endif // ASH_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_ +#endif // ASH_COMMON_SYSTEM_CHROMEOS_BRIGHTNESS_BRIGHTNESS_CONTROLLER_CHROMEOS_H_
diff --git a/ash/system/chromeos/brightness/tray_brightness.cc b/ash/common/system/chromeos/brightness/tray_brightness.cc similarity index 92% rename from ash/system/chromeos/brightness/tray_brightness.cc rename to ash/common/system/chromeos/brightness/tray_brightness.cc index f2358dac..8703cb2 100644 --- a/ash/system/chromeos/brightness/tray_brightness.cc +++ b/ash/common/system/chromeos/brightness/tray_brightness.cc
@@ -2,20 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/system/chromeos/brightness/tray_brightness.h" +#include "ash/common/system/chromeos/brightness/tray_brightness.h" #include <algorithm> -#include "ash/accelerators/accelerator_controller.h" #include "ash/common/ash_constants.h" #include "ash/common/shell_observer.h" +#include "ash/common/system/brightness_control_delegate.h" #include "ash/common/system/tray/fixed_sized_image_view.h" #include "ash/common/system/tray/system_tray_delegate.h" #include "ash/common/system/tray/tray_constants.h" #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" #include "ash/common/wm_shell.h" -#include "ash/shell.h" -#include "ash/system/brightness_control_delegate.h" #include "base/bind.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" @@ -151,10 +149,11 @@ DCHECK_EQ(sender, slider_); if (reason != views::VALUE_CHANGED_BY_USER) return; - AcceleratorController* ac = Shell::GetInstance()->accelerator_controller(); - if (ac->brightness_control_delegate()) { + BrightnessControlDelegate* brightness_control_delegate = + WmShell::Get()->brightness_control_delegate(); + if (brightness_control_delegate) { double percent = std::max(value * 100.0, kMinBrightnessPercent); - ac->brightness_control_delegate()->SetBrightnessPercent(percent, true); + brightness_control_delegate->SetBrightnessPercent(percent, true); } } @@ -192,13 +191,12 @@ } void TrayBrightness::GetInitialBrightness() { - BrightnessControlDelegate* delegate = Shell::GetInstance() - ->accelerator_controller() - ->brightness_control_delegate(); + BrightnessControlDelegate* brightness_control_delegate = + WmShell::Get()->brightness_control_delegate(); // Worrisome, but happens in unit tests, so don't log anything. - if (!delegate) + if (!brightness_control_delegate) return; - delegate->GetBrightnessPercent( + brightness_control_delegate->GetBrightnessPercent( base::Bind(&TrayBrightness::HandleInitialBrightness, weak_ptr_factory_.GetWeakPtr())); }
diff --git a/ash/system/chromeos/brightness/tray_brightness.h b/ash/common/system/chromeos/brightness/tray_brightness.h similarity index 90% rename from ash/system/chromeos/brightness/tray_brightness.h rename to ash/common/system/chromeos/brightness/tray_brightness.h index 0f8b0ca..1a20f3e 100644 --- a/ash/system/chromeos/brightness/tray_brightness.h +++ b/ash/common/system/chromeos/brightness/tray_brightness.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 ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ -#define ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ +#ifndef ASH_COMMON_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ +#define ASH_COMMON_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ #include "ash/common/system/tray/system_tray_item.h" #include "base/macros.h" @@ -66,4 +66,4 @@ } // namespace ash -#endif // ASH_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_ +#endif // ASH_COMMON_SYSTEM_CHROMEOS_BRIGHTNESS_TRAY_BRIGHTNESS_H_
diff --git a/ash/system/chromeos/brightness/tray_brightness_unittest.cc b/ash/common/system/chromeos/brightness/tray_brightness_unittest.cc similarity index 97% rename from ash/system/chromeos/brightness/tray_brightness_unittest.cc rename to ash/common/system/chromeos/brightness/tray_brightness_unittest.cc index 6156e03..b09293b9 100644 --- a/ash/system/chromeos/brightness/tray_brightness_unittest.cc +++ b/ash/common/system/chromeos/brightness/tray_brightness_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 "ash/system/chromeos/brightness/tray_brightness.h" +#include "ash/common/system/chromeos/brightness/tray_brightness.h" #include <memory> @@ -10,7 +10,6 @@ #include "ash/common/system/tray/system_tray_item.h" #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" #include "ash/common/wm_shell.h" -#include "ash/shell.h" #include "ash/test/ash_test_base.h" #include "ash/test/status_area_widget_test_helper.h" #include "ui/views/view.h"
diff --git a/ash/system/chromeos/keyboard_brightness_controller.cc b/ash/common/system/chromeos/keyboard_brightness_controller.cc similarity index 93% rename from ash/system/chromeos/keyboard_brightness_controller.cc rename to ash/common/system/chromeos/keyboard_brightness_controller.cc index a5f7fd9..0d2cc1f 100644 --- a/ash/system/chromeos/keyboard_brightness_controller.cc +++ b/ash/common/system/chromeos/keyboard_brightness_controller.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 "ash/system/chromeos/keyboard_brightness_controller.h" +#include "ash/common/system/chromeos/keyboard_brightness_controller.h" #include "ash/common/wm_shell.h" #include "chromeos/dbus/dbus_thread_manager.h"
diff --git a/ash/system/chromeos/keyboard_brightness_controller.h b/ash/common/system/chromeos/keyboard_brightness_controller.h similarity index 76% rename from ash/system/chromeos/keyboard_brightness_controller.h rename to ash/common/system/chromeos/keyboard_brightness_controller.h index 38130f9..a305aab6 100644 --- a/ash/system/chromeos/keyboard_brightness_controller.h +++ b/ash/common/system/chromeos/keyboard_brightness_controller.h
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_ -#define ASH_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_ +#ifndef ASH_COMMON_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_ +#define ASH_COMMON_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_ #include "ash/ash_export.h" -#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" +#include "ash/common/system/keyboard_brightness_control_delegate.h" #include "base/compiler_specific.h" #include "base/macros.h" @@ -31,4 +31,4 @@ } // namespace ash -#endif // ASH_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_ +#endif // ASH_COMMON_SYSTEM_CHROMEOS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_
diff --git a/ash/common/system/chromeos/network/tray_sms.cc b/ash/common/system/chromeos/network/tray_sms.cc index 45781d3..ddbafaa 100644 --- a/ash/common/system/chromeos/network/tray_sms.cc +++ b/ash/common/system/chromeos/network/tray_sms.cc
@@ -5,6 +5,7 @@ #include "ash/common/system/chromeos/network/tray_sms.h" #include "ash/common/material_design/material_design_controller.h" +#include "ash/common/metrics/user_metrics_action.h" #include "ash/common/system/tray/fixed_sized_scroll_view.h" #include "ash/common/system/tray/system_tray_bubble.h" #include "ash/common/system/tray/tray_constants.h" @@ -13,6 +14,7 @@ #include "ash/common/system/tray/tray_item_view.h" #include "ash/common/system/tray/tray_notification_view.h" #include "ash/common/system/tray/view_click_listener.h" +#include "ash/common/wm_shell.h" #include "ash/system/tray/system_tray.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" @@ -123,7 +125,10 @@ // Overridden from ButtonListener. void ButtonPressed(views::Button* sender, const ui::Event& event) override { - owner_->RemoveMessage(index_); + if (owner_->RemoveMessage(index_)) { + WmShell::Get()->RecordUserMetricsAction( + UMA_STATUS_AREA_SMS_DETAILED_DISMISS_MSG); + } owner_->Update(false); } @@ -221,7 +226,7 @@ static_cast<TraySms*>(owner())->messages(); scroll_content()->RemoveAllChildViews(true); for (size_t index = 0; index < messages.GetSize(); ++index) { - const base::DictionaryValue* message = NULL; + const base::DictionaryValue* message = nullptr; if (!messages.GetDictionary(index, &message)) { LOG(ERROR) << "SMS message not a dictionary at: " << index; continue; @@ -271,7 +276,12 @@ } // Overridden from TrayNotificationView: - void OnClose() override { tray_sms()->RemoveMessage(message_index_); } + void OnClose() override { + if (tray_sms()->RemoveMessage(message_index_)) { + WmShell::Get()->RecordUserMetricsAction( + UMA_STATUS_AREA_SMS_NOTIFICATION_DISMISS_MSG); + } + } void OnClickAction() override { owner()->PopupDetailedView(0, true); } @@ -285,9 +295,9 @@ TraySms::TraySms(SystemTray* system_tray) : SystemTrayItem(system_tray), - default_(NULL), - detailed_(NULL), - notification_(NULL) { + default_(nullptr), + detailed_(nullptr), + notification_(nullptr) { // TODO(armansito): SMS could be a special case for cellular that requires a // user (perhaps the owner) to be logged in. If that is the case, then an // additional check should be done before subscribing for SMS notifications. @@ -303,25 +313,26 @@ } views::View* TraySms::CreateDefaultView(LoginStatus status) { - CHECK(default_ == NULL); + CHECK(default_ == nullptr); default_ = new SmsDefaultView(this); default_->SetVisible(!messages_.empty()); return default_; } views::View* TraySms::CreateDetailedView(LoginStatus status) { - CHECK(detailed_ == NULL); + CHECK(detailed_ == nullptr); HideNotificationView(); if (messages_.empty()) - return NULL; + return nullptr; detailed_ = new SmsDetailedView(this); + WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_DETAILED_SMS_VIEW); return detailed_; } views::View* TraySms::CreateNotificationView(LoginStatus status) { - CHECK(notification_ == NULL); + CHECK(notification_ == nullptr); if (detailed_) - return NULL; + return nullptr; size_t index; std::string number, text; if (GetLatestMessage(&index, &number, &text)) @@ -330,15 +341,15 @@ } void TraySms::DestroyDefaultView() { - default_ = NULL; + default_ = nullptr; } void TraySms::DestroyDetailedView() { - detailed_ = NULL; + detailed_ = nullptr; } void TraySms::DestroyNotificationView() { - notification_ = NULL; + notification_ = nullptr; } void TraySms::MessageReceived(const base::DictionaryValue& message) { @@ -388,9 +399,11 @@ return true; } -void TraySms::RemoveMessage(size_t index) { - if (index < messages_.GetSize()) - messages_.Remove(index, NULL); +bool TraySms::RemoveMessage(size_t index) { + if (index >= messages_.GetSize()) + return false; + messages_.Remove(index, nullptr); + return true; } void TraySms::Update(bool notify) {
diff --git a/ash/common/system/chromeos/network/tray_sms.h b/ash/common/system/chromeos/network/tray_sms.h index c8209a0..4ad9322b 100644 --- a/ash/common/system/chromeos/network/tray_sms.h +++ b/ash/common/system/chromeos/network/tray_sms.h
@@ -43,8 +43,9 @@ // retrieve the numebr and text from the message. bool GetLatestMessage(size_t* index, std::string* number, std::string* text); - // Removes message at |index| from message list. - void RemoveMessage(size_t index); + // Removes message at |index| from message list. Returns true if |index| was + // valid and a message was removed. + bool RemoveMessage(size_t index); // Called when sms messages have changed (through // chromeos::NetworkSmsHandler::Observer).
diff --git a/ash/common/system/chromeos/screen_security/screen_capture_tray_item.cc b/ash/common/system/chromeos/screen_security/screen_capture_tray_item.cc index a77114ac..a6ab6ab 100644 --- a/ash/common/system/chromeos/screen_security/screen_capture_tray_item.cc +++ b/ash/common/system/chromeos/screen_security/screen_capture_tray_item.cc
@@ -6,6 +6,7 @@ #include <utility> +#include "ash/common/metrics/user_metrics_action.h" #include "ash/common/system/system_notifier.h" #include "ash/common/system/tray/system_tray_notifier.h" #include "ash/common/wm_shell.h" @@ -70,6 +71,16 @@ return kScreenCaptureNotificationId; } +void ScreenCaptureTrayItem::RecordStoppedFromDefaultViewMetric() { + WmShell::Get()->RecordUserMetricsAction( + UMA_STATUS_AREA_SCREEN_CAPTURE_DEFAULT_STOP); +} + +void ScreenCaptureTrayItem::RecordStoppedFromNotificationViewMetric() { + WmShell::Get()->RecordUserMetricsAction( + UMA_STATUS_AREA_SCREEN_CAPTURE_NOTIFICATION_STOP); +} + void ScreenCaptureTrayItem::OnScreenCaptureStart( const base::Closure& stop_callback, const base::string16& screen_capture_status) {
diff --git a/ash/common/system/chromeos/screen_security/screen_capture_tray_item.h b/ash/common/system/chromeos/screen_security/screen_capture_tray_item.h index c709c20..0c58b39 100644 --- a/ash/common/system/chromeos/screen_security/screen_capture_tray_item.h +++ b/ash/common/system/chromeos/screen_security/screen_capture_tray_item.h
@@ -31,6 +31,8 @@ // Overridden from ScreenTrayItem. void CreateOrUpdateNotification() override; std::string GetNotificationId() override; + void RecordStoppedFromDefaultViewMetric() override; + void RecordStoppedFromNotificationViewMetric() override; // Overridden from ScreenCaptureObserver. void OnScreenCaptureStart(
diff --git a/ash/common/system/chromeos/screen_security/screen_share_tray_item.cc b/ash/common/system/chromeos/screen_security/screen_share_tray_item.cc index ccd2364..a868f23 100644 --- a/ash/common/system/chromeos/screen_security/screen_share_tray_item.cc +++ b/ash/common/system/chromeos/screen_security/screen_share_tray_item.cc
@@ -77,6 +77,14 @@ return kScreenShareNotificationId; } +void ScreenShareTrayItem::RecordStoppedFromDefaultViewMetric() { + // Intentionally not recording a metric. +} + +void ScreenShareTrayItem::RecordStoppedFromNotificationViewMetric() { + // Intentionally not recording a metric. +} + void ScreenShareTrayItem::OnScreenShareStart( const base::Closure& stop_callback, const base::string16& helper_name) {
diff --git a/ash/common/system/chromeos/screen_security/screen_share_tray_item.h b/ash/common/system/chromeos/screen_security/screen_share_tray_item.h index 2098d40..1de7ff68 100644 --- a/ash/common/system/chromeos/screen_security/screen_share_tray_item.h +++ b/ash/common/system/chromeos/screen_security/screen_share_tray_item.h
@@ -29,6 +29,8 @@ // Overridden from ScreenTrayItem. void CreateOrUpdateNotification() override; std::string GetNotificationId() override; + void RecordStoppedFromDefaultViewMetric() override; + void RecordStoppedFromNotificationViewMetric() override; // Overridden from ScreenShareObserver. void OnScreenShareStart(const base::Closure& stop_callback,
diff --git a/ash/common/system/chromeos/screen_security/screen_tray_item.cc b/ash/common/system/chromeos/screen_security/screen_tray_item.cc index d04f10a..0940bcf 100644 --- a/ash/common/system/chromeos/screen_security/screen_tray_item.cc +++ b/ash/common/system/chromeos/screen_security/screen_tray_item.cc
@@ -77,6 +77,7 @@ const ui::Event& event) { DCHECK(sender == stop_button_); screen_tray_item_->Stop(); + screen_tray_item_->RecordStoppedFromDefaultViewMetric(); } void ScreenStatusView::CreateItems() { @@ -113,6 +114,7 @@ void ScreenNotificationDelegate::ButtonClick(int button_index) { DCHECK_EQ(0, button_index); screen_tray_->Stop(); + screen_tray_->RecordStoppedFromNotificationViewMetric(); } } // namespace tray @@ -167,6 +169,10 @@ callback.Run(); } +void ScreenTrayItem::RecordStoppedFromDefaultViewMetric() {} + +void ScreenTrayItem::RecordStoppedFromNotificationViewMetric() {} + void ScreenTrayItem::DestroyTrayView() { tray_view_ = NULL; }
diff --git a/ash/common/system/chromeos/screen_security/screen_tray_item.h b/ash/common/system/chromeos/screen_security/screen_tray_item.h index b670afb..817e65af 100644 --- a/ash/common/system/chromeos/screen_security/screen_tray_item.h +++ b/ash/common/system/chromeos/screen_security/screen_tray_item.h
@@ -117,6 +117,12 @@ // Returns the id of the notification for the tray item. virtual std::string GetNotificationId() = 0; + // Called after Stop() is invoked from the default view. + virtual void RecordStoppedFromDefaultViewMetric() = 0; + + // Called after Stop() is invoked from the notification view. + virtual void RecordStoppedFromNotificationViewMetric() = 0; + // Overridden from SystemTrayItem. views::View* CreateTrayView(LoginStatus status) override = 0; views::View* CreateDefaultView(LoginStatus status) override = 0;
diff --git a/ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h b/ash/common/system/keyboard_brightness_control_delegate.h similarity index 74% rename from ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h rename to ash/common/system/keyboard_brightness_control_delegate.h index 90bb285..98c00676 100644 --- a/ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h +++ b/ash/common/system/keyboard_brightness_control_delegate.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 ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_ -#define ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_ +#ifndef ASH_COMMON_SYSTEM_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_ +#define ASH_COMMON_SYSTEM_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_ namespace ui { class Accelerator; @@ -26,4 +26,4 @@ } // namespace ash -#endif // ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_ +#endif // ASH_COMMON_SYSTEM_KEYBOARD_BRIGHTNESS_CONTROL_DELEGATE_H_
diff --git a/ash/common/system/update/tray_update.cc b/ash/common/system/update/tray_update.cc index e72bd80..5da745c3 100644 --- a/ash/common/system/update/tray_update.cc +++ b/ash/common/system/update/tray_update.cc
@@ -4,6 +4,7 @@ #include "ash/common/system/update/tray_update.h" +#include "ash/common/metrics/user_metrics_action.h" #include "ash/common/system/tray/fixed_sized_image_view.h" #include "ash/common/system/tray/system_tray_delegate.h" #include "ash/common/system/tray/system_tray_notifier.h" @@ -74,6 +75,8 @@ // Overridden from ActionableView. bool PerformAction(const ui::Event& event) override { WmShell::Get()->system_tray_delegate()->RequestRestartForUpdate(); + WmShell::Get()->RecordUserMetricsAction( + UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED); return true; }
diff --git a/ash/common/wm/overview/window_selector.cc b/ash/common/wm/overview/window_selector.cc index 03ed6fd..3263411 100644 --- a/ash/common/wm/overview/window_selector.cc +++ b/ash/common/wm/overview/window_selector.cc
@@ -499,13 +499,25 @@ break; case ui::VKEY_RIGHT: case ui::VKEY_TAB: - num_key_presses_++; - Move(WindowSelector::RIGHT, true); - break; + if (key_event.key_code() == ui::VKEY_RIGHT || + !(key_event.flags() & ui::EF_SHIFT_DOWN)) { + num_key_presses_++; + Move(WindowSelector::RIGHT, true); + break; + } case ui::VKEY_LEFT: num_key_presses_++; Move(WindowSelector::LEFT, true); break; + case ui::VKEY_W: + if (!(key_event.flags() & ui::EF_CONTROL_DOWN) || + !grid_list_[selected_grid_index_]->is_selecting()) { + // Allow the textfield to handle 'W' key when not used with Ctrl. + return false; + } + WmShell::Get()->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW_CLOSE_KEY); + grid_list_[selected_grid_index_]->SelectedWindow()->CloseWindow(); + break; case ui::VKEY_RETURN: // Ignore if no item is selected. if (!grid_list_[selected_grid_index_]->is_selecting())
diff --git a/ash/common/wm/overview/window_selector_item.cc b/ash/common/wm/overview/window_selector_item.cc index f836c767..ffa9104 100644 --- a/ash/common/wm/overview/window_selector_item.cc +++ b/ash/common/wm/overview/window_selector_item.cc
@@ -8,6 +8,7 @@ #include <vector> #include "ash/common/material_design/material_design_controller.h" +#include "ash/common/metrics/user_metrics_action.h" #include "ash/common/shell_window_ids.h" #include "ash/common/wm/overview/overview_animation_type.h" #include "ash/common/wm/overview/scoped_overview_animation_settings.h" @@ -18,6 +19,7 @@ #include "ash/common/wm/window_state.h" #include "ash/common/wm_lookup.h" #include "ash/common/wm_root_window_controller.h" +#include "ash/common/wm_shell.h" #include "ash/common/wm_window.h" #include "ash/common/wm_window_property.h" #include "base/auto_reset.h" @@ -390,6 +392,26 @@ true); } +void WindowSelectorItem::CloseWindow() { + if (ash::MaterialDesignController::IsOverviewMaterial()) { + gfx::Rect inset_bounds(target_bounds_); + inset_bounds.Inset(target_bounds_.width() * kPreCloseScale, + target_bounds_.height() * kPreCloseScale); + OverviewAnimationType animation_type = + OverviewAnimationType::OVERVIEW_ANIMATION_CLOSING_SELECTOR_ITEM; + // Scale down both the window and label. + SetBounds(inset_bounds, animation_type); + // First animate opacity to an intermediate value concurrently with the + // scaling animation. + AnimateOpacity(kClosingItemOpacity, animation_type); + + // Fade out the window and the label, effectively hiding them. + AnimateOpacity( + 0.0, OverviewAnimationType::OVERVIEW_ANIMATION_CLOSE_SELECTOR_ITEM); + } + transform_window_.Close(); +} + void WindowSelectorItem::SetDimmed(bool dimmed) { dimmed_ = dimmed; SetOpacity(dimmed ? kDimmedItemOpacity : 1.0f); @@ -398,24 +420,8 @@ void WindowSelectorItem::ButtonPressed(views::Button* sender, const ui::Event& event) { if (sender == close_button_) { - if (ash::MaterialDesignController::IsOverviewMaterial()) { - gfx::Rect inset_bounds(target_bounds_); - inset_bounds.Inset(target_bounds_.width() * kPreCloseScale, - target_bounds_.height() * kPreCloseScale); - OverviewAnimationType animation_type = - OverviewAnimationType::OVERVIEW_ANIMATION_CLOSING_SELECTOR_ITEM; - // Scale down both the window and label. - SetBounds(inset_bounds, animation_type); - // First animate opacity to an intermediate value concurrently with the - // scaling animation. - AnimateOpacity(kClosingItemOpacity, animation_type); - - // Fade out the window and the label, effectively hiding them. - AnimateOpacity( - 0.0, OverviewAnimationType::OVERVIEW_ANIMATION_CLOSE_SELECTOR_ITEM); - } - window_selector_->WindowClosing(this); - transform_window_.Close(); + WmShell::Get()->RecordUserMetricsAction(UMA_WINDOW_OVERVIEW_CLOSE_BUTTON); + CloseWindow(); return; } CHECK(sender == window_label_button_view_);
diff --git a/ash/common/wm/overview/window_selector_item.h b/ash/common/wm/overview/window_selector_item.h index 38d7f8a..ec503d28 100644 --- a/ash/common/wm/overview/window_selector_item.h +++ b/ash/common/wm/overview/window_selector_item.h
@@ -101,6 +101,9 @@ // enabled. void SendAccessibleSelectionEvent(); + // Closes |transform_window_|. + void CloseWindow(); + // Sets if the item is dimmed in the overview. Changing the value will also // change the visibility of the transform windows. void SetDimmed(bool dimmed);
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc index 8561358..45a8983 100644 --- a/ash/common/wm_shell.cc +++ b/ash/common/wm_shell.cc
@@ -8,7 +8,8 @@ #include "ash/common/keyboard/keyboard_ui.h" #include "ash/common/shell_delegate.h" #include "ash/common/shell_window_ids.h" -#include "ash/common/system/chromeos/session/logout_confirmation_controller.h" +#include "ash/common/system/brightness_control_delegate.h" +#include "ash/common/system/keyboard_brightness_control_delegate.h" #include "ash/common/system/tray/system_tray_delegate.h" #include "ash/common/system/tray/system_tray_notifier.h" #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" @@ -18,6 +19,12 @@ #include "base/bind.h" #include "base/logging.h" +#if defined(OS_CHROMEOS) +#include "ash/common/system/chromeos/brightness/brightness_controller_chromeos.h" +#include "ash/common/system/chromeos/keyboard_brightness_controller.h" +#include "ash/common/system/chromeos/session/logout_confirmation_controller.h" +#endif + namespace ash { // static @@ -46,6 +53,11 @@ OnPinnedStateChanged(pinned_window)); } +void WmShell::OnVirtualKeyboardActivated(bool activated) { + FOR_EACH_OBSERVER(ShellObserver, shell_observers_, + OnVirtualKeyboardStateChanged(activated)); +} + void WmShell::AddShellObserver(ShellObserver* observer) { shell_observers_.AddObserver(observer); } @@ -58,7 +70,12 @@ : delegate_(delegate), focus_cycler_(new FocusCycler), system_tray_notifier_(new SystemTrayNotifier), - window_selector_controller_(new WindowSelectorController()) {} + window_selector_controller_(new WindowSelectorController) { +#if defined(OS_CHROMEOS) + brightness_control_delegate_.reset(new system::BrightnessControllerChromeos); + keyboard_brightness_control_delegate_.reset(new KeyboardBrightnessController); +#endif +} WmShell::~WmShell() {}
diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h index aa303687..29991b90 100644 --- a/ash/common/wm_shell.h +++ b/ash/common/wm_shell.h
@@ -15,10 +15,6 @@ #include "ash/common/metrics/user_metrics_action.h" #include "base/observer_list.h" -namespace gfx { -class Rect; -} - namespace views { class PointerWatcher; } @@ -26,8 +22,10 @@ namespace ash { class AccessibilityDelegate; +class BrightnessControlDelegate; class DisplayInfo; class FocusCycler; +class KeyboardBrightnessControlDelegate; class KeyboardUI; class MaximizeModeController; class MruWindowTracker; @@ -41,7 +39,6 @@ class WindowSelectorController; class WmActivationObserver; class WmDisplayObserver; -class WmRootWindowController; class WmWindow; namespace wm { @@ -64,8 +61,16 @@ ShellDelegate* delegate() { return delegate_.get(); } + BrightnessControlDelegate* brightness_control_delegate() { + return brightness_control_delegate_.get(); + } + FocusCycler* focus_cycler() { return focus_cycler_.get(); } + KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() { + return keyboard_brightness_control_delegate_.get(); + } + KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); } MaximizeModeController* maximize_mode_controller() { @@ -184,6 +189,9 @@ // |pinned_window|'s window state. void NotifyPinnedStateChanged(WmWindow* pinned_window); + // Called when virtual keyboard has been activated/deactivated. + void OnVirtualKeyboardActivated(bool activated); + virtual AccessibilityDelegate* GetAccessibilityDelegate() = 0; virtual SessionStateDelegate* GetSessionStateDelegate() = 0; @@ -234,13 +242,18 @@ void DeleteMruWindowTracker(); private: + friend class AcceleratorControllerTest; friend class Shell; static WmShell* instance_; base::ObserverList<ShellObserver> shell_observers_; std::unique_ptr<ShellDelegate> delegate_; + + std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; std::unique_ptr<FocusCycler> focus_cycler_; + std::unique_ptr<KeyboardBrightnessControlDelegate> + keyboard_brightness_control_delegate_; std::unique_ptr<KeyboardUI> keyboard_ui_; std::unique_ptr<MaximizeModeController> maximize_mode_controller_; std::unique_ptr<MediaDelegate> media_delegate_;
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc index 1bc2c47..bed4ca4 100644 --- a/ash/display/display_manager.cc +++ b/ash/display/display_manager.cc
@@ -575,7 +575,7 @@ new_mode.ui_scale = iter->configured_ui_scale(); const std::vector<DisplayMode>& display_modes = iter->display_modes(); // This is empty the displays are initialized from InitFromCommandLine. - if (!display_modes.size()) + if (display_modes.empty()) continue; auto display_modes_iter = FindDisplayMode(*iter, new_mode); // Update the actual resolution selected as the resolution request may fail.
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc index 1bdbc1b6..73d03b0 100644 --- a/ash/display/mirror_window_controller.cc +++ b/ash/display/mirror_window_controller.cc
@@ -270,7 +270,7 @@ } void MirrorWindowController::UpdateWindow() { - if (!mirroring_host_info_map_.size()) + if (mirroring_host_info_map_.empty()) return; DisplayManager* display_manager = Shell::GetInstance()->display_manager(); std::vector<DisplayInfo> display_info_list;
diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc index 137199a..7081af8ca 100644 --- a/ash/metrics/user_metrics_recorder.cc +++ b/ash/metrics/user_metrics_recorder.cc
@@ -409,6 +409,9 @@ base::RecordAction( base::UserMetricsAction("StatusArea_Network_Detailed")); break; + case UMA_STATUS_AREA_DETAILED_SMS_VIEW: + base::RecordAction(base::UserMetricsAction("StatusArea_SMS_Detailed")); + break; case UMA_STATUS_AREA_DETAILED_VPN_VIEW: base::RecordAction(base::UserMetricsAction("StatusArea_VPN_Detailed")); break; @@ -491,6 +494,17 @@ case UMA_STATUS_AREA_NETWORK_SETTINGS_CLICKED: base::RecordAction( base::UserMetricsAction("StatusArea_Network_Settings")); + case UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED: + base::RecordAction( + base::UserMetricsAction("StatusArea_OS_Update_Default_Selected")); + break; + case UMA_STATUS_AREA_SCREEN_CAPTURE_DEFAULT_STOP: + base::RecordAction( + base::UserMetricsAction("StatusArea_ScreenCapture_Default_Stop")); + break; + case UMA_STATUS_AREA_SCREEN_CAPTURE_NOTIFICATION_STOP: + base::RecordAction(base::UserMetricsAction( + "StatusArea_ScreenCapture_Notification_Stop")); break; case UMA_STATUS_AREA_SHOW_NETWORK_CONNECTION_DETAILS: base::RecordAction( @@ -503,6 +517,14 @@ case UMA_STATUS_AREA_SIGN_OUT: base::RecordAction(base::UserMetricsAction("StatusArea_SignOut")); break; + case UMA_STATUS_AREA_SMS_DETAILED_DISMISS_MSG: + base::RecordAction( + base::UserMetricsAction("StatusArea_SMS_Detailed_DismissMsg")); + break; + case UMA_STATUS_AREA_SMS_NOTIFICATION_DISMISS_MSG: + base::RecordAction( + base::UserMetricsAction("StatusArea_SMS_Notification_DismissMsg")); + break; case UMA_STATUS_AREA_VPN_ADD_BUILT_IN_CLICKED: base::RecordAction(base::UserMetricsAction("StatusArea_VPN_AddBuiltIn")); break; @@ -587,6 +609,14 @@ base::RecordAction( base::UserMetricsAction("WindowSelector_OverviewEnterKey")); break; + case UMA_WINDOW_OVERVIEW_CLOSE_BUTTON: + base::RecordAction( + base::UserMetricsAction("WindowSelector_OverviewCloseButton")); + break; + case UMA_WINDOW_OVERVIEW_CLOSE_KEY: + base::RecordAction( + base::UserMetricsAction("WindowSelector_OverviewCloseKey")); + break; } }
diff --git a/ash/mus/frame/move_event_handler.cc b/ash/mus/frame/move_event_handler.cc index a76bf25..b2983b4 100644 --- a/ash/mus/frame/move_event_handler.cc +++ b/ash/mus/frame/move_event_handler.cc
@@ -7,11 +7,23 @@ #include "ash/mus/bridge/wm_window_mus.h" #include "services/ui/public/cpp/window.h" #include "services/ui/public/cpp/window_manager_delegate.h" +#include "services/ui/public/cpp/window_property.h" #include "services/ui/public/interfaces/cursor.mojom.h" #include "ui/aura/window.h" #include "ui/base/hit_test.h" #include "ui/events/event.h" +MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::MoveEventHandler*) + +namespace { + +// Key used for storing identifier sent to clients for windows. +MUS_DEFINE_LOCAL_WINDOW_PROPERTY_KEY(ash::mus::MoveEventHandler*, + kWmMoveEventHandler, + nullptr); + +} // namespace + namespace ash { namespace mus { namespace { @@ -39,6 +51,12 @@ } } +void OnMoveLoopCompleted(const base::Callback<void(bool success)>& end_closure, + wm::WmToplevelWindowEventHandler::DragResult result) { + end_closure.Run(result == + wm::WmToplevelWindowEventHandler::DragResult::SUCCESS); +} + } // namespace MoveEventHandler::MoveEventHandler( @@ -51,12 +69,38 @@ toplevel_window_event_handler_(wm_window_->GetShell()) { root_window_->AddObserver(this); root_window_->AddPreTargetHandler(this); + + mus_window->SetLocalProperty(kWmMoveEventHandler, this); } MoveEventHandler::~MoveEventHandler() { Detach(); } +// static +MoveEventHandler* MoveEventHandler::GetForWindow(WmWindow* wm_window) { + return WmWindowMus::GetMusWindow(wm_window)->GetLocalProperty( + kWmMoveEventHandler); +} + +void MoveEventHandler::AttemptToStartDrag( + const gfx::Point& point_in_parent, + int window_component, + aura::client::WindowMoveSource source, + const base::Callback<void(bool success)>& end_closure) { + toplevel_window_event_handler_.AttemptToStartDrag( + wm_window_, point_in_parent, window_component, source, + base::Bind(&OnMoveLoopCompleted, end_closure)); +} + +bool MoveEventHandler::IsDragInProgress() { + return toplevel_window_event_handler_.is_drag_in_progress(); +} + +void MoveEventHandler::RevertDrag() { + toplevel_window_event_handler_.RevertDrag(); +} + void MoveEventHandler::Detach() { if (!root_window_) return;
diff --git a/ash/mus/frame/move_event_handler.h b/ash/mus/frame/move_event_handler.h index 7b4b0a20..d94f1eaf 100644 --- a/ash/mus/frame/move_event_handler.h +++ b/ash/mus/frame/move_event_handler.h
@@ -36,6 +36,25 @@ aura::Window* aura_window); ~MoveEventHandler() override; + // Retrieves the MoveEventHandler for an existing WmWindow. + static MoveEventHandler* GetForWindow(WmWindow* wm_window); + + // Attempts to start a drag if one is not already in progress. This passes + // the call to the underlying WmToplevelWindowEventHandler. After the drag + // completes, |end_closure| will be called to return whether the drag was + // successfully completed. + void AttemptToStartDrag( + const gfx::Point& point_in_parent, + int window_component, + aura::client::WindowMoveSource source, + const base::Callback<void(bool success)>& end_closure); + + // Returns whether we're in a drag. + bool IsDragInProgress(); + + // Reverts a manually started drag started with AttemptToStartDrag(). + void RevertDrag(); + private: // Removes observer and EventHandler installed on |root_window_|. void Detach();
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc index b14cae6..d0755a5 100644 --- a/ash/mus/window_manager.cc +++ b/ash/mus/window_manager.cc
@@ -12,6 +12,7 @@ #include "ash/mus/bridge/wm_lookup_mus.h" #include "ash/mus/bridge/wm_shell_mus.h" #include "ash/mus/bridge/wm_window_mus.h" +#include "ash/mus/frame/move_event_handler.h" #include "ash/mus/non_client_frame_controller.h" #include "ash/mus/property_util.h" #include "ash/mus/root_window_controller.h" @@ -26,6 +27,7 @@ #include "services/ui/public/cpp/window_tree_client.h" #include "services/ui/public/interfaces/mus_constants.mojom.h" #include "services/ui/public/interfaces/window_manager.mojom.h" +#include "ui/base/hit_test.h" #include "ui/events/mojo/event.mojom.h" #include "ui/views/mus/screen_mus.h" @@ -230,7 +232,35 @@ CreateRootWindowController(window, display); } -void WindowManager::OnAccelerator(uint32_t id, const ui::Event& event) { +void WindowManager::OnWmPerformMoveLoop( + ::ui::Window* window, + ::ui::mojom::MoveLoopSource source, + const gfx::Point& cursor_location, + const base::Callback<void(bool)>& on_done) { + WmWindowMus* child_window = WmWindowMus::Get(window); + MoveEventHandler* handler = MoveEventHandler::GetForWindow(child_window); + if (!handler) { + on_done.Run(false); + return; + } + + DCHECK(!handler->IsDragInProgress()); + aura::client::WindowMoveSource aura_source = + source == ::ui::mojom::MoveLoopSource::MOUSE + ? aura::client::WINDOW_MOVE_SOURCE_MOUSE + : aura::client::WINDOW_MOVE_SOURCE_TOUCH; + handler->AttemptToStartDrag(cursor_location, HTCAPTION, aura_source, on_done); +} + +void WindowManager::OnWmCancelMoveLoop(::ui::Window* window) { + WmWindowMus* child_window = WmWindowMus::Get(window); + MoveEventHandler* handler = MoveEventHandler::GetForWindow(child_window); + if (handler) + handler->RevertDrag(); +} + +ui::mojom::EventResult WindowManager::OnAccelerator(uint32_t id, + const ui::Event& event) { switch (id) { case kWindowSwitchAccelerator: window_manager_client()->ActivateNextWindow(); @@ -240,18 +270,8 @@ OnAccelerator(id, event)); break; } -} -void WindowManager::OnWmPerformMoveLoop( - ::ui::Window* window, - ::ui::mojom::MoveLoopSource source, - const gfx::Point& cursor_location, - const base::Callback<void(bool)>& on_done) { - NOTIMPLEMENTED(); -} - -void WindowManager::OnWmCancelMoveLoop(::ui::Window* window) { - NOTIMPLEMENTED(); + return ui::mojom::EventResult::HANDLED; } } // namespace mus
diff --git a/ash/mus/window_manager.h b/ash/mus/window_manager.h index 1ab5046..ab8d6ed 100644 --- a/ash/mus/window_manager.h +++ b/ash/mus/window_manager.h
@@ -100,12 +100,13 @@ bool not_responding) override; void OnWmNewDisplay(::ui::Window* window, const display::Display& display) override; - void OnAccelerator(uint32_t id, const ui::Event& event) override; void OnWmPerformMoveLoop(::ui::Window* window, ::ui::mojom::MoveLoopSource source, const gfx::Point& cursor_location, const base::Callback<void(bool)>& on_done) override; void OnWmCancelMoveLoop(::ui::Window* window) override; + ui::mojom::EventResult OnAccelerator(uint32_t id, + const ui::Event& event) override; shell::Connector* connector_;
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 1ab4e46e..38c33459 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc
@@ -703,7 +703,7 @@ keyboard_controller->AddObserver(workspace_controller_->layout_manager()); keyboard_controller->AddObserver( always_on_top_controller_->GetLayoutManager()); - WmShell::Get()->delegate()->VirtualKeyboardActivated(true); + WmShell::Get()->OnVirtualKeyboardActivated(true); aura::Window* parent = GetContainer(kShellWindowId_ImeWindowParentContainer); DCHECK(parent); aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); @@ -733,7 +733,7 @@ workspace_controller_->layout_manager()); keyboard_controller->RemoveObserver( always_on_top_controller_->GetLayoutManager()); - WmShell::Get()->delegate()->VirtualKeyboardActivated(false); + WmShell::Get()->OnVirtualKeyboardActivated(false); } }
diff --git a/ash/shelf/shelf_tooltip_manager_unittest.cc b/ash/shelf/shelf_tooltip_manager_unittest.cc index b03eb96c..d24fd79 100644 --- a/ash/shelf/shelf_tooltip_manager_unittest.cc +++ b/ash/shelf/shelf_tooltip_manager_unittest.cc
@@ -60,12 +60,7 @@ tooltip_manager_->ShowTooltipWithDelay(shelf_->GetAppListButton()); EXPECT_FALSE(tooltip_manager_->IsVisible()); EXPECT_TRUE(IsTimerRunning()); - RunAllPendingInMessageLoop(); -#if !defined(OS_WIN) - // This check fails on Windows. - EXPECT_TRUE(tooltip_manager_->IsVisible()); -#endif // !OS_WIN - EXPECT_FALSE(IsTimerRunning()); + // TODO: Test that the delayed tooltip is shown, without flaky failures. } TEST_F(ShelfTooltipManagerTest, DoNotShowForInvalidView) {
diff --git a/ash/shell.cc b/ash/shell.cc index 3183c7ad..bd4696c 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -134,7 +134,6 @@ #include "ash/display/resolution_notification_controller.h" #include "ash/display/screen_orientation_controller_chromeos.h" #include "ash/sticky_keys/sticky_keys_controller.h" -#include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" #include "ash/system/chromeos/power/power_event_observer.h" #include "ash/system/chromeos/power/video_activity_notifier.h" #include "ash/touch/touch_transformer_controller.h" @@ -1073,11 +1072,6 @@ } #if defined(OS_CHROMEOS) - // Set accelerator controller delegates. - accelerator_controller_->SetBrightnessControlDelegate( - std::unique_ptr<BrightnessControlDelegate>( - new system::BrightnessControllerChromeos)); - power_event_observer_.reset(new PowerEventObserver()); user_activity_notifier_.reset( new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get()));
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index ca52781..ea22193 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc
@@ -204,14 +204,6 @@ return new TestKeyboardUI; } -void ShellDelegateImpl::VirtualKeyboardActivated(bool activated) {} - -void ShellDelegateImpl::AddVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) {} - -void ShellDelegateImpl::RemoveVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) {} - void ShellDelegateImpl::OpenUrl(const GURL& url) {} app_list::AppListPresenter* ShellDelegateImpl::GetAppListPresenter() {
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index ce80c0c0..4043567 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h
@@ -9,7 +9,6 @@ #include <string> #include "ash/common/shell_delegate.h" -#include "base/compiler_specific.h" #include "base/macros.h" namespace app_list { @@ -41,11 +40,6 @@ void PreShutdown() override; void Exit() override; keyboard::KeyboardUI* CreateKeyboardUI() override; - void VirtualKeyboardActivated(bool activated) override; - void AddVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) override; - void RemoveVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) override; void OpenUrl(const GURL& url) override; app_list::AppListPresenter* GetAppListPresenter() override; ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc index 8bf2f60..36790db 100644 --- a/ash/system/chromeos/tray_display.cc +++ b/ash/system/chromeos/tray_display.cc
@@ -18,7 +18,6 @@ #include "ash/common/wm_shell.h" #include "ash/display/display_manager.h" #include "ash/display/screen_orientation_controller_chromeos.h" -#include "ash/display/window_tree_host_manager.h" #include "ash/shell.h" #include "ash/system/tray/system_tray.h" #include "base/bind.h" @@ -299,12 +298,12 @@ TrayDisplay::TrayDisplay(SystemTray* system_tray) : SystemTrayItem(system_tray), default_(NULL) { - Shell::GetInstance()->window_tree_host_manager()->AddObserver(this); + WmShell::Get()->AddDisplayObserver(this); UpdateDisplayInfo(NULL); } TrayDisplay::~TrayDisplay() { - Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this); + WmShell::Get()->RemoveDisplayObserver(this); } void TrayDisplay::UpdateDisplayInfo(TrayDisplay::DisplayInfoMap* old_info) {
diff --git a/ash/system/chromeos/tray_display.h b/ash/system/chromeos/tray_display.h index 2fe242e..c7e55eab 100644 --- a/ash/system/chromeos/tray_display.h +++ b/ash/system/chromeos/tray_display.h
@@ -12,25 +12,21 @@ #include "ash/ash_export.h" #include "ash/common/display/display_info.h" #include "ash/common/system/tray/system_tray_item.h" -#include "ash/display/window_tree_host_manager.h" +#include "ash/common/wm_display_observer.h" #include "base/macros.h" #include "base/strings/string16.h" #include "ui/views/view.h" namespace ash { + class DisplayView; -namespace test { -class AshTestBase; -} - -class ASH_EXPORT TrayDisplay : public SystemTrayItem, - public WindowTreeHostManager::Observer { +class ASH_EXPORT TrayDisplay : public SystemTrayItem, public WmDisplayObserver { public: explicit TrayDisplay(SystemTray* system_tray); ~TrayDisplay() override; - // Overridden from WindowTreeHostManagerObserver: + // Overridden from WmDisplayObserver: void OnDisplayConfigurationChanged() override; private:
diff --git a/ash/system/chromeos/tray_display_unittest.cc b/ash/system/chromeos/tray_display_unittest.cc index 60cbb0b..e6e9acdf 100644 --- a/ash/system/chromeos/tray_display_unittest.cc +++ b/ash/system/chromeos/tray_display_unittest.cc
@@ -6,7 +6,6 @@ #include "ash/common/system/chromeos/devicetype_utils.h" #include "ash/display/display_manager.h" -#include "ash/root_window_controller.h" #include "ash/screen_util.h" #include "ash/shell.h" #include "ash/system/tray/system_tray.h" @@ -126,8 +125,7 @@ } void TrayDisplayTest::CheckUpdate() { - SystemTray* current = - Shell::GetPrimaryRootWindowController()->GetSystemTray(); + SystemTray* current = GetPrimarySystemTray(); if (tray_ != current) { tray_ = current; tray_display_ = new TrayDisplay(tray_);
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index 8691317..7ff990768 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc
@@ -46,6 +46,7 @@ #if defined(OS_CHROMEOS) #include "ash/common/system/chromeos/audio/tray_audio_chromeos.h" #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" +#include "ash/common/system/chromeos/brightness/tray_brightness.h" #include "ash/common/system/chromeos/enterprise/tray_enterprise.h" #include "ash/common/system/chromeos/network/tray_network.h" #include "ash/common/system/chromeos/network/tray_sms.h" @@ -60,7 +61,6 @@ #include "ash/common/system/chromeos/tray_caps_lock.h" #include "ash/common/system/chromeos/tray_tracing.h" #include "ash/common/system/ime/tray_ime_chromeos.h" -#include "ash/system/chromeos/brightness/tray_brightness.h" #include "ash/system/chromeos/media_security/multi_profile_media_tray_item.h" #include "ash/system/chromeos/rotation/tray_rotation_lock.h" #include "ash/system/chromeos/tray_display.h"
diff --git a/ash/sysui/shell_delegate_mus.cc b/ash/sysui/shell_delegate_mus.cc index 8cf896b..3fe9995 100644 --- a/ash/sysui/shell_delegate_mus.cc +++ b/ash/sysui/shell_delegate_mus.cc
@@ -154,20 +154,6 @@ return nullptr; } -void ShellDelegateMus::VirtualKeyboardActivated(bool activated) { - NOTIMPLEMENTED(); -} - -void ShellDelegateMus::AddVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) { - NOTIMPLEMENTED(); -} - -void ShellDelegateMus::RemoveVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) { - NOTIMPLEMENTED(); -} - void ShellDelegateMus::OpenUrl(const GURL& url) { NOTIMPLEMENTED(); }
diff --git a/ash/sysui/shell_delegate_mus.h b/ash/sysui/shell_delegate_mus.h index a9fdb52ce..c5323bc 100644 --- a/ash/sysui/shell_delegate_mus.h +++ b/ash/sysui/shell_delegate_mus.h
@@ -35,11 +35,6 @@ void PreShutdown() override; void Exit() override; keyboard::KeyboardUI* CreateKeyboardUI() override; - void VirtualKeyboardActivated(bool activated) override; - void AddVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) override; - void RemoveVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) override; void OpenUrl(const GURL& url) override; app_list::AppListPresenter* GetAppListPresenter() override; ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc index 495959d..5e768ef5 100644 --- a/ash/test/test_shell_delegate.cc +++ b/ash/test/test_shell_delegate.cc
@@ -148,22 +148,6 @@ return new TestKeyboardUI; } -void TestShellDelegate::VirtualKeyboardActivated(bool activated) { - FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver, - keyboard_state_observer_list_, - OnVirtualKeyboardStateChanged(activated)); -} - -void TestShellDelegate::AddVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) { - keyboard_state_observer_list_.AddObserver(observer); -} - -void TestShellDelegate::RemoveVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) { - keyboard_state_observer_list_.RemoveObserver(observer); -} - void TestShellDelegate::OpenUrl(const GURL& url) {} app_list::AppListPresenter* TestShellDelegate::GetAppListPresenter() {
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h index fb0d5558..bc9b92d49 100644 --- a/ash/test/test_shell_delegate.h +++ b/ash/test/test_shell_delegate.h
@@ -12,7 +12,6 @@ #include "ash/common/shell_delegate.h" #include "ash/test/test_session_state_delegate.h" #include "base/macros.h" -#include "base/observer_list.h" namespace app_list { class AppListPresenterDelegateFactory; @@ -46,11 +45,6 @@ void PreShutdown() override; void Exit() override; keyboard::KeyboardUI* CreateKeyboardUI() override; - void VirtualKeyboardActivated(bool activated) override; - void AddVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) override; - void RemoveVirtualKeyboardStateObserver( - VirtualKeyboardStateObserver* observer) override; void OpenUrl(const GURL& url) override; app_list::AppListPresenter* GetAppListPresenter() override; ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override; @@ -88,9 +82,6 @@ app_list_presenter_delegate_factory_; std::unique_ptr<app_list::AppListPresenterImpl> app_list_presenter_; - base::ObserverList<VirtualKeyboardStateObserver> - keyboard_state_observer_list_; - DISALLOW_COPY_AND_ASSIGN(TestShellDelegate); };
diff --git a/ash/wm/lock_layout_manager.cc b/ash/wm/lock_layout_manager.cc index e8d7da91..5203dd3 100644 --- a/ash/wm/lock_layout_manager.cc +++ b/ash/wm/lock_layout_manager.cc
@@ -4,7 +4,6 @@ #include "ash/wm/lock_layout_manager.h" -#include "ash/common/shell_delegate.h" #include "ash/common/wm/window_state.h" #include "ash/common/wm/wm_event.h" #include "ash/common/wm_shell.h" @@ -23,7 +22,7 @@ window_(window), root_window_(window->GetRootWindow()), is_observing_keyboard_(false) { - WmShell::Get()->delegate()->AddVirtualKeyboardStateObserver(this); + WmShell::Get()->AddShellObserver(this); root_window_->AddObserver(this); if (keyboard::KeyboardController::GetInstance()) { keyboard::KeyboardController::GetInstance()->AddObserver(this); @@ -40,7 +39,7 @@ (*it)->RemoveObserver(this); } - WmShell::Get()->delegate()->RemoveVirtualKeyboardStateObserver(this); + WmShell::Get()->RemoveShellObserver(this); if (keyboard::KeyboardController::GetInstance() && is_observing_keyboard_) { keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
diff --git a/ash/wm/lock_layout_manager.h b/ash/wm/lock_layout_manager.h index 6eb0cae1a..7a9f0e8 100644 --- a/ash/wm/lock_layout_manager.h +++ b/ash/wm/lock_layout_manager.h
@@ -6,7 +6,7 @@ #define ASH_WM_LOCK_LAYOUT_MANAGER_H_ #include "ash/ash_export.h" -#include "ash/common/shell_delegate.h" +#include "ash/common/shell_observer.h" #include "ash/common/wm/wm_types.h" #include "ash/snap_to_pixel_layout_manager.h" #include "base/macros.h" @@ -45,7 +45,7 @@ class ASH_EXPORT LockLayoutManager : public SnapToPixelLayoutManager, public aura::WindowObserver, - public VirtualKeyboardStateObserver, + public ShellObserver, public keyboard::KeyboardControllerObserver { public: explicit LockLayoutManager(aura::Window* window); @@ -73,7 +73,7 @@ const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) override; - // VirtualKeyboardStateObserver overrides: + // ShellObserver: void OnVirtualKeyboardStateChanged(bool activated) override; // keyboard::KeyboardControllerObserver overrides:
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc index 2bf45e3..af82c9d 100644 --- a/ash/wm/overview/window_selector_unittest.cc +++ b/ash/wm/overview/window_selector_unittest.cc
@@ -231,6 +231,14 @@ event_generator.ReleaseKey(key, 0); } + void SendCtrlKey(ui::KeyboardCode key) { + ui::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow()); + event_generator.PressKey(ui::VKEY_CONTROL, ui::EF_CONTROL_DOWN); + event_generator.PressKey(key, ui::EF_CONTROL_DOWN); + event_generator.ReleaseKey(key, ui::EF_CONTROL_DOWN); + event_generator.ReleaseKey(ui::VKEY_CONTROL, ui::EF_NONE); + } + bool IsSelecting() { return window_selector_controller()->IsSelecting(); } aura::Window* GetFocusedWindow() { @@ -1374,6 +1382,21 @@ WmWindowAura::GetAuraWindow(overview_windows[0]->GetWindow())); } +// Tests that pressing Ctrl+W while a window is selected in overview closes it. +TEST_P(WindowSelectorTest, CloseWindowWithKey) { + gfx::Rect bounds(0, 0, 100, 100); + std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); + std::unique_ptr<views::Widget> widget = + CreateWindowWidget(gfx::Rect(0, 0, 400, 400)); + aura::Window* window1 = widget->GetNativeWindow(); + ToggleOverview(); + + SendKey(ui::VKEY_RIGHT); + EXPECT_EQ(window1, GetSelectedWindow()); + SendCtrlKey(ui::VKEY_W); + EXPECT_TRUE(widget->IsClosed()); +} + // Tests traversing some windows in overview mode with the arrow keys in every // possible direction. TEST_P(WindowSelectorTest, BasicArrowKeyNavigation) {
diff --git a/base/base_switches.cc b/base/base_switches.cc index fa0bc33..f5c6eb3 100644 --- a/base/base_switches.cc +++ b/base/base_switches.cc
@@ -89,6 +89,16 @@ // chrome://profiler. const char kProfilerTimingDisabledValue[] = "0"; +// Specifies a location for profiling output. This will only work if chrome has +// been built with the gyp variable profiling=1 or gn arg enable_profiling=true. +// +// {pid} if present will be replaced by the pid of the process. +// {count} if present will be incremented each time a profile is generated +// for this process. +// The default is chrome-profile-{pid} for the browser and test-profile-{pid} +// for tests. +const char kProfilingFile[] = "profiling-file"; + #if defined(OS_WIN) // Disables the USB keyboard detection for blocking the OSK on Win8+. const char kDisableUsbKeyboardDetect[] = "disable-usb-keyboard-detect";
diff --git a/base/base_switches.h b/base/base_switches.h index b80077b..0585186 100644 --- a/base/base_switches.h +++ b/base/base_switches.h
@@ -22,6 +22,7 @@ extern const char kNoErrorDialogs[]; extern const char kProfilerTiming[]; extern const char kProfilerTimingDisabledValue[]; +extern const char kProfilingFile[]; extern const char kTestChildProcess[]; extern const char kTestDoNotInitializeIcu[]; extern const char kTraceToFile[];
diff --git a/base/bind_internal.h b/base/bind_internal.h index 41c34ff..e3ccb25 100644 --- a/base/bind_internal.h +++ b/base/bind_internal.h
@@ -377,10 +377,10 @@ // This stores all the state passed into Bind(). template <typename Functor, typename... BoundArgs> struct BindState final : BindStateBase { - template <typename... ForwardBoundArgs> - explicit BindState(Functor functor, ForwardBoundArgs&&... bound_args) + template <typename ForwardFunctor, typename... ForwardBoundArgs> + explicit BindState(ForwardFunctor&& functor, ForwardBoundArgs&&... bound_args) : BindStateBase(&Destroy), - functor_(std::move(functor)), + functor_(std::forward<ForwardFunctor>(functor)), bound_args_(std::forward<ForwardBoundArgs>(bound_args)...) { DCHECK(!IsNull(functor_)); }
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h index 6f012ad..84948f7 100644 --- a/base/mac/mac_util.h +++ b/base/mac/mac_util.h
@@ -113,27 +113,32 @@ // "OrLater" variants to those that check for a specific version, unless you // know for sure that you need to check for a specific version. -// Mavericks is Mac OS X 10.9, Darwin 13. +// Mavericks is OS X 10.9, Darwin 13. BASE_EXPORT bool IsOSMavericks(); -BASE_EXPORT bool IsOSMavericksOrLater(); -// Yosemite is Mac OS X 10.10, Darwin 14. +// Yosemite is OS X 10.10, Darwin 14. BASE_EXPORT bool IsOSYosemite(); BASE_EXPORT bool IsOSYosemiteOrEarlier(); BASE_EXPORT bool IsOSYosemiteOrLater(); -// El Capitan is Mac OS X 10.11, Darwin 15. +// El Capitan is OS X 10.11, Darwin 15. BASE_EXPORT bool IsOSElCapitan(); +BASE_EXPORT bool IsOSElCapitanOrEarlier(); BASE_EXPORT bool IsOSElCapitanOrLater(); +// Sierra is macOS 10.12, Darwin 16. +BASE_EXPORT bool IsOSSierra(); +BASE_EXPORT bool IsOSSierraOrLater(); + // This should be infrequently used. It only makes sense to use this to avoid // codepaths that are very likely to break on future (unreleased, untested, // unborn) OS releases, or to log when the OS is newer than any known version. -BASE_EXPORT bool IsOSLaterThanElCapitan_DontCallThis(); +BASE_EXPORT bool IsOSLaterThanSierra_DontCallThis(); // Inline functions that are redundant due to version ranges being mutually- // exclusive. inline bool IsOSYosemiteOrEarlier() { return !IsOSElCapitanOrLater(); } +inline bool IsOSElCapitanOrEarlier() { return !IsOSSierraOrLater(); } // When the deployment target is set, the code produced cannot run on earlier // OS releases. That enables some of the IsOS* family to be implemented as @@ -141,12 +146,6 @@ // contains the value of the deployment target. #if defined(MAC_OS_X_VERSION_10_9) && \ - MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 -#define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_9 -inline bool IsOSMavericksOrLater() { return true; } -#endif - -#if defined(MAC_OS_X_VERSION_10_9) && \ MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_9 #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9 inline bool IsOSMavericks() { return false; } @@ -174,7 +173,19 @@ MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_11 #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_11 inline bool IsOSElCapitan() { return false; } -inline bool IsOSLaterThanElCapitan_DontCallThis() { return true; } +#endif + +#if defined(MAC_OS_X_VERSION_10_12) && \ + MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 +#define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_12 +inline bool IsOSSierraOrLater() { return true; } +#endif + +#if defined(MAC_OS_X_VERSION_10_12) && \ + MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_12 +#define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_12 +inline bool IsOSSierra() { return false; } +inline bool IsOSLaterThanSierra_DontCallThis() { return true; } #endif // Retrieve the system's model identifier string from the IOKit registry:
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm index 6dca874..c2ca83f 100644 --- a/base/mac/mac_util.mm +++ b/base/mac/mac_util.mm
@@ -456,40 +456,20 @@ } enum { - SNOW_LEOPARD_MINOR_VERSION = 6, - LION_MINOR_VERSION = 7, - MOUNTAIN_LION_MINOR_VERSION = 8, MAVERICKS_MINOR_VERSION = 9, YOSEMITE_MINOR_VERSION = 10, EL_CAPITAN_MINOR_VERSION = 11, + SIERRA_MINOR_VERSION = 12, }; } // namespace -#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) -bool IsOSMountainLion() { - return MacOSXMinorVersion() == MOUNTAIN_LION_MINOR_VERSION; -} -#endif - -#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) -bool IsOSMountainLionOrLater() { - return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; -} -#endif - #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9) bool IsOSMavericks() { return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION; } #endif -#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_9) -bool IsOSMavericksOrLater() { - return MacOSXMinorVersion() >= MAVERICKS_MINOR_VERSION; -} -#endif - #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10) bool IsOSYosemite() { return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION; @@ -514,9 +494,21 @@ } #endif -#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_11) -bool IsOSLaterThanElCapitan_DontCallThis() { - return MacOSXMinorVersion() > EL_CAPITAN_MINOR_VERSION; +#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_12) +bool IsOSSierra() { + return MacOSXMinorVersion() == SIERRA_MINOR_VERSION; +} +#endif + +#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_12) +bool IsOSSierraOrLater() { + return MacOSXMinorVersion() >= SIERRA_MINOR_VERSION; +} +#endif + +#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_12) +bool IsOSLaterThanSierra_DontCallThis() { + return MacOSXMinorVersion() > SIERRA_MINOR_VERSION; } #endif
diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm index 3ef9ede..11003fa 100644 --- a/base/mac/mac_util_unittest.mm +++ b/base/mac/mac_util_unittest.mm
@@ -147,33 +147,50 @@ if (major == 10) { if (minor == 9) { EXPECT_TRUE(IsOSMavericks()); - EXPECT_TRUE(IsOSMavericksOrLater()); EXPECT_FALSE(IsOSYosemite()); EXPECT_TRUE(IsOSYosemiteOrEarlier()); EXPECT_FALSE(IsOSYosemiteOrLater()); EXPECT_FALSE(IsOSElCapitan()); + EXPECT_TRUE(IsOSElCapitanOrEarlier()); EXPECT_FALSE(IsOSElCapitanOrLater()); - EXPECT_FALSE(IsOSLaterThanElCapitan_DontCallThis()); + EXPECT_FALSE(IsOSSierra()); + EXPECT_FALSE(IsOSSierraOrLater()); + EXPECT_FALSE(IsOSLaterThanSierra_DontCallThis()); } else if (minor == 10) { EXPECT_FALSE(IsOSMavericks()); - EXPECT_TRUE(IsOSMavericksOrLater()); EXPECT_TRUE(IsOSYosemite()); EXPECT_TRUE(IsOSYosemiteOrEarlier()); EXPECT_TRUE(IsOSYosemiteOrLater()); EXPECT_FALSE(IsOSElCapitan()); + EXPECT_TRUE(IsOSElCapitanOrEarlier()); EXPECT_FALSE(IsOSElCapitanOrLater()); - EXPECT_FALSE(IsOSLaterThanElCapitan_DontCallThis()); + EXPECT_FALSE(IsOSSierra()); + EXPECT_FALSE(IsOSSierraOrLater()); + EXPECT_FALSE(IsOSLaterThanSierra_DontCallThis()); } else if (minor == 11) { EXPECT_FALSE(IsOSMavericks()); - EXPECT_TRUE(IsOSMavericksOrLater()); EXPECT_FALSE(IsOSYosemite()); EXPECT_FALSE(IsOSYosemiteOrEarlier()); EXPECT_TRUE(IsOSYosemiteOrLater()); EXPECT_TRUE(IsOSElCapitan()); + EXPECT_TRUE(IsOSElCapitanOrEarlier()); EXPECT_TRUE(IsOSElCapitanOrLater()); - EXPECT_FALSE(IsOSLaterThanElCapitan_DontCallThis()); + EXPECT_FALSE(IsOSSierra()); + EXPECT_FALSE(IsOSSierraOrLater()); + EXPECT_FALSE(IsOSLaterThanSierra_DontCallThis()); + } else if (minor == 12) { + EXPECT_FALSE(IsOSMavericks()); + EXPECT_FALSE(IsOSYosemite()); + EXPECT_FALSE(IsOSYosemiteOrEarlier()); + EXPECT_TRUE(IsOSYosemiteOrLater()); + EXPECT_FALSE(IsOSElCapitan()); + EXPECT_FALSE(IsOSElCapitanOrEarlier()); + EXPECT_TRUE(IsOSElCapitanOrLater()); + EXPECT_TRUE(IsOSSierra()); + EXPECT_TRUE(IsOSSierraOrLater()); + EXPECT_FALSE(IsOSLaterThanSierra_DontCallThis()); } else { - // Not six, seven, eight, nine, ten, or eleven. Ah, ah, ah. + // Not nine, ten, eleven, or twelve. Ah, ah, ah. EXPECT_TRUE(false); } } else {
diff --git a/base/process/memory_mac.mm b/base/process/memory_mac.mm index 23a4beb..32fdd38 100644 --- a/base/process/memory_mac.mm +++ b/base/process/memory_mac.mm
@@ -248,19 +248,14 @@ // === Core Foundation CFAllocators === bool CanGetContextForCFAllocator() { - return !base::mac::IsOSLaterThanElCapitan_DontCallThis(); + return !base::mac::IsOSLaterThanSierra_DontCallThis(); } CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) { - if (base::mac::IsOSMavericks() || base::mac::IsOSYosemite() || - base::mac::IsOSElCapitan()) { - ChromeCFAllocatorLions* our_allocator = - const_cast<ChromeCFAllocatorLions*>( - reinterpret_cast<const ChromeCFAllocatorLions*>(allocator)); - return &our_allocator->_context; - } else { - return NULL; - } + ChromeCFAllocatorLions* our_allocator = + const_cast<ChromeCFAllocatorLions*>( + reinterpret_cast<const ChromeCFAllocatorLions*>(allocator)); + return &our_allocator->_context; } CFAllocatorAllocateCallBack g_old_cfallocator_system_default;
diff --git a/base/process/memory_unittest.cc b/base/process/memory_unittest.cc index ec2ed9f18..9b6ee5f 100644 --- a/base/process/memory_unittest.cc +++ b/base/process/memory_unittest.cc
@@ -26,7 +26,6 @@ #endif #if defined(OS_MACOSX) #include <malloc/malloc.h> -#include "base/mac/mac_util.h" #include "base/process/memory_unittest_mac.h" #endif #if defined(OS_LINUX) @@ -409,13 +408,6 @@ // under sanitizer tools. #if !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) TEST_F(OutOfMemoryHandledTest, UncheckedMalloc) { -#if defined(OS_MACOSX) && ARCH_CPU_32_BITS - // The Mavericks malloc library changed in a way which breaks the tricks used - // to implement EnableTerminationOnOutOfMemory() with UncheckedMalloc() under - // 32-bit. The 64-bit malloc library works as desired without tricks. - if (base::mac::IsOSMavericksOrLater()) - return; -#endif EXPECT_TRUE(base::UncheckedMalloc(kSafeMallocSize, &value_)); EXPECT_TRUE(value_ != NULL); free(value_); @@ -425,13 +417,6 @@ } TEST_F(OutOfMemoryHandledTest, UncheckedCalloc) { -#if defined(OS_MACOSX) && ARCH_CPU_32_BITS - // The Mavericks malloc library changed in a way which breaks the tricks used - // to implement EnableTerminationOnOutOfMemory() with UncheckedCalloc() under - // 32-bit. The 64-bit malloc library works as desired without tricks. - if (base::mac::IsOSMavericksOrLater()) - return; -#endif EXPECT_TRUE(base::UncheckedCalloc(1, kSafeMallocSize, &value_)); EXPECT_TRUE(value_ != NULL); const char* bytes = static_cast<const char*>(value_);
diff --git a/base/process/process_util_unittest.cc b/base/process/process_util_unittest.cc index 783e09a..87fdd01 100644 --- a/base/process/process_util_unittest.cc +++ b/base/process/process_util_unittest.cc
@@ -60,7 +60,6 @@ #if defined(OS_MACOSX) #include <mach/vm_param.h> #include <malloc/malloc.h> -#include "base/mac/mac_util.h" #endif #if defined(OS_ANDROID) #include "third_party/lss/linux_syscall_support.h" @@ -572,10 +571,6 @@ // <http://crbug.com/338157>. This function allows querying whether the file // descriptor is guarded before attempting to close it. bool CanGuardFd(int fd) { - // The syscall is first provided in 10.9/Mavericks. - if (!base::mac::IsOSMavericksOrLater()) - return true; - // Saves the original flags to reset later. int original_fdflags = 0;
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc index 81ea744..512bde5 100644 --- a/base/test/test_suite.cc +++ b/base/test/test_suite.cc
@@ -12,6 +12,7 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/debug/debugger.h" +#include "base/debug/profiler.h" #include "base/debug/stack_trace.h" #include "base/feature_list.h" #include "base/files/file_path.h" @@ -92,6 +93,20 @@ DISALLOW_COPY_AND_ASSIGN(TestClientInitializer); }; +std::string GetProfileName() { + static const char kDefaultProfileName[] = "test-profile-{pid}"; + CR_DEFINE_STATIC_LOCAL(std::string, profile_name, ()); + if (profile_name.empty()) { + const base::CommandLine& command_line = + *base::CommandLine::ForCurrentProcess(); + if (command_line.HasSwitch(switches::kProfilingFile)) + profile_name = command_line.GetSwitchValueASCII(switches::kProfilingFile); + else + profile_name = std::string(kDefaultProfileName); + } + return profile_name; +} + } // namespace int RunUnitTestsUsingBaseTestSuite(int argc, char **argv) { @@ -362,9 +377,13 @@ TestTimeouts::Initialize(); trace_to_file_.BeginTracingFromCommandLineOptions(); + + base::debug::StartProfiling(GetProfileName()); } void TestSuite::Shutdown() { + base::debug::StopProfiling(); + // Clear the FeatureList that was created by Initialize(). if (created_feature_list_) FeatureList::ClearInstanceForTesting();
diff --git a/base/third_party/libevent/README.chromium b/base/third_party/libevent/README.chromium index 4bc235d4..1462e88 100644 --- a/base/third_party/libevent/README.chromium +++ b/base/third_party/libevent/README.chromium
@@ -35,3 +35,5 @@ which is missing in the newlib-based PNaCl toolchain. 7) Stub out signal.c for nacl_helper_nonsfi. socketpair() will be prohibited by sandbox in nacl_helper_nonsfi. +8) Remove an unnecessary workaround for OS X 10.4 from kqueue.c. It was causing + problems on macOS Sierra.
diff --git a/base/third_party/libevent/kqueue.c b/base/third_party/libevent/kqueue.c index ee740ee..3c2ffd5 100644 --- a/base/third_party/libevent/kqueue.c +++ b/base/third_party/libevent/kqueue.c
@@ -140,28 +140,6 @@ TAILQ_INIT(&kqueueop->evsigevents[i]); } - /* Check for Mac OS X kqueue bug. */ - memset(&kqueueop->changes[0], 0, sizeof kqueueop->changes[0]); - kqueueop->changes[0].ident = -1; - kqueueop->changes[0].filter = EVFILT_READ; - kqueueop->changes[0].flags = EV_ADD; - /* - * If kqueue works, then kevent will succeed, and it will - * stick an error in events[0]. If kqueue is broken, then - * kevent will fail. - */ - if (kevent(kq, - kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 || - kqueueop->events[0].ident != -1 || - kqueueop->events[0].flags != EV_ERROR) { - event_warn("%s: detected broken kqueue; not using.", __func__); - free(kqueueop->changes); - free(kqueueop->events); - free(kqueueop); - close(kq); - return (NULL); - } - return (kqueueop); }
diff --git a/base/tracked_objects.h b/base/tracked_objects.h index 81962f3f..7ef0317c 100644 --- a/base/tracked_objects.h +++ b/base/tracked_objects.h
@@ -174,7 +174,7 @@ // (worker threads don't have message loops generally, and hence gathering from // them will continue to be asynchronous). We had an implementation of this in // the past, but the difficulty is dealing with message loops being terminated. -// We can *try* to spam the available threads via some message loop proxy to +// We can *try* to spam the available threads via some task runner to // achieve this feat, and it *might* be valuable when we are collecting data // for upload via UMA (where correctness of data may be more significant than // for a single screen of about:profiler).
diff --git a/blimp/engine/app/blimp_engine_crash_keys.cc b/blimp/engine/app/blimp_engine_crash_keys.cc index d858f50..527aa79a 100644 --- a/blimp/engine/app/blimp_engine_crash_keys.cc +++ b/blimp/engine/app/blimp_engine_crash_keys.cc
@@ -81,6 +81,10 @@ // Temporary for https://crbug.com/616149. { "existing_extension_pref_value_type", crash_keys::kSmallSize }, + + // Temporary for https://crbug.com/625040 + { "swdh_not_handled_message_type", crash_keys::kMediumSize }, + { "swdh_not_handled_worker_status", crash_keys::kMediumSize }, }; return base::debug::InitCrashKeys(engine_keys, arraysize(engine_keys),
diff --git a/blimp/engine/app/blimp_system_url_request_context_getter.cc b/blimp/engine/app/blimp_system_url_request_context_getter.cc index c4c5bde..0422ba5d 100644 --- a/blimp/engine/app/blimp_system_url_request_context_getter.cc +++ b/blimp/engine/app/blimp_system_url_request_context_getter.cc
@@ -42,7 +42,7 @@ scoped_refptr<base::SingleThreadTaskRunner> BlimpSystemURLRequestContextGetter::GetNetworkTaskRunner() const { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); }
diff --git a/blimp/engine/app/blimp_url_request_context_getter.cc b/blimp/engine/app/blimp_url_request_context_getter.cc index fe5db28..42133f3c 100644 --- a/blimp/engine/app/blimp_url_request_context_getter.cc +++ b/blimp/engine/app/blimp_url_request_context_getter.cc
@@ -91,7 +91,7 @@ scoped_refptr<base::SingleThreadTaskRunner> BlimpURLRequestContextGetter::GetNetworkTaskRunner() const { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); }
diff --git a/blimp/engine/browser_tests/blimp_browser_test.cc b/blimp/engine/browser_tests/blimp_browser_test.cc index 9368052..13a3e6a5b 100644 --- a/blimp/engine/browser_tests/blimp_browser_test.cc +++ b/blimp/engine/browser_tests/blimp_browser_test.cc
@@ -76,8 +76,7 @@ } void BlimpBrowserTest::TearDownOnMainThread() { - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::UI) + content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::UI) ->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); }
diff --git a/blimp/engine/common/blimp_browser_context.cc b/blimp/engine/common/blimp_browser_context.cc index 7652ce1..9868c23 100644 --- a/blimp/engine/common/blimp_browser_context.cc +++ b/blimp/engine/common/blimp_browser_context.cc
@@ -181,9 +181,9 @@ resource_context_->set_url_request_context_getter( new BlimpURLRequestContextGetter( ignore_certificate_errors_, GetPath(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), net_log_)); return resource_context_->url_request_context_getter().get();
diff --git a/blimp/engine/session/blimp_engine_session.cc b/blimp/engine/session/blimp_engine_session.cc index bbd18e5..70134b6 100644 --- a/blimp/engine/session/blimp_engine_session.cc +++ b/blimp/engine/session/blimp_engine_session.cc
@@ -302,10 +302,10 @@ } void BlimpEngineSession::RegisterFeatures() { - thread_pipe_manager_.reset(new ThreadPipeManager( - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::IO), - net_components_->GetBrowserConnectionHandler())); + thread_pipe_manager_.reset( + new ThreadPipeManager(content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::IO), + net_components_->GetBrowserConnectionHandler())); // Register features' message senders and receivers. tab_control_message_sender_ =
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py index 93b19e6..3284429 100755 --- a/build/android/buildbot/bb_device_steps.py +++ b/build/android/buildbot/bb_device_steps.py
@@ -38,12 +38,11 @@ # apk: apk to be installed. # apk_package: package for the apk to be installed. # test_apk: apk to run tests on. -# test_data: data folder in format destination:source. # host_driven_root: The host-driven test root directory. # annotation: Annotation of the tests to include. # exclude_annotation: The annotation of the tests to exclude. I_TEST = collections.namedtuple('InstrumentationTest', [ - 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'isolate_file_path', + 'name', 'apk', 'apk_package', 'test_apk', 'isolate_file_path', 'host_driven_root', 'annotation', 'exclude_annotation', 'extra_flags']) @@ -51,10 +50,10 @@ return os.path.join(CHROME_SRC_DIR, *path) -def I(name, apk, apk_package, test_apk, test_data, isolate_file_path=None, +def I(name, apk, apk_package, test_apk, isolate_file_path=None, host_driven_root=None, annotation=None, exclude_annotation=None, extra_flags=None): - return I_TEST(name, apk, apk_package, test_apk, test_data, isolate_file_path, + return I_TEST(name, apk, apk_package, test_apk, isolate_file_path, host_driven_root, annotation, exclude_annotation, extra_flags) INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [ @@ -62,19 +61,16 @@ 'ContentShell.apk', 'org.chromium.content_shell_apk', 'ContentShellTest', - 'content:content/test/data/android/device_files', isolate_file_path='content/content_shell_test_data.isolate'), I('ChromePublic', 'ChromePublic.apk', 'org.chromium.chrome', 'ChromePublicTest', - 'chrome:chrome/test/data/android/device_files', isolate_file_path='chrome/chrome_public_test_apk.isolate'), I('AndroidWebView', 'AndroidWebView.apk', 'org.chromium.android_webview.shell', 'AndroidWebViewTest', - 'webview:android_webview/test/data/device_files', isolate_file_path='android_webview/android_webview_test_data.isolate'), I('ChromeSyncShell', 'ChromeSyncShell.apk', @@ -245,8 +241,6 @@ '--test-apk', test.test_apk, '--verbose', '--blacklist-file', 'out/bad_devices.json' ] - if test.test_data: - args.extend(['--test_data', test.test_data]) if options.target == 'Release': args.append('--release') if options.asan:
diff --git a/build/android/pylib/base/base_test_result.py b/build/android/pylib/base/base_test_result.py index af4b71c..b8812656 100644 --- a/build/android/pylib/base/base_test_result.py +++ b/build/android/pylib/base/base_test_result.py
@@ -161,6 +161,7 @@ """ assert isinstance(result, BaseTestResult) with self._results_lock: + self._results.discard(result) self._results.add(result) def AddResults(self, results):
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py index b1c4741..62e62b803 100644 --- a/build/android/pylib/instrumentation/instrumentation_test_instance.py +++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -372,7 +372,6 @@ self._isolate_abs_path = None self._isolate_delegate = None self._isolated_abs_path = None - self._test_data = None self._initializeDataDependencyAttributes(args, isolate_delegate) self._annotations = None @@ -471,15 +470,7 @@ else: self._isolate_delegate = None - # TODO(jbudorick): Deprecate and remove --test-data once data dependencies - # are fully converted to isolate. - if args.test_data: - logging.info('Data dependencies specified via --test-data') - self._test_data = args.test_data - else: - self._test_data = None - - if not self._isolate_delegate and not self._test_data: + if not self._isolate_delegate: logging.warning('No data dependencies will be pushed.') def _initializeTestFilterAttributes(self, args): @@ -628,16 +619,6 @@ self._isolate_delegate.MoveOutputDeps() self._data_deps.extend([(self._isolate_delegate.isolate_deps_dir, None)]) - # TODO(jbudorick): Convert existing tests that depend on the --test-data - # mechanism to isolate, then remove this. - if self._test_data: - for t in self._test_data: - device_rel_path, host_rel_path = t.split(':') - host_abs_path = os.path.join(host_paths.DIR_SOURCE_ROOT, host_rel_path) - self._data_deps.extend( - [(host_abs_path, - [None, 'chrome', 'test', 'data', device_rel_path])]) - def GetDataDependencies(self): return self._data_deps
diff --git a/build/android/pylib/local/device/local_device_environment.py b/build/android/pylib/local/device/local_device_environment.py index 56e86786..178e2f1 100644 --- a/build/android/pylib/local/device/local_device_environment.py +++ b/build/android/pylib/local/device/local_device_environment.py
@@ -55,6 +55,9 @@ logging.warning('No target devices specified. Falling back to ' 'running on all available devices.') device_arg = 'default' + else: + logging.info( + 'Read device list %s from target devices file.', str(device_arg)) elif self._device_serial: device_arg = self._device_serial
diff --git a/build/android/pylib/local/device/local_device_test_run.py b/build/android/pylib/local/device/local_device_test_run.py index 544fbf0e..81b855b 100644 --- a/build/android/pylib/local/device/local_device_test_run.py +++ b/build/android/pylib/local/device/local_device_test_run.py
@@ -123,38 +123,54 @@ logging.info('Finished running tests on this device.') + class TestsTerminated(Exception): + pass + def stop_tests(_signum, _frame): + logging.critical('Received SIGTERM. Stopping test execution.') exit_now.set() + raise TestsTerminated() - with signal_handler.AddSignalHandler(signal.SIGTERM, stop_tests): - tries = 0 - results = [] - while tries < self._env.max_tries and tests: - logging.info('STARTING TRY #%d/%d', tries + 1, self._env.max_tries) - logging.info('Will run %d tests on %d devices: %s', - len(tests), len(self._env.devices), - ', '.join(str(d) for d in self._env.devices)) - for t in tests: - logging.debug(' %s', t) + try: + with signal_handler.AddSignalHandler(signal.SIGTERM, stop_tests): + tries = 0 + results = [] + while tries < self._env.max_tries and tests: + logging.info('STARTING TRY #%d/%d', tries + 1, self._env.max_tries) + logging.info('Will run %d tests on %d devices: %s', + len(tests), len(self._env.devices), + ', '.join(str(d) for d in self._env.devices)) + for t in tests: + logging.debug(' %s', t) - try_results = base_test_result.TestRunResults() - if self._ShouldShard(): - tc = test_collection.TestCollection(self._CreateShards(tests)) - self._env.parallel_devices.pMap( - run_tests_on_device, tc, try_results).pGet(None) - else: - self._env.parallel_devices.pMap( - run_tests_on_device, tests, try_results).pGet(None) + try_results = base_test_result.TestRunResults() + test_names = (self._GetUniqueTestName(t) for t in tests) + try_results.AddResults( + base_test_result.BaseTestResult( + t, base_test_result.ResultType.UNKNOWN) + for t in test_names if not t.endswith('*')) - results.append(try_results) - tries += 1 - tests = self._GetTestsToRetry(tests, try_results) + try: + if self._ShouldShard(): + tc = test_collection.TestCollection(self._CreateShards(tests)) + self._env.parallel_devices.pMap( + run_tests_on_device, tc, try_results).pGet(None) + else: + self._env.parallel_devices.pMap( + run_tests_on_device, tests, try_results).pGet(None) + finally: + results.append(try_results) - logging.info('FINISHED TRY #%d/%d', tries, self._env.max_tries) - if tests: - logging.info('%d failed tests remain.', len(tests)) - else: - logging.info('All tests completed.') + tries += 1 + tests = self._GetTestsToRetry(tests, try_results) + + logging.info('FINISHED TRY #%d/%d', tries, self._env.max_tries) + if tests: + logging.info('%d failed tests remain.', len(tests)) + else: + logging.info('All tests completed.') + except TestsTerminated: + pass return results
diff --git a/build/android/stacktrace/java_deobfuscate.py b/build/android/stacktrace/java_deobfuscate.py new file mode 100755 index 0000000..a468ec3 --- /dev/null +++ b/build/android/stacktrace/java_deobfuscate.py
@@ -0,0 +1,60 @@ +#!/usr/bin/env python +# 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. + +"""A tool to deobfuscate Java stack traces. + +Utility wrapper around ReTrace to deobfuscate stack traces that have been +mangled by ProGuard. Takes stack traces from stdin (eg. adb logcat | +java_deobfuscate.py proguard.mapping) and files. +""" + +# Can just run: +# java -jar third_party/proguard/lib/retrace.jar -regex \ +# "(?:.*?\bat\s+%c\.%m\s*\(%s(?::%l)?\)\s*)|(?:(?:.*?[:\"]\s+)?%c(?::.*)?)" \ +# ~/mapping +# in terminal to achieve same effect as this tool. + +import argparse +import os +import subprocess +import sys + +_THIRD_PARTY_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), + os.pardir, os.pardir, os.pardir, + 'third_party')) +sys.path.append(os.path.join(_THIRD_PARTY_DIR, 'catapult', 'devil')) +from devil.utils import cmd_helper + + +# This regex is taken from +# http://proguard.sourceforge.net/manual/retrace/usage.html. +_LINE_PARSE_REGEX = ( + r'(?:.*?\bat\s+%c\.%m\s*\(%s(?::%l)?\)\s*)|(?:(?:.*?[:"]\s+)?%c(?::.*)?)') + + +def main(): + parser = argparse.ArgumentParser(description=(__doc__)) + parser.add_argument( + 'mapping_file', + help='ProGuard mapping file from build which the stacktrace is from.') + parser.add_argument( + '--stacktrace', + help='Stacktrace file to be deobfuscated.') + args = parser.parse_args() + + retrace_path = os.path.join(_THIRD_PARTY_DIR, 'proguard', + 'lib', 'retrace.jar') + + base_args = ['java', '-jar', retrace_path, '-regex', _LINE_PARSE_REGEX, + args.mapping_file] + if args.stacktrace: + subprocess.call(base_args + [args.stacktrace]) + else: + for line in cmd_helper.IterCmdOutputLines(base_args): + print line + + +if __name__ == '__main__': + main()
diff --git a/build/android/test_runner.py b/build/android/test_runner.py index 8ca3ed7..46889f94 100755 --- a/build/android/test_runner.py +++ b/build/android/test_runner.py
@@ -340,13 +340,6 @@ argument_group.add_argument( '--official-build', action='store_true', help='Run official build tests.') argument_group.add_argument( - '--test_data', '--test-data', action='append', default=[], - help=('Each instance defines a directory of test data that should be ' - 'copied to the target(s) before running the tests. The argument ' - 'should be of the form <target>:<source>, <target> is relative to ' - 'the device data directory, and <source> is relative to the ' - 'chromium build directory.')) - argument_group.add_argument( '--disable-dalvik-asserts', dest='set_asserts', action='store_false', default=True, help='Removes the dalvik.vm.enableassertions property')
diff --git a/build/common.gypi b/build/common.gypi index 66f152d..cdefdd1 100644 --- a/build/common.gypi +++ b/build/common.gypi
@@ -5703,6 +5703,7 @@ 'VCCLCompilerTool': { 'AdditionalOptions': ['/MP'], 'MinimalRebuild': 'false', + 'BufferSecurityCheck': 'true', 'EnableFunctionLevelLinking': 'true', 'RuntimeTypeInfo': 'false', 'WarningLevel': '4', @@ -5775,14 +5776,6 @@ }], ], 'conditions': [ - ['clang==0', { - 'VCCLCompilerTool': { - # TODO(thakis): Enable this with clang too, - # https://crbug.com/598767 - 'BufferSecurityCheck': 'true', - }, - }], - # Building with Clang on Windows is a work in progress and very # experimental. See crbug.com/82385. # Keep this in sync with the similar blocks in build/config/compiler/BUILD.gn
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni index a6cc4fe..9915203 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni
@@ -1967,7 +1967,9 @@ _extra_native_libs_even_when_incremental_deps = [] assert(_extra_native_libs_even_when_incremental_deps == []) # Mark as used. if (_native_libs_deps != []) { - if (is_debug) { + # zipalign can't align gdb_server, don't pack gdbserver temporarily. + if (is_debug && (!defined(invoker.page_align_shared_libraries) || + !invoker.page_align_shared_libraries)) { _extra_native_libs_even_when_incremental = [ android_gdbserver ] }
diff --git a/build/config/mac/base_rules.gni b/build/config/mac/base_rules.gni index 109710d..df89c40 100644 --- a/build/config/mac/base_rules.gni +++ b/build/config/mac/base_rules.gni
@@ -366,13 +366,14 @@ script = "//build/config/mac/compile_xib.py" sources = invoker.sources outputs = [ - "$target_gen_dir/{{source_name_part}}.nib", + "$target_gen_dir/$target_name/{{source_name_part}}.nib", ] - args = [ - "--input", - "{{source}}", - "--output", - rebase_path("$target_gen_dir/{{source_name_part}}.nib"), - ] + ibtool_flags + args = + [ + "--input", + "{{source}}", + "--output", + rebase_path("$target_gen_dir/$target_name/{{source_name_part}}.nib"), + ] + ibtool_flags } }
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py index d1aa1aac..2003ff6 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -36,26 +36,22 @@ URL_PATH = 'chrome-linux-sysroot/toolchain' REVISION_AMD64 = 'c52471d9dec240c8d0a88fa98aa1eefeee32e22f' REVISION_ARM = 'c52471d9dec240c8d0a88fa98aa1eefeee32e22f' -REVISION_ARM64 = 'bd10c315594d2a20e31a94a7a6c7adb9a0961c56' REVISION_I386 = 'c52471d9dec240c8d0a88fa98aa1eefeee32e22f' REVISION_MIPS = 'c52471d9dec240c8d0a88fa98aa1eefeee32e22f' TARBALL_AMD64 = 'debian_wheezy_amd64_sysroot.tgz' TARBALL_ARM = 'debian_wheezy_arm_sysroot.tgz' -TARBALL_ARM64 = 'debian_jessie_arm64_sysroot.tgz' TARBALL_I386 = 'debian_wheezy_i386_sysroot.tgz' TARBALL_MIPS = 'debian_wheezy_mips_sysroot.tgz' TARBALL_AMD64_SHA1SUM = 'ca4ed6e7c9e333b046be19d38584a11f6785eea6' TARBALL_ARM_SHA1SUM = '1fab0c2b1e93a933ddc593df3b43872b0ba5ded2' -TARBALL_ARM64_SHA1SUM = '0db3be51912e0be46bb1b906fc196c5c1dfc090f' TARBALL_I386_SHA1SUM = '80c48c303319af2284e4a104c882d888af75ba81' TARBALL_MIPS_SHA1SUM = '01da32a35288627e05cfca193b7f3659531c6f7d' SYSROOT_DIR_AMD64 = 'debian_wheezy_amd64-sysroot' SYSROOT_DIR_ARM = 'debian_wheezy_arm-sysroot' -SYSROOT_DIR_ARM64 = 'debian_jessie_arm64-sysroot' SYSROOT_DIR_I386 = 'debian_wheezy_i386-sysroot' SYSROOT_DIR_MIPS = 'debian_wheezy_mips-sysroot' -valid_archs = ('arm', 'arm64', 'i386', 'amd64', 'mips') +valid_archs = ('arm', 'i386', 'amd64', 'mips') class Error(Exception): @@ -133,7 +129,7 @@ # Don't attampt to install arm64 since this is currently and android-only # architecture. target_arch = DetectTargetArch() - if target_arch and target_arch not in (host_arch, 'i386'): + if target_arch and target_arch not in (host_arch, 'i386', 'arm64'): InstallSysroot(target_arch) @@ -174,11 +170,6 @@ tarball_filename = TARBALL_ARM tarball_sha1sum = TARBALL_ARM_SHA1SUM revision = REVISION_ARM - elif target_arch == 'arm64': - sysroot = os.path.join(linux_dir, SYSROOT_DIR_ARM64) - tarball_filename = TARBALL_ARM64 - tarball_sha1sum = TARBALL_ARM64_SHA1SUM - revision = REVISION_ARM64 elif target_arch == 'i386': sysroot = os.path.join(linux_dir, SYSROOT_DIR_I386) tarball_filename = TARBALL_I386
diff --git a/build/linux/sysroot_scripts/packagelist.jessie.arm64 b/build/linux/sysroot_scripts/packagelist.jessie.arm64 index 7a3358cc..c95cbf0d 100644 --- a/build/linux/sysroot_scripts/packagelist.jessie.arm64 +++ b/build/linux/sysroot_scripts/packagelist.jessie.arm64
@@ -20,8 +20,8 @@ main/e/e2fsprogs/libcomerr2_1.42.12-1.1_arm64.deb main/e/elfutils/libelf1_0.159-4.2_arm64.deb main/e/elfutils/libelf-dev_0.159-4.2_arm64.deb -main/e/expat/libexpat1_2.1.0-6+deb8u2_arm64.deb -main/e/expat/libexpat1-dev_2.1.0-6+deb8u2_arm64.deb +main/e/expat/libexpat1_2.1.0-6+deb8u1_arm64.deb +main/e/expat/libexpat1-dev_2.1.0-6+deb8u1_arm64.deb main/f/fontconfig/libfontconfig1_2.11.0-6.3_arm64.deb main/f/fontconfig/libfontconfig1-dev_2.11.0-6.3_arm64.deb main/f/freetype/libfreetype6_2.5.2-3+deb8u1_arm64.deb @@ -86,7 +86,7 @@ main/libp/libpng/libpng12-dev_1.2.50-2+deb8u2_arm64.deb main/libp/libpthread-stubs/libpthread-stubs0-dev_0.3-4_arm64.deb main/libs/libselinux/libselinux1_2.3-2_arm64.deb -main/libt/libtasn1-6/libtasn1-6_4.2-3+deb8u2_arm64.deb +main/libt/libtasn1-6/libtasn1-6_4.2-3+deb8u1_arm64.deb main/libt/libthai/libthai0_0.1.21-1_arm64.deb main/libx/libx11/libx11-6_1.6.2-3_arm64.deb main/libx/libx11/libx11-dev_1.6.2-3_arm64.deb @@ -127,7 +127,7 @@ main/libx/libxtst/libxtst6_1.2.2-1+b1_arm64.deb main/libx/libxtst/libxtst-dev_1.2.2-1+b1_arm64.deb main/libx/libxxf86vm/libxxf86vm1_1.1.3-1+b1_arm64.deb -main/l/linux/linux-libc-dev_3.16.7-ckt25-2_arm64.deb +main/l/linux/linux-libc-dev_3.16.7-ckt25-1_arm64.deb main/m/mesa/libgl1-mesa-dev_10.3.2-1+deb8u1_arm64.deb main/m/mesa/libgl1-mesa-glx_10.3.2-1+deb8u1_arm64.deb main/m/mesa/libglapi-mesa_10.3.2-1+deb8u1_arm64.deb @@ -138,8 +138,8 @@ main/n/nspr/libnspr4-dev_4.10.7-1+deb8u1_arm64.deb main/n/nss/libnss3_3.17.2-1.1+deb8u2_arm64.deb main/n/nss/libnss3-dev_3.17.2-1.1+deb8u2_arm64.deb -main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u2_arm64.deb -main/o/openssl/libssl-dev_1.0.1t-1+deb8u2_arm64.deb +main/o/openssl/libssl1.0.0_1.0.1k-3+deb8u4_arm64.deb +main/o/openssl/libssl-dev_1.0.1k-3+deb8u4_arm64.deb main/o/orbit2/liborbit2_2.14.19-0.3_arm64.deb main/p/p11-kit/libp11-kit0_0.20.7-1_arm64.deb main/p/pam/libpam0g_1.1.8-3.1+deb8u1+b1_arm64.deb
diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h index 30ac88d..11a3310 100644 --- a/cc/input/input_handler.h +++ b/cc/input/input_handler.h
@@ -31,7 +31,6 @@ namespace cc { -class LayerScrollOffsetDelegate; class ScrollElasticityHelper; struct CC_EXPORT InputHandlerScrollResult {
diff --git a/cc/ipc/cc_serialization_perftest.cc b/cc/ipc/cc_serialization_perftest.cc index cad0894..9c75cf5 100644 --- a/cc/ipc/cc_serialization_perftest.cc +++ b/cc/ipc/cc_serialization_perftest.cc
@@ -37,8 +37,48 @@ class CCSerializationPerfTest : public testing::Test { protected: - static void RunTestParamTraits(const std::string& test_name, - const CompositorFrame& frame) { + static bool ReadMessage(const IPC::Message* msg, CompositorFrame* frame) { + base::PickleIterator iter(*msg); + return IPC::ParamTraits<CompositorFrame>::Read(msg, &iter, frame); + } + + static void RunDeserializationTestParamTraits(const std::string& test_name, + const CompositorFrame& frame) { + IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); + IPC::ParamTraits<CompositorFrame>::Write(&msg, frame); + for (int i = 0; i < kNumWarmupRuns; ++i) { + CompositorFrame compositor_frame; + ReadMessage(&msg, &compositor_frame); + } + + base::TimeTicks start = base::TimeTicks::Now(); + base::TimeTicks end = + start + base::TimeDelta::FromMilliseconds(kTimeLimitMillis); + base::TimeDelta min_time; + size_t count = 0; + while (start < end) { + for (int i = 0; i < kTimeCheckInterval; ++i) { + ++count; + CompositorFrame compositor_frame; + ReadMessage(&msg, &compositor_frame); + } + + base::TimeTicks now = base::TimeTicks::Now(); + if (now - start < min_time || min_time.is_zero()) + min_time = now - start; + start = base::TimeTicks::Now(); + } + + perf_test::PrintResult( + "ParamTraits deserialization: min_frame_deserialization_time", "", + test_name, min_time.InMillisecondsF() / kTimeCheckInterval * 1000, "us", + true); + perf_test::PrintResult("ParamTraits deserialization: num runs in 2 seconds", + "", test_name, count, "", true); + } + + static void RunSerializationTestParamTraits(const std::string& test_name, + const CompositorFrame& frame) { for (int i = 0; i < kNumWarmupRuns; ++i) { IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); IPC::ParamTraits<CompositorFrame>::Write(&msg, frame); @@ -63,14 +103,51 @@ } perf_test::PrintResult( - "ParamTraits: min_frame_serialization_time", "", test_name, - min_time.InMillisecondsF() / kTimeCheckInterval * 1000, "us", true); - perf_test::PrintResult("ParamTraits: num runs in 2 seconds", "", test_name, - count, "", true); + "ParamTraits serialization: min_frame_serialization_time", "", + test_name, min_time.InMillisecondsF() / kTimeCheckInterval * 1000, "us", + true); + perf_test::PrintResult("ParamTraits serialization: num runs in 2 seconds", + "", test_name, count, "", true); } - static void RunTestStructTraits(const std::string& test_name, - const CompositorFrame& frame) { + static void RunDeserializationTestStructTraits(const std::string& test_name, + const CompositorFrame& frame) { + mojo::Array<uint8_t> data = mojom::CompositorFrame::Serialize(&frame); + DCHECK_GT(data.size(), 0u); + for (int i = 0; i < kNumWarmupRuns; ++i) { + CompositorFrame compositor_frame; + mojom::CompositorFrame::Deserialize(data, &compositor_frame); + } + + base::TimeTicks start = base::TimeTicks::Now(); + base::TimeTicks end = + start + base::TimeDelta::FromMilliseconds(kTimeLimitMillis); + base::TimeDelta min_time; + size_t count = 0; + while (start < end) { + for (int i = 0; i < kTimeCheckInterval; ++i) { + CompositorFrame compositor_frame; + mojom::CompositorFrame::Deserialize(data, &compositor_frame); + ++count; + } + + base::TimeTicks now = base::TimeTicks::Now(); + if (now - start < min_time || min_time.is_zero()) + min_time = now - start; + start = base::TimeTicks::Now(); + } + + perf_test::PrintResult( + "StructTraits deserialization min_frame_deserialization_time", "", + test_name, min_time.InMillisecondsF() / kTimeCheckInterval * 1000, "us", + true); + perf_test::PrintResult( + "StructTraits deserialization: num runs in 2 seconds", "", test_name, + count, "", true); + } + + static void RunSerializationTestStructTraits(const std::string& test_name, + const CompositorFrame& frame) { for (int i = 0; i < kNumWarmupRuns; ++i) { mojo::Array<uint8_t> data = mojom::CompositorFrame::Serialize(&frame); DCHECK_GT(data.size(), 0u); @@ -95,15 +172,18 @@ } perf_test::PrintResult( - "StructTraits min_frame_serialization_time", "", test_name, - min_time.InMillisecondsF() / kTimeCheckInterval * 1000, "us", true); - perf_test::PrintResult("StructTraits: num runs in 2 seconds", "", test_name, - count, "", true); + "StructTraits serialization min_frame_serialization_time", "", + test_name, min_time.InMillisecondsF() / kTimeCheckInterval * 1000, "us", + true); + perf_test::PrintResult("StructTraits serialization: num runs in 2 seconds", + "", test_name, count, "", true); } static void RunTest(const std::string& test_name, CompositorFrame frame) { - RunTestStructTraits(test_name, frame); - RunTestParamTraits(test_name, frame); + RunSerializationTestStructTraits(test_name, frame); + RunDeserializationTestStructTraits(test_name, frame); + RunSerializationTestParamTraits(test_name, frame); + RunDeserializationTestParamTraits(test_name, frame); } };
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index 30c110e..e36d745 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc
@@ -162,7 +162,8 @@ inputs_.replica_layer->SetLayerTreeHost(host); const bool has_any_animation = - layer_tree_host_ ? layer_tree_host_->HasAnyAnimation(this) : false; + layer_tree_host_ ? GetAnimationHost()->HasAnyAnimation(element_id()) + : false; if (host && has_any_animation) host->SetNeedsCommit(); @@ -465,15 +466,6 @@ SetNeedsCommit(); } -bool Layer::FilterIsAnimating() const { - DCHECK(layer_tree_host_); - return layer_tree_host_->IsAnimatingFilterProperty(this); -} - -bool Layer::HasPotentiallyRunningFilterAnimation() const { - return layer_tree_host_->HasPotentiallyRunningFilterAnimation(this); -} - void Layer::SetBackgroundFilters(const FilterOperations& filters) { DCHECK(IsPropertyChangeAllowed()); if (inputs_.background_filters == filters) @@ -515,15 +507,6 @@ return inputs_.hide_layer_and_subtree ? 0.f : inputs_.opacity; } -bool Layer::OpacityIsAnimating() const { - DCHECK(layer_tree_host_); - return layer_tree_host_->IsAnimatingOpacityProperty(this); -} - -bool Layer::HasPotentiallyRunningOpacityAnimation() const { - return layer_tree_host_->HasPotentiallyRunningOpacityAnimation(this); -} - bool Layer::OpacityCanAnimateOnImplThread() const { return false; } @@ -717,40 +700,13 @@ SetNeedsCommit(); } -bool Layer::AnimationsPreserveAxisAlignment() const { - DCHECK(layer_tree_host_); - return layer_tree_host_->AnimationsPreserveAxisAlignment(this); -} - -bool Layer::TransformIsAnimating() const { - DCHECK(layer_tree_host_); - return layer_tree_host_->IsAnimatingTransformProperty(this); -} - -bool Layer::HasPotentiallyRunningTransformAnimation() const { - return layer_tree_host_->HasPotentiallyRunningTransformAnimation(this); +bool Layer::ScrollOffsetAnimationWasInterrupted() const { + return GetAnimationHost()->ScrollOffsetAnimationWasInterrupted(element_id()); } bool Layer::HasOnlyTranslationTransforms() const { - return layer_tree_host_->HasOnlyTranslationTransforms(this); -} - -bool Layer::MaximumTargetScale(float* max_scale) const { - return layer_tree_host_->MaximumTargetScale(this, max_scale); -} - -bool Layer::AnimationStartScale(float* start_scale) const { - return layer_tree_host_->AnimationStartScale(this, start_scale); -} - -bool Layer::HasAnyAnimationTargetingProperty( - TargetProperty::Type property) const { - return layer_tree_host_->HasAnyAnimationTargetingProperty(this, property); -} - -bool Layer::ScrollOffsetAnimationWasInterrupted() const { - DCHECK(layer_tree_host_); - return layer_tree_host_->ScrollOffsetAnimationWasInterrupted(this); + return GetAnimationHost()->HasOnlyTranslationTransforms( + element_id(), GetElementTypeForAnimation()); } void Layer::SetScrollParent(Layer* parent) { @@ -1637,6 +1593,16 @@ SetNeedsPushProperties(); } +bool Layer::FilterIsAnimating() const { + return GetAnimationHost()->IsAnimatingFilterProperty( + element_id(), GetElementTypeForAnimation()); +} + +bool Layer::TransformIsAnimating() const { + return GetAnimationHost()->IsAnimatingTransformProperty( + element_id(), GetElementTypeForAnimation()); +} + gfx::ScrollOffset Layer::ScrollOffsetForAnimation() const { return CurrentScrollOffset(); } @@ -1761,8 +1727,9 @@ } bool Layer::HasActiveAnimationForTesting() const { - return layer_tree_host_ ? layer_tree_host_->HasActiveAnimationForTesting(this) - : false; + return layer_tree_host_ + ? GetAnimationHost()->HasActiveAnimationForTesting(element_id()) + : false; } void Layer::SetHasWillChangeTransformHint(bool has_will_change) { @@ -1772,12 +1739,16 @@ SetNeedsCommit(); } -ScrollbarLayerInterface* Layer::ToScrollbarLayer() { - return nullptr; +AnimationHost* Layer::GetAnimationHost() const { + return layer_tree_host_ ? layer_tree_host_->animation_host() : nullptr; } -RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { - return layer_tree_host_->rendering_stats_instrumentation(); +ElementListType Layer::GetElementTypeForAnimation() const { + return ElementListType::ACTIVE; +} + +ScrollbarLayerInterface* Layer::ToScrollbarLayer() { + return nullptr; } void Layer::RemoveFromScrollTree() {
diff --git a/cc/layers/layer.h b/cc/layers/layer.h index addb510..a85d995 100644 --- a/cc/layers/layer.h +++ b/cc/layers/layer.h
@@ -27,6 +27,7 @@ #include "cc/layers/layer_position_constraint.h" #include "cc/layers/paint_properties.h" #include "cc/output/filter_operations.h" +#include "cc/trees/mutator_host_client.h" #include "cc/trees/property_tree.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkPicture.h" @@ -49,6 +50,7 @@ namespace cc { +class AnimationHost; class CopyOutputRequest; class LayerAnimationEventObserver; class LayerClient; @@ -133,8 +135,6 @@ virtual void SetOpacity(float opacity); float opacity() const { return inputs_.opacity; } float EffectiveOpacity() const; - bool OpacityIsAnimating() const; - bool HasPotentiallyRunningOpacityAnimation() const; virtual bool OpacityCanAnimateOnImplThread() const; virtual bool AlwaysUseActiveTreeOpacity() const; @@ -165,8 +165,6 @@ void SetFilters(const FilterOperations& filters); const FilterOperations& filters() const { return inputs_.filters; } - bool FilterIsAnimating() const; - bool HasPotentiallyRunningFilterAnimation() const; // Background filters are filters applied to what is behind this layer, when // they are viewed through non-opaque regions in this layer. They are used @@ -198,29 +196,15 @@ void SetTransform(const gfx::Transform& transform); const gfx::Transform& transform() const { return inputs_.transform; } - bool TransformIsAnimating() const; - bool HasPotentiallyRunningTransformAnimation() const; - bool HasOnlyTranslationTransforms() const; - bool AnimationsPreserveAxisAlignment() const; - - bool MaximumTargetScale(float* max_scale) const; - bool AnimationStartScale(float* start_scale) const; void SetTransformOrigin(const gfx::Point3F&); gfx::Point3F transform_origin() const { return inputs_.transform_origin; } - bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const; - - bool ScrollOffsetAnimationWasInterrupted() const; - void SetScrollParent(Layer* parent); Layer* scroll_parent() { return inputs_.scroll_parent; } const Layer* scroll_parent() const { return inputs_.scroll_parent; } - void AddScrollChild(Layer* child); - void RemoveScrollChild(Layer* child); - std::set<Layer*>* scroll_children() { return scroll_children_.get(); } const std::set<Layer*>* scroll_children() const { return scroll_children_.get(); @@ -231,9 +215,6 @@ Layer* clip_parent() { return inputs_.clip_parent; } const Layer* clip_parent() const { return inputs_.clip_parent; } - void AddClipChild(Layer* child); - void RemoveClipChild(Layer* child); - std::set<Layer*>* clip_children() { return clip_children_.get(); } const std::set<Layer*>* clip_children() const { return clip_children_.get(); @@ -422,8 +403,6 @@ bool NeedsDisplayForTesting() const { return !inputs_.update_rect.IsEmpty(); } void ResetNeedsDisplayForTesting() { inputs_.update_rect = gfx::Rect(); } - RenderingStatsInstrumentation* rendering_stats_instrumentation() const; - const PaintProperties& paint_properties() const { return paint_properties_; } @@ -508,6 +487,10 @@ return inputs_.has_will_change_transform_hint; } + AnimationHost* GetAnimationHost() const; + + ElementListType GetElementTypeForAnimation() const; + protected: friend class LayerImpl; friend class TreeSynchronizer; @@ -581,6 +564,17 @@ void OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating); void OnOpacityIsPotentiallyAnimatingChanged(bool has_potential_animation); + bool FilterIsAnimating() const; + bool TransformIsAnimating() const; + bool ScrollOffsetAnimationWasInterrupted() const; + bool HasOnlyTranslationTransforms() const; + + void AddScrollChild(Layer* child); + void RemoveScrollChild(Layer* child); + + void AddClipChild(Layer* child); + void RemoveClipChild(Layer* child); + void SetParent(Layer* layer); bool DescendantIsFixedToContainerLayer() const;
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index 163ee3a5..abc24ae 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc
@@ -16,6 +16,7 @@ #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event_argument.h" +#include "cc/animation/animation_host.h" #include "cc/animation/mutable_properties.h" #include "cc/base/math_util.h" #include "cc/base/simple_enclosed_region.h" @@ -107,6 +108,14 @@ has_will_change_transform_hint_ = has_will_change; } +AnimationHost* LayerImpl::GetAnimationHost() const { + return layer_tree_impl_ ? layer_tree_impl_->animation_host() : nullptr; +} + +ElementListType LayerImpl::GetElementTypeForAnimation() const { + return IsActive() ? ElementListType::ACTIVE : ElementListType::PENDING; +} + void LayerImpl::SetDebugInfo( std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) { owned_debug_info_ = std::move(debug_info); @@ -773,11 +782,13 @@ } bool LayerImpl::FilterIsAnimating() const { - return layer_tree_impl_->IsAnimatingFilterProperty(this); + return GetAnimationHost()->IsAnimatingFilterProperty( + element_id(), GetElementTypeForAnimation()); } bool LayerImpl::HasPotentiallyRunningFilterAnimation() const { - return layer_tree_impl_->HasPotentiallyRunningFilterAnimation(this); + return GetAnimationHost()->HasPotentiallyRunningFilterAnimation( + element_id(), GetElementTypeForAnimation()); } void LayerImpl::SetMasksToBounds(bool masks_to_bounds) { @@ -797,14 +808,6 @@ return node->opacity; } -bool LayerImpl::OpacityIsAnimating() const { - return layer_tree_impl_->IsAnimatingOpacityProperty(this); -} - -bool LayerImpl::HasPotentiallyRunningOpacityAnimation() const { - return layer_tree_impl_->HasPotentiallyRunningOpacityAnimation(this); -} - void LayerImpl::SetElementId(ElementId element_id) { if (element_id == element_id_) return; @@ -849,54 +852,49 @@ } bool LayerImpl::TransformIsAnimating() const { - return layer_tree_impl_->IsAnimatingTransformProperty(this); + return GetAnimationHost()->IsAnimatingTransformProperty( + element_id(), GetElementTypeForAnimation()); } bool LayerImpl::HasPotentiallyRunningTransformAnimation() const { - return layer_tree_impl_->HasPotentiallyRunningTransformAnimation(this); + return GetAnimationHost()->HasPotentiallyRunningTransformAnimation( + element_id(), GetElementTypeForAnimation()); } bool LayerImpl::HasOnlyTranslationTransforms() const { - return layer_tree_impl_->HasOnlyTranslationTransforms(this); -} - -bool LayerImpl::AnimationsPreserveAxisAlignment() const { - return layer_tree_impl_->AnimationsPreserveAxisAlignment(this); -} - -bool LayerImpl::MaximumTargetScale(float* max_scale) const { - return layer_tree_impl_->MaximumTargetScale(this, max_scale); -} - -bool LayerImpl::AnimationStartScale(float* start_scale) const { - return layer_tree_impl_->AnimationStartScale(this, start_scale); + return GetAnimationHost()->HasOnlyTranslationTransforms( + element_id(), GetElementTypeForAnimation()); } bool LayerImpl::HasAnyAnimationTargetingProperty( TargetProperty::Type property) const { - return layer_tree_impl_->HasAnyAnimationTargetingProperty(this, property); + return GetAnimationHost()->HasAnyAnimationTargetingProperty(element_id(), + property); } bool LayerImpl::HasFilterAnimationThatInflatesBounds() const { - return layer_tree_impl_->HasFilterAnimationThatInflatesBounds(this); + return GetAnimationHost()->HasFilterAnimationThatInflatesBounds(element_id()); } bool LayerImpl::HasTransformAnimationThatInflatesBounds() const { - return layer_tree_impl_->HasTransformAnimationThatInflatesBounds(this); + return GetAnimationHost()->HasTransformAnimationThatInflatesBounds( + element_id()); } bool LayerImpl::HasAnimationThatInflatesBounds() const { - return layer_tree_impl_->HasAnimationThatInflatesBounds(this); + return GetAnimationHost()->HasAnimationThatInflatesBounds(element_id()); } bool LayerImpl::FilterAnimationBoundsForBox(const gfx::BoxF& box, gfx::BoxF* bounds) const { - return layer_tree_impl_->FilterAnimationBoundsForBox(this, box, bounds); + return GetAnimationHost()->FilterAnimationBoundsForBox(element_id(), box, + bounds); } bool LayerImpl::TransformAnimationBoundsForBox(const gfx::BoxF& box, gfx::BoxF* bounds) const { - return layer_tree_impl_->TransformAnimationBoundsForBox(this, box, bounds); + return GetAnimationHost()->TransformAnimationBoundsForBox(element_id(), box, + bounds); } void LayerImpl::SetUpdateRect(const gfx::Rect& update_rect) { @@ -1027,8 +1025,7 @@ state->SetBoolean("can_use_lcd_text", CanUseLCDText()); state->SetBoolean("contents_opaque", contents_opaque()); - state->SetBoolean("has_animation_bounds", - layer_tree_impl_->HasAnimationThatInflatesBounds(this)); + state->SetBoolean("has_animation_bounds", HasAnimationThatInflatesBounds()); state->SetBoolean("has_will_change_transform_hint", has_will_change_transform_hint());
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index 3c0255f4..a2136db 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h
@@ -34,6 +34,7 @@ #include "cc/quads/shared_quad_state.h" #include "cc/resources/resource_provider.h" #include "cc/tiles/tile_priority.h" +#include "cc/trees/mutator_host_client.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkXfermode.h" #include "ui/gfx/geometry/point3_f.h" @@ -52,6 +53,7 @@ namespace cc { +class AnimationHost; class LayerTreeHostImpl; class LayerTreeImpl; class MicroBenchmarkImpl; @@ -202,8 +204,6 @@ bool contents_opaque() const { return contents_opaque_; } float Opacity() const; - bool OpacityIsAnimating() const; - bool HasPotentiallyRunningOpacityAnimation() const; void SetElementId(ElementId element_id); ElementId element_id() const { return element_id_; } @@ -364,15 +364,6 @@ const gfx::Transform& transform() const { return transform_; } bool TransformIsAnimating() const; bool HasPotentiallyRunningTransformAnimation() const; - bool HasOnlyTranslationTransforms() const; - bool AnimationsPreserveAxisAlignment() const; - - bool MaximumTargetScale(float* max_scale) const; - bool AnimationStartScale(float* start_scale) const; - - // This includes all animations, even those that are finished but haven't yet - // been deleted. - bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const; bool HasFilterAnimationThatInflatesBounds() const; bool HasTransformAnimationThatInflatesBounds() const; @@ -474,6 +465,10 @@ return has_will_change_transform_hint_; } + AnimationHost* GetAnimationHost() const; + + ElementListType GetElementTypeForAnimation() const; + protected: LayerImpl(LayerTreeImpl* layer_impl, int id, @@ -497,6 +492,12 @@ gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const; private: + bool HasOnlyTranslationTransforms() const; + + // This includes all animations, even those that are finished but haven't yet + // been deleted. + bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const; + void ValidateQuadResourcesInternal(DrawQuad* quad) const; virtual const char* LayerTypeAsString() const;
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 5190e95..47f1b22 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc
@@ -3670,7 +3670,7 @@ } void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { - if (!frame->overlay_list.size()) + if (frame->overlay_list.empty()) return; OverlayCandidateList& overlays = frame->overlay_list;
diff --git a/cc/proto/property_tree.proto b/cc/proto/property_tree.proto index 230c62e..ae46cbcf 100644 --- a/cc/proto/property_tree.proto +++ b/cc/proto/property_tree.proto
@@ -68,14 +68,15 @@ } // Proto for struct ClipNodeData. -// NEXT ID: 12 +// NEXT ID: 13 message ClipNodeData { optional RectF clip = 1; optional RectF combined_clip_in_target_space = 2; optional RectF clip_in_target_space = 3; optional int64 transform_id = 4; - optional int64 target_id = 5; + optional int64 target_transform_id = 5; + optional int64 target_effect_id = 12; optional bool applies_local_clip = 6; optional bool layer_clipping_uses_only_local_clip = 7; optional bool target_is_clipped = 8;
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc index d38110e..19b9e92 100644 --- a/cc/resources/resource_provider.cc +++ b/cc/resources/resource_provider.cc
@@ -703,7 +703,8 @@ bool lost_resource = resource->lost || exported_resource_lost || gpu_resource_lost; - if (!lost_resource && + // Wait on sync token before deleting resources we own. + if (!lost_resource && resource->origin == Resource::INTERNAL && resource->synchronization_state() == Resource::NEEDS_WAIT) { DCHECK(resource->allocated); DCHECK(IsGpuResourceType(resource->type)); @@ -744,6 +745,7 @@ GLES2Interface* gl = ContextGL(); DCHECK(gl); if (resource->gl_id) { + DCHECK_NE(Resource::NEEDS_WAIT, resource->synchronization_state()); gl->DeleteTextures(1, &resource->gl_id); resource->gl_id = 0; if (!lost_resource) { @@ -1365,32 +1367,42 @@ std::vector<GLbyte*> unverified_sync_tokens; std::vector<Resource*> need_synchronization_resources; for (Resource* resource : resources) { + if (!IsGpuResourceType(resource->type)) + continue; + CreateMailboxAndBindResource(gl, resource); - if (delegated_sync_points_required_ && resource->needs_sync_token()) { - need_synchronization_resources.push_back(resource); - } else if (resource->mailbox().HasSyncToken() && - !resource->mailbox().sync_token().verified_flush()) { - unverified_sync_tokens.push_back(resource->GetSyncTokenData()); + if (delegated_sync_points_required_) { + if (resource->needs_sync_token()) { + need_synchronization_resources.push_back(resource); + } else if (resource->mailbox().HasSyncToken() && + !resource->mailbox().sync_token().verified_flush()) { + unverified_sync_tokens.push_back(resource->GetSyncTokenData()); + } } } // Insert sync point to synchronize the mailbox creation or bound textures. gpu::SyncToken new_sync_token; - if (gl) { - if (!need_synchronization_resources.empty()) { - const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM(); - gl->OrderingBarrierCHROMIUM(); - gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, new_sync_token.GetData()); - unverified_sync_tokens.push_back(new_sync_token.GetData()); - } - - if (!unverified_sync_tokens.empty()) { - gl->VerifySyncTokensCHROMIUM(unverified_sync_tokens.data(), - unverified_sync_tokens.size()); - } + if (!need_synchronization_resources.empty()) { + DCHECK(delegated_sync_points_required_); + DCHECK(gl); + const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM(); + gl->OrderingBarrierCHROMIUM(); + gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, new_sync_token.GetData()); + unverified_sync_tokens.push_back(new_sync_token.GetData()); } + + if (!unverified_sync_tokens.empty()) { + DCHECK(delegated_sync_points_required_); + DCHECK(gl); + gl->VerifySyncTokensCHROMIUM(unverified_sync_tokens.data(), + unverified_sync_tokens.size()); + } + + // Set sync token after verification. for (Resource* resource : need_synchronization_resources) { + DCHECK(IsGpuResourceType(resource->type)); resource->UpdateSyncToken(new_sync_token); resource->SetSynchronized(); } @@ -1548,24 +1560,25 @@ void ResourceProvider::CreateMailboxAndBindResource( gpu::gles2::GLES2Interface* gl, Resource* resource) { - if (resource->type != RESOURCE_TYPE_BITMAP) { - if (!resource->mailbox().IsValid()) { - LazyCreate(resource); + DCHECK(IsGpuResourceType(resource->type)); + DCHECK(gl); - gpu::MailboxHolder mailbox_holder; - mailbox_holder.texture_target = resource->target; - gl->GenMailboxCHROMIUM(mailbox_holder.mailbox.name); - gl->ProduceTextureDirectCHROMIUM(resource->gl_id, - mailbox_holder.texture_target, - mailbox_holder.mailbox.name); - resource->set_mailbox(TextureMailbox(mailbox_holder)); - } + if (!resource->mailbox().IsValid()) { + LazyCreate(resource); - if (resource->image_id && resource->dirty_image) { - DCHECK(resource->gl_id); - DCHECK(resource->origin == Resource::INTERNAL); - BindImageForSampling(resource); - } + gpu::MailboxHolder mailbox_holder; + mailbox_holder.texture_target = resource->target; + gl->GenMailboxCHROMIUM(mailbox_holder.mailbox.name); + gl->ProduceTextureDirectCHROMIUM(resource->gl_id, + mailbox_holder.texture_target, + mailbox_holder.mailbox.name); + resource->set_mailbox(TextureMailbox(mailbox_holder)); + } + + if (resource->image_id && resource->dirty_image) { + DCHECK(resource->gl_id); + DCHECK(resource->origin == Resource::INTERNAL); + BindImageForSampling(resource); } } @@ -1612,10 +1625,11 @@ ReturnedResourceArray to_return; to_return.reserve(unused.size()); + std::vector<ReturnedResource*> need_synchronization_resources; std::vector<GLbyte*> unverified_sync_tokens; - bool need_sync_token = false; GLES2Interface* gl = ContextGL(); + for (ResourceId local_id : unused) { ResourceMap::iterator it = resources_.find(local_id); CHECK(it != resources_.end()); @@ -1649,10 +1663,11 @@ is_lost = true; } - if (gl && resource.filter != resource.original_filter) { + if (IsGpuResourceType(resource.type) && + resource.filter != resource.original_filter) { DCHECK(resource.target); DCHECK(resource.gl_id); - + DCHECK(gl); gl->BindTexture(resource.target, resource.gl_id); gl->TexParameteri(resource.target, GL_TEXTURE_MIN_FILTER, resource.original_filter); @@ -1663,30 +1678,30 @@ ReturnedResource returned; returned.id = child_id; - if (resource.needs_sync_token()) - need_sync_token = true; - else - returned.sync_token = resource.mailbox().sync_token(); - + returned.sync_token = resource.mailbox().sync_token(); returned.count = resource.imported_count; returned.lost = is_lost; to_return.push_back(returned); + if (IsGpuResourceType(resource.type) && child_info->needs_sync_tokens) { + if (resource.needs_sync_token()) { + need_synchronization_resources.push_back(&to_return.back()); + } else if (returned.sync_token.HasData() && + !returned.sync_token.verified_flush()) { + // Before returning any sync tokens, they must be verified. + unverified_sync_tokens.push_back(returned.sync_token.GetData()); + } + } + child_info->parent_to_child_map.erase(local_id); child_info->child_to_parent_map.erase(child_id); resource.imported_count = 0; DeleteResourceInternal(it, style); - - // Before returning any sync tokens, they must be verified. Note that we - // need to verify the sync token inside of the "to_return" array. - if (to_return.back().sync_token.HasData() && - !to_return.back().sync_token.verified_flush()) { - unverified_sync_tokens.push_back(to_return.back().sync_token.GetData()); - } } gpu::SyncToken new_sync_token; - if (need_sync_token && child_info->needs_sync_tokens) { + if (!need_synchronization_resources.empty()) { + DCHECK(child_info->needs_sync_tokens); DCHECK(gl); const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM(); gl->OrderingBarrierCHROMIUM(); @@ -1695,18 +1710,15 @@ } if (!unverified_sync_tokens.empty()) { + DCHECK(child_info->needs_sync_tokens); DCHECK(gl); gl->VerifySyncTokensCHROMIUM(unverified_sync_tokens.data(), unverified_sync_tokens.size()); } - if (new_sync_token.HasData()) { - DCHECK(need_sync_token && child_info->needs_sync_tokens); - for (ReturnedResource& returned_resource : to_return) { - if (!returned_resource.sync_token.HasData()) - returned_resource.sync_token = new_sync_token; - } - } + // Set sync token after verification. + for (ReturnedResource* returned : need_synchronization_resources) + returned->sync_token = new_sync_token; if (!to_return.empty()) child_info->return_callback.Run(to_return,
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc index d20f8f82..f45842d9 100644 --- a/cc/surfaces/display.cc +++ b/cc/surfaces/display.cc
@@ -409,7 +409,7 @@ if (surface) { const CompositorFrame& current_frame = surface->GetEligibleFrame(); if (!current_frame.delegated_frame_data || - !current_frame.delegated_frame_data->resource_list.size()) { + current_frame.delegated_frame_data->resource_list.empty()) { aggregator_->ReleaseResources(surface_id); } }
diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc index 4b7caa3..26c8440 100644 --- a/cc/surfaces/surface_manager.cc +++ b/cc/surfaces/surface_manager.cc
@@ -304,7 +304,7 @@ for (size_t i = 0; i < children.size(); ++i) { if (children[i] == child_namespace) { found_child = true; - children[i] = children[children.size() - 1]; + children[i] = children.back(); children.resize(children.size() - 1); break; }
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h index 681f99f0..24d82aa 100644 --- a/cc/surfaces/surface_manager.h +++ b/cc/surfaces/surface_manager.h
@@ -129,7 +129,7 @@ ClientSourceMapping(); ClientSourceMapping(const ClientSourceMapping& other); ~ClientSourceMapping(); - bool is_empty() const { return !client && !children.size(); } + bool is_empty() const { return !client && children.empty(); } // The client that's responsible for creating this namespace. Never null. SurfaceFactoryClient* client; // The currently assigned begin frame source for this client.
diff --git a/cc/test/test_gles2_interface.cc b/cc/test/test_gles2_interface.cc index d2a86990..c137c394 100644 --- a/cc/test/test_gles2_interface.cc +++ b/cc/test/test_gles2_interface.cc
@@ -290,12 +290,6 @@ width, height, internalformat, usage); } -void TestGLES2Interface::GetImageivCHROMIUM(GLuint image_id, - GLenum param, - GLint* data) { - return test_context_->getImageivCHROMIUM(image_id, param, data); -} - void TestGLES2Interface::BindTexImage2DCHROMIUM(GLenum target, GLint image_id) { test_context_->bindTexImage2DCHROMIUM(target, image_id); }
diff --git a/cc/test/test_gles2_interface.h b/cc/test/test_gles2_interface.h index 8b5a3c9..a02bb193 100644 --- a/cc/test/test_gles2_interface.h +++ b/cc/test/test_gles2_interface.h
@@ -109,7 +109,6 @@ GLsizei height, GLenum internalformat, GLenum usage) override; - void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data) override; void BindTexImage2DCHROMIUM(GLenum target, GLint image_id) override; void ReleaseTexImage2DCHROMIUM(GLenum target, GLint image_id) override; void FramebufferRenderbuffer(GLenum target,
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc index ba29b422..2641c90 100644 --- a/cc/test/test_web_graphics_context_3d.cc +++ b/cc/test/test_web_graphics_context_3d.cc
@@ -639,15 +639,6 @@ return image_id; } -void TestWebGraphicsContext3D::getImageivCHROMIUM(GLuint image_id, - GLenum param, - GLint* data) { - DCHECK_EQ(GL_GPU_MEMORY_BUFFER_ID, static_cast<int>(param)); - base::AutoLock lock(namespace_->lock); - std::unordered_set<unsigned>& images = namespace_->images; - *data = images.find(image_id) == images.end() ? -1 : 1; -} - GLuint64 TestWebGraphicsContext3D::insertFenceSync() { return next_insert_fence_sync_++; }
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h index 2c50d1f..1f51040 100644 --- a/cc/test/test_web_graphics_context_3d.h +++ b/cc/test/test_web_graphics_context_3d.h
@@ -268,7 +268,6 @@ GLsizei height, GLenum internalformat, GLenum usage); - virtual void getImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data); virtual GLuint64 insertFenceSync(); virtual void genSyncToken(GLuint64 fence_sync, GLbyte* sync_token);
diff --git a/cc/trees/clip_node.cc b/cc/trees/clip_node.cc index b5efb98f..b7d8164 100644 --- a/cc/trees/clip_node.cc +++ b/cc/trees/clip_node.cc
@@ -15,7 +15,8 @@ parent_id(-1), owner_id(-1), transform_id(-1), - target_id(-1), + target_transform_id(-1), + target_effect_id(-1), applies_local_clip(true), layer_clipping_uses_only_local_clip(false), target_is_clipped(false), @@ -30,7 +31,9 @@ owner_id == other.owner_id && clip == other.clip && combined_clip_in_target_space == other.combined_clip_in_target_space && clip_in_target_space == other.clip_in_target_space && - transform_id == other.transform_id && target_id == other.target_id && + transform_id == other.transform_id && + target_transform_id == other.target_transform_id && + target_effect_id == other.target_effect_id && applies_local_clip == other.applies_local_clip && layer_clipping_uses_only_local_clip == other.layer_clipping_uses_only_local_clip && @@ -55,7 +58,8 @@ RectFToProto(clip_in_target_space, data->mutable_clip_in_target_space()); data->set_transform_id(transform_id); - data->set_target_id(target_id); + data->set_target_transform_id(target_transform_id); + data->set_target_effect_id(target_effect_id); data->set_applies_local_clip(applies_local_clip); data->set_layer_clipping_uses_only_local_clip( layer_clipping_uses_only_local_clip); @@ -80,7 +84,8 @@ clip_in_target_space = ProtoToRectF(data.clip_in_target_space()); transform_id = data.transform_id(); - target_id = data.target_id(); + target_transform_id = data.target_transform_id(); + target_effect_id = data.target_effect_id(); applies_local_clip = data.applies_local_clip(); layer_clipping_uses_only_local_clip = data.layer_clipping_uses_only_local_clip(); @@ -97,7 +102,8 @@ value->SetInteger("owner_id", owner_id); MathUtil::AddToTracedValue("clip", clip, value); value->SetInteger("transform_id", transform_id); - value->SetInteger("target_id", target_id); + value->SetInteger("target_transform_id", target_transform_id); + value->SetInteger("target_effect_id", target_effect_id); value->SetBoolean("applies_local_clip", applies_local_clip); value->SetBoolean("layer_clipping_uses_only_local_clip", layer_clipping_uses_only_local_clip);
diff --git a/cc/trees/clip_node.h b/cc/trees/clip_node.h index 289930b..e9dfede 100644 --- a/cc/trees/clip_node.h +++ b/cc/trees/clip_node.h
@@ -49,7 +49,10 @@ int transform_id; // The id of the transform node that defines the clip node's target space. - int target_id; + int target_transform_id; + + // The id of the effect node that defines the clip node's target space. + int target_effect_id; // Whether this node contributes a new clip (that is, whether |clip| needs to // be applied), rather than only inheriting ancestor clips.
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc index 612c9a9..694bf45 100644 --- a/cc/trees/draw_property_utils.cc +++ b/cc/trees/draw_property_utils.cc
@@ -56,9 +56,9 @@ #endif -static void AddSublayerScaleToTransform(const int effect_node_id, - const EffectTree& effect_tree, - gfx::Transform* transform) { +static void ApplySublayerScale(const int effect_node_id, + const EffectTree& effect_tree, + gfx::Transform* transform) { const EffectNode* effect_node = effect_tree.Node(effect_node_id); const EffectNode* target_effect_node = effect_node->has_render_surface @@ -97,19 +97,19 @@ int target_node_id, gfx::RectF* clip_rect_in_target_space) { DCHECK(layer->clip_tree_index() == clip_node->id); - DCHECK(clip_node->target_id != target_node_id); + DCHECK(clip_node->target_transform_id != target_node_id); gfx::Transform clip_to_target; - if (clip_node->target_id > target_node_id) { + if (clip_node->target_transform_id > target_node_id) { // In this case, layer has a scroll parent. We need to keep the scale // at the layer's target but remove the scale at the scroll parent's // target. - if (transform_tree.ComputeTransform(clip_node->target_id, target_node_id, - &clip_to_target)) { + if (transform_tree.ComputeTransform(clip_node->target_transform_id, + target_node_id, &clip_to_target)) { // We don't have to apply sublayer scale when target is root. if (target_node_id != 0) { - AddSublayerScaleToTransform(layer->effect_tree_index(), effect_tree, - &clip_to_target); + ApplySublayerScale(layer->effect_tree_index(), effect_tree, + &clip_to_target); #if DCHECK_IS_ON() VerifySublayerScalesMatch(layer->effect_tree_index(), target_node_id, effect_tree, transform_tree); @@ -117,7 +117,7 @@ } const TransformNode* source_node = - transform_tree.Node(clip_node->target_id); + transform_tree.Node(clip_node->target_transform_id); if (source_node->sublayer_scale.x() != 0.f && source_node->sublayer_scale.y() != 0.f) clip_to_target.Scale(1.0f / source_node->sublayer_scale.x(), @@ -128,8 +128,8 @@ return false; } } else { - if (transform_tree.ComputeTransform(clip_node->target_id, target_node_id, - &clip_to_target)) { + if (transform_tree.ComputeTransform(clip_node->target_transform_id, + target_node_id, &clip_to_target)) { *clip_rect_in_target_space = MathUtil::ProjectClippedRect( clip_to_target, clip_node->clip_in_target_space); } else { @@ -166,13 +166,23 @@ static ConditionalClip ComputeLocalRectInTargetSpace( gfx::RectF rect, const TransformTree& transform_tree, + const EffectTree& effect_tree, int current_transform_id, - int target_transform_id) { + int target_transform_id, + int target_effect_id) { gfx::Transform current_to_target; - if (!transform_tree.ComputeTransformWithDestinationSublayerScale( - current_transform_id, target_transform_id, ¤t_to_target)) + if (!transform_tree.ComputeTransform(current_transform_id, + target_transform_id, ¤t_to_target)) // If transform is not invertible, cannot apply clip. return ConditionalClip{false, gfx::RectF()}; + // We don't have to apply sublayer scale when target is root. + if (target_transform_id != 0) { + ApplySublayerScale(target_effect_id, effect_tree, ¤t_to_target); +#if DCHECK_IS_ON() + VerifySublayerScalesMatch(target_effect_id, target_transform_id, + effect_tree, transform_tree); +#endif + } if (current_transform_id > target_transform_id) return ConditionalClip{true, // is_clipped. @@ -184,11 +194,13 @@ static ConditionalClip ComputeCurrentClip(const ClipNode* clip_node, const TransformTree& transform_tree, - int target_transform_id) { + const EffectTree& effect_tree, + int target_transform_id, + int target_effect_id) { if (clip_node->transform_id != target_transform_id) return ComputeLocalRectInTargetSpace(clip_node->clip, transform_tree, - clip_node->transform_id, - target_transform_id); + effect_tree, clip_node->transform_id, + target_transform_id, target_effect_id); gfx::RectF current_clip = clip_node->clip; gfx::Vector2dF sublayer_scale = @@ -246,8 +258,8 @@ // No clip node applying clip in between. return ConditionalClip{false, gfx::RectF()}; - ConditionalClip current_clip = - ComputeCurrentClip(clip_node, transform_tree, target_transform_id); + ConditionalClip current_clip = ComputeCurrentClip( + clip_node, transform_tree, effect_tree, target_transform_id, target_id); is_clipped = current_clip.is_clipped; gfx::RectF accumulated_clip = current_clip.clip_rect; @@ -257,8 +269,8 @@ if (!clip_node->applies_local_clip) { continue; } - ConditionalClip current_clip = - ComputeCurrentClip(clip_node, transform_tree, target_transform_id); + ConditionalClip current_clip = ComputeCurrentClip( + clip_node, transform_tree, effect_tree, target_transform_id, target_id); // If transform is not invertible, no clip will be applied. if (!current_clip.is_clipped) @@ -303,7 +315,7 @@ // If required, this clip rect should be mapped to the current layer's // target space. - if (clip_node->target_id != target_node_id) { + if (clip_node->target_transform_id != target_node_id) { // In this case, layer has a clip parent or scroll parent (or shares the // target with an ancestor layer that has clip parent) and the clip // parent's target is different from the layer's target. As the layer's @@ -435,7 +447,7 @@ // this clip rect should be mapped to the current layer's target space. gfx::RectF combined_clip_rect_in_target_space; - if (clip_node->target_id != target_node_id) { + if (clip_node->target_transform_id != target_node_id) { // In this case, layer has a clip parent or scroll parent (or shares the // target with an ancestor layer that has clip parent) and the clip // parent's target is different from the layer's target. As the layer's @@ -705,6 +717,7 @@ void ComputeClips(ClipTree* clip_tree, const TransformTree& transform_tree, + const EffectTree& effect_tree, bool non_root_surfaces_enabled) { if (!clip_tree->needs_update()) return; @@ -723,7 +736,7 @@ gfx::Transform parent_to_current; const TransformNode* parent_target_transform_node = - transform_tree.Node(parent_clip_node->target_id); + transform_tree.Node(parent_clip_node->target_transform_id); bool success = true; // Clips must be combined in target space. We cannot, for example, combine @@ -741,11 +754,21 @@ gfx::RectF parent_clip_in_target_space = parent_clip_node->clip_in_target_space; if (parent_target_transform_node && - parent_target_transform_node->id != clip_node->target_id && + parent_target_transform_node->id != clip_node->target_transform_id && non_root_surfaces_enabled) { - success &= transform_tree.ComputeTransformWithDestinationSublayerScale( - parent_target_transform_node->id, clip_node->target_id, + success &= transform_tree.ComputeTransform( + parent_target_transform_node->id, clip_node->target_transform_id, &parent_to_current); + // We don't have to apply sublayer scale when target is root. + if (clip_node->target_transform_id != 0) { + ApplySublayerScale(clip_node->target_effect_id, effect_tree, + &parent_to_current); +#if DCHECK_IS_ON() + VerifySublayerScalesMatch(clip_node->target_effect_id, + clip_node->target_transform_id, effect_tree, + transform_tree); +#endif + } if (parent_target_transform_node->sublayer_scale.x() > 0 && parent_target_transform_node->sublayer_scale.y() > 0) parent_to_current.Scale( @@ -804,11 +827,22 @@ if (!non_root_surfaces_enabled) { source_to_target = transform_tree.ToScreen(clip_node->transform_id); } else if (transform_tree.ContentTargetId(transform_node->id) == - clip_node->target_id) { + clip_node->target_transform_id) { source_to_target = transform_tree.ToTarget(clip_node->transform_id); } else { - success = transform_tree.ComputeTransformWithDestinationSublayerScale( - transform_node->id, clip_node->target_id, &source_to_target); + success = transform_tree.ComputeTransform( + transform_node->id, clip_node->target_transform_id, + &source_to_target); + // We don't have to apply sublayer scale when target is root. + if (clip_node->target_transform_id != 0) { + ApplySublayerScale(clip_node->target_effect_id, effect_tree, + &source_to_target); +#if DCHECK_IS_ON() + VerifySublayerScalesMatch(clip_node->target_effect_id, + clip_node->target_transform_id, effect_tree, + transform_tree); +#endif + } // source_to_target computation should be successful as target is an // ancestor of the transform node. DCHECK(success); @@ -963,8 +997,8 @@ &draw_transform); // We don't have to apply sublayer scale when target is root. if (destination_id != 0) { - AddSublayerScaleToTransform(layer->effect_tree_index(), - property_trees->effect_tree, &draw_transform); + ApplySublayerScale(layer->effect_tree_index(), property_trees->effect_tree, + &draw_transform); #if DCHECK_IS_ON() VerifySublayerScalesMatch(layer->effect_tree_index(), destination_id, property_trees->effect_tree, @@ -1001,9 +1035,11 @@ UpdateRenderTarget(&property_trees->effect_tree, property_trees->non_root_surfaces_enabled); ComputeTransforms(&property_trees->transform_tree); - ComputeClips(&property_trees->clip_tree, property_trees->transform_tree, - can_render_to_separate_surface); + // Computation of clips uses sublayer scale which is updated while computing + // effects. So, ComputeEffects should be before ComputeClips. ComputeEffects(&property_trees->effect_tree); + ComputeClips(&property_trees->clip_tree, property_trees->transform_tree, + property_trees->effect_tree, can_render_to_separate_surface); FindLayersThatNeedUpdates(root_layer->layer_tree_impl(), property_trees->transform_tree, @@ -1030,9 +1066,11 @@ property_trees->effect_tree.set_needs_update(true); } ComputeTransforms(&property_trees->transform_tree); - ComputeClips(&property_trees->clip_tree, property_trees->transform_tree, - can_render_to_separate_surface); + // Computation of clips uses sublayer scale which is updated while computing + // effects. So, ComputeEffects should be before ComputeClips. ComputeEffects(&property_trees->effect_tree); + ComputeClips(&property_trees->clip_tree, property_trees->transform_tree, + property_trees->effect_tree, can_render_to_separate_surface); } void ComputeVisibleRectsForTesting(PropertyTrees* property_trees, @@ -1156,8 +1194,8 @@ &render_surface_transform); // We don't have to apply sublayer scale when target is root. if (target_transform_node->id != 0) { - AddSublayerScaleToTransform(effect_node->target_id, effect_tree, - &render_surface_transform); + ApplySublayerScale(effect_node->target_id, effect_tree, + &render_surface_transform); #if DCHECK_IS_ON() VerifySublayerScalesMatch(effect_node->target_id, target_transform_node->id, effect_tree, transform_tree); @@ -1182,6 +1220,7 @@ static void SetSurfaceClipRect(const ClipNode* parent_clip_node, const TransformTree& transform_tree, + const EffectTree& effect_tree, RenderSurfaceImpl* render_surface) { if (!render_surface->is_clipped()) { render_surface->SetClipRect(gfx::Rect()); @@ -1191,7 +1230,7 @@ const TransformNode* transform_node = transform_tree.Node(render_surface->TransformTreeIndex()); if (transform_tree.TargetId(transform_node->id) == - parent_clip_node->target_id) { + parent_clip_node->target_transform_id) { render_surface->SetClipRect( gfx::ToEnclosingRect(parent_clip_node->clip_in_target_space)); return; @@ -1201,18 +1240,28 @@ // the parent clip node's clip rect is in clip parent's target space and not // our target space. We need to transform it to our target space. gfx::Transform clip_parent_target_to_target; - const bool success = - transform_tree.ComputeTransformWithDestinationSublayerScale( - parent_clip_node->target_id, - transform_tree.TargetId(transform_node->id), - &clip_parent_target_to_target); + const bool success = transform_tree.ComputeTransform( + parent_clip_node->target_transform_id, + transform_tree.TargetId(transform_node->id), + &clip_parent_target_to_target); if (!success) { render_surface->SetClipRect(gfx::Rect()); return; } - DCHECK_LT(parent_clip_node->target_id, + // We don't have to apply sublayer scale when target is root. + if (transform_tree.TargetId(transform_node->id) != 0) { + ApplySublayerScale(render_surface->EffectTreeIndex(), effect_tree, + &clip_parent_target_to_target); +#if DCHECK_IS_ON() + VerifySublayerScalesMatch(render_surface->EffectTreeIndex(), + transform_tree.TargetId(transform_node->id), + effect_tree, transform_tree); +#endif + } + + DCHECK_LT(parent_clip_node->target_transform_id, transform_tree.TargetId(transform_node->id)); render_surface->SetClipRect(gfx::ToEnclosingRect(MathUtil::ProjectClippedRect( clip_parent_target_to_target, parent_clip_node->clip_in_target_space))); @@ -1379,7 +1428,8 @@ } SetSurfaceClipRect(property_trees->clip_tree.parent(clip_node), - property_trees->transform_tree, render_surface); + property_trees->transform_tree, + property_trees->effect_tree, render_surface); } #if DCHECK_IS_ON()
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index 903236e..a9d4e06 100644 --- a/cc/trees/layer_tree_host.cc +++ b/cc/trees/layer_tree_host.cc
@@ -1469,81 +1469,6 @@ return layer->ScrollOffsetForAnimation(); } -bool LayerTreeHost::ScrollOffsetAnimationWasInterrupted( - const Layer* layer) const { - return animation_host_->ScrollOffsetAnimationWasInterrupted( - layer->element_id()); -} - -bool LayerTreeHost::IsAnimatingFilterProperty(const Layer* layer) const { - return animation_host_->IsAnimatingFilterProperty(layer->element_id(), - ElementListType::ACTIVE); -} - -bool LayerTreeHost::IsAnimatingOpacityProperty(const Layer* layer) const { - return animation_host_->IsAnimatingOpacityProperty(layer->element_id(), - ElementListType::ACTIVE); -} - -bool LayerTreeHost::IsAnimatingTransformProperty(const Layer* layer) const { - return animation_host_->IsAnimatingTransformProperty(layer->element_id(), - ElementListType::ACTIVE); -} - -bool LayerTreeHost::HasPotentiallyRunningFilterAnimation( - const Layer* layer) const { - return animation_host_->HasPotentiallyRunningFilterAnimation( - layer->element_id(), ElementListType::ACTIVE); -} - -bool LayerTreeHost::HasPotentiallyRunningOpacityAnimation( - const Layer* layer) const { - return animation_host_->HasPotentiallyRunningOpacityAnimation( - layer->element_id(), ElementListType::ACTIVE); -} - -bool LayerTreeHost::HasPotentiallyRunningTransformAnimation( - const Layer* layer) const { - return animation_host_->HasPotentiallyRunningTransformAnimation( - layer->element_id(), ElementListType::ACTIVE); -} - -bool LayerTreeHost::HasOnlyTranslationTransforms(const Layer* layer) const { - return animation_host_->HasOnlyTranslationTransforms(layer->element_id(), - ElementListType::ACTIVE); -} - -bool LayerTreeHost::MaximumTargetScale(const Layer* layer, - float* max_scale) const { - return animation_host_->MaximumTargetScale( - layer->element_id(), ElementListType::ACTIVE, max_scale); -} - -bool LayerTreeHost::AnimationStartScale(const Layer* layer, - float* start_scale) const { - return animation_host_->AnimationStartScale( - layer->element_id(), ElementListType::ACTIVE, start_scale); -} - -bool LayerTreeHost::HasAnyAnimationTargetingProperty( - const Layer* layer, - TargetProperty::Type property) const { - return animation_host_->HasAnyAnimationTargetingProperty(layer->element_id(), - property); -} - -bool LayerTreeHost::AnimationsPreserveAxisAlignment(const Layer* layer) const { - return animation_host_->AnimationsPreserveAxisAlignment(layer->element_id()); -} - -bool LayerTreeHost::HasAnyAnimation(const Layer* layer) const { - return animation_host_->HasAnyAnimation(layer->element_id()); -} - -bool LayerTreeHost::HasActiveAnimationForTesting(const Layer* layer) const { - return animation_host_->HasActiveAnimationForTesting(layer->element_id()); -} - bool LayerTreeHost::IsSingleThreaded() const { DCHECK(compositor_mode_ != CompositorMode::SINGLE_THREADED || !task_runner_provider_->HasImplThread());
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h index 26560e7..cf52e948 100644 --- a/cc/trees/layer_tree_host.h +++ b/cc/trees/layer_tree_host.h
@@ -392,22 +392,6 @@ gfx::ScrollOffset GetScrollOffsetForAnimation( ElementId element_id) const override; - bool ScrollOffsetAnimationWasInterrupted(const Layer* layer) const; - bool IsAnimatingFilterProperty(const Layer* layer) const; - bool IsAnimatingOpacityProperty(const Layer* layer) const; - bool IsAnimatingTransformProperty(const Layer* layer) const; - bool HasPotentiallyRunningFilterAnimation(const Layer* layer) const; - bool HasPotentiallyRunningOpacityAnimation(const Layer* layer) const; - bool HasPotentiallyRunningTransformAnimation(const Layer* layer) const; - bool HasOnlyTranslationTransforms(const Layer* layer) const; - bool MaximumTargetScale(const Layer* layer, float* max_scale) const; - bool AnimationStartScale(const Layer* layer, float* start_scale) const; - bool HasAnyAnimationTargetingProperty(const Layer* layer, - TargetProperty::Type property) const; - bool AnimationsPreserveAxisAlignment(const Layer* layer) const; - bool HasAnyAnimation(const Layer* layer) const; - bool HasActiveAnimationForTesting(const Layer* layer) const; - // Serializes the parts of this LayerTreeHost that is needed for a commit to a // protobuf message. Not all members are serialized as they are not helpful // for remote usage.
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc index 4d6ec707..2c8fbb8 100644 --- a/cc/trees/layer_tree_impl.cc +++ b/cc/trees/layer_tree_impl.cc
@@ -1672,7 +1672,7 @@ clip_node->id > 1; clip_node = clip_tree.parent(clip_node)) { if (clip_node->applies_local_clip) { const TransformNode* transform_node = - transform_tree.Node(clip_node->target_id); + transform_tree.Node(clip_node->target_transform_id); gfx::Rect combined_clip_in_target_space = gfx::ToEnclosingRect(clip_node->combined_clip_in_target_space); @@ -1985,122 +1985,6 @@ return std::move(pending_page_scale_animation_); } -bool LayerTreeImpl::IsAnimatingFilterProperty(const LayerImpl* layer) const { - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host()->IsAnimatingFilterProperty( - layer->element_id(), list_type); -} - -bool LayerTreeImpl::IsAnimatingOpacityProperty(const LayerImpl* layer) const { - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host()->IsAnimatingOpacityProperty( - layer->element_id(), list_type); -} - -bool LayerTreeImpl::IsAnimatingTransformProperty(const LayerImpl* layer) const { - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host()->IsAnimatingTransformProperty( - layer->element_id(), list_type); -} - -bool LayerTreeImpl::HasPotentiallyRunningFilterAnimation( - const LayerImpl* layer) const { - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host() - ->HasPotentiallyRunningFilterAnimation(layer->element_id(), list_type); -} - -bool LayerTreeImpl::HasPotentiallyRunningOpacityAnimation( - const LayerImpl* layer) const { - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host() - ->HasPotentiallyRunningOpacityAnimation(layer->element_id(), list_type); -} - -bool LayerTreeImpl::HasPotentiallyRunningTransformAnimation( - const LayerImpl* layer) const { - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host() - ->HasPotentiallyRunningTransformAnimation(layer->element_id(), list_type); -} - -bool LayerTreeImpl::HasAnyAnimationTargetingProperty( - const LayerImpl* layer, - TargetProperty::Type property) const { - return layer_tree_host_impl_->animation_host() - ->HasAnyAnimationTargetingProperty(layer->element_id(), property); -} - -bool LayerTreeImpl::AnimationsPreserveAxisAlignment( - const LayerImpl* layer) const { - return layer_tree_host_impl_->animation_host() - ->AnimationsPreserveAxisAlignment(layer->element_id()); -} - -bool LayerTreeImpl::HasOnlyTranslationTransforms(const LayerImpl* layer) const { - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host()->HasOnlyTranslationTransforms( - layer->element_id(), list_type); -} - -bool LayerTreeImpl::MaximumTargetScale(const LayerImpl* layer, - float* max_scale) const { - *max_scale = 0.f; - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host()->MaximumTargetScale( - layer->element_id(), list_type, max_scale); -} - -bool LayerTreeImpl::AnimationStartScale(const LayerImpl* layer, - float* start_scale) const { - *start_scale = 0.f; - ElementListType list_type = - IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING; - return layer_tree_host_impl_->animation_host()->AnimationStartScale( - layer->element_id(), list_type, start_scale); -} - -bool LayerTreeImpl::HasFilterAnimationThatInflatesBounds( - const LayerImpl* layer) const { - return layer_tree_host_impl_->animation_host() - ->HasFilterAnimationThatInflatesBounds(layer->element_id()); -} - -bool LayerTreeImpl::HasTransformAnimationThatInflatesBounds( - const LayerImpl* layer) const { - return layer_tree_host_impl_->animation_host() - ->HasTransformAnimationThatInflatesBounds(layer->element_id()); -} - -bool LayerTreeImpl::HasAnimationThatInflatesBounds( - const LayerImpl* layer) const { - return layer_tree_host_impl_->animation_host() - ->HasAnimationThatInflatesBounds(layer->element_id()); -} - -bool LayerTreeImpl::FilterAnimationBoundsForBox(const LayerImpl* layer, - const gfx::BoxF& box, - gfx::BoxF* bounds) const { - return layer_tree_host_impl_->animation_host()->FilterAnimationBoundsForBox( - layer->element_id(), box, bounds); -} - -bool LayerTreeImpl::TransformAnimationBoundsForBox(const LayerImpl* layer, - const gfx::BoxF& box, - gfx::BoxF* bounds) const { - *bounds = gfx::BoxF(); - return layer_tree_host_impl_->animation_host() - ->TransformAnimationBoundsForBox(layer->element_id(), box, bounds); -} - void LayerTreeImpl::ScrollAnimationAbort(bool needs_completion) { layer_tree_host_impl_->animation_host()->ScrollAnimationAbort( needs_completion);
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h index 05350ce2..37fc1ee 100644 --- a/cc/trees/layer_tree_impl.h +++ b/cc/trees/layer_tree_impl.h
@@ -40,7 +40,6 @@ class HeadsUpDisplayLayerImpl; class ImageDecodeController; class LayerExternalScrollOffsetListener; -class LayerScrollOffsetDelegate; class LayerTreeDebugState; class LayerTreeImpl; class LayerTreeSettings; @@ -426,33 +425,6 @@ void DidUpdateScrollOffset(int layer_id, int transform_id); void DidUpdateScrollState(int layer_id); - bool IsAnimatingFilterProperty(const LayerImpl* layer) const; - bool IsAnimatingOpacityProperty(const LayerImpl* layer) const; - bool IsAnimatingTransformProperty(const LayerImpl* layer) const; - - bool HasPotentiallyRunningFilterAnimation(const LayerImpl* layer) const; - bool HasPotentiallyRunningOpacityAnimation(const LayerImpl* layer) const; - bool HasPotentiallyRunningTransformAnimation(const LayerImpl* layer) const; - - bool HasAnyAnimationTargetingProperty(const LayerImpl* layer, - TargetProperty::Type property) const; - - bool AnimationsPreserveAxisAlignment(const LayerImpl* layer) const; - bool HasOnlyTranslationTransforms(const LayerImpl* layer) const; - - bool MaximumTargetScale(const LayerImpl* layer, float* max_scale) const; - bool AnimationStartScale(const LayerImpl* layer, float* start_scale) const; - - bool HasFilterAnimationThatInflatesBounds(const LayerImpl* layer) const; - bool HasTransformAnimationThatInflatesBounds(const LayerImpl* layer) const; - bool HasAnimationThatInflatesBounds(const LayerImpl* layer) const; - - bool FilterAnimationBoundsForBox(const LayerImpl* layer, - const gfx::BoxF& box, - gfx::BoxF* bounds) const; - bool TransformAnimationBoundsForBox(const LayerImpl* layer, - const gfx::BoxF& box, - gfx::BoxF* bounds) const; void ScrollAnimationAbort(bool needs_completion); bool have_scroll_event_handlers() const {
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc index 7c190da..665942f 100644 --- a/cc/trees/layer_tree_impl_unittest.cc +++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -448,7 +448,7 @@ ClipTree& clip_tree = host_impl().active_tree()->property_trees()->clip_tree; ClipNode* clip_node = clip_tree.Node(result_layer->clip_tree_index()); - EXPECT_NE(clip_node->transform_id, clip_node->target_id); + EXPECT_NE(clip_node->transform_id, clip_node->target_transform_id); } TEST_F(LayerTreeImplTest, HitTestingSiblings) {
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc index 62de5d7..d2b3783a 100644 --- a/cc/trees/property_tree.cc +++ b/cc/trees/property_tree.cc
@@ -10,6 +10,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/trace_event/trace_event_argument.h" +#include "cc/animation/animation_host.h" #include "cc/layers/layer_impl.h" #include "cc/output/copy_output_request.h" #include "cc/proto/property_tree.pb.h" @@ -1817,12 +1818,14 @@ // TODO(sunxd): make LayerTreeImpl::MaximumTargetScale take layer id as // parameter. LayerImpl* layer_impl = layer_tree_impl->LayerById(node->owner_id); - layer_tree_impl->MaximumTargetScale( - layer_impl, &cached_data_.animation_scales[transform_node_id] - .local_maximum_animation_target_scale); - layer_tree_impl->AnimationStartScale( - layer_impl, &cached_data_.animation_scales[transform_node_id] - .local_starting_animation_scale); + layer_impl->GetAnimationHost()->MaximumTargetScale( + layer_impl->element_id(), layer_impl->GetElementTypeForAnimation(), + &cached_data_.animation_scales[transform_node_id] + .local_maximum_animation_target_scale); + layer_impl->GetAnimationHost()->AnimationStartScale( + layer_impl->element_id(), layer_impl->GetElementTypeForAnimation(), + &cached_data_.animation_scales[transform_node_id] + .local_starting_animation_scale); gfx::Vector2dF local_scales = MathUtil::ComputeTransform2dScaleComponents(node->local, 0.f); float max_local_scale = std::max(local_scales.x(), local_scales.y());
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h index 4dbf6c4..b00d090 100644 --- a/cc/trees/property_tree.h +++ b/cc/trees/property_tree.h
@@ -85,10 +85,8 @@ T* parent(const T* t) { return Node(t->parent_id); } const T* parent(const T* t) const { return Node(t->parent_id); } - T* back() { return size() ? &nodes_[nodes_.size() - 1] : nullptr; } - const T* back() const { - return size() ? &nodes_[nodes_.size() - 1] : nullptr; - } + T* back() { return size() ? &nodes_.back() : nullptr; } + const T* back() const { return size() ? &nodes_.back() : nullptr; } void clear(); size_t size() const { return nodes_.size(); }
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc index f9ebb6f..fcfe0b99 100644 --- a/cc/trees/property_tree_builder.cc +++ b/cc/trees/property_tree_builder.cc
@@ -9,6 +9,7 @@ #include <map> #include <set> +#include "cc/animation/animation_host.h" #include "cc/base/math_util.h" #include "cc/layers/layer.h" #include "cc/layers/layer_impl.h" @@ -233,6 +234,64 @@ return layer->test_properties()->replica_layer; } +// Methods to query state from the AnimationHost ---------------------- +template <typename LayerType> +bool OpacityIsAnimating(LayerType* layer) { + return layer->GetAnimationHost()->IsAnimatingOpacityProperty( + layer->element_id(), layer->GetElementTypeForAnimation()); +} + +template <typename LayerType> +bool HasPotentiallyRunningOpacityAnimation(LayerType* layer) { + return layer->GetAnimationHost()->HasPotentiallyRunningOpacityAnimation( + layer->element_id(), layer->GetElementTypeForAnimation()); +} + +template <typename LayerType> +bool FilterIsAnimating(LayerType* layer) { + return layer->GetAnimationHost()->IsAnimatingFilterProperty( + layer->element_id(), layer->GetElementTypeForAnimation()); +} + +template <typename LayerType> +bool HasPotentiallyRunningFilterAnimation(LayerType* layer) { + return layer->GetAnimationHost()->HasPotentiallyRunningFilterAnimation( + layer->element_id(), layer->GetElementTypeForAnimation()); +} + +template <typename LayerType> +bool TransformIsAnimating(LayerType* layer) { + return layer->GetAnimationHost()->IsAnimatingTransformProperty( + layer->element_id(), layer->GetElementTypeForAnimation()); +} + +template <typename LayerType> +bool HasPotentiallyRunningTransformAnimation(LayerType* layer) { + return layer->GetAnimationHost()->HasPotentiallyRunningTransformAnimation( + layer->element_id(), layer->GetElementTypeForAnimation()); +} + +template <typename LayerType> +bool HasOnlyTranslationTransforms(LayerType* layer) { + return layer->GetAnimationHost()->HasOnlyTranslationTransforms( + layer->element_id(), layer->GetElementTypeForAnimation()); +} + +template <typename LayerType> +bool AnimationsPreserveAxisAlignment(LayerType* layer) { + return layer->GetAnimationHost()->AnimationsPreserveAxisAlignment( + layer->element_id()); +} + +template <typename LayerType> +bool HasAnyAnimationTargetingProperty(LayerType* layer, + TargetProperty::Type property) { + return layer->GetAnimationHost()->HasAnyAnimationTargetingProperty( + layer->element_id(), property); +} + +// ------------------------------------------------------------------- + template <typename LayerType> static LayerType* GetTransformParent(const DataForRecursion<LayerType>& data, LayerType* layer) { @@ -345,9 +404,10 @@ node.clip = gfx::RectF(gfx::PointF() + layer->offset_to_transform_parent(), gfx::SizeF(layer->bounds())); node.transform_id = transform_parent->transform_tree_index(); - node.target_id = data_for_children->property_trees->effect_tree - .Node(data_for_children->render_target) - ->transform_id; + node.target_effect_id = data_for_children->render_target; + node.target_transform_id = data_for_children->property_trees->effect_tree + .Node(data_for_children->render_target) + ->transform_id; node.owner_id = layer->id(); if (ancestor_clips_subtree || layer_clips_subtree) { @@ -430,14 +490,14 @@ !layer->transform().IsIdentityOr2DTranslation(); const bool has_potentially_animated_transform = - layer->HasPotentiallyRunningTransformAnimation(); + HasPotentiallyRunningTransformAnimation(layer); // A transform node is needed even for a finished animation, since differences // in the timing of animation state updates can mean that an animation that's // in the Finished state at tree-building time on the main thread is still in // the Running state right after commit on the compositor thread. const bool has_any_transform_animation = - layer->HasAnyAnimationTargetingProperty(TargetProperty::TRANSFORM); + HasAnyAnimationTargetingProperty(layer, TargetProperty::TRANSFORM); const bool has_surface = created_render_surface; @@ -558,10 +618,10 @@ kInvalidPropertyTreeNodeId); node->has_potential_animation = has_potentially_animated_transform; - node->is_currently_animating = layer->TransformIsAnimating(); + node->is_currently_animating = TransformIsAnimating(layer); if (has_potentially_animated_transform) { node->has_only_translation_animations = - layer->HasOnlyTranslationTransforms(); + HasOnlyTranslationTransforms(layer); } float post_local_scale_factor = 1.0f; @@ -642,12 +702,12 @@ } static inline bool HasPotentialOpacityAnimation(Layer* layer) { - return layer->HasPotentiallyRunningOpacityAnimation() || + return HasPotentiallyRunningOpacityAnimation(layer) || layer->OpacityCanAnimateOnImplThread(); } static inline bool HasPotentialOpacityAnimation(LayerImpl* layer) { - return layer->HasPotentiallyRunningOpacityAnimation() || + return HasPotentiallyRunningOpacityAnimation(layer) || layer->test_properties()->opacity_can_animate; } @@ -745,7 +805,7 @@ bool axis_aligned) { const bool preserves_2d_axis_alignment = (current_transform * layer->transform()).Preserves2dAxisAlignment() && - axis_aligned && layer->AnimationsPreserveAxisAlignment(); + axis_aligned && AnimationsPreserveAxisAlignment(layer); const bool is_root = !Parent(layer); if (is_root) return true; @@ -768,7 +828,7 @@ // If the layer will use a CSS filter. In this case, the animation // will start and add a filter to this layer, so it needs a surface. - if (layer->HasPotentiallyRunningFilterAnimation()) { + if (HasPotentiallyRunningFilterAnimation(layer)) { return true; } @@ -872,7 +932,7 @@ layer, data_from_ancestor.compound_transform_since_render_target, data_from_ancestor.axis_align_since_render_target); data_for_children->axis_align_since_render_target &= - layer->AnimationsPreserveAxisAlignment(); + AnimationsPreserveAxisAlignment(layer); bool requires_node = is_root || has_transparency || has_potential_opacity_animation || @@ -902,7 +962,7 @@ node.has_potential_opacity_animation = has_potential_opacity_animation; node.double_sided = DoubleSided(layer); node.subtree_hidden = HideLayerAndSubtree(layer); - node.is_currently_animating_opacity = layer->OpacityIsAnimating(); + node.is_currently_animating_opacity = OpacityIsAnimating(layer); EffectTree& effect_tree = data_for_children->property_trees->effect_tree; if (MaskLayer(layer)) {
diff --git a/cc/trees/property_tree_unittest.cc b/cc/trees/property_tree_unittest.cc index d007cb2..789761c 100644 --- a/cc/trees/property_tree_unittest.cc +++ b/cc/trees/property_tree_unittest.cc
@@ -111,7 +111,8 @@ original.combined_clip_in_target_space = gfx::RectF(0.6f, 0.6f); original.clip_in_target_space = gfx::RectF(0.7f, 0.7f); original.transform_id = 2; - original.target_id = 3; + original.target_transform_id = 3; + original.target_effect_id = 4; original.applies_local_clip = false; original.layer_clipping_uses_only_local_clip = false; original.target_is_clipped = false; @@ -132,14 +133,16 @@ ClipNode& root = *original.Node(0); root.owner_id = 1; root.transform_id = 2; - root.target_id = 1; + root.target_transform_id = 1; + root.target_effect_id = 1; ClipNode second; second.owner_id = 2; second.transform_id = 4; second.applies_local_clip = true; ClipNode third; third.owner_id = 3; - third.target_id = 3; + third.target_transform_id = 3; + third.target_effect_id = 2; third.target_is_clipped = false; original.Insert(second, 0);
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc index 6a053c2..37baa50f 100644 --- a/cc/trees/single_thread_proxy.cc +++ b/cc/trees/single_thread_proxy.cc
@@ -258,7 +258,7 @@ // touched on the impl layer tree. std::unique_ptr<ScrollAndScaleSet> scroll_info = layer_tree_host_impl_->ProcessScrollDeltas(); - DCHECK(!scroll_info->scrolls.size()); + DCHECK(scroll_info->scrolls.empty()); DCHECK_EQ(1.f, scroll_info->page_scale_delta); #endif
diff --git a/chrome/android/java/res/layout/autofill_billing_address_dropdown.xml b/chrome/android/java/res/layout/autofill_billing_address_dropdown.xml index 47574baa..943b2926 100644 --- a/chrome/android/java/res/layout/autofill_billing_address_dropdown.xml +++ b/chrome/android/java/res/layout/autofill_billing_address_dropdown.xml
@@ -7,10 +7,10 @@ <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/pref_autofill_field_top_padding" + android:layout_marginTop="@dimen/pref_autofill_field_top_margin" android:layout_marginStart="@dimen/pref_autofill_field_horizontal_padding" android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" - android:focusable="true" + android:labelFor="@+id/autofill_credit_card_editor_billing_address_spinner" android:textAppearance="@style/PreferenceFloatLabelTextAppearance" android:text="@string/autofill_credit_card_editor_billing_address" /> @@ -18,9 +18,11 @@ android:id="@+id/autofill_credit_card_editor_billing_address_spinner" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/pref_autofill_field_top_padding" + android:layout_marginTop="@dimen/pref_autofill_field_top_margin" android:layout_marginStart="@dimen/pref_autofill_field_horizontal_padding" android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" + android:focusable="true" + android:focusableInTouchMode="true" android:textDirection="locale" /> <View style="@style/PreferenceSpinnerUnderlineView"
diff --git a/chrome/android/java/res/layout/autofill_local_card_editor.xml b/chrome/android/java/res/layout/autofill_local_card_editor.xml index a1ec078..b683ca1 100644 --- a/chrome/android/java/res/layout/autofill_local_card_editor.xml +++ b/chrome/android/java/res/layout/autofill_local_card_editor.xml
@@ -3,17 +3,18 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> -<!-- EditText views in FloatLabelLayout require both hint and contentDescription to be set - to work correctly for accessibility because FloatLabelLayout sometimes clear hint. --> -<!--suppress ContentDescription --> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> + <!-- Name --> <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout android:id="@+id/credit_card_name_label" + android:labelFor="@+id/credit_card_name_edit" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/pref_autofill_content_spacing"> + <EditText android:id="@+id/credit_card_name_edit" android:layout_width="match_parent" @@ -21,12 +22,17 @@ android:imeOptions="flagNoExtractUi" android:inputType="textCapWords" android:hint="@string/autofill_credit_card_editor_name" /> + </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> + <!-- Credit card number --> <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout android:id="@+id/credit_card_number_label" + android:labelFor="@+id/credit_card_number_edit" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/pref_autofill_content_spacing"> + <EditText android:id="@+id/credit_card_number_edit" android:layout_width="match_parent" @@ -35,15 +41,17 @@ android:inputType="phone" android:digits="0123456789- " android:hint="@string/autofill_credit_card_editor_number" /> + </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> + <!-- Expiration date --> <TextView android:id="@+id/credit_card_expiration_label" + android:labelFor="@+id/credit_card_expiration_month" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/pref_autofill_field_horizontal_padding" android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" - android:focusable="true" android:textAppearance="@style/PreferenceFloatLabelTextAppearance" android:text="@string/autofill_credit_card_editor_expiration_date" /> @@ -51,18 +59,20 @@ android:id="@+id/credit_card_expiration_container" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/pref_autofill_field_top_margin" + android:layout_marginBottom="@dimen/pref_autofill_content_spacing" android:layout_marginStart="@dimen/pref_autofill_field_horizontal_padding" android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" android:orientation="horizontal" - android:paddingTop="8dp" android:baselineAligned="false"> <LinearLayout + android:id="@+id/credit_card_expiration_month" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:orientation="vertical" - android:layout_marginEnd="@dimen/payments_section_large_spacing"> + android:layout_marginEnd="@dimen/payments_section_large_spacing" + android:orientation="vertical"> <android.support.v7.widget.AppCompatSpinner android:id="@+id/autofill_credit_card_editor_month_spinner" @@ -78,11 +88,14 @@ android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> - <android.support.v7.widget.AppCompatSpinner - android:id="@+id/autofill_credit_card_editor_year_spinner" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> - <View style="@style/PreferenceSpinnerUnderlineView" /> + + <android.support.v7.widget.AppCompatSpinner + android:id="@+id/autofill_credit_card_editor_year_spinner" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + <View style="@style/PreferenceSpinnerUnderlineView" /> + </LinearLayout> </LinearLayout>
diff --git a/chrome/android/java/res/layout/autofill_profile_editor.xml b/chrome/android/java/res/layout/autofill_profile_editor.xml index 559c060..d1a0f53 100644 --- a/chrome/android/java/res/layout/autofill_profile_editor.xml +++ b/chrome/android/java/res/layout/autofill_profile_editor.xml
@@ -3,46 +3,29 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> -<!-- EditText views in FloatLabelLayout require both hint and contentDescription to be set - to work correctly for accessibility because FloatLabelLayout sometimes clear hint. --> -<!--suppress ContentDescription --> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" > - <!-- Editable fields for the profile --> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:layout_marginStart="@dimen/pref_autofill_field_horizontal_padding" - android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" - android:paddingBottom="5dp" > - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:focusable="true" - android:textAppearance="@style/PreferenceFloatLabelTextAppearance" - android:text="@string/autofill_profile_editor_country" - android:paddingBottom="8dp" /> - <Spinner - android:id="@+id/countries" - android:layout_width="fill_parent" - android:layout_height="wrap_content" /> - <View style="@style/PreferenceSpinnerUnderlineView" /> - </LinearLayout> + <!-- Country --> + <include layout="@layout/payment_request_editor_dropdown" /> + <!-- Country specific address information + Bottom margins are handled by the views that are added to this layout. + --> <LinearLayout android:id="@+id/autofill_profile_widget_root" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" > - </LinearLayout> + android:orientation="vertical" /> + <!-- Phone number --> <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout android:id="@+id/phone_number_label" android:layout_width="match_parent" - android:layout_height="wrap_content" > + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/pref_autofill_content_spacing" > + <EditText android:id="@+id/phone_number_edit" android:layout_width="match_parent" @@ -51,12 +34,15 @@ android:inputType="phone" android:singleLine="true" android:hint="@string/autofill_profile_editor_phone_number" /> + </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> + <!-- Email address --> <org.chromium.chrome.browser.widget.CompatibilityTextInputLayout android:id="@+id/email_address_label" android:layout_width="match_parent" android:layout_height="wrap_content" > + <EditText android:id="@+id/email_address_edit" android:layout_width="match_parent" @@ -65,6 +51,7 @@ android:inputType="textEmailAddress" android:singleLine="true" android:hint="@string/autofill_profile_editor_email_address" /> + </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> </merge>
diff --git a/chrome/android/java/res/layout/autofill_server_card_editor.xml b/chrome/android/java/res/layout/autofill_server_card_editor.xml index 0b1597a..f69d326 100644 --- a/chrome/android/java/res/layout/autofill_server_card_editor.xml +++ b/chrome/android/java/res/layout/autofill_server_card_editor.xml
@@ -15,14 +15,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/PreferenceSummary" - android:layout_marginBottom="@dimen/pref_autofill_field_top_padding" /> + android:layout_marginBottom="@dimen/pref_autofill_field_top_margin" /> <include layout="@layout/autofill_billing_address_dropdown" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/pref_autofill_field_top_padding"> + android:layout_marginTop="@dimen/pref_autofill_field_top_margin"> <TextView android:id="@+id/edit_server_card"
diff --git a/chrome/android/java/res/layout/new_tab_page_recycler_view.xml b/chrome/android/java/res/layout/new_tab_page_recycler_view.xml index 0aee4e4..0e16e12 100644 --- a/chrome/android/java/res/layout/new_tab_page_recycler_view.xml +++ b/chrome/android/java/res/layout/new_tab_page_recycler_view.xml
@@ -11,4 +11,5 @@ android:layout_height="match_parent" android:focusable="true" android:focusableInTouchMode="true" - android:contentDescription="@string/accessibility_new_tab_page" /> + android:contentDescription="@string/accessibility_new_tab_page" + android:theme="@style/NewTabPageRecyclerView" />
diff --git a/chrome/android/java/res/layout/payment_request_editor.xml b/chrome/android/java/res/layout/payment_request_editor.xml index e04e43e1..419a37b 100644 --- a/chrome/android/java/res/layout/payment_request_editor.xml +++ b/chrome/android/java/res/layout/payment_request_editor.xml
@@ -31,20 +31,9 @@ android:id="@+id/contents" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="@dimen/payments_section_large_spacing" - android:paddingEnd="@dimen/payments_section_large_spacing" - android:orientation="vertical" > - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:layout_marginBottom="16dp" - android:textColor="@color/descriptive_text_color" - android:textSize="12sp" - android:text="@string/payments_required_field_message" /> - - </LinearLayout> + android:paddingStart="@dimen/pref_autofill_content_spacing" + android:paddingEnd="@dimen/pref_autofill_content_spacing" + android:orientation="vertical" /> </org.chromium.chrome.browser.payments.ui.FadingEdgeScrollView>
diff --git a/chrome/android/java/res/layout/payment_request_editor_dropdown.xml b/chrome/android/java/res/layout/payment_request_editor_dropdown.xml new file mode 100644 index 0000000..df10eb7 --- /dev/null +++ b/chrome/android/java/res/layout/payment_request_editor_dropdown.xml
@@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. --> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="@dimen/pref_autofill_content_spacing" + android:paddingStart="@dimen/pref_autofill_field_horizontal_padding" + android:paddingEnd="@dimen/pref_autofill_field_horizontal_padding"> + + <TextView + android:id="@+id/spinner_label" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/PreferenceFloatLabelTextAppearance" /> + + <android.support.v7.widget.AppCompatSpinner + android:id="@+id/spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/pref_autofill_field_top_margin" /> + + <View style="@style/PreferenceSpinnerUnderlineView" /> + +</LinearLayout> \ No newline at end of file
diff --git a/chrome/android/java/res/layout/payment_request_editor_footer.xml b/chrome/android/java/res/layout/payment_request_editor_footer.xml new file mode 100644 index 0000000..84741e60 --- /dev/null +++ b/chrome/android/java/res/layout/payment_request_editor_footer.xml
@@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. --> + +<TextView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:layout_marginBottom="16dp" + android:textColor="@color/descriptive_text_color" + android:textSize="12sp" + android:text="@string/payments_required_field_message" /> \ No newline at end of file
diff --git a/chrome/android/java/res/layout/preference_address_float_label_layout.xml b/chrome/android/java/res/layout/preference_address_float_label_layout.xml index 6128043ad..3f66ead 100644 --- a/chrome/android/java/res/layout/preference_address_float_label_layout.xml +++ b/chrome/android/java/res/layout/preference_address_float_label_layout.xml
@@ -7,7 +7,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/float_label_layout" android:layout_width="match_parent" - android:layout_height="wrap_content" > + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/pref_autofill_content_spacing"> + <EditText android:id="@+id/address_edit_text" android:layout_width="fill_parent" @@ -15,4 +17,5 @@ android:singleLine="true" android:imeOptions="flagNoExtractUi" android:inputType="textPostalAddress|textCapWords" /> + </org.chromium.chrome.browser.widget.CompatibilityTextInputLayout> \ No newline at end of file
diff --git a/chrome/android/java/res/values-v17/styles.xml b/chrome/android/java/res/values-v17/styles.xml index cd643ac..b2b5dfe 100644 --- a/chrome/android/java/res/values-v17/styles.xml +++ b/chrome/android/java/res/values-v17/styles.xml
@@ -97,7 +97,7 @@ <item name="floatLabelTextAppearance">@style/PreferenceFloatLabelTextAppearance</item> <item name="floatLabelPaddingLeft">@dimen/pref_autofill_field_horizontal_padding</item> <item name="floatLabelPaddingRight">@dimen/pref_autofill_field_horizontal_padding</item> - <item name="floatLabelPaddingTop">@dimen/pref_autofill_field_top_padding</item> + <item name="floatLabelPaddingTop">@dimen/pref_autofill_field_top_margin</item> </style> <style name="PreferenceTextAppearanceMedium"> <item name="android:textSize">18sp</item> @@ -133,8 +133,8 @@ <!-- Additional padding is applied to each of the controls inside the layout, making this a 16dp padding overall. --> - <item name="android:paddingStart">@dimen/pref_autofill_content_padding</item> - <item name="android:paddingEnd">@dimen/pref_autofill_content_padding</item> + <item name="android:paddingStart">@dimen/pref_autofill_content_spacing</item> + <item name="android:paddingEnd">@dimen/pref_autofill_content_spacing</item> </style> <style name="PreferenceLayoutBase"> <item name="android:background">?android:attr/activatedBackgroundIndicator</item> @@ -553,4 +553,8 @@ <item name="android:paddingEnd">16dp</item> <item name="android:background">?attr/listChoiceBackgroundIndicator</item> </style> + <!-- New tab page RecyclerView overscroll color --> + <style name="NewTabPageRecyclerView"> + <item name="android:colorEdgeEffect">@color/google_grey_300</item> + </style> </resources>
diff --git a/chrome/android/java/res/values-v21/styles.xml b/chrome/android/java/res/values-v21/styles.xml index 3345d89..646af200 100644 --- a/chrome/android/java/res/values-v21/styles.xml +++ b/chrome/android/java/res/values-v21/styles.xml
@@ -13,7 +13,7 @@ <item name="floatLabelTextAppearance">@style/PreferenceFloatLabelTextAppearance</item> <item name="floatLabelPaddingLeft">@dimen/pref_autofill_field_horizontal_padding</item> <item name="floatLabelPaddingRight">@dimen/pref_autofill_field_horizontal_padding</item> - <item name="floatLabelPaddingTop">@dimen/pref_autofill_field_top_padding</item> + <item name="floatLabelPaddingTop">@dimen/pref_autofill_field_top_margin</item> </style> <style name="PreferencesDialogTheme" parent="@android:style/Theme.Material.Light.Dialog.Alert"> <item name="android:colorAccent">@color/pref_accent_color</item>
diff --git a/chrome/android/java/res/values/colors.xml b/chrome/android/java/res/values/colors.xml index decd525..885de90 100644 --- a/chrome/android/java/res/values/colors.xml +++ b/chrome/android/java/res/values/colors.xml
@@ -9,7 +9,6 @@ <color name="default_primary_color">#f2f2f2</color> <color name="light_normal_color">#5A5A5A</color> <color name="light_active_color">#4285F4</color> - <color name="input_underline_color">#e5e5e5</color> <color name="input_underline_error_color">#d32f2f</color> <color name="explanation_text_color">#909090</color> <color name="text_highlight_color">#C6DAFC</color> @@ -111,7 +110,6 @@ <color name="ntp_material_design_bg">#f2f2f2</color> <color name="snippets_thumnail_placeholder_bg">#f2f2f2</color> <color name="snippets_thumnail_placeholder_fg">#757575</color> - <color name="snippets_background_color">#fff</color> <color name="snippets_publisher_name_color">#646464</color> <color name="snippets_text_color">#646464</color> <color name="snippets_list_header_text_color">#646464</color>
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml index 7bf72e02..06a1930 100644 --- a/chrome/android/java/res/values/dimens.xml +++ b/chrome/android/java/res/values/dimens.xml
@@ -222,7 +222,6 @@ <dimen name="toolbar_tab_count_text_size_1_digit">12dp</dimen> <dimen name="toolbar_tab_count_text_size_2_digit">10dp</dimen> <dimen name="toolbar_height_no_shadow">56dp</dimen> - <dimen name="toolbar_elevation">2dp</dimen> <dimen name="toolbar_progress_bar_height">2dp</dimen> <dimen name="toolbar_button_width">48dp</dimen> @@ -287,11 +286,11 @@ <dimen name="ntp_list_item_min_height">48dp</dimen> <dimen name="ntp_list_item_text_size">16sp</dimen> <dimen name="ntp_shadow_height">9dp</dimen> + <dimen name="ntp_min_bottom_spacing_recycler_view">32dp</dimen> <dimen name="snippets_thumbnail_size">72dp</dimen> <dimen name="snippets_padding_and_peeking_card_height">16dp</dimen> <dimen name="snippets_card_9_patch_adjustment">2dp</dimen> <dimen name="snippets_article_header_height">40dp</dimen> - <dimen name="snippets_card_elevation">2dp</dimen> <!-- Interests page --> <dimen name="ntp_interest_item_text_size">20sp</dimen> @@ -368,9 +367,9 @@ pref_autofill_field_horizontal_padding exists because TextInputLayouts have an internal padding set. --> - <dimen name="pref_autofill_content_padding">12dp</dimen> + <dimen name="pref_autofill_content_spacing">12dp</dimen> <dimen name="pref_autofill_field_horizontal_padding">4dp</dimen> - <dimen name="pref_autofill_field_top_padding">10dp</dimen> + <dimen name="pref_autofill_field_top_margin">8dp</dimen> <!-- Dialog dimensions. https://www.google.com/design/spec/components/dialogs.html#dialogs-simple-dialogs -->
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AppLinkHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/AppLinkHandler.java deleted file mode 100644 index 786b47e6..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/AppLinkHandler.java +++ /dev/null
@@ -1,51 +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. - -package org.chromium.chrome.browser; - -import android.content.Context; -import android.content.Intent; - -/** App link handler. */ -public class AppLinkHandler { - - private static final Object INSTANCE_LOCK = new Object(); - private static AppLinkHandler sInstance; - - public static AppLinkHandler getInstance(ChromeApplication application) { - synchronized (INSTANCE_LOCK) { - if (sInstance == null) { - sInstance = application.createAppLinkHandler(); - } - } - return sInstance; - } - - /** Cache whether the feature is enabled. */ - public void cacheAppLinkEnabled(Context context) { - } - - /** Handle incoming intent. */ - public boolean handleIncomingIntent(Context context, Intent intent, boolean isCustomTabs) { - return false; - } - - /** - * Handle intent. - * TODO(mariakhomenko): remove - */ - @Deprecated - public boolean handleIntent(Context context, Intent intent, boolean isCustomTabsIntent) { - return false; - } - - /** - * Commit metrics. - * TODO(mariakhomenko): remove - */ - @Deprecated - public void commitMetrics() { - } - -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java index d215a1e..ffe3e02d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
@@ -682,8 +682,8 @@ return mPrintingController; } - public AppLinkHandler createAppLinkHandler() { - return new AppLinkHandler(); + public InstantAppsHandler createInstantAppsHandler() { + return new InstantAppsHandler(); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/InstantAppsHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/InstantAppsHandler.java new file mode 100644 index 0000000..3515dc84 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/InstantAppsHandler.java
@@ -0,0 +1,225 @@ +// 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. + +package org.chromium.chrome.browser; + +import android.content.Context; +import android.content.Intent; +import android.os.StrictMode; +import android.os.SystemClock; +import android.provider.Browser; + +import org.chromium.base.CommandLine; +import org.chromium.base.FieldTrialList; +import org.chromium.base.Log; +import org.chromium.chrome.browser.externalnav.ExternalNavigationDelegateImpl; +import org.chromium.chrome.browser.metrics.LaunchMetrics.TimesHistogramSample; +import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; +import org.chromium.chrome.browser.preferences.ChromePreferenceManager; +import org.chromium.chrome.browser.util.IntentUtils; + +import java.util.concurrent.TimeUnit; + +/** A launcher for Instant Apps. */ +public class InstantAppsHandler { + private static final String TAG = "InstantAppsHandler"; + + private static final Object INSTANCE_LOCK = new Object(); + private static InstantAppsHandler sInstance; + + private static final String DO_NOT_LAUNCH_EXTRA = + "com.google.android.gms.instantapps.DO_NOT_LAUNCH_INSTANT_APP"; + + private static final String CUSTOM_APPS_INSTANT_APP_EXTRA = + "android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS"; + + private static final String INSTANT_APP_START_TIME_EXTRA = + "org.chromium.chrome.INSTANT_APP_START_TIME"; + + /** Finch experiment name. */ + private static final String INSTANT_APPS_EXPERIMENT_NAME = "InstantApps"; + + /** Finch experiment group which is enabled for instant apps. */ + private static final String INSTANT_APPS_ENABLED_ARM = "InstantAppsEnabled"; + + /** Finch experiment group which is disabled for instant apps. */ + private static final String INSTANT_APPS_DISABLED_ARM = "InstantAppsDisabled"; + + /** A histogram to record how long each handleIntent() call took. */ + private static final TimesHistogramSample sHandleIntentDuration = new TimesHistogramSample( + "Android.InstantApps.HandleIntentDuration", TimeUnit.MILLISECONDS); + + /** A histogram to record how long the fallback intent roundtrip was. */ + private static final TimesHistogramSample sFallbackIntentTimes = new TimesHistogramSample( + "Android.InstantApps.FallbackDuration", TimeUnit.MILLISECONDS); + + /** A histogram to record how long the GMS Core API call took. */ + private static final TimesHistogramSample sInstantAppsApiCallTimes = new TimesHistogramSample( + "Android.InstantApps.ApiCallDuration", TimeUnit.MILLISECONDS); + + + /** @return The singleton instance of {@link InstantAppsHandler}. */ + public static InstantAppsHandler getInstance(ChromeApplication application) { + synchronized (INSTANCE_LOCK) { + if (sInstance == null) { + sInstance = application.createInstantAppsHandler(); + } + } + return sInstance; + } + + /** + * Check the cached value to figure out if the feature is enabled. We have to use the cached + * value because native library hasn't yet been loaded. + * @param context The application context. + * @return Whether the feature is enabled. + */ + private boolean isEnabled(Context context) { + // Will go away once the feature is enabled for everyone by default. + StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); + try { + return ChromePreferenceManager.getInstance(context).getCachedInstantAppsEnabled(); + } finally { + StrictMode.setThreadPolicy(oldPolicy); + } + } + + /** + * Record how long the handleIntent() method took. + * @param startTime The timestamp for handleIntent start time. + */ + private void recordHandleIntentDuration(long startTime) { + sHandleIntentDuration.record(SystemClock.elapsedRealtime() - startTime); + } + + /** + * Record the amount of time spent in the instant apps API call. + * @param startTime The time at which we started doing computations. + */ + protected void recordInstantAppsApiCallTime(long startTime) { + sInstantAppsApiCallTimes.record(SystemClock.elapsedRealtime() - startTime); + } + + /** + * In the case Chrome is called through the fallback mechanism from Instant Apps, record the + * amount of time the whole trip took. + * @param intent The current intent. + */ + private void maybeRecordFallbackDuration(Intent intent) { + if (intent.hasExtra(INSTANT_APP_START_TIME_EXTRA)) { + Long startTime = intent.getLongExtra(INSTANT_APP_START_TIME_EXTRA, 0); + if (startTime != 0) { + sFallbackIntentTimes.record(SystemClock.elapsedRealtime() - startTime); + } + } + } + + /** + * Cache whether the Instant Apps feature is enabled. + * This should only be called with the native library loaded. + */ + public void cacheInstantAppsEnabled(Context context) { + boolean isEnabled = false; + boolean wasEnabled = isEnabled(context); + CommandLine instance = CommandLine.getInstance(); + if (instance.hasSwitch(ChromeSwitches.DISABLE_APP_LINK)) { + isEnabled = false; + } else if (instance.hasSwitch(ChromeSwitches.ENABLE_APP_LINK)) { + isEnabled = true; + } else { + String experiment = FieldTrialList.findFullName(INSTANT_APPS_EXPERIMENT_NAME); + if (INSTANT_APPS_DISABLED_ARM.equals(experiment)) { + isEnabled = false; + } else if (INSTANT_APPS_ENABLED_ARM.equals(experiment)) { + isEnabled = true; + } + } + + if (isEnabled != wasEnabled) { + ChromePreferenceManager.getInstance(context).setCachedInstantAppsEnabled(isEnabled); + } + } + + /** Handle incoming intent. */ + public boolean handleIncomingIntent(Context context, Intent intent, + boolean isCustomTabsIntent) { + long startTimeStamp = SystemClock.elapsedRealtime(); + boolean result = handleIncomingIntentInternal(context, intent, isCustomTabsIntent, + startTimeStamp); + recordHandleIntentDuration(startTimeStamp); + return result; + } + + private boolean handleIncomingIntentInternal( + Context context, Intent intent, boolean isCustomTabsIntent, long startTime) { + if (!isEnabled(context) + || IntentUtils.safeGetBooleanExtra(intent, DO_NOT_LAUNCH_EXTRA, false) + || IntentUtils.safeGetBooleanExtra( + intent, IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, false) + || (isCustomTabsIntent && !IntentUtils.safeGetBooleanExtra( + intent, CUSTOM_APPS_INSTANT_APP_EXTRA, false)) + || DataReductionProxySettings.isEnabledBeforeNativeLoad(context) + || isIntentFromChrome(context, intent) + || (intent.getAction() != Intent.ACTION_VIEW)) { + Log.i(TAG, "Not handling with Instant Apps"); + return false; + } + + maybeRecordFallbackDuration(intent); + + // Used to search for the intent handlers. Needs null component to return correct results. + Intent intentCopy = new Intent(intent); + intentCopy.setComponent(null); + + if (!(isCustomTabsIntent || isChromeDefaultHandler(context)) + || ExternalNavigationDelegateImpl.isPackageSpecializedHandler( + context, null, intentCopy)) { + // Chrome is not the default browser or a specialized handler exists. + Log.i(TAG, "Not handling with Instant Apps because Chrome is not default or " + + "there's a specialized handler"); + return false; + } + + Intent callbackIntent = new Intent(intent); + callbackIntent.putExtra(DO_NOT_LAUNCH_EXTRA, true); + callbackIntent.putExtra(INSTANT_APP_START_TIME_EXTRA, startTime); + + return tryLaunchingInstantApp(context, intent, isCustomTabsIntent, callbackIntent); + } + + /** + * Attempts to launch an Instant App, if possible. + * @param context The activity context. + * @param intent The incoming intent. + * @param isCustomTabsIntent Whether the intent is for a CustomTab. + * @param fallbackIntent The intent that will be launched by Instant Apps in case of failure to + * load. + * @return Whether an Instant App was launched. + */ + protected boolean tryLaunchingInstantApp( + Context context, Intent intent, boolean isCustomTabsIntent, Intent fallbackIntent) { + return false; + } + + /** + * @return Whether the intent was fired from Chrome. This happens when the user gets a + * disambiguation dialog and chooses to stay in Chrome. + */ + private boolean isIntentFromChrome(Context context, Intent intent) { + return context.getPackageName().equals(IntentUtils.safeGetStringExtra( + intent, Browser.EXTRA_APPLICATION_ID)) + // We shouldn't leak internal intents with authentication tokens + || IntentHandler.wasIntentSenderChrome(intent, context); + } + + /** @return Whether Chrome is the default browser on the device. */ + private boolean isChromeDefaultHandler(Context context) { + StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); + try { + return ChromePreferenceManager.getInstance(context).getCachedChromeDefaultBrowser(); + } finally { + StrictMode.setThreadPolicy(oldPolicy); + } + } +}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java index 4d5ea8f..c0dd099c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
@@ -45,6 +45,7 @@ import org.chromium.content_public.common.ScreenOrientationConstants; import org.chromium.net.GURLUtils; import org.chromium.ui.widget.Toast; +import org.chromium.webapk.lib.client.WebApkValidator; import java.io.ByteArrayOutputStream; import java.util.List; @@ -437,6 +438,19 @@ } /** + * Returns true if WebAPKs are enabled and there is a WebAPK installed which can handle + * {@link url}. + */ + @CalledByNative + public static boolean isWebApkInstalled(String url) { + if (!CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_WEBAPK)) { + return false; + } + return WebApkValidator.queryWebApkPackage(ContextUtils.getApplicationContext(), url) + != null; + } + + /** * Compresses a bitmap into a PNG and converts into a Base64 encoded string. * The encoded string can be decoded using {@link decodeBitmapFromString(String)}. * @param bitmap The Bitmap to compress and encode.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java index f44df72..657c0f2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
@@ -935,8 +935,15 @@ mLayoutAnimations = null; onAnimationFinished(); } - requestUpdate(); } + + // LayoutTabs may be running their own animations; make sure they are done. + for (int i = 0; mLayoutTabs != null && i < mLayoutTabs.length; i++) { + finished &= mLayoutTabs[i].onUpdateAnimation(time); + } + + if (!finished) requestUpdate(); + return finished; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java index f10e88f8..ac0a093 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerDocument.java
@@ -262,10 +262,11 @@ int themeColor = tab.getThemeColor(); boolean canUseLiveTexture = tab.getContentViewCore() != null && !tab.isShowingSadTab() && !isNativePage; - layoutTab.initFromHost(tab.getBackgroundColor(), tab.shouldStall(), canUseLiveTexture, - themeColor, ColorUtils.getTextBoxColorForToolbarBackground( + boolean needsUpdate = layoutTab.initFromHost(tab.getBackgroundColor(), tab.shouldStall(), + canUseLiveTexture, themeColor, ColorUtils.getTextBoxColorForToolbarBackground( mContext.getResources(), tab, themeColor), ColorUtils.getTextBoxAlphaForToolbarBackground(tab)); + if (needsUpdate) requestUpdate(); mHost.requestRender(); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java index e03bb15..f541c80 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
@@ -4,6 +4,8 @@ package org.chromium.chrome.browser.compositor.layouts.components; +import static org.chromium.chrome.browser.compositor.layouts.ChromeAnimation.AnimatableAnimation.createAnimation; + import android.content.Context; import android.content.res.Resources; import android.graphics.Color; @@ -12,7 +14,10 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.compositor.layouts.ChromeAnimation; import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.toolbar.ToolbarPhone; +import org.chromium.chrome.browser.util.ColorUtils; import org.chromium.chrome.browser.util.MathUtils; +import org.chromium.ui.interpolators.BakedBezierInterpolator; /** * {@link LayoutTab} is used to keep track of a thumbnail's bitmap and position and to @@ -40,6 +45,7 @@ DECORATION_ALPHA, TOOLBAR_Y_OFFSET, SIDE_BORDER_SCALE, + TOOLBAR_COLOR, } public static final float ALPHA_THRESHOLD = 1.0f / 255.0f; @@ -115,6 +121,11 @@ */ private boolean mInitFromHostCalled = false; + /** The animation set specific to this LayoutTab. */ + private ChromeAnimation<ChromeAnimation.Animatable<?>> mCurrentAnimations; + private int mInitialThemeColor; + private int mFinalThemeColor; + // All the members bellow are initialized from the delayed initialization. // // Begin section -------------- @@ -208,16 +219,53 @@ * @param shouldStall Whether the tab should display a desaturated thumbnail and * wait for the content layer to load. * @param canUseLiveTexture Whether the tab can use a live texture when being displayed. + * @return True if the init requires the compositor to update. */ - public void initFromHost(int backgroundColor, boolean shouldStall, boolean canUseLiveTexture, + public boolean initFromHost(int backgroundColor, boolean shouldStall, boolean canUseLiveTexture, int toolbarBackgroundColor, int textBoxBackgroundColor, float textBoxAlpha) { mBackgroundColor = backgroundColor; - mToolbarBackgroundColor = toolbarBackgroundColor; + + boolean needsUpdate = false; + + // If the toolbar color changed, animate between the old and new colors. + if (mToolbarBackgroundColor != toolbarBackgroundColor && isVisible()) { + ChromeAnimation.Animation<ChromeAnimation.Animatable<?>> themeColorAnimation = + createAnimation(this, Property.TOOLBAR_COLOR, 0.0f, 1.0f, + ToolbarPhone.THEME_COLOR_TRANSITION_DURATION, 0, false, + BakedBezierInterpolator.TRANSFORM_CURVE); + + mInitialThemeColor = mToolbarBackgroundColor; + mFinalThemeColor = toolbarBackgroundColor; + + if (mCurrentAnimations != null) { + mCurrentAnimations.updateAndFinish(); + } + + mCurrentAnimations = new ChromeAnimation<ChromeAnimation.Animatable<?>>(); + mCurrentAnimations.add(themeColorAnimation); + mCurrentAnimations.start(); + needsUpdate = true; + } else { + // If the layout tab isn't visible, just set the toolbar color without animating. + mToolbarBackgroundColor = toolbarBackgroundColor; + } + mTextBoxBackgroundColor = textBoxBackgroundColor; mTextBoxAlpha = textBoxAlpha; mShouldStall = shouldStall; mCanUseLiveTexture = canUseLiveTexture; mInitFromHostCalled = true; + + return needsUpdate; + } + + /** + * Update any animation controlled by this object. + * @param time The current app time in ms. + * @return Whether the animations controlled by this LayoutTab are finished. + */ + public boolean onUpdateAnimation(long time) { + return mCurrentAnimations == null ? true : mCurrentAnimations.update(time); } /** @@ -774,6 +822,7 @@ * @param visible True if the {@link LayoutTab} is visible and need to be drawn. */ public void setVisible(boolean visible) { + if (!visible && mCurrentAnimations != null) mCurrentAnimations.updateAndFinish(); mVisible = visible; } @@ -959,9 +1008,21 @@ case SIDE_BORDER_SCALE: setSideBorderScale(val); break; + case TOOLBAR_COLOR: + if (!isVisible()) { + mCurrentAnimations.updateAndFinish(); + } else { + mToolbarBackgroundColor = ColorUtils.getColorWithOverlay(mInitialThemeColor, + mFinalThemeColor, val); + } + break; } } @Override - public void onPropertyAnimationFinished(Property prop) {} + public void onPropertyAnimationFinished(Property prop) { + if (mCurrentAnimations != null && mCurrentAnimations.finished()) { + mCurrentAnimations = null; + } + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java index a7d5763..411b08e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
@@ -25,10 +25,10 @@ import org.chromium.base.Log; import org.chromium.base.TraceEvent; import org.chromium.chrome.R; -import org.chromium.chrome.browser.AppLinkHandler; import org.chromium.chrome.browser.ChromeApplication; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.ChromeTabbedActivity; +import org.chromium.chrome.browser.InstantAppsHandler; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.IntentHandler.TabOpenType; import org.chromium.chrome.browser.UrlConstants; @@ -180,7 +180,9 @@ return; } - if (AppLinkHandler.getInstance((ChromeApplication) getApplication()).handleIncomingIntent( + // Check if we should launch an Instant App to handle the intent. + ChromeApplication application = (ChromeApplication) getApplication(); + if (InstantAppsHandler.getInstance(application).handleIncomingIntent( this, intent, mIsCustomTabIntent)) { finish(); return;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java index d8ba0d7..99c2a04 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
@@ -327,6 +327,9 @@ intent.addCategory(Intent.CATEGORY_BROWSABLE); intent.setPackage("com.android.vending"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + if (params.getReferrerUrl() != null) { + intent.putExtra(Intent.EXTRA_REFERRER, Uri.parse(params.getReferrerUrl())); + } mDelegate.startActivity(intent); return OverrideUrlLoadingResult.OVERRIDE_WITH_EXTERNAL_INTENT; } catch (ActivityNotFoundException ex) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionPromoInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionPromoInfoBar.java index 5828ef4e..06e05ea2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionPromoInfoBar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionPromoInfoBar.java
@@ -9,6 +9,7 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.graphics.Bitmap; import android.graphics.BitmapFactory; +import android.os.StrictMode; import org.chromium.base.CommandLine; import org.chromium.base.ThreadUtils; @@ -41,6 +42,7 @@ private static String sText; private static String sPrimaryButtonText; private static String sSecondaryButtonText; + /** * Launch the data reduction infobar promo, if it needs to be displayed. * @@ -80,7 +82,16 @@ String freOrSecondRunVersion = DataReductionPromoUtils.getDisplayedFreOrSecondRunPromoVersion(); - Calendar releaseDateOfM48Stable = Calendar.getInstance(TimeZone.getTimeZone("UTC")); + Calendar releaseDateOfM48Stable = null; + + // Temporarily allowing disk access. TODO: Fix. See http://crbug.com/577185 + StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); + try { + releaseDateOfM48Stable = Calendar.getInstance(TimeZone.getTimeZone("UTC")); + } finally { + StrictMode.setThreadPolicy(oldPolicy); + } + releaseDateOfM48Stable.setTime(Date.valueOf(M48_STABLE_RELEASE_DATE)); long packageInstallTime = getPackageInstallTime(context);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationConstants.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationConstants.java index a0b7913..d44b897 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationConstants.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationConstants.java
@@ -24,7 +24,7 @@ * Names of the Intent extras used for Intents related to notifications. These intents are set * and owned by Chromium. */ - public static final String EXTRA_PERSISTENT_NOTIFICATION_ID = "notification_persistent_id"; + public static final String EXTRA_NOTIFICATION_ID = "notification_id"; public static final String EXTRA_NOTIFICATION_INFO_ORIGIN = "notification_info_origin"; public static final String EXTRA_NOTIFICATION_INFO_PROFILE_ID = "notification_info_profile_id"; public static final String EXTRA_NOTIFICATION_INFO_PROFILE_INCOGNITO =
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java index 535f462..b080c8e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java
@@ -191,8 +191,8 @@ } } - long persistentNotificationId = - intent.getLongExtra(NotificationConstants.EXTRA_PERSISTENT_NOTIFICATION_ID, -1); + String notificationId = intent.getStringExtra(NotificationConstants.EXTRA_NOTIFICATION_ID); + String origin = intent.getStringExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_ORIGIN); String profileId = intent.getStringExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_PROFILE_ID); @@ -200,7 +200,7 @@ NotificationConstants.EXTRA_NOTIFICATION_INFO_PROFILE_INCOGNITO, false); String tag = intent.getStringExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_TAG); - Log.i(TAG, "Dispatching notification event to native: " + persistentNotificationId); + Log.i(TAG, "Dispatching notification event to native: " + notificationId); if (NotificationConstants.ACTION_CLICK_NOTIFICATION.equals(intent.getAction())) { String webApkPackage = ""; @@ -214,15 +214,14 @@ int actionIndex = intent.getIntExtra( NotificationConstants.EXTRA_NOTIFICATION_INFO_ACTION_INDEX, -1); sInstance.onNotificationClicked( - persistentNotificationId, origin, profileId, incognito, tag, webApkPackage, - actionIndex); + notificationId, origin, profileId, incognito, tag, webApkPackage, actionIndex); return true; } else if (NotificationConstants.ACTION_CLOSE_NOTIFICATION.equals(intent.getAction())) { // Notification deleteIntent is executed only "when the notification is explicitly // dismissed by the user, either with the 'Clear All' button or by swiping it away // individually" (though a third-party NotificationListenerService may also trigger it). sInstance.onNotificationClosed( - persistentNotificationId, origin, profileId, incognito, tag, true /* byUser */); + notificationId, origin, profileId, incognito, tag, true /* byUser */); return true; } @@ -300,13 +299,12 @@ * Without this, the pending intents derived from the intent may be reused, because extras are * not taken into account for the filterEquals comparison. * - * @param persistentNotificationId The persistent id of the notification. + * @param notificationId The id of the notification. * @param origin The origin to whom the notification belongs. * @param actionIndex The zero-based index of the action button, or -1 if not applicable. */ - private Uri makeIntentData(long persistentNotificationId, String origin, int actionIndex) { - return Uri.parse(origin).buildUpon().fragment( - persistentNotificationId + "," + actionIndex).build(); + private Uri makeIntentData(String notificationId, String origin, int actionIndex) { + return Uri.parse(origin).buildUpon().fragment(notificationId + "," + actionIndex).build(); } /** @@ -314,7 +312,7 @@ * in the other parameters. * * @param action The action this pending intent will represent. - * @param persistentNotificationId The persistent id of the notification. + * @paramn notificationId The id of the notification. * @param origin The origin to whom the notification belongs. * @param profileId Id of the profile to which the notification belongs. * @param incognito Whether the profile was in incognito mode. @@ -323,15 +321,14 @@ * the notification is not associated with a WebAPK. * @param actionIndex The zero-based index of the action button, or -1 if not applicable. */ - private PendingIntent makePendingIntent(String action, long persistentNotificationId, - String origin, String profileId, boolean incognito, @Nullable String tag, - String webApkPackage, int actionIndex) { - Uri intentData = makeIntentData(persistentNotificationId, origin, actionIndex); + private PendingIntent makePendingIntent(String action, String notificationId, String origin, + String profileId, boolean incognito, @Nullable String tag, String webApkPackage, + int actionIndex) { + Uri intentData = makeIntentData(notificationId, origin, actionIndex); Intent intent = new Intent(action, intentData); intent.setClass(mAppContext, NotificationService.Receiver.class); - intent.putExtra(NotificationConstants.EXTRA_PERSISTENT_NOTIFICATION_ID, - persistentNotificationId); + intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_ID, notificationId); intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_ORIGIN, origin); intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_PROFILE_ID, profileId); intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_PROFILE_INCOGNITO, incognito); @@ -357,14 +354,13 @@ * If the input tag is empty the output is PREFIX + SEPARATOR + ORIGIN + SEPARATOR + * NOTIFICATION_ID. * - * @param persistentNotificationId The persistent id of the notification. + * @param notificationId The id of the notification. * @param origin The origin for which the notification is shown. * @param tag A string identifier for this notification. * @return The generated platform tag. */ @VisibleForTesting - static String makePlatformTag( - long persistentNotificationId, String origin, @Nullable String tag) { + static String makePlatformTag(String notificationId, String origin, @Nullable String tag) { // The given tag may contain the separator character, so add it last to make reading the // preceding origin token reliable. If no tag was specified (it is the default empty // string), make the platform tag unique by appending the notification id. @@ -375,7 +371,7 @@ .append(NotificationConstants.NOTIFICATION_TAG_SEPARATOR); if (TextUtils.isEmpty(tag)) { - builder.append(persistentNotificationId); + builder.append(notificationId); } else { builder.append(tag); } @@ -459,7 +455,7 @@ /** * Displays a notification with the given details. * - * @param persistentNotificationId The persistent id of the notification. + * @param notificationId The id of the notification. * @param origin Full text of the origin, including the protocol, owning this notification. * @param profileId Id of the profile that showed the notification. * @param incognito if the session of the profile is an off the record one. @@ -486,7 +482,7 @@ * @see https://developer.android.com/reference/android/app/Notification.html */ @CalledByNative - private void displayNotification(long persistentNotificationId, String origin, String profileId, + private void displayNotification(String notificationId, String origin, String profileId, boolean incognito, String tag, String webApkPackage, String title, String body, Bitmap icon, Bitmap badge, int[] vibrationPattern, long timestamp, boolean renotify, boolean silent, String[] actionTitles, Bitmap[] actionIcons) { @@ -505,20 +501,19 @@ // Set up a pending intent for going to the settings screen for |origin|. Intent settingsIntent = PreferencesLauncher.createIntentForSettingsPage( mAppContext, SingleWebsitePreferences.class.getName()); - settingsIntent.setData( - makeIntentData(persistentNotificationId, origin, -1 /* actionIndex */)); + settingsIntent.setData(makeIntentData(notificationId, origin, -1 /* actionIndex */)); settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, SingleWebsitePreferences.createFragmentArgsForSite(origin)); PendingIntent pendingSettingsIntent = PendingIntent.getActivity(mAppContext, PENDING_INTENT_REQUEST_CODE, settingsIntent, PendingIntent.FLAG_UPDATE_CURRENT); - PendingIntent clickIntent = makePendingIntent( - NotificationConstants.ACTION_CLICK_NOTIFICATION, persistentNotificationId, origin, - profileId, incognito, tag, webApkPackage, -1 /* actionIndex */); - PendingIntent closeIntent = makePendingIntent( - NotificationConstants.ACTION_CLOSE_NOTIFICATION, persistentNotificationId, origin, - profileId, incognito, tag, webApkPackage, -1 /* actionIndex */); + PendingIntent clickIntent = + makePendingIntent(NotificationConstants.ACTION_CLICK_NOTIFICATION, notificationId, + origin, profileId, incognito, tag, webApkPackage, -1 /* actionIndex */); + PendingIntent closeIntent = + makePendingIntent(NotificationConstants.ACTION_CLOSE_NOTIFICATION, notificationId, + origin, profileId, incognito, tag, webApkPackage, -1 /* actionIndex */); NotificationBuilderBase notificationBuilder = createNotificationBuilder() @@ -538,8 +533,8 @@ for (int actionIndex = 0; actionIndex < actionTitles.length; actionIndex++) { notificationBuilder.addAction(actionIcons[actionIndex], actionTitles[actionIndex], makePendingIntent(NotificationConstants.ACTION_CLICK_NOTIFICATION, - persistentNotificationId, origin, profileId, - incognito, tag, webApkPackage, actionIndex)); + notificationId, origin, profileId, incognito, tag, + webApkPackage, actionIndex)); } // If action buttons are displayed, there isn't room for the full Site Settings button @@ -566,7 +561,7 @@ makeDefaults(vibrationPattern.length, silent, vibrateEnabled)); notificationBuilder.setVibrate(makeVibrationPattern(vibrationPattern)); - String platformTag = makePlatformTag(persistentNotificationId, origin, tag); + String platformTag = makePlatformTag(notificationId, origin, tag); if (webApkPackage.isEmpty()) { mNotificationManager.notify(platformTag, PLATFORM_ID, notificationBuilder.build()); } else { @@ -675,17 +670,17 @@ * Closes the notification associated with the given parameters. * * @param profileId of the profile whose notification this is for. - * @param persistentNotificationId The persistent id of the notification. + * @param notificationId The id of the notification. * @param origin The origin to which the notification belongs. * @param tag The tag of the notification. May be NULL. * @param webApkPackage The package of the WebAPK associated with the notification. * Empty if the notification is not associated with a WebAPK. */ @CalledByNative - private void closeNotification(String profileId, long persistentNotificationId, String origin, + private void closeNotification(String profileId, String notificationId, String origin, String tag, String webApkPackage) { // TODO(miguelg) make profile_id part of the tag. - String platformTag = makePlatformTag(persistentNotificationId, origin, tag); + String platformTag = makePlatformTag(notificationId, origin, tag); if (webApkPackage.isEmpty()) { mNotificationManager.cancel(platformTag, PLATFORM_ID); @@ -698,7 +693,7 @@ * Calls NotificationPlatformBridgeAndroid::OnNotificationClicked in native code to indicate * that the notification with the given parameters has been clicked on. * - * @param persistentNotificationId The persistent id of the notification. + * @param notificationId The id of the notification. * @param origin The origin of the notification. * @param profileId Id of the profile that showed the notification. * @param incognito if the profile session was an off the record one. @@ -707,37 +702,36 @@ * Empty if the notification is not associated with a WebAPK. * @param actionIndex */ - private void onNotificationClicked(long persistentNotificationId, String origin, - String profileId, boolean incognito, String tag, String webApkPackage, - int actionIndex) { + private void onNotificationClicked(String notificationId, String origin, String profileId, + boolean incognito, String tag, String webApkPackage, int actionIndex) { mLastNotificationClickMs = System.currentTimeMillis(); - nativeOnNotificationClicked(mNativeNotificationPlatformBridge, persistentNotificationId, - origin, profileId, incognito, tag, webApkPackage, actionIndex); + nativeOnNotificationClicked(mNativeNotificationPlatformBridge, notificationId, origin, + profileId, incognito, tag, webApkPackage, actionIndex); } /** * Calls NotificationPlatformBridgeAndroid::OnNotificationClosed in native code to indicate that * the notification with the given parameters has been closed. * - * @param persistentNotificationId The persistent id of the notification. + * @param notificationId The id of the notification. * @param origin The origin of the notification. * @param profileId Id of the profile that showed the notification. * @param incognito if the profile session was an off the record one. * @param tag The tag of the notification. May be NULL. * @param byUser Whether the notification was closed by a user gesture. */ - private void onNotificationClosed(long persistentNotificationId, String origin, - String profileId, boolean incognito, String tag, boolean byUser) { - nativeOnNotificationClosed(mNativeNotificationPlatformBridge, persistentNotificationId, - origin, profileId, incognito, tag, byUser); + private void onNotificationClosed(String notificationId, String origin, String profileId, + boolean incognito, String tag, boolean byUser) { + nativeOnNotificationClosed(mNativeNotificationPlatformBridge, notificationId, origin, + profileId, incognito, tag, byUser); } private static native void nativeInitializeNotificationPlatformBridge(); private native void nativeOnNotificationClicked(long nativeNotificationPlatformBridgeAndroid, - long persistentNotificationId, String origin, String profileId, boolean incognito, - String tag, String webApkPackage, int actionIndex); + String notificationId, String origin, String profileId, boolean incognito, String tag, + String webApkPackage, int actionIndex); private native void nativeOnNotificationClosed(long nativeNotificationPlatformBridgeAndroid, - long persistentNotificationId, String origin, String profileId, boolean incognito, - String tag, boolean byUser); + String notificationId, String origin, String profileId, boolean incognito, String tag, + boolean byUser); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java index 8202494..4b3eed1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java
@@ -51,7 +51,7 @@ */ @Override public void onHandleIntent(final Intent intent) { - if (!intent.hasExtra(NotificationConstants.EXTRA_PERSISTENT_NOTIFICATION_ID) + if (!intent.hasExtra(NotificationConstants.EXTRA_NOTIFICATION_ID) || !intent.hasExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_ORIGIN) || !intent.hasExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_TAG)) { return;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java index 9725c89..f833e7ab 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
@@ -27,11 +27,6 @@ private static final String TAG = "NtpCards"; /** - * Minimum height of the bottom spacing item. - */ - private static final int MIN_BOTTOM_SPACING = 0; - - /** * Positions of key items in the RecyclerView. */ private static final int ABOVE_THE_FOLD_ITEM_POSITION = 0; @@ -41,6 +36,7 @@ private final GestureDetector mGestureDetector; private final LinearLayoutManager mLayoutManager; private final int mToolbarHeight; + private final int mMinBottomSpacing; /** * Total height of the items being dismissed. Tracked to allow the bottom space to compensate @@ -72,6 +68,8 @@ Resources res = context.getResources(); mToolbarHeight = res.getDimensionPixelSize(R.dimen.toolbar_height_no_shadow) + res.getDimensionPixelSize(R.dimen.toolbar_progress_bar_height); + mMinBottomSpacing = + res.getDimensionPixelSize(R.dimen.ntp_min_bottom_spacing_recycler_view); } public boolean isFirstItemVisible() { @@ -160,7 +158,7 @@ int firstVisiblePos = mLayoutManager.findFirstVisibleItemPosition(); // We have enough items to fill the view, since the snap point item is not even visible. - if (firstVisiblePos > ARTICLES_HEADER_ITEM_POSITION) return MIN_BOTTOM_SPACING; + if (firstVisiblePos > ARTICLES_HEADER_ITEM_POSITION) return mMinBottomSpacing; // The spacing item is the last item, the last content item is directly above that. int lastContentItemPosition = getAdapter().getItemCount() - 2; @@ -190,7 +188,7 @@ bottomSpacing -= contentHeight - mCompensationHeight; } - return Math.max(MIN_BOTTOM_SPACING, bottomSpacing); + return Math.max(mMinBottomSpacing, bottomSpacing); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java index e9540b6..b3017d80 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
@@ -789,7 +789,7 @@ // of the top of the text which includes some whitespace. if (child == mAnswerImage) { verticalOffset += getResources().getDimensionPixelOffset( - R.dimen.omnibox_suggestion_answer_line2_vertical_spacing); + R.dimen.omnibox_suggestion_answer_image_vertical_spacing); } if (child != mTextLine1 && verticalOffset + line2Height > height) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/AccountChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/AccountChooserDialog.java index e206d32d..ec10ac6 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/AccountChooserDialog.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/AccountChooserDialog.java
@@ -11,6 +11,7 @@ import android.support.v7.app.AlertDialog; import android.text.SpannableString; import android.text.Spanned; +import android.text.TextUtils; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.view.LayoutInflater; @@ -44,6 +45,7 @@ private final int mTitleLinkStart; private final int mTitleLinkEnd; private final String mOrigin; + private final String mSigninButtonText; private ArrayAdapter<Credential> mAdapter; private boolean mIsDestroyed; private boolean mWasDismissedByNative; @@ -54,10 +56,15 @@ private Credential mCredential; private long mNativeAccountChooserDialog; private AlertDialog mDialog; + /** + * True, if credentials were selected via "Sign In" button instead of clicking on the credential + * itself. + */ + private boolean mSigninButtonClicked; private AccountChooserDialog(Context context, long nativeAccountChooserDialog, Credential[] credentials, String title, int titleLinkStart, int titleLinkEnd, - String origin) { + String origin, String signinButtonText) { mNativeAccountChooserDialog = nativeAccountChooserDialog; mContext = context; mCredentials = credentials.clone(); @@ -65,6 +72,8 @@ mTitleLinkStart = titleLinkStart; mTitleLinkEnd = titleLinkEnd; mOrigin = origin; + mSigninButtonText = signinButtonText; + mSigninButtonClicked = false; } /** @@ -78,12 +87,12 @@ @CalledByNative private static AccountChooserDialog createAndShowAccountChooser(WindowAndroid windowAndroid, long nativeAccountChooserDialog, Credential[] credentials, String title, - int titleLinkStart, int titleLinkEnd, String origin) { + int titleLinkStart, int titleLinkEnd, String origin, String signinButtonText) { Activity activity = windowAndroid.getActivity().get(); if (activity == null) return null; AccountChooserDialog chooser = new AccountChooserDialog(activity, nativeAccountChooserDialog, credentials, title, - titleLinkStart, titleLinkEnd, origin); + titleLinkStart, titleLinkEnd, origin, signinButtonText); chooser.show(); return chooser; } @@ -164,6 +173,9 @@ mCredential = mCredentials[item]; } }); + if (!TextUtils.isEmpty(mSigninButtonText)) { + builder.setPositiveButton(mSigninButtonText, this); + } mDialog = builder.create(); mDialog.setOnDismissListener(this); mDialog.show(); @@ -203,14 +215,19 @@ } @Override - public void onClick(DialogInterface dialog, int whichButton) {} + public void onClick(DialogInterface dialog, int whichButton) { + if (whichButton == DialogInterface.BUTTON_POSITIVE) { + mCredential = mCredentials[0]; + mSigninButtonClicked = true; + } + } @Override public void onDismiss(DialogInterface dialog) { if (!mWasDismissedByNative) { if (mCredential != null) { - nativeOnCredentialClicked( - mNativeAccountChooserDialog, mCredential.getIndex(), mCredential.getType()); + nativeOnCredentialClicked(mNativeAccountChooserDialog, mCredential.getIndex(), + mCredential.getType(), mSigninButtonClicked); } else { nativeCancelDialog(mNativeAccountChooserDialog); } @@ -218,8 +235,8 @@ destroy(); } - private native void nativeOnCredentialClicked( - long nativeAccountChooserDialogAndroid, int credentialId, int credentialType); + private native void nativeOnCredentialClicked(long nativeAccountChooserDialogAndroid, + int credentialId, int credentialType, boolean signinButtonClicked); private native void nativeCancelDialog(long nativeAccountChooserDialogAndroid); private native void nativeDestroy(long nativeAccountChooserDialogAndroid); private native void nativeOnLinkClicked(long nativeAccountChooserDialogAndroid);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java index 959310a..c853391 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java
@@ -5,6 +5,7 @@ package org.chromium.chrome.browser.payments.ui; import android.content.Context; +import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; @@ -12,6 +13,7 @@ import android.widget.Spinner; import android.widget.TextView; +import org.chromium.chrome.R; import org.chromium.chrome.browser.preferences.autofill.AutofillProfileBridge.DropdownKeyValue; import java.util.List; @@ -21,6 +23,7 @@ */ class EditorDropdownField { private final EditorFieldModel mFieldModel; + private final View mLayout; private final TextView mLabel; private final Spinner mDropdown; private int mSelectedIndex; @@ -38,7 +41,10 @@ assert fieldModel.getInputTypeHint() == EditorFieldModel.INPUT_TYPE_HINT_DROPDOWN; mFieldModel = fieldModel; - mLabel = new TextView(context); + mLayout = LayoutInflater.from(context).inflate( + R.layout.payment_request_editor_dropdown, null, false); + + mLabel = (TextView) mLayout.findViewById(R.id.spinner_label); mLabel.setText(mFieldModel.getLabel()); final List<DropdownKeyValue> dropdownKeyValues = mFieldModel.getDropdownKeyValues(); @@ -49,11 +55,12 @@ } } - ArrayAdapter<DropdownKeyValue> adapter = new ArrayAdapter<DropdownKeyValue>(context, - android.R.layout.simple_spinner_item, dropdownKeyValues); + ArrayAdapter<DropdownKeyValue> adapter = new ArrayAdapter<DropdownKeyValue>( + context, android.R.layout.simple_spinner_item, dropdownKeyValues); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); - mDropdown = new Spinner(context); + mDropdown = (Spinner) mLayout.findViewById(R.id.spinner); + mDropdown.setContentDescription(mFieldModel.getLabel()); mDropdown.setAdapter(adapter); mDropdown.setSelection(mSelectedIndex); mDropdown.setOnItemSelectedListener(new OnItemSelectedListener() { @@ -71,6 +78,11 @@ }); } + /** @return The View containing everything. */ + public View getLayout() { + return mLayout; + } + /** @return The EditorFieldModel that the EditorDropdownField represents. */ public EditorFieldModel getFieldModel() { return mFieldModel;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java index f22122c..0191d9e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java
@@ -49,6 +49,7 @@ LayoutInflater.from(context).inflate(R.layout.payments_request_editor_textview, this, true); mInput = (AutoCompleteTextView) findViewById(R.id.text_view); mInput.setText(fieldModel.getValue()); + mInput.setContentDescription(label); mInput.setOnEditorActionListener(actionlistener); // Validate the field when the user de-focuses it.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java index 72b61782..9b21004 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java
@@ -26,6 +26,7 @@ import android.widget.TextView; import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.base.VisibleForTesting; import org.chromium.chrome.R; import org.chromium.chrome.browser.EmbedContentViewActivity; import org.chromium.chrome.browser.payments.ui.PaymentRequestUI.PaymentRequestObserverForTest; @@ -58,10 +59,14 @@ private final Handler mHandler; private final AsyncTask<Void, Void, PhoneNumberFormattingTextWatcher> mPhoneFormatterTask; private final TextView.OnEditorActionListener mEditorActionListener; + private final int mHalfRowMargin; + private final List<EditorTextField> mEditorTextFields; private ViewGroup mLayout; private EditorModel mEditorModel; private Button mDoneButton; + private ViewGroup mDataView; + private View mFooter; @Nullable private AutoCompleteTextView mPhoneInput; /** @@ -98,6 +103,10 @@ return false; } }; + + mHalfRowMargin = activity.getResources().getDimensionPixelSize( + R.dimen.payments_section_large_spacing); + mEditorTextFields = new ArrayList<>(); } /** Launches the Autofill help page on top of the current Context. */ @@ -157,21 +166,19 @@ */ private boolean validateForm() { final List<EditorTextField> invalidViews = getViewsWithInvalidInformation(); - if (invalidViews.isEmpty()) return true; // Focus the first field that's invalid. - if (!invalidViews.contains(getCurrentFocus())) focusInputField(invalidViews.get(0)); + if (!invalidViews.isEmpty() && !invalidViews.contains(getCurrentFocus())) { + focusInputField(invalidViews.get(0)); + } // Iterate over all the fields to update what errors are displayed, which is necessary to // to clear existing errors on any newly valid fields. - ViewGroup dataView = (ViewGroup) mLayout.findViewById(R.id.contents); - for (int i = 0; i < dataView.getChildCount(); i++) { - if (!(dataView.getChildAt(i) instanceof EditorTextField)) continue; - EditorTextField fieldView = (EditorTextField) dataView.getChildAt(i); + for (int i = 0; i < mEditorTextFields.size(); i++) { + EditorTextField fieldView = mEditorTextFields.get(i); fieldView.updateDisplayedError(invalidViews.contains(fieldView)); } - - return false; + return invalidViews.isEmpty(); } @Override @@ -210,47 +217,90 @@ /** * Create the visual representation of the EditorModel. * - * Fields are added to the layout at position |getChildCount() - 1| to account for the - * additional TextView that says "* indicates required field" at the bottom of the layout. - * - * TODO(rouslan): Put views side by side if !fieldModel.isFullLine(); + * This would be more optimal as a RelativeLayout, but because it's dynamically generated, it's + * much more human-parsable with inefficient LinearLayouts for half-width controls sharing rows. */ private void prepareEditor() { - final ViewGroup dataView = (ViewGroup) mLayout.findViewById(R.id.contents); + removeTextChangedListenerFromPhoneInputField(); + + // Ensure the layout is empty. + mDataView = (ViewGroup) mLayout.findViewById(R.id.contents); + mDataView.removeAllViews(); + mEditorTextFields.clear(); + + // Add Views for each of the {@link EditorFields}. for (int i = 0; i < mEditorModel.getFields().size(); i++) { - final EditorFieldModel fieldModel = mEditorModel.getFields().get(i); + EditorFieldModel fieldModel = mEditorModel.getFields().get(i); + EditorFieldModel nextFieldModel = null; - if (fieldModel.getInputTypeHint() == EditorFieldModel.INPUT_TYPE_HINT_DROPDOWN) { - EditorDropdownField dropdownView = new EditorDropdownField(mContext, fieldModel, - new Runnable() { - @Override - public void run() { - removeTextChangedListenerFromPhoneInputField(); - // Do not remove the "* indicates required field" label at the - // bottom. - dataView.removeViews(0, dataView.getChildCount() - 1); - prepareEditor(); - if (mObserverForTest != null) { - mObserverForTest.onPaymentRequestReadyToEdit(); - } - } - }); + boolean isLastField = i == mEditorModel.getFields().size() - 1; + boolean useFullLine = fieldModel.isFullLine(); + if (!isLastField && !useFullLine) { + // If the next field isn't full, stretch it out. + nextFieldModel = mEditorModel.getFields().get(i + 1); + if (nextFieldModel.isFullLine()) useFullLine = true; + } - dataView.addView(dropdownView.getLabel(), dataView.getChildCount() - 1); - dataView.addView(dropdownView.getDropdown(), dataView.getChildCount() - 1); + if (useFullLine) { + addFieldViewToEditor(mDataView, fieldModel); } else { - EditorTextField inputLayout = new EditorTextField(mLayout.getContext(), fieldModel, - mEditorActionListener, getPhoneFormatter(), mObserverForTest); + // Create a LinearLayout to put it and the next view side by side. + LinearLayout rowLayout = new LinearLayout(mContext); + mDataView.addView(rowLayout); - final AutoCompleteTextView input = inputLayout.getEditText(); - if (fieldModel.getInputTypeHint() == EditorFieldModel.INPUT_TYPE_HINT_PHONE) { - assert mPhoneInput == null; - mPhoneInput = input; - } + View firstView = addFieldViewToEditor(rowLayout, fieldModel); + View lastView = addFieldViewToEditor(rowLayout, nextFieldModel); - dataView.addView(inputLayout, dataView.getChildCount() - 1); + LinearLayout.LayoutParams firstParams = + (LinearLayout.LayoutParams) firstView.getLayoutParams(); + LinearLayout.LayoutParams lastParams = + (LinearLayout.LayoutParams) lastView.getLayoutParams(); + + firstParams.width = 0; + firstParams.weight = 1; + firstParams.setMarginEnd(mHalfRowMargin); + lastParams.width = 0; + lastParams.weight = 1; + i = i + 1; } } + + // Add the footer. + mDataView.addView(mFooter); + } + + private View addFieldViewToEditor(ViewGroup parent, EditorFieldModel fieldModel) { + View childView = null; + + if (fieldModel.getInputTypeHint() == EditorFieldModel.INPUT_TYPE_HINT_DROPDOWN) { + Runnable prepareEditorRunnable = new Runnable() { + @Override + public void run() { + // The fields may have changed. + prepareEditor(); + if (mObserverForTest != null) mObserverForTest.onPaymentRequestReadyToEdit(); + } + }; + EditorDropdownField dropdownView = + new EditorDropdownField(mContext, fieldModel, prepareEditorRunnable); + + childView = dropdownView.getLayout(); + } else { + EditorTextField inputLayout = new EditorTextField(mLayout.getContext(), fieldModel, + mEditorActionListener, getPhoneFormatter(), mObserverForTest); + mEditorTextFields.add(inputLayout); + + final AutoCompleteTextView input = inputLayout.getEditText(); + if (fieldModel.getInputTypeHint() == EditorFieldModel.INPUT_TYPE_HINT_PHONE) { + assert mPhoneInput == null; + mPhoneInput = input; + } + + childView = inputLayout; + } + + parent.addView(childView); + return childView; } /** @@ -265,6 +315,10 @@ mLayout = (LinearLayout) LayoutInflater.from(mContext).inflate( R.layout.payment_request_editor, null); setContentView(mLayout); + + mFooter = LayoutInflater.from(mContext).inflate( + R.layout.payment_request_editor_footer, null, false); + prepareToolbar(); prepareButtons(); prepareEditor(); @@ -289,6 +343,12 @@ if (mObserverForTest != null) mObserverForTest.onPaymentRequestEditorDismissed(); } + /** @return All the EditorTextFields that exist in the EditorView. */ + @VisibleForTesting + public List<EditorTextField> getEditorTextFields() { + return mEditorTextFields; + } + private void removeTextChangedListenerFromPhoneInputField() { if (mPhoneInput != null) mPhoneInput.removeTextChangedListener(getPhoneFormatter()); mPhoneInput = null; @@ -305,14 +365,9 @@ } private List<EditorTextField> getViewsWithInvalidInformation() { - ViewGroup container = (ViewGroup) findViewById(R.id.contents); - List<EditorTextField> invalidViews = new ArrayList<>(); - for (int i = 0; i < container.getChildCount(); i++) { - View layout = container.getChildAt(i); - if (!(layout instanceof EditorTextField)) continue; - - EditorTextField fieldView = (EditorTextField) layout; + for (int i = 0; i < mEditorTextFields.size(); i++) { + EditorTextField fieldView = mEditorTextFields.get(i); if (!fieldView.getFieldModel().isValid()) invalidViews.add(fieldView); } return invalidViews;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java index fc68ac4..05b92e3 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
@@ -39,7 +39,7 @@ private static final String CONTEXTUAL_SEARCH_TAP_QUICK_ANSWER_COUNT = "contextual_search_tap_quick_answer_count"; private static final String HERB_FLAVOR_KEY = "herb_flavor"; - private static final String APP_LINK_KEY = "applink.app_link_enabled"; + private static final String INSTANT_APPS_KEY = "applink.app_link_enabled"; private static final String CHROME_DEFAULT_BROWSER = "applink.chrome_default_browser"; private static final String SUCCESS_UPLOAD_SUFFIX = "_crash_success_upload"; @@ -320,14 +320,14 @@ } /** Checks the cached value for the app link feature. */ - public boolean getCachedAppLinkEnabled() { - return mSharedPreferences.getBoolean(APP_LINK_KEY, false); + public boolean getCachedInstantAppsEnabled() { + return mSharedPreferences.getBoolean(INSTANT_APPS_KEY, false); } /** Writes the cached value for whether app link is enabled. */ - public void setCachedAppLinkEnabled(boolean isEnabled) { + public void setCachedInstantAppsEnabled(boolean isEnabled) { SharedPreferences.Editor ed = mSharedPreferences.edit(); - ed.putBoolean(APP_LINK_KEY, isEnabled); + ed.putBoolean(INSTANT_APPS_KEY, isEnabled); ed.apply(); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillProfileEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillProfileEditor.java index 5b0302e..7d3e71c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillProfileEditor.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillProfileEditor.java
@@ -14,6 +14,7 @@ import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; +import android.widget.TextView; import org.chromium.chrome.R; import org.chromium.chrome.browser.autofill.PersonalDataManager; @@ -58,7 +59,10 @@ mEmailText = (EditText) v.findViewById(R.id.email_address_edit); mEmailLabel = (CompatibilityTextInputLayout) v.findViewById(R.id.email_address_label); mWidgetRoot = (ViewGroup) v.findViewById(R.id.autofill_profile_widget_root); - mCountriesDropdown = (Spinner) v.findViewById(R.id.countries); + mCountriesDropdown = (Spinner) v.findViewById(R.id.spinner); + + TextView countriesLabel = (TextView) v.findViewById(R.id.spinner_label); + countriesLabel.setText(v.getContext().getString(R.string.autofill_profile_editor_country)); mAutofillProfileBridge = new AutofillProfileBridge(); @@ -208,7 +212,6 @@ fieldFloatLabel.setHint(field.label); EditText fieldEditText = fieldFloatLabel.getEditText(); - fieldEditText.setContentDescription(field.label); fieldEditText.addTextChangedListener(this); if (field.id == AddressField.STREET_ADDRESS) { fieldEditText.setSingleLine(false);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java index 80b8c1c6..f06c77d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java
@@ -34,6 +34,7 @@ import android.util.Pair; import org.chromium.base.ContextUtils; +import org.chromium.base.Log; import org.chromium.base.metrics.RecordUserAction; import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeApplication; @@ -72,6 +73,8 @@ implements SignOutDialogListener, ProfileDownloader.Observer, SyncStateChangedListener, SignInStateObserver, ConfirmManagedSyncDataDialog.Listener { + private static final String TAG = "AcctManagementPref"; + public static final String SIGN_OUT_DIALOG_TAG = "sign_out_dialog_tag"; private static final String CLEAR_DATA_PROGRESS_DIALOG_TAG = "clear_data_progress"; @@ -411,6 +414,10 @@ // this when we figure that out. Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS); intent.putExtra(Settings.EXTRA_ACCOUNT_TYPES, new String[] {"com.google"}); + if (intent.resolveActivity(activity.getPackageManager()) == null) { + Log.w(TAG, "Unable to resolve activity for: %s", intent); + return; + } activity.startActivity(intent); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/snackbar/LofiBarController.java b/chrome/android/java/src/org/chromium/chrome/browser/snackbar/LofiBarController.java index 5cdc5619..6906a853 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/snackbar/LofiBarController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/snackbar/LofiBarController.java
@@ -32,6 +32,7 @@ private final Context mContext; private final boolean mDisabled; private Tab mTab; + private TabObserver mTabObserver; private boolean mLoFiPopupShownForPageLoad = false; /** @@ -70,21 +71,11 @@ showLoFiBar(tab, isPreview); tab.removeObserver(this); } - - @Override - public void onHidden(Tab tab) { - dismissLoFiBar(); - } - - @Override - public void onDestroyed(Tab tab) { - dismissLoFiBar(); - } }; tab.addObserver(tabObserver); - return; + } else { + showLoFiBar(tab, isPreview); } - showLoFiBar(tab, isPreview); } /** @@ -93,6 +84,31 @@ private void showLoFiBar(Tab tab, boolean isPreview) { if (mDisabled) return; mTab = tab; + + mTabObserver = new EmptyTabObserver() { + @Override + public void onHidden(Tab tab) { + dismissLoFiBar(); + } + + @Override + public void onDestroyed(Tab tab) { + dismissLoFiBar(); + } + + @Override + public void onDidStartProvisionalLoadForFrame(Tab tab, long frameId, + long parentFrameId, boolean isMainFrame, String validatedUrl, + boolean isErrorPage, boolean isIframeSrcdoc) { + // When a provisional load is started for the main frame, the boolean storing if + // the Lo-Fi snackbar has been shown is reset. If there was a previous Lo-Fi + // snackbar showing, remove it. + if (isMainFrame) dismissLoFiBar(); + } + + }; + tab.addObserver(mTabObserver); + String message = mContext .getString(isPreview ? R.string.data_reduction_lo_fi_preview_snackbar_message : R.string.data_reduction_lo_fi_snackbar_message); @@ -113,15 +129,24 @@ * Dismisses the snackbar. */ private void dismissLoFiBar() { + removeTabObserver(); if (mSnackbarManager.isShowing()) mSnackbarManager.dismissSnackbars(this); } /** + * Removes the TabObserver. + */ + private void removeTabObserver() { + mTab.removeObserver(mTabObserver); + mTabObserver = null; + } + + /** * Reloads the page showing all images. */ @Override public void onAction(Object actionData) { - mSnackbarManager.dismissSnackbars(this); + removeTabObserver(); if (actionData == null) return; int snackbarType = (int) actionData; @@ -143,5 +168,7 @@ } @Override - public void onDismissNoAction(Object actionData) {} + public void onDismissNoAction(Object actionData) { + removeTabObserver(); + } } \ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java index 669d587..422b1c8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
@@ -84,7 +84,6 @@ } } - private static final int BRAND_COLOR_TRANSITION_DURATION_MS = 250; private static final int TITLE_ANIM_DELAY_MS = 800; private static final int STATE_DOMAIN_ONLY = 0; private static final int STATE_TITLE_ONLY = 1; @@ -530,7 +529,7 @@ if (background.getColor() == finalColor) return; mBrandColorTransitionAnimation = ValueAnimator.ofFloat(0, 1) - .setDuration(BRAND_COLOR_TRANSITION_DURATION_MS); + .setDuration(ToolbarPhone.THEME_COLOR_TRANSITION_DURATION); mBrandColorTransitionAnimation.setInterpolator(BakedBezierInterpolator.TRANSFORM_CURVE); mBrandColorTransitionAnimation.addUpdateListener(new AnimatorUpdateListener() { @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java index 6b1cd17d..174da7e4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
@@ -76,6 +76,9 @@ implements Invalidator.Client, OnClickListener, OnLongClickListener, NewTabPage.OnSearchBoxScrollListener { + /** The amount of time transitioning from one theme color to another should take in ms. */ + public static final long THEME_COLOR_TRANSITION_DURATION = 250; + public static final int URL_FOCUS_CHANGE_ANIMATION_DURATION_MS = 250; private static final int URL_FOCUS_TOOLBAR_BUTTONS_TRANSLATION_X_DP = 10; private static final int URL_FOCUS_TOOLBAR_BUTTONS_DURATION_MS = 100; @@ -89,8 +92,6 @@ private static final float UNINITIALIZED_PERCENT = -1f; - private static final int BRAND_COLOR_TRANSITION_DURATION_MS = 250; - private static final String TAG = "ToolbarPhone"; static final int LOCATION_BAR_TRANSPARENT_BACKGROUND_ALPHA = 51; @@ -903,12 +904,7 @@ (mNtpSearchBoxTransformedBounds.top - mPhoneLocationBar.getTop() + halfHeightDifference))); if (!mUrlFocusChangeInProgress) { - float searchBoxTranslationY = - mNtpSearchBoxTransformedBounds.top - mNtpSearchBoxOriginalBounds.top; - searchBoxTranslationY = Math.min(searchBoxTranslationY, 0); - mToolbarButtonsContainer.setTranslationY(searchBoxTranslationY); - mReturnButton.setTranslationY(searchBoxTranslationY); - mHomeButton.setTranslationY(searchBoxTranslationY); + setButtonsTranslationY(); } mLocationBarBackgroundOffset.set( @@ -938,6 +934,15 @@ mForceDrawLocationBarBackground = mUrlExpansionPercent != 0f; } + private void setButtonsTranslationY() { + float searchBoxTranslationY = + mNtpSearchBoxTransformedBounds.top - mNtpSearchBoxOriginalBounds.top; + searchBoxTranslationY = Math.min(searchBoxTranslationY, 0); + mToolbarButtonsContainer.setTranslationY(searchBoxTranslationY); + mReturnButton.setTranslationY(searchBoxTranslationY); + mHomeButton.setTranslationY(searchBoxTranslationY); + } + private void setAncestorsShouldClipChildren(boolean clip) { if (!isLocationBarShownInNTP()) return; ViewGroup parent = this; @@ -1719,10 +1724,10 @@ // during the URL focus and defocus animations it should not be touched. Unfortunately // updateNtpTransitionAnimation() is called a few times after the URL focus animation has // been completed while mUrlFocusChangeInProgress is set to false, causing translationY to - // non-zero at the end. + // incorrect at the end. // We reset the translationY here so the mToolbarButtonsContainer is on screen for the // defocusing animation. - mToolbarButtonsContainer.setTranslationY(0f); + setButtonsTranslationY(); triggerUrlFocusAnimation(hasFocus); @@ -1869,7 +1874,7 @@ shouldUseOpaque ? 255 : LOCATION_BAR_TRANSPARENT_BACKGROUND_ALPHA; final boolean shouldAnimateAlpha = initialAlpha != finalAlpha; mBrandColorTransitionAnimation = ValueAnimator.ofFloat(0, 1) - .setDuration(BRAND_COLOR_TRANSITION_DURATION_MS); + .setDuration(THEME_COLOR_TRANSITION_DURATION); mBrandColorTransitionAnimation.setInterpolator(BakedBezierInterpolator.TRANSFORM_CURVE); mBrandColorTransitionAnimation.addUpdateListener(new AnimatorUpdateListener() { @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java index 9053f731..ac6b2e44 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
@@ -23,10 +23,10 @@ import org.chromium.base.Log; import org.chromium.base.ThreadUtils; import org.chromium.base.VisibleForTesting; -import org.chromium.chrome.browser.AppLinkHandler; import org.chromium.chrome.browser.ChromeApplication; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.ChromeVersionInfo; +import org.chromium.chrome.browser.InstantAppsHandler; import org.chromium.chrome.browser.preferences.ChromePreferenceManager; import org.chromium.chrome.browser.tabmodel.DocumentModeAssassin; import org.chromium.sync.signin.AccountManagerHelper; @@ -218,7 +218,7 @@ */ public static void cacheNativeFlags(ChromeApplication application) { cacheHerbFlavor(); - AppLinkHandler.getInstance(application).cacheAppLinkEnabled( + InstantAppsHandler.getInstance(application).cacheInstantAppsEnabled( application.getApplicationContext()); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/CompatibilityTextInputLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/CompatibilityTextInputLayout.java index 10c892f..3516927 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/widget/CompatibilityTextInputLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/CompatibilityTextInputLayout.java
@@ -9,6 +9,8 @@ import android.support.design.widget.TextInputLayout; import android.text.TextUtils; import android.util.AttributeSet; +import android.view.View; +import android.widget.EditText; import javax.annotation.Nullable; @@ -52,4 +54,14 @@ if (TextUtils.isEmpty(error)) setErrorEnabled(false); } + @Override + public void onFinishInflate() { + super.onFinishInflate(); + + if (getChildCount() == 1) { + // If there is a child to this TextInputLayout, automatically set the hint. + View child = getChildAt(0); + if (child instanceof EditText && child.getId() > NO_ID) setLabelFor(child.getId()); + } + } }
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index 453c5b7..87dc7e4 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -1097,7 +1097,7 @@ To get your tabs from your other devices, turn on sync. </message> <message name="IDS_RECENT_TABS_SYNC_PROMO_ENABLE_ANDROID_SYNC" desc="Text that displayed in a textview encouraging the user to enable sync in the android settings."> - To get your tabs from your other devices, turn on "Auto-sync data" in Android account settings. + To get your tabs from your other devices, turn on “Auto-sync data” in Android account settings. </message> <message name="IDS_NTP_RECENT_TABS_SYNC_PROMO_INSTRUCTIONS" desc="Information about sync displayed on the NTP when the user has signed in on mobile but not on desktop"> Tabs that you've opened in Chrome on your other devices will appear here. @@ -2481,7 +2481,7 @@ All site storage, including cookies and other locally stored data </message> <message name="IDS_STORAGE_MANAGEMENT_COMPUTING_SIZE" desc="String shown in place of the data usage while it's being calculated. [CHAR-LIMIT=30]"> - Computing... + Computing… </message> <message name="IDS_STORAGE_MANAGEMENT_STARTUP_FAILURE" desc="String shown in place of the data usage when starting the chrome native process failed. [CHAR-LIMIT=30]"> Unknown @@ -2509,7 +2509,7 @@ </message> <message name="IDS_STORAGE_CLEAR_BUTTON_TITLE" desc="Title of a button in the storage UI used to clear all storage data. [CHAR-LIMIT=24]"> - Clear Site Storage... + Clear Site Storage… </message> <message name="IDS_STORAGE_CLEAR_DIALOG_TEXT" desc="Text of the clear storage dialog which give the user a choice to reset the app or delete site storage data."> This will clear all <ph name="SIZE_IN_KB">%1$s<ex>101kb</ex></ph> of website storage.
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index 756194a0..3df5934 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni
@@ -7,7 +7,6 @@ "java/src/org/chromium/chrome/browser/ActivityTabTaskDescriptionHelper.java", "java/src/org/chromium/chrome/browser/ActivityTaskDescriptionIconGenerator.java", "java/src/org/chromium/chrome/browser/AfterStartupTaskUtils.java", - "java/src/org/chromium/chrome/browser/AppLinkHandler.java", "java/src/org/chromium/chrome/browser/ApplicationInitialization.java", "java/src/org/chromium/chrome/browser/ApplicationLifetime.java", "java/src/org/chromium/chrome/browser/AssistStatusHandler.java", @@ -34,6 +33,7 @@ "java/src/org/chromium/chrome/browser/FileProviderHelper.java", "java/src/org/chromium/chrome/browser/FrozenNativePage.java", "java/src/org/chromium/chrome/browser/InsetObserverView.java", + "java/src/org/chromium/chrome/browser/InstantAppsHandler.java", "java/src/org/chromium/chrome/browser/IntentHandler.java", "java/src/org/chromium/chrome/browser/IntentHelper.java", "java/src/org/chromium/chrome/browser/ItemChooserDialog.java", @@ -1010,6 +1010,7 @@ "javatests/src/org/chromium/chrome/browser/FocusedEditableTextFieldZoomTest.java", "javatests/src/org/chromium/chrome/browser/GeolocationTest.java", "javatests/src/org/chromium/chrome/browser/HistoryUITest.java", + "javatests/src/org/chromium/chrome/browser/InstantAppsHandlerTest.java", "javatests/src/org/chromium/chrome/browser/IntentHandlerTest.java", "javatests/src/org/chromium/chrome/browser/ItemChooserDialogTest.java", "javatests/src/org/chromium/chrome/browser/JavaScriptEvalChromeTest.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/InstantAppsHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/InstantAppsHandlerTest.java new file mode 100644 index 0000000..634dc90 --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/InstantAppsHandlerTest.java
@@ -0,0 +1,148 @@ +// 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. + +package org.chromium.chrome.browser; + +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.net.Uri; +import android.provider.Browser; +import android.test.InstrumentationTestCase; +import android.test.suitebuilder.annotation.SmallTest; + +import org.chromium.base.ContextUtils; + +/** + * Unit tests for {@link InstantAppsHandler}. + */ +public class InstantAppsHandlerTest extends InstrumentationTestCase { + + private TestInstantAppsHandler mHandler; + private Context mContext; + + private static final Uri URI = Uri.parse("http://sampleurl.com/foo"); + + private Intent createViewIntent() { + return new Intent(Intent.ACTION_VIEW, URI); + } + + @Override + public void setUp() throws Exception { + super.setUp(); + + mContext = getInstrumentation().getTargetContext(); + mHandler = new TestInstantAppsHandler(); + + SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); + SharedPreferences.Editor editor = prefs.edit(); + editor.putBoolean("applink.app_link_enabled", true); + editor.putBoolean("applink.chrome_default_browser", true); + editor.apply(); + } + + @Override + public void tearDown() throws Exception { + SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); + SharedPreferences.Editor editor = prefs.edit(); + editor.clear(); + editor.commit(); + super.tearDown(); + } + + @SmallTest + public void testInstantAppsDisabled_disabledByFlag() { + SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); + SharedPreferences.Editor editor = prefs.edit(); + editor.putBoolean("applink.app_link_enabled", false); + editor.apply(); + + assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), false)); + assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), true)); + } + + @SmallTest + public void testInstantAppsDisabled_incognito() { + Intent i = createViewIntent(); + i.putExtra(IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, true); + + assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); + } + + + @SmallTest + public void testInstantAppsDisabled_doNotLaunch() { + Intent i = createViewIntent(); + i.putExtra("com.google.android.gms.instantapps.DO_NOT_LAUNCH_INSTANT_APP", true); + + assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); + } + + @SmallTest + public void testInstantAppsDisabled_dataReductionProxy() { + SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); + SharedPreferences.Editor editor = prefs.edit(); + editor.putBoolean("BANDWIDTH_REDUCTION_PROXY_ENABLED", true); + editor.apply(); + + assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), false)); + } + + @SmallTest + public void testInstantAppsDisabled_mainIntent() { + Intent i = new Intent(Intent.ACTION_MAIN); + assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); + } + + @SmallTest + public void testInstantAppsDisabled_intentOriginatingFromChrome() { + Intent i = createViewIntent(); + i.putExtra(Browser.EXTRA_APPLICATION_ID, mContext.getPackageName()); + + assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); + + Intent signedIntent = createViewIntent(); + signedIntent.setPackage(mContext.getPackageName()); + IntentHandler.addTrustedIntentExtras(signedIntent, mContext); + + assertFalse(mHandler.handleIncomingIntent(mContext, signedIntent, false)); + } + + @SmallTest + public void testChromeNotDefault() { + SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); + SharedPreferences.Editor editor = prefs.edit(); + editor.putBoolean("applink.chrome_default_browser", false); + editor.apply(); + + assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), false)); + + // Even if Chrome is not default, launch Instant Apps for CustomTabs since those never + // show disambiguation dialogs. + Intent cti = createViewIntent() + .putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", true); + assertTrue(mHandler.handleIncomingIntent(mContext, cti, true)); + } + + @SmallTest + public void testInstantAppsEnabled() { + Intent i = createViewIntent(); + assertTrue(mHandler.handleIncomingIntent(getInstrumentation().getContext(), i, false)); + + // Check that identical intent wouldn't be enabled for CustomTab flow. + assertFalse(mHandler.handleIncomingIntent(getInstrumentation().getContext(), i, true)); + + // Add CustomTab specific extra and check it's now enabled. + i.putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", true); + assertTrue(mHandler.handleIncomingIntent(getInstrumentation().getContext(), i, true)); + } + + static class TestInstantAppsHandler extends InstantAppsHandler { + @Override + protected boolean tryLaunchingInstantApp(Context context, Intent intent, + boolean isCustomTabsIntent, Intent fallbackIntent) { + return true; + } + } +}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java index 05074df3..395a2b8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
@@ -258,13 +258,17 @@ mDelegate.setCanResolveActivity(false); checkUrl(INTENT_APP_NOT_INSTALLED_WITH_MARKET_REFERRER) + .withReferrer(KEEP_URL) .expecting(OverrideUrlLoadingResult.OVERRIDE_WITH_EXTERNAL_INTENT, START_OTHER_ACTIVITY); + assertNotNull(mDelegate.startActivityIntent); Uri uri = mDelegate.startActivityIntent.getData(); assertEquals("market", uri.getScheme()); assertEquals(Uri.decode(ENCODED_MARKET_REFERRER), uri.getQueryParameter("referrer")); + assertEquals(Uri.parse(KEEP_URL), + mDelegate.startActivityIntent.getParcelableExtra(Intent.EXTRA_REFERRER)); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java index 94e66c4c..2e21eb1a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest.java
@@ -6,6 +6,7 @@ import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; +import android.content.Context; import android.os.Environment; import android.test.UiThreadTest; import android.test.suitebuilder.annotation.MediumTest; @@ -14,6 +15,7 @@ import org.chromium.base.CommandLine; import org.chromium.base.ContextUtils; import org.chromium.base.ThreadUtils; +import org.chromium.base.test.util.AdvancedMockContext; import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.UrlUtils; @@ -82,6 +84,11 @@ mTestServer = EmbeddedTestServer.createAndStartFileServer( getInstrumentation().getContext(), Environment.getExternalStorageDirectory()); + + // Using an AdvancedMockContext allows us to use a fresh in-memory SharedPreference. + Context context = new AdvancedMockContext( + getInstrumentation().getTargetContext().getApplicationContext()); + ContextUtils.initApplicationContextForTests(context); } @Override @@ -175,9 +182,8 @@ */ @MediumTest @Feature({"Browser", "Main"}) - @DisabledTest // crbug.com/625038 public void testDataReductionPromoInfoBar() throws InterruptedException { - ThreadUtils.runOnUiThread(new Runnable() { + ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { assertFalse("Data Reduction Proxy enabled", @@ -203,7 +209,7 @@ assertTrue("InfoBar does not have secondary button", InfoBarUtil.hasSecondaryButton(infoBars.get(0))); - ThreadUtils.runOnUiThread(new Runnable() { + ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { InfoBarUtil.clickPrimaryButton(infoBars.get(0)); @@ -214,7 +220,7 @@ assertTrue("InfoBar not removed.", mListener.removeInfoBarAnimationFinished()); assertTrue("Wrong infobar count", getInfoBars().isEmpty()); - ThreadUtils.runOnUiThread(new Runnable() { + ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { assertTrue("Data Reduction Proxy not enabled", @@ -237,9 +243,8 @@ */ @MediumTest @Feature({"Browser", "Main"}) - @DisabledTest // crbug.com/625038 public void testDataReductionPromoInfoBarDismissed() throws InterruptedException { - ThreadUtils.runOnUiThread(new Runnable() { + ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { assertFalse("Data Reduction Proxy enabled", @@ -265,7 +270,7 @@ assertTrue("InfoBar does not have secondary button", InfoBarUtil.hasSecondaryButton(infoBars.get(0))); - ThreadUtils.runOnUiThread(new Runnable() { + ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { InfoBarUtil.clickSecondaryButton(infoBars.get(0)); @@ -276,7 +281,7 @@ assertTrue("InfoBar not removed.", mListener.removeInfoBarAnimationFinished()); assertTrue("Wrong infobar count", getInfoBars().isEmpty()); - ThreadUtils.runOnUiThread(new Runnable() { + ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { assertFalse("Data Reduction Proxy enabled", @@ -297,7 +302,6 @@ @UiThreadTest @MediumTest @Feature({"Browser", "Main"}) - @DisabledTest // crbug.com/625038 public void testDataReductionPromoInfoBarPostM48Install() { assertFalse("Data Reduction Proxy enabled", DataReductionProxySettings.getInstance().isDataReductionProxyEnabled()); @@ -322,7 +326,6 @@ @UiThreadTest @MediumTest @Feature({"Browser", "Main"}) - @DisabledTest // crbug.com/625038 public void testDataReductionPromoInfoBarFreOptOut() { // Try to add an infobar. Infobar should not be added since the first run experience or // second run promo hasn't been shown.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeIntentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeIntentTest.java index 68ebebc2..1fe8efb 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeIntentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeIntentTest.java
@@ -101,7 +101,7 @@ .putExtra(EXTRA_NOTIFICATION_ID, NotificationPlatformBridge.PLATFORM_ID) .putExtra(NotificationConstants.EXTRA_NOTIFICATION_TAG, NotificationPlatformBridge.makePlatformTag( - 42L /* persistentNotificationId */, "https://example.com", + "42" /* notificationId */, "https://example.com", null /* tag */)); Preferences activity = ActivityUtils.waitForActivity( @@ -137,11 +137,10 @@ Intent intent = new Intent(NotificationConstants.ACTION_CLICK_NOTIFICATION); intent.setClass(context, NotificationService.Receiver.class); - long persistentId = 42; - - intent.putExtra(NotificationConstants.EXTRA_PERSISTENT_NOTIFICATION_ID, persistentId); + intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_ID, "42"); intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_PROFILE_ID, "Default"); - intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_ORIGIN, "example.com"); + intent.putExtra( + NotificationConstants.EXTRA_NOTIFICATION_INFO_ORIGIN, "https://example.com"); intent.putExtra(NotificationConstants.EXTRA_NOTIFICATION_INFO_TAG, "tag"); PendingIntent pendingIntent = PendingIntent.getBroadcast(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java index a117f225..c4cc7355 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
@@ -4,8 +4,6 @@ package org.chromium.chrome.browser.payments; -import android.view.View; -import android.view.ViewGroup; import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; @@ -30,6 +28,7 @@ import org.chromium.content.browser.test.util.DOMUtils; import org.chromium.content_public.browser.WebContents; +import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; @@ -213,15 +212,7 @@ ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { - ViewGroup contents = (ViewGroup) mUI.getEditorView().findViewById(R.id.contents); - assertNotNull(contents); - for (int i = 0; i < contents.getChildCount(); i++) { - View view = contents.getChildAt(i); - if (view instanceof Spinner) { - ((Spinner) view).setSelection(selection); - return; - } - } + ((Spinner) mUI.getEditorView().findViewById(R.id.spinner)).setSelection(selection); } }); helper.waitForCallback(callCount); @@ -234,13 +225,9 @@ ThreadUtils.runOnUiThreadBlocking(new Runnable() { @Override public void run() { - ViewGroup contents = (ViewGroup) mUI.getEditorView().findViewById(R.id.contents); - assertNotNull(contents); - for (int i = 0, j = 0; i < contents.getChildCount() && j < values.length; i++) { - View view = contents.getChildAt(i); - if (view instanceof EditorTextField) { - ((EditorTextField) view).getEditText().setText(values[j++]); - } + List<EditorTextField> fields = mUI.getEditorView().getEditorTextFields(); + for (int i = 0; i < values.length; i++) { + fields.get(i).getEditText().setText(values[i]); } } });
diff --git a/chrome/android/webapk/shell_apk/BUILD.gn b/chrome/android/webapk/shell_apk/BUILD.gn index 903e8bf..87fb835 100644 --- a/chrome/android/webapk/shell_apk/BUILD.gn +++ b/chrome/android/webapk/shell_apk/BUILD.gn
@@ -83,7 +83,6 @@ ":dex_loader_java", ":shell_apk_resources", "//chrome/android/webapk/libs/common:common_java", - "//chrome/android/webapk/libs/runtime_library:runtime_library_java", ] if (!is_java_debug) { proguard_enabled = true
diff --git a/chrome/app/chrome_exe_main_mac.c b/chrome/app/chrome_exe_main_mac.c index 5c9be39..135e547 100644 --- a/chrome/app/chrome_exe_main_mac.c +++ b/chrome/app/chrome_exe_main_mac.c
@@ -1,4 +1,4 @@ -// Copyright (c) 2015 The Chromium Authors. All rights reserved. +// 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. @@ -34,8 +34,7 @@ uint32_t exec_path_size = 0; int rv = _NSGetExecutablePath(NULL, &exec_path_size); if (rv != -1) { - fprintf(stderr, - "_NSGetExecutablePath: get [length|path] failed.\n"); + fprintf(stderr, "_NSGetExecutablePath: get length failed\n"); abort(); } @@ -47,24 +46,23 @@ rv = _NSGetExecutablePath(exec_path, &exec_path_size); if (rv != 0) { - fprintf(stderr, - "_NSGetExecutablePath(): get [%d|path] failed.\n", exec_path_size); + fprintf(stderr, "_NSGetExecutablePath: get path failed\n"); abort(); } // Slice off the last part of the main executable path, and append the // version framework information. - char* parent_dir = dirname(exec_path); + const char* parent_dir = dirname(exec_path); if (!parent_dir) { fprintf(stderr, "dirname %s: %s\n", exec_path, strerror(errno)); abort(); } free(exec_path); - size_t parent_path_len = strlen(parent_dir); - size_t rel_path_len = strlen(rel_path); + const size_t parent_path_len = strlen(parent_dir); + const size_t rel_path_len = strlen(rel_path); // 2 accounts for a trailing NUL byte and the '/' in the middle of the paths. - size_t framework_path_size = parent_path_len + rel_path_len + 2; + const size_t framework_path_size = parent_path_len + rel_path_len + 2; char* framework_path = malloc(framework_path_size); if (!framework_path) { fprintf(stderr, "malloc %zu: %s\n", framework_path_size, strerror(errno)); @@ -79,7 +77,7 @@ } free(framework_path); - ChromeMainPtr chrome_main = dlsym(library, "ChromeMain"); + const ChromeMainPtr chrome_main = dlsym(library, "ChromeMain"); if (!chrome_main) { fprintf(stderr, "dlsym ChromeMain: %s\n", dlerror()); abort();
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index 703d0a3..21a6894 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp
@@ -6855,6 +6855,12 @@ <message name="IDS_ARC_ANDROID_MANAGEMENT_REQUIRED_ERROR" desc="Error message shown when Android management is required for an unmanaged Chrome OS user."> Your organization has not enabled Google Play Store for your account. Contact your administrator for more information. </message> + <message name="IDS_ARC_CRITICALLY_LOW_DISK_NOTIFICATION_TITLE" desc="Title of the notification warning users that they are critically low on disk space and Android apps can not be launched."> + Device disk space critically low + </message> + <message name="IDS_ARC_CRITICALLY_LOW_DISK_NOTIFICATION_MESSAGE" desc="Notification text warning users that they are critically low on disk space and Android apps can not be launched."> + Free up disk space to launch Android apps. + </message> <message name="IDS_FLAGS_ENABLE_IME_MENU_NAME" desc="Name of the about: flag for enabling opt-in IME menu."> Enable opt-in IME menu </message>
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 33a2bf0..99d3dbc 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -3589,12 +3589,6 @@ <message name="IDS_EXTENSION_IS_BLACKLISTED" desc="Text displayed in an infobar when an extension is blacklisted and prevented from being installed."> Google has flagged "<ph name="EXTENSION_NAME">$1<ex>Google Talk</ex></ph>" as malicious and installation has been prevented. </message> - <message name="IDS_EXTENSION_DISABLED_REMOTE_INSTALL_ERROR_LABEL" desc="Text displayed when an extension was disabled due to it being installed server side, requiring an explicit permission check from the user."> - The extension "<ph name="EXTENSION_NAME">$1<ex>Flashblock</ex></ph>" was installed remotely. - </message> - <message name="IDS_APP_DISABLED_REMOTE_INSTALL_ERROR_LABEL" desc="Text displayed when an extension was disabled due to it being installed server side, requiring an explicit permission check from the user."> - The app "<ph name="EXTENSION_NAME">$1<ex>Flashblock</ex></ph>" was installed remotely. - </message> <message name="IDS_EXTENSION_DISABLED_REMOTE_INSTALL_ERROR_TITLE" desc="Title of the notification that an extension or app was disabled due to it being installed server side, requiring an explicit permission check from the user."> <ph name="EXTENSION_NAME">$1<ex>Adblock</ex></ph> was installed remotely </message> @@ -3811,9 +3805,6 @@ <message name="IDS_EXTENSION_PROMPT_WARNING_CLIPBOARD" desc="Permission string for access to clipboard."> Read data you copy and paste </message> - <message name="IDS_EXTENSION_PROMPT_WARNING_COPRESENCE" desc="Permission string for access to bookmarks."> - Communicate with nearby devices - </message> <message name="IDS_EXTENSION_PROMPT_WARNING_DEBUGGER" desc="Permission string for access to debugger."> Access the page debugger backend </message> @@ -4534,6 +4525,9 @@ <message name="IDS_MD_EXTENSIONS_SIDEBAR_KEYBOARD_SHORTCUTS" desc="The text for the link to manage keyboard shortcuts for extensions."> Keyboard shortcuts </message> + <message name="IDS_MD_EXTENSIONS_TYPE_A_SHORTCUT" desc="The prompt to the user to enter a keyboard shortcut in order to assign it to an extension."> + Type a shortcut + </message> <if expr="not use_titlecase"> <message name="IDS_EXTENSIONS_CONTEXT_MENU_PAGE_ACCESS" desc="The label in an extension's context menu for the submenu specifying whether or not the extension can run on the current page (sentence case)."> Page access @@ -6170,15 +6164,15 @@ With this flag on, desktop share picker window will not let the user choose whether to share audio. </message> <message name="IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE" desc="Title for the flag to disable tab for desktop share."> - Desktop Share with tab source + Disable Desktop Share with tab source </message> <message name="IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION" desc="Description for the flag to disable tab for desktop share."> This flag controls whether users can choose a tab for desktop share. </message> - <message name="IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI" desc="Title for the flag to disable desktop capture picker window new UI."> - Disable Desktop Capture Picker Window Old UI. + <message name="IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_NEW_UI" desc="Title for the flag to disable desktop capture picker window new UI."> + Disable Desktop Capture Picker Window New UI. </message> - <message name="IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI_DESCRIPTION" desc="Description for the flag to disable desktop capture picker window new UI."> + <message name="IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_NEW_UI_DESCRIPTION" desc="Description for the flag to disable desktop capture picker window new UI."> This flag controls whether we show the old or new UI for desktop capture picker window. </message> <message name="IDS_TRACE_UPLOAD_URL_CHOICE_OTHER"> @@ -14170,52 +14164,6 @@ </message> </if> - <!-- Copresence settings/debug strings --> - <if expr="not is_android and not is_ios"> - <message name="IDS_COPRESENCE_TITLE" desc="Title for the chrome://copresence page."> - Google Copresence Info - </message> - - <message name="IDS_COPRESENCE_DIRECTIVES_TITLE" desc="Title for the table of currently active copresence directives (transmit this, receive that)."> - Active Directives - </message> - <message name="IDS_COPRESENCE_DIRECTIVE_TYPE" desc="Title for the column in the directives table indicating whether the directive is 'transmit' or 'receive'."> - Type - </message> - <message name="IDS_COPRESENCE_TOKEN_MEDIUM" desc="Title for the column in the directives and tokens tables indicating how tokens are being transmitted. Currently one of 'ultrasound' or 'sound'."> - Medium - </message> - <message name="IDS_COPRESENCE_DURATION" desc="Title for the column in the directives table indicating how long the directive is active, e.g. '10 minutes'."> - Duration - </message> - - <message name="IDS_COPRESENCE_TRANSMITTED_TOKENS_TITLE" desc="Title for the table of copresence tokens recently transmitted."> - Tokens Transmitted - </message> - <message name="IDS_COPRESENCE_RECEIVED_TOKENS_TITLE" desc="Title for the table of copresence tokens recently received."> - Tokens Received - </message> - <message name="IDS_COPRESENCE_TOKEN_ID" desc="Title for the column in a tokens table listing the token id (base64 encoded)."> - Token ID - </message> - <message name="IDS_COPRESENCE_TOKEN_STATUS" desc="Title for the column in a tokens table indicating the status of a token: e.g. 'transmitted', 'received', 'expired', etc."> - Status - </message> - <message name="IDS_COPRESENCE_TOKEN_TRANSMIT_TIME" desc="Title for the column in the transmitted tokens table indicating when the token was first transmitted, e.g. '12:34 PM'."> - Time First Transmitted - </message> - <message name="IDS_COPRESENCE_TOKEN_RECEIVE_TIME" desc="Title for the column in the received tokens table indicating when the token was last received, e.g. '12:34 AM'."> - Time Last Received - </message> - - <message name="IDS_COPRESENCE_CLEAR_STATE" desc="Label for the button that deletes all copresence state in the current profile."> - Clear Copresence State - </message> - <message name="IDS_COPRESENCE_CONFIRM_DELETE" desc="Message explaining which state will be deleted and the effect it will have."> - Attempts to connect to nearby devices will be cancelled. All local copresence data will be cleared, and apps using copresence may stop working. Are you sure? - </message> - </if> - <!-- Easy Unlock strings --> <!-- Strings for the Easy Unlock promo notification --> <message name="IDS_EASY_UNLOCK_SETUP_NOTIFICATION_TITLE" desc="Title for the notification inviting the user to use the Easy Unlock feature.">
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index f45e0b7..6e5d76a5 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -1150,6 +1150,18 @@ <message name="IDS_SETTINGS_SITE_SETTINGS_DELETE" desc="Label for the trashcan icon used to delete storage on the Site Details page."> Delete </message> + <message name="IDS_SETTINGS_SITE_SETTINGS_COOKIE_HEADER" desc="A header for the list of showing all sites and their data."> + All cookies and site data + </message> + <message name="IDS_SETTINGS_SITE_SETTINGS_COOKIE_DIALOG" desc="A label for cookie dialog, stating which site we're showing data for."> + <ph name="SITE">$1<ex>www.example.com</ex></ph> locally stored data + </message> + <message name="IDS_SETTINGS_SITE_SETTINGS_COOKIE_REMOVE" desc="Label for the button to delete a single site cookie."> + Remove + </message> + <message name="IDS_SETTINGS_SITE_SETTINGS_COOKIE_REMOVE_ALL" desc="Label for the button to delete all cookies for a site."> + Remove All + </message> <message name="IDS_SETTINGS_SITE_SETTINGS_THIRD_PARTY_COOKIE" desc="Label for the Block 3rd-party cookie checkbox on the Cookies category."> Block third-party cookies. </message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index f41ed25..c6c6ccb 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -1823,14 +1823,13 @@ #if defined(ENABLE_EXTENSIONS) {"tab-for-desktop-share", IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE, IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll, - ENABLE_DISABLE_VALUE_TYPE( - extensions::switches::kEnableTabForDesktopShare, - extensions::switches::kDisableTabForDesktopShare)}, - {"disable-desktop-capture-picker-old-ui", - IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI, - IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_OLD_UI_DESCRIPTION, kOsAll, SINGLE_VALUE_TYPE( - extensions::switches::kDisableDesktopCapturePickerOldUI)}, + extensions::switches::kDisableTabForDesktopShare)}, + {"disable-desktop-capture-picker-new-ui", + IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_NEW_UI, + IDS_FLAG_DISABLE_DESKTOP_CAPTURE_PICKER_NEW_UI_DESCRIPTION, kOsAll, + SINGLE_VALUE_TYPE( + extensions::switches::kDisableDesktopCapturePickerNewUI)}, #endif #if defined(OS_ANDROID) {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME,
diff --git a/chrome/browser/after_startup_task_utils_unittest.cc b/chrome/browser/after_startup_task_utils_unittest.cc index 239ff213..5dd16a7 100644 --- a/chrome/browser/after_startup_task_utils_unittest.cc +++ b/chrome/browser/after_startup_task_utils_unittest.cc
@@ -73,9 +73,9 @@ AfterStartupTaskTest() : browser_thread_bundle_(TestBrowserThreadBundle::REAL_DB_THREAD) { ui_thread_ = new WrappedTaskRunner( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)); db_thread_ = new WrappedTaskRunner( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB)); AfterStartupTaskUtils::UnsafeResetForTesting(); }
diff --git a/chrome/browser/android/banners/app_banner_data_fetcher_android.cc b/chrome/browser/android/banners/app_banner_data_fetcher_android.cc index 1016408..3357f61 100644 --- a/chrome/browser/android/banners/app_banner_data_fetcher_android.cc +++ b/chrome/browser/android/banners/app_banner_data_fetcher_android.cc
@@ -73,6 +73,15 @@ minimum_splash_image_size_in_dp_, webapp_id); } +bool AppBannerDataFetcherAndroid::IsWebAppInstalled( + content::BrowserContext* browser_context, + const GURL& start_url) { + // Check whether a WebAPK is installed in order to block showing the app + // banner if a WebAPK is installed even after a user clears Chrome's data. + // This function does not check whether a non-WebAPK web app is installed. + return ShortcutHelper::IsWebApkInstalled(start_url); +} + void AppBannerDataFetcherAndroid::ShowBanner(const GURL& icon_url, const SkBitmap* icon, const base::string16& title,
diff --git a/chrome/browser/android/banners/app_banner_data_fetcher_android.h b/chrome/browser/android/banners/app_banner_data_fetcher_android.h index da4e9bdb..5fc7ae0 100644 --- a/chrome/browser/android/banners/app_banner_data_fetcher_android.h +++ b/chrome/browser/android/banners/app_banner_data_fetcher_android.h
@@ -43,6 +43,9 @@ std::string GetAppIdentifier() override; private: + bool IsWebAppInstalled(content::BrowserContext* browser_context, + const GURL& start_url) override; + void ShowBanner(const GURL& icon_url, const SkBitmap* icon, const base::string16& title,
diff --git a/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc b/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc index 2fb0d4d..5a00a68 100644 --- a/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc +++ b/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc
@@ -106,9 +106,9 @@ protected: void SetUp() override { - io_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + io_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); - ui_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + ui_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI); data_use_aggregator_.reset(
diff --git a/chrome/browser/android/data_usage/external_data_use_observer_unittest.cc b/chrome/browser/android/data_usage/external_data_use_observer_unittest.cc index f660aba0..6d72efe5 100644 --- a/chrome/browser/android/data_usage/external_data_use_observer_unittest.cc +++ b/chrome/browser/android/data_usage/external_data_use_observer_unittest.cc
@@ -58,9 +58,9 @@ void SetUp() override { thread_bundle_.reset(new content::TestBrowserThreadBundle( content::TestBrowserThreadBundle::IO_MAINLOOP)); - io_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + io_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); - ui_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + ui_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI); data_use_aggregator_.reset( new data_usage::DataUseAggregator(nullptr, nullptr));
diff --git a/chrome/browser/android/logo_service.cc b/chrome/browser/android/logo_service.cc index ab0b9d9..1a0cda8 100644 --- a/chrome/browser/android/logo_service.cc +++ b/chrome/browser/android/logo_service.cc
@@ -117,7 +117,7 @@ if (!logo_tracker_) { logo_tracker_.reset(new LogoTracker( profile_->GetPath().Append(kCachedLogoDirectory), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), BrowserThread::GetBlockingPool(), profile_->GetRequestContext(), std::unique_ptr<search_provider_logos::LogoDelegate>( new ChromeLogoDelegate())));
diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc index 3e1c122b..cb129e3 100644 --- a/chrome/browser/android/shortcut_helper.cc +++ b/chrome/browser/android/shortcut_helper.cc
@@ -215,6 +215,14 @@ return gfx::CreateSkBitmapFromJavaBitmap(gfx::JavaBitmap(result.obj())); } +// static +bool ShortcutHelper::IsWebApkInstalled(const GURL& url) { + JNIEnv* env = base::android::AttachCurrentThread(); + ScopedJavaLocalRef<jstring> java_url = + base::android::ConvertUTF8ToJavaString(env, url.spec()); + return Java_ShortcutHelper_isWebApkInstalled(env, java_url.obj()); +} + // Callback used by Java when the shortcut has been created. // |splash_image_callback| is a pointer to a base::Closure allocated in // AddShortcutInBackgroundWithSkBitmap, so reinterpret_cast it back and run it.
diff --git a/chrome/browser/android/shortcut_helper.h b/chrome/browser/android/shortcut_helper.h index d2fabef..40a4beea7 100644 --- a/chrome/browser/android/shortcut_helper.h +++ b/chrome/browser/android/shortcut_helper.h
@@ -72,6 +72,10 @@ const GURL& url, bool* is_generated); + // Returns true if WebAPKs are enabled and there is a WebAPK installed which + // can handle |url|. + static bool IsWebApkInstalled(const GURL& url); + private: ShortcutHelper() = delete; ~ShortcutHelper() = delete;
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc index c118cd1..d32ae561 100644 --- a/chrome/browser/android/tab_android.cc +++ b/chrome/browser/android/tab_android.cc
@@ -83,7 +83,8 @@ #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/window_open_disposition.h" -#include "ui/gfx/android/device_display_info.h" +#include "ui/display/display.h" +#include "ui/display/screen.h" #include "ui/gfx/android/java_bitmap.h" #include "ui/gfx/favicon_size.h" #include "ui/gfx/image/image_skia.h" @@ -663,8 +664,8 @@ // Always return the default favicon in Android. SkBitmap favicon = favicon_driver->GetFavicon().AsBitmap(); if (!favicon.empty()) { - gfx::DeviceDisplayInfo device_info; - const float device_scale_factor = device_info.GetDIPScale(); + const float device_scale_factor = + display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); int target_size_dip = device_scale_factor * gfx::kFaviconSize; if (favicon.width() != target_size_dip || favicon.height() != target_size_dip) {
diff --git a/chrome/browser/apps/app_shim/app_shim_host_mac.cc b/chrome/browser/apps/app_shim/app_shim_host_mac.cc index 6ce706e..edcce64 100644 --- a/chrome/browser/apps/app_shim/app_shim_host_mac.cc +++ b/chrome/browser/apps/app_shim/app_shim_host_mac.cc
@@ -25,11 +25,9 @@ DCHECK(CalledOnValidThread()); DCHECK(!channel_.get()); channel_ = IPC::ChannelProxy::Create( - handle, - IPC::Channel::MODE_SERVER, - this, - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::IO).get()); + handle, IPC::Channel::MODE_SERVER, this, + content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::IO) + .get()); } base::FilePath AppShimHost::GetProfilePath() const {
diff --git a/chrome/browser/autocomplete/shortcuts_backend_factory.cc b/chrome/browser/autocomplete/shortcuts_backend_factory.cc index 4ccf932..e97d93a2 100644 --- a/chrome/browser/autocomplete/shortcuts_backend_factory.cc +++ b/chrome/browser/autocomplete/shortcuts_backend_factory.cc
@@ -95,7 +95,7 @@ base::WrapUnique(new UIThreadSearchTermsData(profile)), HistoryServiceFactory::GetForProfile(profile, ServiceAccessType::EXPLICIT_ACCESS), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB), profile->GetPath().Append(kShortcutsDatabaseName), suppress_db)); #if defined(ENABLE_EXTENSIONS)
diff --git a/chrome/browser/banners/app_banner_data_fetcher.h b/chrome/browser/banners/app_banner_data_fetcher.h index 214017ed..a1af6fc 100644 --- a/chrome/browser/banners/app_banner_data_fetcher.h +++ b/chrome/browser/banners/app_banner_data_fetcher.h
@@ -158,7 +158,6 @@ void OnHasServiceWorker(content::WebContents* web_contents); // Returns whether the given web app has already been installed. - // Implemented on desktop platforms only. virtual bool IsWebAppInstalled(content::BrowserContext* browser_context, const GURL& start_url);
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc index 77e6aac..8a6edc16 100644 --- a/chrome/browser/bookmarks/bookmark_model_factory.cc +++ b/chrome/browser/bookmarks/bookmark_model_factory.cc
@@ -63,11 +63,10 @@ BookmarkModel* bookmark_model = new BookmarkModel(base::WrapUnique(new ChromeBookmarkClient( profile, ManagedBookmarkServiceFactory::GetForProfile(profile)))); - bookmark_model->Load(profile->GetPrefs(), - profile->GetPath(), + bookmark_model->Load(profile->GetPrefs(), profile->GetPath(), StartupTaskRunnerServiceFactory::GetForProfile(profile) ->GetBookmarkTaskRunner(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI)); bool register_bookmark_undo_service_as_observer = true; #if !BUILDFLAG(ANDROID_JAVA_UI)
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index c46d521..c70b465 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc
@@ -1181,9 +1181,9 @@ gcm_driver_ = gcm::CreateGCMDriverDesktop( base::WrapUnique(new gcm::GCMClientFactory), local_state(), store_path, system_request_context(), chrome::GetChannel(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), blocking_task_runner); #endif // defined(OS_ANDROID)
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index bc801a34..24a1ed5 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd
@@ -98,11 +98,6 @@ <if expr="enable_app_list"> <include name="IDR_CHROME_APP_MANIFEST" file="resources\chrome_app\manifest.json" type="BINDATA" /> </if> - <if expr="not is_android and not is_ios"> - <include name="IDR_COPRESENCE_CSS" file="resources\copresence.css" type="BINDATA" /> - <include name="IDR_COPRESENCE_HTML" file="resources\copresence.html" type="BINDATA" /> - <include name="IDR_COPRESENCE_JS" file="resources\copresence.js" type="BINDATA" /> - </if> <if expr="enable_printing"> <include name="IDR_CLOUDPRINT_MANIFEST" file="resources\cloud_print_app\manifest.json" type="BINDATA" /> </if> @@ -169,6 +164,8 @@ <include name="IDR_MD_EXTENSIONS_PACK_DIALOG_JS" file="resources\md_extensions\pack_dialog.js" type="BINDATA" /> <include name="IDR_MD_EXTENSIONS_SERVICE_HTML" file="resources\md_extensions\service.html" type="BINDATA" /> <include name="IDR_MD_EXTENSIONS_SERVICE_JS" file="resources\md_extensions\service.js" type="BINDATA" /> + <include name="IDR_MD_EXTENSIONS_SHORTCUT_INPUT_HTML" file="resources\md_extensions\shortcut_input.html" type="BINDATA" /> + <include name="IDR_MD_EXTENSIONS_SHORTCUT_INPUT_JS" file="resources\md_extensions\shortcut_input.js" type="BINDATA" /> <include name="IDR_MD_EXTENSIONS_SIDEBAR_CSS" file="resources\md_extensions\sidebar.css" type="BINDATA" /> <include name="IDR_MD_EXTENSIONS_SIDEBAR_HTML" file="resources\md_extensions\sidebar.html" type="BINDATA" /> <include name="IDR_MD_EXTENSIONS_SIDEBAR_JS" file="resources\md_extensions\sidebar.js" type="BINDATA" />
diff --git a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc index e1ffaa1..9900fa0 100644 --- a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc +++ b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc
@@ -36,8 +36,8 @@ EXPECT_TRUE(dir_.CreateUniqueTempDir()); quota_manager_ = new storage::QuotaManager( false, dir_.path(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), nullptr); helper_ = new BrowsingDataQuotaHelperImpl(quota_manager_.get()); }
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 54df3f56..a93e7fc9 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc
@@ -497,10 +497,14 @@ // 2. Chrome OS: On Chrome OS this registration is delayed until user login. RegisterEVWhitelistComponent(cus, path); - // Registration of the STH set fetcher here is not done for: - // Android: Because the story around CT on Mobile is not finalized yet. - // Chrome OS: On Chrome OS this registration is delayed until user login. - RegisterSTHSetComponent(cus, path); + // Note: This is behind a base::Feature to verify whether it causes a + // suspected startup regression. See: http://crbug.com/626676 + if (base::FeatureList::IsEnabled(features::kSTHSetComponent)) { + // Registration of the STH set fetcher here is not done for: + // Android: Because the story around CT on Mobile is not finalized yet. + // Chrome OS: On Chrome OS this registration is delayed until user login. + RegisterSTHSetComponent(cus, path); + } #endif // defined(OS_ANDROID) RegisterOriginTrialsComponent(cus, path); @@ -797,7 +801,7 @@ TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); g_browser_process->metrics_service()->CheckForClonedInstall( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true); } @@ -1452,7 +1456,7 @@ } ui::SelectFileDialog::SetFactory(new ChromeSelectFileDialogFactory( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); #endif // defined(OS_WIN) if (parsed_command_line().HasSwitch(switches::kMakeDefaultBrowser)) {
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 4ce60eb..fc8dfe7b 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc
@@ -318,7 +318,7 @@ base::FilePath path( profile()->GetPath().AppendASCII("ChromeDWriteFontCache")); content::BrowserThread::PostAfterStartupTask( - FROM_HERE, content::BrowserThread::GetMessageLoopProxyForThread( + FROM_HERE, content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), base::Bind(base::IgnoreResult(&base::DeleteFile), path, false)); }
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index e1ac0da..f8af92a0 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -159,6 +159,7 @@ #include "content/public/common/content_descriptors.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" +#include "content/public/common/mojo_shell_connection.h" #include "content/public/common/sandbox_type.h" #include "content/public/common/url_utils.h" #include "content/public/common/web_preferences.h" @@ -2849,8 +2850,8 @@ #if defined(OS_CHROMEOS) #if defined(MOJO_SHELL_CLIENT) if (chrome::IsRunningInMash()) { - content::MojoShellConnection::GetForProcess()->MergeService( - base::WrapUnique(new chromeos::ChromeInterfaceFactory)); + content::MojoShellConnection::GetForProcess()->AddConnectionFilter( + base::MakeUnique<chromeos::ChromeInterfaceFactory>()); } #endif // MOJO_SHELL_CLIENT #endif // OS_CHROMEOS
diff --git a/chrome/browser/chrome_device_client.cc b/chrome/browser/chrome_device_client.cc index 93d17ff..7ce9c4f 100644 --- a/chrome/browser/chrome_device_client.cc +++ b/chrome/browser/chrome_device_client.cc
@@ -20,7 +20,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!usb_service_) { usb_service_ = device::UsbService::Create( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); } return usb_service_.get(); } @@ -30,7 +30,7 @@ #if !defined(OS_ANDROID) if (!hid_service_) { hid_service_ = device::HidService::Create( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); } #endif return hid_service_.get();
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc index 6ac8869..e2c2332 100644 --- a/chrome/browser/chromeos/arc/arc_auth_service.cc +++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -667,7 +667,7 @@ if (initial_opt_in_) { initial_opt_in_ = false; - ShowUI(UIPage::START, base::string16()); + ShowUI(UIPage::TERMS_PROGRESS, base::string16()); } else { context_->PrepareContext(); }
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.h b/chrome/browser/chromeos/arc/arc_auth_service.h index c826427d..1b4c7f0 100644 --- a/chrome/browser/chromeos/arc/arc_auth_service.h +++ b/chrome/browser/chromeos/arc/arc_auth_service.h
@@ -57,7 +57,8 @@ enum class UIPage { NO_PAGE, // Hide everything. - START, // Initial start page. + TERMS_PROGRESS, // Terms loading progress page. + TERMS, // Terms content page. LSO_PROGRESS, // LSO loading progress page. LSO, // LSO page to enter user's credentials. START_PROGRESS, // Arc starting progress page.
diff --git a/chrome/browser/chromeos/arc/arc_support_host.cc b/chrome/browser/chromeos/arc/arc_support_host.cc index 97a1277a..ace97f7 100644 --- a/chrome/browser/chromeos/arc/arc_support_host.cc +++ b/chrome/browser/chromeos/arc/arc_support_host.cc
@@ -138,6 +138,9 @@ loadtime_data->SetString( "textBackupRestore", l10n_util::GetStringUTF16(IDS_ARC_OPT_IN_DIALOG_BACKUP_RESTORE)); + loadtime_data->SetString( + "serverError", + l10n_util::GetStringUTF16(IDS_ARC_SERVER_COMMUNICATION_ERROR)); const std::string& app_locale = g_browser_process->GetApplicationLocale(); const std::string& country_code = base::CountryCodeForCurrentTimezone();
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index 504b214f..bf76b57 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -382,7 +382,7 @@ void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { // Set the crypto thread after the IO thread has been created/started. TPMTokenLoader::Get()->SetCryptoTaskRunner( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)); CrasAudioHandler::Initialize( @@ -399,7 +399,7 @@ // will ensure that loading is aborted on early exit. bool load_oem_statistics = !StartupUtils::IsOobeCompleted(); system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), load_oem_statistics);
diff --git a/chrome/browser/chromeos/chrome_interface_factory.cc b/chrome/browser/chromeos/chrome_interface_factory.cc index a4b334d..3e29eec 100644 --- a/chrome/browser/chromeos/chrome_interface_factory.cc +++ b/chrome/browser/chromeos/chrome_interface_factory.cc
@@ -4,6 +4,13 @@ #include "chrome/browser/chromeos/chrome_interface_factory.h" +#include <memory> + +#include "ash/sysui/public/interfaces/wallpaper.mojom.h" +#include "base/lazy_instance.h" +#include "base/memory/weak_ptr.h" +#include "base/threading/thread_checker.h" +#include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/ash/app_list/app_list_presenter_service.h" @@ -11,7 +18,16 @@ #include "chrome/browser/ui/ash/keyboard_ui_service.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/browser_finder.h" +#include "content/public/common/mojo_shell_connection.h" +#include "mash/public/interfaces/launchable.mojom.h" +#include "mojo/public/cpp/bindings/binding_set.h" #include "services/shell/public/cpp/connection.h" +#include "ui/app_list/presenter/app_list_presenter.mojom.h" +#include "ui/keyboard/keyboard.mojom.h" + +namespace chromeos { + +namespace { class ChromeLaunchable : public mash::mojom::Launchable { public: @@ -57,49 +73,92 @@ DISALLOW_COPY_AND_ASSIGN(ChromeLaunchable); }; -namespace chromeos { +class FactoryImpl { + public: + FactoryImpl() {} + ~FactoryImpl() {} -ChromeInterfaceFactory::ChromeInterfaceFactory() {} + template <typename Interface> + static void AddFactory( + shell::Connection* connection, + scoped_refptr<base::SingleThreadTaskRunner> task_runner) { + connection->AddInterface<Interface>( + base::Bind(&FactoryImpl::CallMainThreadFactory<Interface>), + task_runner); + } + + private: + static FactoryImpl* Get() { + if (!factory_.Get()) + factory_.Get().reset(new FactoryImpl); + return factory_.Get().get(); + } + + template <typename Interface> + static void CallMainThreadFactory(mojo::InterfaceRequest<Interface> request) { + Get()->BindRequest(std::move(request)); + } + + void BindRequest(keyboard::mojom::KeyboardRequest request) { + if (!keyboard_ui_service_) + keyboard_ui_service_.reset(new KeyboardUIService); + keyboard_bindings_.AddBinding(keyboard_ui_service_.get(), + std::move(request)); + } + + void BindRequest(mash::mojom::LaunchableRequest request) { + if (!launchable_) + launchable_.reset(new ChromeLaunchable); + launchable_->ProcessRequest(std::move(request)); + } + + void BindRequest(ash::sysui::mojom::WallpaperManagerRequest request) { + if (!wallpaper_manager_) + wallpaper_manager_.reset(new ChromeWallpaperManager); + wallpaper_manager_->ProcessRequest(std::move(request)); + } + + void BindRequest(app_list::mojom::AppListPresenterRequest request) { + if (!app_list_presenter_service_) + app_list_presenter_service_.reset(new AppListPresenterService); + app_list_presenter_bindings_.AddBinding(app_list_presenter_service_.get(), + std::move(request)); + } + + static base::LazyInstance<std::unique_ptr<FactoryImpl>>::Leaky factory_; + + std::unique_ptr<KeyboardUIService> keyboard_ui_service_; + mojo::BindingSet<keyboard::mojom::Keyboard> keyboard_bindings_; + std::unique_ptr<ChromeLaunchable> launchable_; + std::unique_ptr<ChromeWallpaperManager> wallpaper_manager_; + std::unique_ptr<AppListPresenterService> app_list_presenter_service_; + mojo::BindingSet<app_list::mojom::AppListPresenter> + app_list_presenter_bindings_; + + DISALLOW_COPY_AND_ASSIGN(FactoryImpl); +}; + +base::LazyInstance<std::unique_ptr<FactoryImpl>>::Leaky FactoryImpl::factory_ = + LAZY_INSTANCE_INITIALIZER; + +} // namespace + +ChromeInterfaceFactory::ChromeInterfaceFactory() + : main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()) {} + ChromeInterfaceFactory::~ChromeInterfaceFactory() {} -bool ChromeInterfaceFactory::OnConnect(shell::Connection* connection) { - connection->AddInterface<keyboard::mojom::Keyboard>(this); - connection->AddInterface<mash::mojom::Launchable>(this); - connection->AddInterface<ash::sysui::mojom::WallpaperManager>(this); - connection->AddInterface<app_list::mojom::AppListPresenter>(this); +bool ChromeInterfaceFactory::OnConnect(shell::Connection* connection, + shell::Connector* connector) { + FactoryImpl::AddFactory<keyboard::mojom::Keyboard>( + connection, main_thread_task_runner_); + FactoryImpl::AddFactory<mash::mojom::Launchable>( + connection, main_thread_task_runner_); + FactoryImpl::AddFactory<ash::sysui::mojom::WallpaperManager>( + connection, main_thread_task_runner_); + FactoryImpl::AddFactory<app_list::mojom::AppListPresenter>( + connection, main_thread_task_runner_); return true; } -void ChromeInterfaceFactory::Create( - shell::Connection* connection, - mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) { - if (!keyboard_ui_service_) - keyboard_ui_service_.reset(new KeyboardUIService); - keyboard_bindings_.AddBinding(keyboard_ui_service_.get(), std::move(request)); -} - -void ChromeInterfaceFactory::Create(shell::Connection* connection, - mash::mojom::LaunchableRequest request) { - if (!launchable_) - launchable_.reset(new ChromeLaunchable); - launchable_->ProcessRequest(std::move(request)); -} - -void ChromeInterfaceFactory::Create( - shell::Connection* connection, - ash::sysui::mojom::WallpaperManagerRequest request) { - if (!wallpaper_manager_) - wallpaper_manager_.reset(new ChromeWallpaperManager); - wallpaper_manager_->ProcessRequest(std::move(request)); -} - -void ChromeInterfaceFactory::Create( - shell::Connection* connection, - mojo::InterfaceRequest<app_list::mojom::AppListPresenter> request) { - if (!app_list_presenter_service_) - app_list_presenter_service_.reset(new AppListPresenterService); - app_list_presenter_bindings_.AddBinding(app_list_presenter_service_.get(), - std::move(request)); -} - } // namespace chromeos
diff --git a/chrome/browser/chromeos/chrome_interface_factory.h b/chrome/browser/chromeos/chrome_interface_factory.h index d8afb09f..3538bbc0 100644 --- a/chrome/browser/chromeos/chrome_interface_factory.h +++ b/chrome/browser/chromeos/chrome_interface_factory.h
@@ -5,62 +5,25 @@ #ifndef CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_ #define CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_ -#include "ash/sysui/public/interfaces/wallpaper.mojom.h" -#include "content/public/common/mojo_shell_connection.h" -#include "mash/public/interfaces/launchable.mojom.h" -#include "mojo/public/cpp/bindings/binding_set.h" -#include "services/shell/public/cpp/interface_factory.h" -#include "services/shell/public/cpp/service.h" -#include "ui/app_list/presenter/app_list_presenter.mojom.h" -#include "ui/keyboard/keyboard.mojom.h" - -class AppListPresenterService; -class ChromeLaunchable; -class ChromeWallpaperManager; -class KeyboardUIService; +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "base/single_thread_task_runner.h" +#include "content/public/common/connection_filter.h" namespace chromeos { // InterfaceFactory for creating all services provided by chrome. -class ChromeInterfaceFactory - : public shell::Service, - public shell::InterfaceFactory<keyboard::mojom::Keyboard>, - public shell::InterfaceFactory<mash::mojom::Launchable>, - public shell::InterfaceFactory<ash::sysui::mojom::WallpaperManager>, - public shell::InterfaceFactory<app_list::mojom::AppListPresenter> { +class ChromeInterfaceFactory : public content::ConnectionFilter { public: ChromeInterfaceFactory(); ~ChromeInterfaceFactory() override; private: - // shell::Service: - bool OnConnect(shell::Connection* connection) override; + // content::ConnectionFilter: + bool OnConnect(shell::Connection* connection, + shell::Connector* connector) override; - // shell::InterfaceFactory<keyboard::Keyboard>: - void Create( - shell::Connection* connection, - mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) override; - - // mojo::InterfaceFactory<mash::mojom::Launchable> - void Create(shell::Connection* connection, - mash::mojom::LaunchableRequest request) override; - - // mojo::InterfaceFactory<ash::sysui::mojom::WallpaperManager> - void Create(shell::Connection* connection, - ash::sysui::mojom::WallpaperManagerRequest request) override; - - // mojo::InterfaceFactory<app_list::AppListPresenter>: - void Create(shell::Connection* connection, - mojo::InterfaceRequest<app_list::mojom::AppListPresenter> request) - override; - - std::unique_ptr<KeyboardUIService> keyboard_ui_service_; - mojo::BindingSet<keyboard::mojom::Keyboard> keyboard_bindings_; - std::unique_ptr<ChromeLaunchable> launchable_; - std::unique_ptr<ChromeWallpaperManager> wallpaper_manager_; - std::unique_ptr<AppListPresenterService> app_list_presenter_service_; - mojo::BindingSet<app_list::mojom::AppListPresenter> - app_list_presenter_bindings_; + scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; DISALLOW_COPY_AND_ASSIGN(ChromeInterfaceFactory); };
diff --git a/chrome/browser/chromeos/device/input_service_proxy.cc b/chrome/browser/chromeos/device/input_service_proxy.cc index 7172f4a9..3499cd5 100644 --- a/chrome/browser/chromeos/device/input_service_proxy.cc +++ b/chrome/browser/chromeos/device/input_service_proxy.cc
@@ -87,8 +87,7 @@ InputServiceProxy::InputServiceProxy() : service_observer_(new ServiceObserver()), - task_runner_(BrowserThread::GetMessageLoopProxyForThread( - thread_identifier_)), + task_runner_(BrowserThread::GetTaskRunnerForThread(thread_identifier_)), weak_factory_(this) { DCHECK_CURRENTLY_ON(BrowserThread::UI); task_runner_->PostTask(
diff --git a/chrome/browser/chromeos/drive/drive_integration_service.cc b/chrome/browser/chromeos/drive/drive_integration_service.cc index 9897800..6d40b1e9 100644 --- a/chrome/browser/chromeos/drive/drive_integration_service.cc +++ b/chrome/browser/chromeos/drive/drive_integration_service.cc
@@ -260,7 +260,7 @@ metadata_storage_.get(), cache_.get(), blocking_task_runner_)); file_task_runner_ = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); file_system_.reset( test_file_system ? test_file_system
diff --git a/chrome/browser/chromeos/drive/fileapi/async_file_util.cc b/chrome/browser/chromeos/drive/fileapi/async_file_util.cc index ff02b64..a2fae23 100644 --- a/chrome/browser/chromeos/drive/fileapi/async_file_util.cc +++ b/chrome/browser/chromeos/drive/fileapi/async_file_util.cc
@@ -79,7 +79,7 @@ callback.Run( std::move(file), base::Bind(&google_apis::RunTaskWithTaskRunner, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), close_callback_on_ui_thread)); }
diff --git a/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc b/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc index 9280941..1ebf97c 100644 --- a/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc +++ b/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc
@@ -160,9 +160,6 @@ // TBD // emk::kCommands, - // TBD, doc missing - // emk::kCopresence, - // TBD, looks unsafe // emk::kEventRules, @@ -295,9 +292,6 @@ // Potentially risky: Could be used to spoof system UI. // "contextMenus", - // Dev channel only. Not evaluated. - // "copresence", - // Placing a document on the scanner implies user consent. "documentScan",
diff --git a/chrome/browser/chromeos/extensions/external_cache_unittest.cc b/chrome/browser/chromeos/extensions/external_cache_unittest.cc index 091ecac85..b503445f 100644 --- a/chrome/browser/chromeos/extensions/external_cache_unittest.cc +++ b/chrome/browser/chromeos/extensions/external_cache_unittest.cc
@@ -62,7 +62,7 @@ // testing::Test overrides: void SetUp() override { request_context_getter_ = new net::TestURLRequestContextGetter( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)); fetcher_factory_.reset(new net::TestURLFetcherFactory());
diff --git a/chrome/browser/chromeos/file_manager/zip_file_creator.cc b/chrome/browser/chromeos/file_manager/zip_file_creator.cc index 823ee1a..5a3a2f4 100644 --- a/chrome/browser/chromeos/file_manager/zip_file_creator.cc +++ b/chrome/browser/chromeos/file_manager/zip_file_creator.cc
@@ -93,8 +93,7 @@ base::FileDescriptor dest_fd(std::move(dest_file)); UtilityProcessHost* host = UtilityProcessHost::Create( - this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get()); + this, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI).get()); host->SetName( l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_ZIP_FILE_CREATOR_NAME)); host->SetExposedDir(src_dir_);
diff --git a/chrome/browser/chromeos/hats/hats_notification_controller.cc b/chrome/browser/chromeos/hats/hats_notification_controller.cc index 8ec8e18..461f2acb 100644 --- a/chrome/browser/chromeos/hats/hats_notification_controller.cc +++ b/chrome/browser/chromeos/hats/hats_notification_controller.cc
@@ -8,6 +8,7 @@ #include "base/feature_list.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/hats/hats_dialog.h" +#include "chrome/browser/chromeos/login/startup_utils.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/notifications/notification_ui_manager.h" @@ -29,15 +30,23 @@ // Returns true if the given |profile| interacted with HaTS by either // dismissing the notification or taking the survey within a given threshold -// time delta |threshold|. -bool DidShowSurveyToProfileRecently(Profile* profile, - base::TimeDelta threshold) { +// days |threshold_days|. +bool DidShowSurveyToProfileRecently(Profile* profile, int threshold_days) { int64_t serialized_timestamp = profile->GetPrefs()->GetInt64(prefs::kHatsLastInteractionTimestamp); base::Time previous_interaction_timestamp = base::Time::FromInternalValue(serialized_timestamp); - return (previous_interaction_timestamp + threshold) > base::Time::Now(); + return (previous_interaction_timestamp + + base::TimeDelta::FromDays(threshold_days)) > base::Time::Now(); +} + +// Returns true if at least |threshold_days| days have passed since OOBE. This +// is an indirect measure of whether the owner has used the device for at least +// |threshold_days| days. +bool IsNewDevice(int threshold_days) { + return chromeos::StartupUtils::GetTimeSinceOobeFlagFileCreation() <= + base::TimeDelta::FromDays(threshold_days); } } // namespace @@ -51,24 +60,43 @@ const char HatsNotificationController::kNotificationId[] = "hats_notification"; // static -const base::TimeDelta HatsNotificationController::kHatsThresholdTime = - base::TimeDelta::FromDays(90); +const int HatsNotificationController::kHatsThresholdDays = 90; + +// static +const int HatsNotificationController::kHatsNewDeviceThresholdDays = 7; HatsNotificationController::HatsNotificationController(Profile* profile) - : profile_(profile) { - // Add self as an observer to be notified when an internet connection is - // available. - network_portal_detector::GetInstance()->AddAndFireObserver(this); + : profile_(profile), weak_pointer_factory_(this) { + base::PostTaskAndReplyWithResult( + content::BrowserThread::GetBlockingPool(), FROM_HERE, + base::Bind(&IsNewDevice, kHatsNewDeviceThresholdDays), + base::Bind(&HatsNotificationController::Initialize, + weak_pointer_factory_.GetWeakPtr())); } HatsNotificationController::~HatsNotificationController() { network_portal_detector::GetInstance()->RemoveObserver(this); } +void HatsNotificationController::Initialize(bool is_new_device) { + if (is_new_device) { + // This device has been chosen for a survey, but it is too new. Instead + // of showing the user the survey, just mark it as completed. + UpdateLastInteractionTime(); + return; + } + + // Add self as an observer to be notified when an internet connection is + // available. + network_portal_detector::GetInstance()->AddAndFireObserver(this); +} + // static // TODO(malaykeshav): Add check for @google accounts. bool HatsNotificationController::ShouldShowSurveyToProfile(Profile* profile) { - // Do not show the survey if the HaTS feature is disabled for the device. + // Do not show the survey if the HaTS feature is disabled for the device. This + // flag is controlled by finch and is enabled only when the device has been + // selected for the survey. if (!base::FeatureList::IsEnabled(features::kHappininessTrackingSystem)) return false; @@ -91,7 +119,7 @@ // Do not show survey to user if user has interacted with HaTS within the past // |kHatsThresholdTime| time delta. - if (DidShowSurveyToProfileRecently(profile, kHatsThresholdTime)) + if (DidShowSurveyToProfileRecently(profile, kHatsThresholdDays)) return false; return true;
diff --git a/chrome/browser/chromeos/hats/hats_notification_controller.h b/chrome/browser/chromeos/hats/hats_notification_controller.h index 95b75d6..20d36a5 100644 --- a/chrome/browser/chromeos/hats/hats_notification_controller.h +++ b/chrome/browser/chromeos/hats/hats_notification_controller.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_CHROMEOS_HATS_HATS_NOTIFICATION_CONTROLLER_H_ #include "base/macros.h" +#include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_delegate.h" @@ -23,7 +24,10 @@ public: // Minimum amount of time before the notification is displayed again after a // user has interacted with it. - static const base::TimeDelta kHatsThresholdTime; + static const int kHatsThresholdDays; + // Minimum amount of time after initial login or oobe after which we can show + // the HaTS notification. + static const int kHatsNewDeviceThresholdDays; static const char kDelegateId[]; static const char kNotificationId[]; @@ -36,6 +40,7 @@ ~HatsNotificationController() override; // NotificationDelegate overrides: + void Initialize(bool is_new_device); void ButtonClick(int button_index) override; void Close(bool by_user) override; std::string id() const override; @@ -49,6 +54,7 @@ void UpdateLastInteractionTime(); Profile* profile_; + base::WeakPtrFactory<HatsNotificationController> weak_pointer_factory_; DISALLOW_COPY_AND_ASSIGN(HatsNotificationController); };
diff --git a/chrome/browser/chromeos/login/lock/webui_screen_locker.cc b/chrome/browser/chromeos/login/lock/webui_screen_locker.cc index 43b7ba5..83bdcb2 100644 --- a/chrome/browser/chromeos/login/lock/webui_screen_locker.cc +++ b/chrome/browser/chromeos/login/lock/webui_screen_locker.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" -#include "ash/common/shell_delegate.h" #include "ash/common/wm_shell.h" #include "ash/shell.h" #include "ash/system/chromeos/power/power_event_observer.h" @@ -69,7 +68,7 @@ weak_factory_(this) { set_should_emit_login_prompt_visible(false); ash::Shell::GetInstance()->lock_state_controller()->AddObserver(this); - ash::WmShell::Get()->delegate()->AddVirtualKeyboardStateObserver(this); + ash::WmShell::Get()->AddShellObserver(this); display::Screen::GetScreen()->AddObserver(this); DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); @@ -169,7 +168,7 @@ display::Screen::GetScreen()->RemoveObserver(this); ash::Shell::GetInstance()->lock_state_controller()->RemoveObserver(this); - ash::WmShell::Get()->delegate()->RemoveVirtualKeyboardStateObserver(this); + ash::WmShell::Get()->RemoveShellObserver(this); // In case of shutdown, lock_window_ may be deleted before WebUIScreenLocker. if (lock_window_) { lock_window_->RemoveObserver(this); @@ -354,7 +353,7 @@ } //////////////////////////////////////////////////////////////////////////////// -// ash::KeyboardStateObserver overrides. +// ash::ShellObserver: void WebUIScreenLocker::OnVirtualKeyboardStateChanged(bool activated) { if (keyboard::KeyboardController::GetInstance()) {
diff --git a/chrome/browser/chromeos/login/lock/webui_screen_locker.h b/chrome/browser/chromeos/login/lock/webui_screen_locker.h index ecc3d26e..f62b2e7 100644 --- a/chrome/browser/chromeos/login/lock/webui_screen_locker.h +++ b/chrome/browser/chromeos/login/lock/webui_screen_locker.h
@@ -10,7 +10,7 @@ #include <memory> #include <string> -#include "ash/common/shell_delegate.h" +#include "ash/common/shell_observer.h" #include "ash/wm/lock_state_observer.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" @@ -55,7 +55,7 @@ public ash::LockStateObserver, public views::WidgetObserver, public PowerManagerClient::Observer, - public ash::VirtualKeyboardStateObserver, + public ash::ShellObserver, public keyboard::KeyboardControllerObserver, public display::DisplayObserver, public content::WebContentsObserver { @@ -114,7 +114,7 @@ // content::WebContentsObserver: void RenderProcessGone(base::TerminationStatus status) override; - // ash::KeyboardStateObserver: + // ash::ShellObserver: void OnVirtualKeyboardStateChanged(bool activated) override; // keyboard::KeyboardControllerObserver:
diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc index 86ed30d..f712f27 100644 --- a/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc +++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h" #include "ash/desktop_background/desktop_background_controller.h" +#include "ash/shelf/shelf.h" #include "ash/shell.h" #include "base/rand_util.h" #include "base/values.h" @@ -20,7 +21,6 @@ #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h" #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h" #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h" -#include "chrome/browser/chromeos/login/ui/login_display_host.h" #include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h" #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" @@ -375,13 +375,8 @@ // during the user image picker step are below it. ash::Shell::GetInstance()-> desktop_background_controller()->MoveDesktopToLockedContainer(); - - // Hide the status area and the control bar, since they will show up at the - // logged in users's preferred location, which could be on the left or right - // side of the screen. - LoginDisplayHost* default_host = LoginDisplayHost::default_host(); - default_host->SetStatusAreaVisible(false); - default_host->GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); + ash::Shelf::ForPrimaryDisplay()->SetAlignment( + ash::ShelfAlignment::SHELF_ALIGNMENT_BOTTOM_LOCKED); controller_->SetManagerProfile(manager_profile); if (actor_)
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc index 6245d6f4..28312bf4 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
@@ -301,7 +301,7 @@ } if (!chrome::IsRunningInMash()) - ash::WmShell::Get()->delegate()->AddVirtualKeyboardStateObserver(this); + ash::WmShell::Get()->AddShellObserver(this); else NOTIMPLEMENTED(); display::Screen::GetScreen()->AddObserver(this); @@ -420,7 +420,7 @@ } if (!chrome::IsRunningInMash()) - ash::WmShell::Get()->delegate()->RemoveVirtualKeyboardStateObserver(this); + ash::WmShell::Get()->RemoveShellObserver(this); else NOTIMPLEMENTED(); display::Screen::GetScreen()->RemoveObserver(this); @@ -452,7 +452,7 @@ } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, LoginDisplayHost implementation: +// LoginDisplayHostImpl, LoginDisplayHost: LoginDisplay* LoginDisplayHostImpl::CreateLoginDisplay( LoginDisplay::Delegate* delegate) { @@ -812,7 +812,7 @@ } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, content:NotificationObserver implementation: +// LoginDisplayHostImpl, content:NotificationObserver: void LoginDisplayHostImpl::Observe( int type, @@ -888,7 +888,7 @@ } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, WebContentsObserver implementation: +// LoginDisplayHostImpl, WebContentsObserver: void LoginDisplayHostImpl::RenderProcessGone(base::TerminationStatus status) { // Do not try to restore on shutdown @@ -909,24 +909,21 @@ } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, chromeos::SessionManagerClient::Observer -// implementation: +// LoginDisplayHostImpl, chromeos::SessionManagerClient::Observer: void LoginDisplayHostImpl::EmitLoginPromptVisibleCalled() { OnLoginPromptVisible(); } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver -// implementation: +// LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver: void LoginDisplayHostImpl::OnActiveOutputNodeChanged() { TryToPlayStartupSound(); } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, ash::KeyboardStateObserver: -// implementation: +// LoginDisplayHostImpl, ash::ShellObserver: void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(bool activated) { if (keyboard::KeyboardController::GetInstance()) { @@ -944,7 +941,6 @@ //////////////////////////////////////////////////////////////////////////////// // LoginDisplayHostImpl, keyboard::KeyboardControllerObserver: -// implementation: void LoginDisplayHostImpl::OnKeyboardBoundsChanging( const gfx::Rect& new_bounds) { @@ -960,7 +956,7 @@ } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, display::DisplayObserver implementation: +// LoginDisplayHostImpl, display::DisplayObserver: void LoginDisplayHostImpl::OnDisplayAdded(const display::Display& new_display) { } @@ -986,7 +982,7 @@ } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, views::WidgetRemovalsObserver implementation: +// LoginDisplayHostImpl, views::WidgetRemovalsObserver: void LoginDisplayHostImpl::OnWillRemoveView(views::Widget* widget, views::View* view) { if (view != static_cast<views::View*>(login_view_)) @@ -996,8 +992,7 @@ } //////////////////////////////////////////////////////////////////////////////// -// LoginDisplayHostImpl, chrome::MultiUserWindowManager::Observer -// implementation: +// LoginDisplayHostImpl, chrome::MultiUserWindowManager::Observer: void LoginDisplayHostImpl::OnUserSwitchAnimationFinished() { ShutdownDisplayHost(false); }
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.h b/chrome/browser/chromeos/login/ui/login_display_host_impl.h index eb278f5..9d7624a 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_impl.h +++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.h
@@ -11,7 +11,7 @@ #include <string> #include <vector> -#include "ash/common/shell_delegate.h" +#include "ash/common/shell_observer.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/chromeos/login/app_launch_controller.h" @@ -57,7 +57,7 @@ public content::WebContentsObserver, public chromeos::SessionManagerClient::Observer, public chromeos::CrasAudioHandler::AudioObserver, - public ash::VirtualKeyboardStateObserver, + public ash::ShellObserver, public keyboard::KeyboardControllerObserver, public display::DisplayObserver, public views::WidgetRemovalsObserver, @@ -123,7 +123,7 @@ // Overridden from chromeos::CrasAudioHandler::AudioObserver: void OnActiveOutputNodeChanged() override; - // Overridden from ash::KeyboardStateObserver: + // ash::ShellObserver: void OnVirtualKeyboardStateChanged(bool activated) override; // Overridden from keyboard::KeyboardControllerObserver:
diff --git a/chrome/browser/chromeos/login/ui/webui_login_view.cc b/chrome/browser/chromeos/login/ui/webui_login_view.cc index 236fcae..408b9511 100644 --- a/chrome/browser/chromeos/login/ui/webui_login_view.cc +++ b/chrome/browser/chromeos/login/ui/webui_login_view.cc
@@ -323,7 +323,6 @@ tray->SetVisible(visible); tray->GetWidget()->SetOpacity(visible ? 1.0 : 0.0); if (visible) { - // Tray may have been initialized being hidden. tray->GetWidget()->Show(); } else { tray->GetWidget()->Hide();
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index f21f0e1e..ee672fd 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -385,8 +385,7 @@ if (!remora_controller_) { remora_controller_.reset( new pairing_chromeos::BluetoothHostPairingController( - BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); remora_controller_->StartPairing(); } return new HostPairingScreen(this, this, @@ -1354,7 +1353,7 @@ if (!shark_connection_listener_) { shark_connection_listener_.reset( new pairing_chromeos::SharkConnectionListener( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), base::Bind(&WizardController::OnSharkConnected, weak_factory_.GetWeakPtr()))); }
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc index 907e5bd..d5caadc 100644 --- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc +++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
@@ -189,13 +189,11 @@ device_local_account_policy_service_.reset( new DeviceLocalAccountPolicyService( chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), - chromeos::DeviceSettingsService::Get(), - chromeos::CrosSettings::Get(), + chromeos::DeviceSettingsService::Get(), chromeos::CrosSettings::Get(), affiliated_invalidation_service_provider_.get(), + GetBackgroundTaskRunner(), GetBackgroundTaskRunner(), GetBackgroundTaskRunner(), - GetBackgroundTaskRunner(), - GetBackgroundTaskRunner(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), request_context)); device_local_account_policy_service_->Connect(device_management_service());
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc index d585b0b..2199b54 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc
@@ -121,8 +121,8 @@ std::string(), store.get(), task_runner, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)), device_store_(std::move(store)), state_keys_broker_(state_keys_broker), task_runner_(task_runner),
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc index a551e915..1afb80a 100644 --- a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc +++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
@@ -232,14 +232,14 @@ std::unique_ptr<ResourceCache> resource_cache( new ResourceCache(component_policy_cache_path_, - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE))); component_policy_service_.reset(new ComponentCloudPolicyService( this, &schema_registry_, core(), client, std::move(resource_cache), - request_context, content::BrowserThread::GetMessageLoopProxyForThread( + request_context, content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO))); }
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc index 4874389..8d10c3b 100644 --- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc +++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
@@ -200,7 +200,7 @@ content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( content::BrowserThread::GetBlockingPool()->GetSequenceToken()); scoped_refptr<base::SequencedTaskRunner> io_task_runner = - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); std::unique_ptr<CloudExternalDataManager> external_data_manager( new UserCloudExternalDataManager(base::Bind(&GetChromePolicyDetails), @@ -210,7 +210,7 @@ store->LoadImmediately(); scoped_refptr<base::SequencedTaskRunner> file_task_runner = - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE); std::unique_ptr<UserCloudPolicyManagerChromeOS> manager(
diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc index bff0eb0..b393eca 100644 --- a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc +++ b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc
@@ -141,7 +141,7 @@ DCHECK(database); SetCertificateImporter(std::unique_ptr<chromeos::onc::CertificateImporter>( new chromeos::onc::CertificateImporterImpl( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), database))); }
diff --git a/chrome/browser/chromeos/power/freezer_cgroup_process_manager.cc b/chrome/browser/chromeos/power/freezer_cgroup_process_manager.cc index e11155a4..af1fd7e 100644 --- a/chrome/browser/chromeos/power/freezer_cgroup_process_manager.cc +++ b/chrome/browser/chromeos/power/freezer_cgroup_process_manager.cc
@@ -32,7 +32,7 @@ public: // Called on UI thread. explicit FileWorker(scoped_refptr<base::SequencedTaskRunner> file_thread) - : ui_thread_(content::BrowserThread::GetMessageLoopProxyForThread( + : ui_thread_(content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI)), file_thread_(file_thread) { DCHECK(ui_thread_->RunsTasksOnCurrentThread()); @@ -132,7 +132,7 @@ }; FreezerCgroupProcessManager::FreezerCgroupProcessManager() - : file_thread_(content::BrowserThread::GetMessageLoopProxyForThread( + : file_thread_(content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE)), file_worker_(new FileWorker(file_thread_)) { file_thread_->PostTask(FROM_HERE,
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc index 8af07ca9..ce977fe 100644 --- a/chrome/browser/chromeos/proxy_config_service_impl.cc +++ b/chrome/browser/chromeos/proxy_config_service_impl.cc
@@ -53,7 +53,7 @@ PrefService* local_state_prefs) : PrefProxyConfigTrackerImpl( profile_prefs ? profile_prefs : local_state_prefs, - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)), active_config_state_(ProxyPrefs::CONFIG_UNSET), profile_prefs_(profile_prefs),
diff --git a/chrome/browser/chromeos/settings/OWNERS b/chrome/browser/chromeos/settings/OWNERS index bb2a49f..54eb71e 100644 --- a/chrome/browser/chromeos/settings/OWNERS +++ b/chrome/browser/chromeos/settings/OWNERS
@@ -1,3 +1,4 @@ +tnagel@chromium.org mnissler@chromium.org bartfab@chromium.org pastarmovj@chromium.org
diff --git a/chrome/browser/chromeos/settings/device_settings_service.h b/chrome/browser/chromeos/settings/device_settings_service.h index d7b0ff486..b0ea5eb7 100644 --- a/chrome/browser/chromeos/settings/device_settings_service.h +++ b/chrome/browser/chromeos/settings/device_settings_service.h
@@ -105,15 +105,12 @@ // and stops any pending operations. void UnsetSessionManager(); - SessionManagerClient* session_manager_client() const { - return session_manager_client_; - } - - // Returns the currently active device settings. Returns NULL if the device - // settings have not been retrieved from session_manager yet. const enterprise_management::PolicyData* policy_data() { return policy_data_.get(); } + + // Returns the currently active device settings. Returns nullptr if the device + // settings have not been retrieved from session_manager yet. const enterprise_management::ChromeDeviceSettingsProto* device_settings() const { return device_settings_.get();
diff --git a/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc b/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc index c9cdc5d..d05c3794 100644 --- a/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc +++ b/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc
@@ -16,7 +16,6 @@ #include "base/run_loop.h" #include "base/stl_util.h" #include "build/build_config.h" -#include "chrome/browser/extensions/api/copresence/copresence_api.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/data_usage/tab_id_annotator.cc b/chrome/browser/data_usage/tab_id_annotator.cc index 6754b20..307dd61 100644 --- a/chrome/browser/data_usage/tab_id_annotator.cc +++ b/chrome/browser/data_usage/tab_id_annotator.cc
@@ -81,7 +81,7 @@ } scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); std::unique_ptr<TabIdProvider> tab_id_provider(new TabIdProvider( ui_thread_task_runner.get(), FROM_HERE, base::Bind(&GetTabIdForRenderFrame, render_process_id, render_frame_id)));
diff --git a/chrome/browser/devtools/devtools_file_system_indexer.cc b/chrome/browser/devtools/devtools_file_system_indexer.cc index a493a4f..2930a01 100644 --- a/chrome/browser/devtools/devtools_file_system_indexer.cc +++ b/chrome/browser/devtools/devtools_file_system_indexer.cc
@@ -260,8 +260,8 @@ total_work_callback_(total_work_callback), worked_callback_(worked_callback), done_callback_(done_callback), - current_file_(BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::FILE).get()), + current_file_( + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()), files_indexed_(0), stopped_(false) { current_trigrams_set_.resize(kTrigramCount);
diff --git a/chrome/browser/engagement/site_engagement_service.cc b/chrome/browser/engagement/site_engagement_service.cc index 5bb379ed..56ca99d6 100644 --- a/chrome/browser/engagement/site_engagement_service.cc +++ b/chrome/browser/engagement/site_engagement_service.cc
@@ -109,7 +109,7 @@ SiteEngagementService::SiteEngagementService(Profile* profile) : SiteEngagementService(profile, base::WrapUnique(new base::DefaultClock)) { content::BrowserThread::PostAfterStartupTask( - FROM_HERE, content::BrowserThread::GetMessageLoopProxyForThread( + FROM_HERE, content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), base::Bind(&SiteEngagementService::AfterStartupTask, weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn index c304abd..a57e40f 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn
@@ -46,7 +46,7 @@ "//chrome/common/extensions/api:api_registration", "//chrome/common/safe_browsing:proto", "//chrome/installer/util:with_no_strings", - "//components/copresence", + "//components/audio_modem", "//components/data_reduction_proxy/proto:data_reduction_proxy_proto", "//components/dom_distiller/core", "//components/onc",
diff --git a/chrome/browser/extensions/api/api_registration.gyp b/chrome/browser/extensions/api/api_registration.gyp index 0dc611f..cfe44644 100644 --- a/chrome/browser/extensions/api/api_registration.gyp +++ b/chrome/browser/extensions/api/api_registration.gyp
@@ -24,7 +24,6 @@ # include generated headers from these targets. # TODO(brettw) this should be made unnecessary if possible. '<(DEPTH)/components/components.gyp:component_metrics_proto', - '<(DEPTH)/components/components.gyp:copresence_proto', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/sync/sync.gyp:sync', '<(DEPTH)/ui/accessibility/accessibility.gyp:ax_gen',
diff --git a/chrome/browser/extensions/api/copresence/OWNERS b/chrome/browser/extensions/api/copresence/OWNERS deleted file mode 100644 index 5f781a6..0000000 --- a/chrome/browser/extensions/api/copresence/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -rkc@chromium.org -ckehoe@chromium.org
diff --git a/chrome/browser/extensions/api/copresence/copresence_api.cc b/chrome/browser/extensions/api/copresence/copresence_api.cc deleted file mode 100644 index a1eb781..0000000 --- a/chrome/browser/extensions/api/copresence/copresence_api.cc +++ /dev/null
@@ -1,307 +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 "chrome/browser/extensions/api/copresence/copresence_api.h" - -#include <utility> - -#include "base/lazy_instance.h" -#include "chrome/browser/copresence/chrome_whispernet_client.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/services/gcm/gcm_profile_service_factory.h" -#include "chrome/common/channel_info.h" -#include "chrome/common/extensions/api/copresence.h" -#include "chrome/common/extensions/manifest_handlers/copresence_manifest.h" -#include "chrome/common/pref_names.h" -#include "components/copresence/copresence_manager_impl.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/proto/enums.pb.h" -#include "components/copresence/proto/rpcs.pb.h" -#include "components/gcm_driver/gcm_profile_service.h" -#include "components/pref_registry/pref_registry_syncable.h" -#include "components/prefs/pref_service.h" -#include "content/public/browser/browser_context.h" -#include "content/public/browser/storage_partition.h" -#include "extensions/browser/event_router.h" -#include "extensions/browser/extension_registry.h" -#include "extensions/common/extension.h" -#include "extensions/common/manifest_constants.h" - -using user_prefs::PrefRegistrySyncable; - -namespace extensions { - -namespace { - -base::LazyInstance<BrowserContextKeyedAPIFactory<CopresenceService>> - g_factory = LAZY_INSTANCE_INITIALIZER; - -const char kInvalidOperationsMessage[] = - "Invalid operation in operations array."; -const char kShuttingDownMessage[] = "Shutting down."; - -const std::string GetPrefName(bool authenticated) { - return authenticated ? prefs::kCopresenceAuthenticatedDeviceId - : prefs::kCopresenceAnonymousDeviceId; -} - -} // namespace - -namespace Execute = api::copresence::Execute; -namespace OnMessagesReceived = api::copresence::OnMessagesReceived; -namespace OnStatusUpdated = api::copresence::OnStatusUpdated; -namespace SetApiKey = api::copresence::SetApiKey; -namespace SetAuthToken = api::copresence::SetAuthToken; - -// Public functions. - -CopresenceService::CopresenceService(content::BrowserContext* context) - : is_shutting_down_(false), browser_context_(context) {} - -CopresenceService::~CopresenceService() {} - -void CopresenceService::Shutdown() { - is_shutting_down_ = true; - manager_.reset(); - whispernet_client_.reset(); -} - -copresence::CopresenceManager* CopresenceService::manager() { - if (!manager_ && !is_shutting_down_) - manager_.reset(new copresence::CopresenceManagerImpl(this)); - return manager_.get(); -} - -std::string CopresenceService::auth_token(const std::string& app_id) - const { - // This won't be const if we use map[] - const auto& key = auth_tokens_by_app_.find(app_id); - return key == auth_tokens_by_app_.end() ? std::string() : key->second; -} - -void CopresenceService::set_api_key(const std::string& app_id, - const std::string& api_key) { - DCHECK(!app_id.empty()); - api_keys_by_app_[app_id] = api_key; -} - -void CopresenceService::set_auth_token(const std::string& app_id, - const std::string& token) { - DCHECK(!app_id.empty()); - auth_tokens_by_app_[app_id] = token; -} - -void CopresenceService::set_manager_for_testing( - std::unique_ptr<copresence::CopresenceManager> manager) { - manager_ = std::move(manager); -} - -void CopresenceService::ResetState() { - DVLOG(2) << "Deleting copresence state"; - GetPrefService()->ClearPref(prefs::kCopresenceAuthenticatedDeviceId); - GetPrefService()->ClearPref(prefs::kCopresenceAnonymousDeviceId); - manager_ = nullptr; -} - -// static -void CopresenceService::RegisterProfilePrefs(PrefRegistrySyncable* registry) { - registry->RegisterStringPref(prefs::kCopresenceAuthenticatedDeviceId, - std::string()); - registry->RegisterStringPref(prefs::kCopresenceAnonymousDeviceId, - std::string()); -} - -// static -BrowserContextKeyedAPIFactory<CopresenceService>* -CopresenceService::GetFactoryInstance() { - return g_factory.Pointer(); -} - - -// Private functions. - -void CopresenceService::HandleMessages( - const std::string& /* app_id */, - const std::string& subscription_id, - const std::vector<copresence::Message>& messages) { - // TODO(ckehoe): Once the server starts sending back the app ids associated - // with subscriptions, use that instead of the apps_by_subs registry. - std::string app_id = apps_by_subscription_id_[subscription_id]; - - if (app_id.empty()) { - LOG(ERROR) << "Skipping message from unrecognized subscription " - << subscription_id; - return; - } - - int message_count = messages.size(); - std::vector<api::copresence::Message> api_messages(message_count); - - for (const copresence::Message& message : messages) { - api::copresence::Message api_message; - api_message.type = message.type().type(); - api_message.payload.assign(message.payload().begin(), - message.payload().end()); - api_messages.push_back(std::move(api_message)); - DVLOG(2) << "Dispatching message of type " << api_message.type << ":\n" - << message.payload(); - } - - // Send the messages to the client app. - std::unique_ptr<Event> event(new Event( - events::COPRESENCE_ON_MESSAGES_RECEIVED, OnMessagesReceived::kEventName, - OnMessagesReceived::Create(subscription_id, api_messages), - browser_context_)); - EventRouter::Get(browser_context_) - ->DispatchEventToExtension(app_id, std::move(event)); - DVLOG(2) << "Passed " << api_messages.size() << " messages to app \"" - << app_id << "\" for subscription \"" << subscription_id << "\""; -} - -void CopresenceService::HandleStatusUpdate( - copresence::CopresenceStatus status) { - DCHECK_EQ(copresence::AUDIO_FAIL, status); - std::unique_ptr<Event> event(new Event( - events::COPRESENCE_ON_STATUS_UPDATED, OnStatusUpdated::kEventName, - OnStatusUpdated::Create(api::copresence::STATUS_AUDIOFAILED), - browser_context_)); - EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event)); - DVLOG(2) << "Sent Audio Failed status update."; -} - -net::URLRequestContextGetter* CopresenceService::GetRequestContext() const { - return content::BrowserContext::GetDefaultStoragePartition(browser_context_)-> - GetURLRequestContext(); -} - -std::string CopresenceService::GetPlatformVersionString() const { - return chrome::GetVersionString(); -} - -std::string -CopresenceService::GetAPIKey(const std::string& app_id) const { - // Check first if the app has set its key via the API. - const auto& key = api_keys_by_app_.find(app_id); - if (key != api_keys_by_app_.end()) - return key->second; - - // If no key was found, look in the manifest. - if (!app_id.empty()) { - const Extension* extension = ExtensionRegistry::Get(browser_context_) - ->GetExtensionById(app_id, ExtensionRegistry::ENABLED); - DCHECK(extension) << "Invalid extension ID"; - CopresenceManifestData* manifest_data = - static_cast<CopresenceManifestData*>( - extension->GetManifestData(manifest_keys::kCopresence)); - if (manifest_data) - return manifest_data->api_key; - } - - return std::string(); -} - -audio_modem::WhispernetClient* CopresenceService::GetWhispernetClient() { - if (!whispernet_client_ && !is_shutting_down_) - whispernet_client_.reset(new ChromeWhispernetClient(browser_context_)); - return whispernet_client_.get(); -} - -gcm::GCMDriver* CopresenceService::GetGCMDriver() { - gcm::GCMProfileService* gcm_service = - gcm::GCMProfileServiceFactory::GetForProfile(browser_context_); - return gcm_service ? gcm_service->driver() : nullptr; -} - -std::string CopresenceService::GetDeviceId(bool authenticated) { - std::string id = GetPrefService()->GetString(GetPrefName(authenticated)); - DVLOG(3) << "Retrieved device ID \"" << id << "\", " - << "authenticated = " << authenticated; - return id; -} - -void CopresenceService::SaveDeviceId(bool authenticated, - const std::string& device_id) { - DVLOG(3) << "Storing device ID \"" << device_id << "\", " - << "authenticated = " << authenticated; - if (device_id.empty()) - GetPrefService()->ClearPref(GetPrefName(authenticated)); - else - GetPrefService()->SetString(GetPrefName(authenticated), device_id); -} - -PrefService* CopresenceService::GetPrefService() { - return Profile::FromBrowserContext(browser_context_)->GetPrefs(); -} - -template <> -void -BrowserContextKeyedAPIFactory<CopresenceService>::DeclareFactoryDependencies() { - DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); -} - -// CopresenceExecuteFunction implementation. -ExtensionFunction::ResponseAction CopresenceExecuteFunction::Run() { - std::unique_ptr<Execute::Params> params(Execute::Params::Create(*args_)); - EXTENSION_FUNCTION_VALIDATE(params.get()); - - CopresenceService* service = - CopresenceService::GetFactoryInstance()->Get(browser_context()); - - // This can only happen if we're shutting down. In all other cases, if we - // don't have a manager, we'll create one. - if (!service->manager()) - return RespondNow(Error(kShuttingDownMessage)); - - // Each execute will correspond to one ReportRequest protocol buffer. - copresence::ReportRequest request; - if (!PrepareReportRequestProto(params->operations, - extension_id(), - &service->apps_by_subscription_id(), - &request)) { - return RespondNow(Error(kInvalidOperationsMessage)); - } - - service->manager()->ExecuteReportRequest( - request, - extension_id(), - service->auth_token(extension_id()), - base::Bind(&CopresenceExecuteFunction::SendResult, this)); - return RespondLater(); -} - -void CopresenceExecuteFunction::SendResult( - copresence::CopresenceStatus status) { - api::copresence::ExecuteStatus api_status = - (status == copresence::SUCCESS) ? api::copresence::EXECUTE_STATUS_SUCCESS - : api::copresence::EXECUTE_STATUS_FAILED; - Respond(ArgumentList(Execute::Results::Create(api_status))); -} - -// CopresenceSetApiKeyFunction implementation. -ExtensionFunction::ResponseAction CopresenceSetApiKeyFunction::Run() { - std::unique_ptr<SetApiKey::Params> params(SetApiKey::Params::Create(*args_)); - EXTENSION_FUNCTION_VALIDATE(params.get()); - - LOG(WARNING) << "copresence.setApiKey() is deprecated. " - << "Put the key in the manifest at copresence.api_key instead."; - - // The api key may be set to empty, to clear it. - CopresenceService::GetFactoryInstance()->Get(browser_context()) - ->set_api_key(extension_id(), params->api_key); - return RespondNow(NoArguments()); -} - -// CopresenceSetAuthTokenFunction implementation -ExtensionFunction::ResponseAction CopresenceSetAuthTokenFunction::Run() { - std::unique_ptr<SetAuthToken::Params> params( - SetAuthToken::Params::Create(*args_)); - EXTENSION_FUNCTION_VALIDATE(params.get()); - - // The token may be set to empty, to clear it. - CopresenceService::GetFactoryInstance()->Get(browser_context()) - ->set_auth_token(extension_id(), params->token); - return RespondNow(NoArguments()); -} - -} // namespace extensions
diff --git a/chrome/browser/extensions/api/copresence/copresence_api.h b/chrome/browser/extensions/api/copresence/copresence_api.h deleted file mode 100644 index c6cbdcd..0000000 --- a/chrome/browser/extensions/api/copresence/copresence_api.h +++ /dev/null
@@ -1,153 +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 CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ -#define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ - -#include <map> -#include <memory> -#include <string> -#include <vector> - -#include "base/macros.h" -#include "chrome/browser/extensions/api/copresence/copresence_translations.h" -#include "chrome/browser/extensions/chrome_extension_function.h" -#include "chrome/common/extensions/api/copresence.h" -#include "components/copresence/public/copresence_delegate.h" -#include "extensions/browser/browser_context_keyed_api_factory.h" - -class ChromeWhispernetClient; - -namespace audio_modem { -class WhispernetClient; -} - -namespace copresence { -class CopresenceManager; -} - -namespace gcm { -class GCMDriver; -} - -namespace user_prefs { -class PrefRegistrySyncable; -} - -namespace extensions { - -class CopresenceService final : public BrowserContextKeyedAPI, - public copresence::CopresenceDelegate { - public: - explicit CopresenceService(content::BrowserContext* context); - ~CopresenceService() override; - - // BrowserContextKeyedAPI implementation. - static const bool kServiceHasOwnInstanceInIncognito = true; - void Shutdown() override; - - // These accessors will always return an object (except during shutdown). - // If the object doesn't exist, they will create one first. - copresence::CopresenceManager* manager(); - - // A registry containing the app id's associated with every subscription. - SubscriptionToAppMap& apps_by_subscription_id() { - return apps_by_subscription_id_; - } - - std::string auth_token(const std::string& app_id) const; - - void set_api_key(const std::string& app_id, - const std::string& api_key); - - void set_auth_token(const std::string& app_id, - const std::string& token); - - // Delete all current copresence data, including stored device IDs. - void ResetState(); - - // Manager override for testing. - void set_manager_for_testing( - std::unique_ptr<copresence::CopresenceManager> manager); - - // Registers the preference for saving our device IDs. - static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); - - // BrowserContextKeyedAPI implementation. - static BrowserContextKeyedAPIFactory<CopresenceService>* GetFactoryInstance(); - - private: - friend class BrowserContextKeyedAPIFactory<CopresenceService>; - - // CopresenceDelegate implementation - void HandleMessages(const std::string& app_id, - const std::string& subscription_id, - const std::vector<copresence::Message>& message) override; - void HandleStatusUpdate(copresence::CopresenceStatus status) override; - net::URLRequestContextGetter* GetRequestContext() const override; - std::string GetPlatformVersionString() const override; - std::string GetAPIKey(const std::string& app_id) const override; - audio_modem::WhispernetClient* GetWhispernetClient() override; - gcm::GCMDriver* GetGCMDriver() override; - std::string GetDeviceId(bool authenticated) override; - void SaveDeviceId(bool authenticated, const std::string& device_id) override; - - // BrowserContextKeyedAPI implementation. - static const char* service_name() { return "CopresenceService"; } - - PrefService* GetPrefService(); - - bool is_shutting_down_; - content::BrowserContext* const browser_context_; - - std::map<std::string, std::string> apps_by_subscription_id_; - - std::map<std::string, std::string> api_keys_by_app_; - std::map<std::string, std::string> auth_tokens_by_app_; - - std::unique_ptr<audio_modem::WhispernetClient> whispernet_client_; - std::unique_ptr<copresence::CopresenceManager> manager_; - - DISALLOW_COPY_AND_ASSIGN(CopresenceService); -}; - -template <> -void BrowserContextKeyedAPIFactory< - CopresenceService>::DeclareFactoryDependencies(); - -class CopresenceExecuteFunction : public ChromeUIThreadExtensionFunction { - public: - DECLARE_EXTENSION_FUNCTION("copresence.execute", COPRESENCE_EXECUTE); - - protected: - ~CopresenceExecuteFunction() override {} - ExtensionFunction::ResponseAction Run() override; - - private: - void SendResult(copresence::CopresenceStatus status); -}; - -// TODO(ckehoe): Remove this function. -class CopresenceSetApiKeyFunction : public ChromeUIThreadExtensionFunction { - public: - DECLARE_EXTENSION_FUNCTION("copresence.setApiKey", COPRESENCE_SETAPIKEY); - - protected: - ~CopresenceSetApiKeyFunction() override {} - ExtensionFunction::ResponseAction Run() override; -}; - -class CopresenceSetAuthTokenFunction : public ChromeUIThreadExtensionFunction { - public: - DECLARE_EXTENSION_FUNCTION("copresence.setAuthToken", - COPRESENCE_SETAUTHTOKEN); - - protected: - ~CopresenceSetAuthTokenFunction() override {} - ExtensionFunction::ResponseAction Run() override; -}; - -} // namespace extensions - -#endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_
diff --git a/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc b/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc deleted file mode 100644 index eacfe7a..0000000 --- a/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc +++ /dev/null
@@ -1,301 +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 "chrome/browser/extensions/api/copresence/copresence_api.h" - -#include <utility> - -#include "base/json/json_writer.h" -#include "base/memory/ptr_util.h" -#include "base/values.h" -#include "chrome/browser/extensions/extension_api_unittest.h" -#include "chrome/browser/extensions/extension_function_test_utils.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/proto/rpcs.pb.h" -#include "components/copresence/public/copresence_manager.h" - -using base::ListValue; -using copresence::AUDIO_CONFIGURATION_AUDIBLE; -using copresence::AUDIO_CONFIGURATION_UNKNOWN; -using copresence::BROADCAST_ONLY; -using copresence::CopresenceDelegate; -using copresence::CopresenceManager; -using copresence::FAIL; -using copresence::PublishedMessage; -using copresence::ReportRequest; -using copresence::SCAN_ONLY; -using copresence::Subscription; -using google::protobuf::RepeatedPtrField; - -namespace test_utils = extension_function_test_utils; - -namespace extensions { - -using api::copresence::Message; -using api::copresence::Operation; -using api::copresence::PublishOperation; -using api::copresence::Strategy; -using api::copresence::SubscribeOperation; -using api::copresence::UnpublishOperation; -using api::copresence::UnsubscribeOperation; - - -PublishOperation* CreatePublish(const std::string& id) { - PublishOperation* publish = new PublishOperation; - - publish->id = id; - publish->time_to_live_millis.reset(new int(1000)); - publish->message.type = "joke"; - std::string payload("Knock Knock!"); - publish->message.payload.assign(payload.begin(), payload.end()); - - return publish; -} - -SubscribeOperation* CreateSubscribe(const std::string& id) { - SubscribeOperation* subscribe = new SubscribeOperation; - - subscribe->id = id; - subscribe->time_to_live_millis.reset(new int(1000)); - subscribe->filter.type = "joke"; - - return subscribe; -} - -template <typename T> -bool GetOnly(const RepeatedPtrField<T>& things, T* out) { - if (things.size() != 1) - return false; - - *out = things.Get(0); - return true; -} - -class FakeCopresenceManager : public CopresenceManager { - public: - explicit FakeCopresenceManager(CopresenceDelegate* delegate) - : delegate_(delegate) {} - ~FakeCopresenceManager() override {} - - // CopresenceManager overrides. - copresence::CopresenceState* state() override { - NOTREACHED(); - return nullptr; - } - void ExecuteReportRequest( - const ReportRequest& request, - const std::string& app_id, - const std::string& /* auth_token */, - const copresence::StatusCallback& status_callback) override { - request_ = request; - app_id_ = app_id; - status_callback.Run(copresence::SUCCESS); - } - - CopresenceDelegate* delegate_; - - ReportRequest request_; - std::string app_id_; -}; - -class CopresenceApiUnittest : public ExtensionApiUnittest { - public: - CopresenceApiUnittest() {} - ~CopresenceApiUnittest() override {} - - void SetUp() override { - ExtensionApiUnittest::SetUp(); - - CopresenceService* service = - CopresenceService::GetFactoryInstance()->Get(profile()); - copresence_manager_ = new FakeCopresenceManager(service); - service->set_manager_for_testing( - base::WrapUnique<CopresenceManager>(copresence_manager_)); - } - - // Takes ownership of the operation_list. - bool ExecuteOperations(ListValue* operation_list) { - std::unique_ptr<ListValue> args_list(new ListValue); - args_list->Append(operation_list); - - scoped_refptr<UIThreadExtensionFunction> function = - new CopresenceExecuteFunction; - function->set_extension(extension()); - function->set_browser_context(profile()); - function->set_has_callback(true); - test_utils::RunFunction(function.get(), std::move(args_list), browser(), - test_utils::NONE); - return function->GetResultList(); - } - - bool ExecuteOperation(std::unique_ptr<Operation> operation) { - ListValue* operation_list = new ListValue; - operation_list->Append(operation->ToValue()); - return ExecuteOperations(operation_list); - } - - const ReportRequest& request_sent() const { - return copresence_manager_->request_; - } - - const std::string& app_id_sent() const { - return copresence_manager_->app_id_; - } - - void clear_app_id() { - copresence_manager_->app_id_.clear(); - } - - CopresenceDelegate* delegate() { - return copresence_manager_->delegate_; - } - - protected: - FakeCopresenceManager* copresence_manager_; -}; - -TEST_F(CopresenceApiUnittest, Publish) { - std::unique_ptr<PublishOperation> publish(CreatePublish("pub")); - publish->strategies.reset(new Strategy); - publish->strategies->only_broadcast.reset(new bool(true)); // Default - - std::unique_ptr<Operation> operation(new Operation); - operation->publish = std::move(publish); - - clear_app_id(); - EXPECT_TRUE(ExecuteOperation(std::move(operation))); - EXPECT_EQ(extension()->id(), app_id_sent()); - - PublishedMessage message; - ASSERT_TRUE(GetOnly( - request_sent().manage_messages_request().message_to_publish(), &message)); - EXPECT_EQ("pub", message.id()); - EXPECT_EQ(1000, message.access_policy().ttl_millis()); - EXPECT_EQ(copresence::NO_ACL_CHECK, message.access_policy().acl().acl_type()); - EXPECT_EQ("joke", message.message().type().type()); - EXPECT_EQ("Knock Knock!", message.message().payload()); - EXPECT_EQ(BROADCAST_ONLY, - message.token_exchange_strategy().broadcast_scan_configuration()); - EXPECT_EQ(AUDIO_CONFIGURATION_UNKNOWN, - message.token_exchange_strategy().audio_configuration()); -} - -TEST_F(CopresenceApiUnittest, Subscribe) { - std::unique_ptr<SubscribeOperation> subscribe(CreateSubscribe("sub")); - subscribe->strategies.reset(new Strategy); - subscribe->strategies->only_broadcast.reset(new bool(true)); // Not default - subscribe->strategies->audible.reset(new bool(true)); // Not default - - std::unique_ptr<Operation> operation(new Operation); - operation->subscribe = std::move(subscribe); - - clear_app_id(); - EXPECT_TRUE(ExecuteOperation(std::move(operation))); - EXPECT_EQ(extension()->id(), app_id_sent()); - - Subscription subscription; - ASSERT_TRUE(GetOnly( - request_sent().manage_subscriptions_request().subscription(), - &subscription)); - EXPECT_EQ("sub", subscription.id()); - EXPECT_EQ(1000, subscription.ttl_millis()); - EXPECT_EQ("joke", subscription.message_type().type()); - copresence::BroadcastScanConfiguration broadcast_scan = - subscription.token_exchange_strategy().broadcast_scan_configuration(); - EXPECT_EQ(BROADCAST_ONLY, broadcast_scan); - EXPECT_EQ(AUDIO_CONFIGURATION_AUDIBLE, - subscription.token_exchange_strategy().audio_configuration()); -} - -TEST_F(CopresenceApiUnittest, DefaultStrategies) { - std::unique_ptr<Operation> publish_operation(new Operation); - publish_operation->publish.reset(CreatePublish("pub")); - - std::unique_ptr<Operation> subscribe_operation(new Operation); - subscribe_operation->subscribe.reset(CreateSubscribe("sub")); - - ListValue* operation_list = new ListValue; - operation_list->Append(publish_operation->ToValue()); - operation_list->Append(subscribe_operation->ToValue()); - EXPECT_TRUE(ExecuteOperations(operation_list)); - - EXPECT_EQ(BROADCAST_ONLY, - request_sent().manage_messages_request().message_to_publish(0) - .token_exchange_strategy().broadcast_scan_configuration()); - EXPECT_EQ(SCAN_ONLY, - request_sent().manage_subscriptions_request().subscription(0) - .token_exchange_strategy().broadcast_scan_configuration()); -} - -TEST_F(CopresenceApiUnittest, LowPowerStrategy) { - std::unique_ptr<Operation> subscribe_operation(new Operation); - subscribe_operation->subscribe.reset(CreateSubscribe("sub")); - subscribe_operation->subscribe->strategies.reset(new Strategy); - subscribe_operation->subscribe->strategies->low_power.reset(new bool(true)); - - ListValue* operation_list = new ListValue; - operation_list->Append(subscribe_operation->ToValue()); - EXPECT_TRUE(ExecuteOperations(operation_list)); - - EXPECT_EQ(copresence::BROADCAST_SCAN_CONFIGURATION_UNKNOWN, - request_sent().manage_subscriptions_request().subscription(0) - .token_exchange_strategy().broadcast_scan_configuration()); -} - -TEST_F(CopresenceApiUnittest, UnPubSub) { - // First we need to create a publish and a subscribe to cancel. - std::unique_ptr<Operation> publish_operation(new Operation); - std::unique_ptr<Operation> subscribe_operation(new Operation); - publish_operation->publish.reset(CreatePublish("pub")); - subscribe_operation->subscribe.reset(CreateSubscribe("sub")); - ListValue* operation_list = new ListValue; - operation_list->Append(publish_operation->ToValue()); - operation_list->Append(subscribe_operation->ToValue()); - EXPECT_TRUE(ExecuteOperations(operation_list)); - - std::unique_ptr<Operation> unpublish_operation(new Operation); - unpublish_operation->unpublish.reset(new UnpublishOperation); - unpublish_operation->unpublish->unpublish_id = "pub"; - - std::unique_ptr<Operation> unsubscribe_operation(new Operation); - unsubscribe_operation->unsubscribe.reset(new UnsubscribeOperation); - unsubscribe_operation->unsubscribe->unsubscribe_id = "sub"; - - operation_list = new ListValue; - operation_list->Append(unpublish_operation->ToValue()); - operation_list->Append(unsubscribe_operation->ToValue()); - EXPECT_TRUE(ExecuteOperations(operation_list)); - - std::string unpublish_id; - ASSERT_TRUE(GetOnly( - request_sent().manage_messages_request().id_to_unpublish(), - &unpublish_id)); - EXPECT_EQ("pub", unpublish_id); - - std::string unsubscribe_id; - ASSERT_TRUE(GetOnly( - request_sent().manage_subscriptions_request().id_to_unsubscribe(), - &unsubscribe_id)); - EXPECT_EQ("sub", unsubscribe_id); -} - -TEST_F(CopresenceApiUnittest, BadId) { - std::unique_ptr<Operation> unsubscribe_operation(new Operation); - unsubscribe_operation->unsubscribe.reset(new UnsubscribeOperation); - unsubscribe_operation->unsubscribe->unsubscribe_id = "invalid id"; - - EXPECT_FALSE(ExecuteOperation(std::move(unsubscribe_operation))); -} - -TEST_F(CopresenceApiUnittest, MultipleOperations) { - std::unique_ptr<Operation> multi_operation(new Operation); - multi_operation->publish.reset(CreatePublish("pub")); - multi_operation->subscribe.reset(CreateSubscribe("sub")); - - EXPECT_FALSE(ExecuteOperation(std::move(multi_operation))); -} - -} // namespace extensions - -// TODO(ckehoe): add tests for auth tokens and api key functionality
diff --git a/chrome/browser/extensions/api/copresence/copresence_translations.cc b/chrome/browser/extensions/api/copresence/copresence_translations.cc deleted file mode 100644 index 3537e2c..0000000 --- a/chrome/browser/extensions/api/copresence/copresence_translations.cc +++ /dev/null
@@ -1,234 +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 "chrome/browser/extensions/api/copresence/copresence_translations.h" - -#include "chrome/common/extensions/api/copresence.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/proto/enums.pb.h" -#include "components/copresence/proto/rpcs.pb.h" - -using copresence::AUDIO_CONFIGURATION_AUDIBLE; -using copresence::AUDIO_CONFIGURATION_UNKNOWN; -using copresence::BROADCAST_AND_SCAN; -using copresence::BROADCAST_ONLY; -using copresence::BROADCAST_SCAN_CONFIGURATION_UNKNOWN; -using copresence::BroadcastScanConfiguration; -using copresence::ReportRequest; -using copresence::SCAN_ONLY; -using copresence::TokenExchangeStrategy; - -using extensions::api::copresence::Strategy; - -namespace { - -const int kDefaultTimeToLiveMs = 5 * 60 * 1000; // 5 minutes. -const int kMaxTimeToLiveMs = 24 * 60 * 60 * 1000; // 24 hours. - -// Checks and returns the ttl provided by the user. If invalid, returns -1. -int SanitizeTtl(int* user_ttl) { - return !user_ttl - ? kDefaultTimeToLiveMs - : (*user_ttl <= 0 || *user_ttl > kMaxTimeToLiveMs ? -1 : *user_ttl); -} - -BroadcastScanConfiguration TranslateStrategy(const Strategy& strategy) { - bool only_broadcast = strategy.only_broadcast && *strategy.only_broadcast; - bool only_scan = strategy.only_scan && *strategy.only_scan; - - if (only_broadcast && only_scan) - return BROADCAST_AND_SCAN; - if (only_broadcast) - return BROADCAST_ONLY; - if (only_scan) - return SCAN_ONLY; - - return BROADCAST_SCAN_CONFIGURATION_UNKNOWN; -} - -// The strategy may be null (unspecified), so we pass it as a pointer. -void SetTokenExchangeStrategy(const Strategy* strategy, - BroadcastScanConfiguration default_config, - TokenExchangeStrategy* strategy_proto) { - if (strategy) { - BroadcastScanConfiguration config; - if (strategy->low_power && *(strategy->low_power)) { - config = BROADCAST_SCAN_CONFIGURATION_UNKNOWN; - } else { - config = TranslateStrategy(*strategy); - if (config == BROADCAST_SCAN_CONFIGURATION_UNKNOWN) - config = default_config; - } - - strategy_proto->set_broadcast_scan_configuration(config); - strategy_proto->set_audio_configuration( - strategy->audible && *strategy->audible ? AUDIO_CONFIGURATION_AUDIBLE - : AUDIO_CONFIGURATION_UNKNOWN); - } else { - strategy_proto->set_broadcast_scan_configuration(default_config); - strategy_proto->set_audio_configuration(AUDIO_CONFIGURATION_UNKNOWN); - } -} - -} // namespace - -namespace extensions { - -using api::copresence::Operation; - -// Adds a publish operation to the report request. Returns false if the -// publish operation was invalid. -bool AddPublishToRequest(const std::string& app_id, - const api::copresence::PublishOperation& publish, - ReportRequest* request) { - copresence::PublishedMessage* publish_proto = - request->mutable_manage_messages_request()->add_message_to_publish(); - publish_proto->mutable_access_policy()->mutable_acl()->set_acl_type( - copresence::NO_ACL_CHECK); - publish_proto->set_id(publish.id); - publish_proto->mutable_message()->mutable_type()->set_type( - publish.message.type); - publish_proto->mutable_message()->set_payload(publish.message.payload.data(), - publish.message.payload.size()); - - int ttl = SanitizeTtl(publish.time_to_live_millis.get()); - if (ttl < 0) - return false; - publish_proto->mutable_access_policy()->set_ttl_millis(ttl); - - SetTokenExchangeStrategy(publish.strategies.get(), - BROADCAST_ONLY, - publish_proto->mutable_token_exchange_strategy()); - - DVLOG(2) << "Publishing message of type " << publish.message.type << ":\n" - << std::string(publish.message.payload.begin(), - publish.message.payload.end()); - // TODO(ckehoe): Validate that required fields are non-empty, etc. - return true; -} - -// Adds an unpublish operation to the report request. Returns false if the -// publish id was invalid. -bool AddUnpublishToRequest(const std::string& publish_id, - ReportRequest* request) { - if (publish_id.empty()) - return false; - - request->mutable_manage_messages_request()->add_id_to_unpublish(publish_id); - DVLOG(2) << "Unpublishing message \"" << publish_id << "\""; - return true; -} - -// Adds a subscribe operation to the report request. Returns false if the -// subscription operation was invalid. -bool AddSubscribeToRequest( - const std::string& app_id, - const api::copresence::SubscribeOperation& subscription, - SubscriptionToAppMap* apps_by_subscription_id, - ReportRequest* request) { - // Associate the subscription id with the app id. - SubscriptionToAppMap::iterator previous_subscription = - apps_by_subscription_id->find(subscription.id); - if (previous_subscription == apps_by_subscription_id->end()) { - (*apps_by_subscription_id)[subscription.id] = app_id; - } else if (previous_subscription->second == app_id) { - VLOG(2) << "Overwriting subscription id \"" << subscription.id - << "\" for app \"" << app_id << "\""; - } else { - // A conflicting association exists already. - VLOG(1) << "Subscription id \"" << subscription.id - << "\" used by two apps: \"" << previous_subscription->second - << "\" and \"" << app_id << "\""; - return false; - } - - // Convert from IDL to server subscription format. - copresence::Subscription* subscription_proto = - request->mutable_manage_subscriptions_request()->add_subscription(); - subscription_proto->set_id(subscription.id); - int ttl = SanitizeTtl(subscription.time_to_live_millis.get()); - if (ttl < 0) - return false; - subscription_proto->set_ttl_millis(ttl); - - subscription_proto->mutable_message_type()->set_type( - subscription.filter.type); - - SetTokenExchangeStrategy( - subscription.strategies.get(), - SCAN_ONLY, - subscription_proto->mutable_token_exchange_strategy()); - - DVLOG(2) << "Subscribing for messages of type " << subscription.filter.type; - // TODO(ckehoe): Validate that required fields are non-empty, etc. - return true; -} - -// Adds an unpublish operation to the report request. Returns false if the -// subscription id was invalid. -bool AddUnsubscribeToRequest(const std::string& app_id, - const std::string& subscription_id, - SubscriptionToAppMap* apps_by_subscription_id, - ReportRequest* request) { - if (subscription_id.empty()) - return false; - - // Check that this subscription id belongs to this app. - SubscriptionToAppMap::iterator subscription = - apps_by_subscription_id->find(subscription_id); - if (subscription == apps_by_subscription_id->end()) { - LOG(ERROR) << "No such subscription \"" << subscription_id - << "\". Cannot unsubscribe."; - return false; - } else if (subscription->second != app_id) { - LOG(ERROR) << "Subscription \"" << subscription_id - << "\" does not belong to app \"" << app_id - << "\". Cannot unsubscribe."; - return false; - } else { - apps_by_subscription_id->erase(subscription); - } - - request->mutable_manage_subscriptions_request()->add_id_to_unsubscribe( - subscription_id); - DVLOG(2) << "Cancelling subscription \"" << subscription_id << "\" for app \"" - << app_id << "\""; - return true; -} - -bool PrepareReportRequestProto(const std::vector<Operation>& operations, - const std::string& app_id, - SubscriptionToAppMap* apps_by_subscription_id, - ReportRequest* request) { - for (const Operation& op : operations) { - // Verify our object has exactly one operation. - if (static_cast<int>(op.publish != nullptr) + - static_cast<int>(op.subscribe != nullptr) + - static_cast<int>(op.unpublish != nullptr) + - static_cast<int>(op.unsubscribe != nullptr) != - 1) { - return false; - } - - if (op.publish) { - if (!AddPublishToRequest(app_id, *(op.publish), request)) - return false; - } else if (op.subscribe) { - if (!AddSubscribeToRequest(app_id, *(op.subscribe), - apps_by_subscription_id, request)) - return false; - } else if (op.unpublish) { - if (!AddUnpublishToRequest(op.unpublish->unpublish_id, request)) - return false; - } else { // if (op.unsubscribe) - if (!AddUnsubscribeToRequest(app_id, op.unsubscribe->unsubscribe_id, - apps_by_subscription_id, request)) - return false; - } - } - - return true; -} - -} // namespace extensions
diff --git a/chrome/browser/extensions/api/copresence/copresence_translations.h b/chrome/browser/extensions/api/copresence/copresence_translations.h deleted file mode 100644 index 4903c62..0000000 --- a/chrome/browser/extensions/api/copresence/copresence_translations.h +++ /dev/null
@@ -1,43 +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 CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_TRANSLATIONS_H_ -#define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_TRANSLATIONS_H_ - -#include <map> -#include <string> -#include <vector> - -#include "base/macros.h" -#include "components/copresence/proto/enums.pb.h" - -namespace copresence { -class ReportRequest; -} - -namespace extensions { - -namespace api { -namespace copresence { -struct Operation; -struct PublishOperation; -struct SubscribeOperation; -} -} - -// A 1-1 map of of which app a subscription id belongs to. -// Key = subscription, value = app_id. -typedef std::map<std::string, std::string> SubscriptionToAppMap; - -// Returns report request protocol buffer containing all the operations in the -// given vector. If parsing any of the operations fails, we return false. -bool PrepareReportRequestProto( - const std::vector<api::copresence::Operation>& operations, - const std::string& app_id, - SubscriptionToAppMap* apps_by_subscription_id, - copresence::ReportRequest* request); - -} // namespace extensions - -#endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_TRANSLATIONS_H_
diff --git a/chrome/browser/extensions/api/declarative/declarative_apitest.cc b/chrome/browser/extensions/api/declarative/declarative_apitest.cc index 810b4df..68f7410 100644 --- a/chrome/browser/extensions/api/declarative/declarative_apitest.cc +++ b/chrome/browser/extensions/api/declarative/declarative_apitest.cc
@@ -123,7 +123,7 @@ base::Bind( &RulesRegistry::GetAllRules, rules_registry, extension_id, &rules)); scoped_refptr<base::ThreadTestHelper> io_helper(new base::ThreadTestHelper( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())); EXPECT_TRUE(io_helper->Run()); return rules.size(); }
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc index d28c49f..67d07b4 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc
@@ -173,10 +173,6 @@ #define MAYBE_ChooseDesktopMedia ChooseDesktopMedia #endif IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, MAYBE_ChooseDesktopMedia) { - // For tabshare, we need to turn on the flag. - base::CommandLine::ForCurrentProcess()->AppendSwitch( - extensions::switches::kEnableTabForDesktopShare); - // Each element in the following array corresponds to one test in // chrome/test/data/extensions/api_test/desktop_capture/test.js . TestFlags test_flags[] = {
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc index 82d24612..282cec5a 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
@@ -17,7 +17,6 @@ #include "chrome/browser/media/media_capture_devices_dispatcher.h" #include "chrome/browser/media/native_desktop_media_list.h" #include "chrome/browser/media/tab_desktop_media_list.h" -#include "chrome/common/channel_info.h" #include "components/version_info/version_info.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" @@ -98,20 +97,9 @@ break; case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_TAB: - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - extensions::switches::kEnableTabForDesktopShare)) { - show_tabs = true; - } else if (base::CommandLine::ForCurrentProcess()->HasSwitch( + if (!base::CommandLine::ForCurrentProcess()->HasSwitch( extensions::switches::kDisableTabForDesktopShare)) { - show_tabs = false; - } else { - const version_info::Channel channel = chrome::GetChannel(); - if ((channel == version_info::Channel::STABLE) || - (channel == version_info::Channel::BETA)) { - show_tabs = false; - } else { - show_tabs = true; - } + show_tabs = true; } break;
diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc index 30eac21..6f43b17 100644 --- a/chrome/browser/extensions/api/dial/dial_api.cc +++ b/chrome/browser/extensions/api/dial/dial_api.cc
@@ -39,7 +39,7 @@ DialAPI::DialAPI(Profile* profile) : RefcountedKeyedService( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)), profile_(profile) { EventRouter::Get(profile) ->RegisterObserver(this, dial::OnDeviceList::kEventName);
diff --git a/chrome/browser/extensions/api/gcd_private/privet_v3_context_getter_unittest.cc b/chrome/browser/extensions/api/gcd_private/privet_v3_context_getter_unittest.cc index 6d3d6cd9..a749c1a 100644 --- a/chrome/browser/extensions/api/gcd_private/privet_v3_context_getter_unittest.cc +++ b/chrome/browser/extensions/api/gcd_private/privet_v3_context_getter_unittest.cc
@@ -33,7 +33,7 @@ void SetUp() override { context_getter_ = new extensions::PrivetV3ContextGetter( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } void OnURLFetchComplete(const net::URLFetcher* source) override {
diff --git a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc index 8c6f945..22f12d8 100644 --- a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc +++ b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc
@@ -88,8 +88,7 @@ url_fetcher_->SetRequestContext(request_context_); url_fetcher_->SaveResponseToFileAtPath( - image_path_, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + image_path_, BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); AddCleanUpFunction( base::Bind(&WriteFromUrlOperation::DestroyUrlFetcher, this));
diff --git a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc index afb4639..ca70690 100644 --- a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc +++ b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc
@@ -77,7 +77,7 @@ // Turn on interception and set up our dummy file. get_interceptor_.reset(new GetInterceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); get_interceptor_->SetResponse(GURL(kTestImageUrl),
diff --git a/chrome/browser/extensions/api/management/management_browsertest.cc b/chrome/browser/extensions/api/management/management_browsertest.cc index 95651fa..d6a7c04 100644 --- a/chrome/browser/extensions/api/management/management_browsertest.cc +++ b/chrome/browser/extensions/api/management/management_browsertest.cc
@@ -292,7 +292,7 @@ // Note: This interceptor gets requests on the IO thread. net::LocalHostTestURLRequestInterceptor interceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); @@ -382,7 +382,7 @@ // Note: This interceptor gets requests on the IO thread. net::LocalHostTestURLRequestInterceptor interceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); @@ -451,7 +451,7 @@ // Note: This interceptor gets requests on the IO thread. net::LocalHostTestURLRequestInterceptor interceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); @@ -547,7 +547,7 @@ // Note: This interceptor gets requests on the IO thread. net::LocalHostTestURLRequestInterceptor interceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); @@ -628,7 +628,7 @@ // Note: This interceptor gets requests on the IO thread. net::LocalHostTestURLRequestInterceptor interceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
diff --git a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc index da51abd3..e31b1a2 100644 --- a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc +++ b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
@@ -100,11 +100,11 @@ std::unique_ptr<remoting::ChromotingHostContext> context = remoting::ChromotingHostContext::CreateForChromeOS( make_scoped_refptr(g_browser_process->system_request_context()), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE)); std::unique_ptr<NativeMessageHost> host( new remoting::It2MeNativeMessagingHost(std::move(context),
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.cc b/chrome/browser/extensions/api/messaging/native_message_process_host.cc index 681ec348..5921943 100644 --- a/chrome/browser/extensions/api/messaging/native_message_process_host.cc +++ b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
@@ -58,7 +58,7 @@ weak_factory_(this) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); }
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.cc b/chrome/browser/extensions/api/page_capture/page_capture_api.cc index e1c962c..1e7c549d 100644 --- a/chrome/browser/extensions/api/page_capture/page_capture_api.cc +++ b/chrome/browser/extensions/api/page_capture/page_capture_api.cc
@@ -106,10 +106,8 @@ // Setup a ShareableFileReference so the temporary file gets deleted // once it is no longer used. mhtml_file_ = ShareableFileReference::GetOrCreate( - mhtml_path_, - ShareableFileReference::DELETE_ON_FINAL_RELEASE, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) - .get()); + mhtml_path_, ShareableFileReference::DELETE_ON_FINAL_RELEASE, + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()); } BrowserThread::PostTask( BrowserThread::UI, FROM_HERE,
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc index 1e75bb5..861094c 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -833,6 +833,38 @@ EXPECT_EQ(i, ipc_sender_.sent_end()); } +// Tests the sanity of operator< (crbug.com/589735). +TEST_F(ExtensionWebRequestTest, AddAndRemoveListeners) { + std::string ext_id("abcdefghijklmnopabcdefghijklmnop"); + ExtensionWebRequestEventRouter::RequestFilter filter; + const std::string kEventName(web_request::OnBeforeRequest::kEventName); + const std::string kSubEventName = kEventName + "/1"; + base::WeakPtrFactory<TestIPCSender> ipc_sender_factory(&ipc_sender_); + + // Add two non-webview listeners. + ExtensionWebRequestEventRouter::GetInstance()->AddEventListener( + &profile_, ext_id, ext_id, events::FOR_TEST, kEventName, kSubEventName, + filter, 0, 1 /* embedder_process_id */, 0, + ipc_sender_factory.GetWeakPtr()); + ExtensionWebRequestEventRouter::GetInstance()->AddEventListener( + &profile_, ext_id, ext_id, events::FOR_TEST, kEventName, kSubEventName, + filter, 0, 2 /* embedder_process_id */, 0, + ipc_sender_factory.GetWeakPtr()); + + // Now remove the events without passing an explicit process ID. + ExtensionWebRequestEventRouter::GetInstance()->RemoveEventListener( + &profile_, ext_id, kSubEventName, 0 /* embedder_process_id */, 0); + EXPECT_EQ(1, + ExtensionWebRequestEventRouter::GetInstance()->GetListenerCountForTesting( + &profile_, kEventName)); + + ExtensionWebRequestEventRouter::GetInstance()->RemoveEventListener( + &profile_, ext_id, kSubEventName, 0 /* embedder_process_id */, 0); + EXPECT_EQ(0, + ExtensionWebRequestEventRouter::GetInstance()->GetListenerCountForTesting( + &profile_, kEventName)); +} + struct HeaderModificationTest_Header { const char* name; const char* value;
diff --git a/chrome/browser/extensions/event_router_forwarder_unittest.cc b/chrome/browser/extensions/event_router_forwarder_unittest.cc index aa420b82..1718e44 100644 --- a/chrome/browser/extensions/event_router_forwarder_unittest.cc +++ b/chrome/browser/extensions/event_router_forwarder_unittest.cc
@@ -185,7 +185,7 @@ // Wait for IO thread's message loop to be processed scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())); ASSERT_TRUE(helper->Run()); base::RunLoop().RunUntilIdle();
diff --git a/chrome/browser/extensions/extension_disabled_ui.cc b/chrome/browser/extensions/extension_disabled_ui.cc index 7497f9c..df3e03b 100644 --- a/chrome/browser/extensions/extension_disabled_ui.cc +++ b/chrome/browser/extensions/extension_disabled_ui.cc
@@ -297,11 +297,6 @@ PermissionMessages permission_warnings = extension_->permissions_data()->GetPermissionMessages(); if (is_remote_install_) { - messages.push_back(l10n_util::GetStringFUTF16( - extension_->is_app() - ? IDS_APP_DISABLED_REMOTE_INSTALL_ERROR_LABEL - : IDS_EXTENSION_DISABLED_REMOTE_INSTALL_ERROR_LABEL, - base::UTF8ToUTF16(extension_->name()))); if (!permission_warnings.empty()) messages.push_back( l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WILL_HAVE_ACCESS_TO));
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc index 4509ad6..7031282c 100644 --- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc +++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
@@ -233,7 +233,7 @@ // Note: This interceptor gets requests on the IO thread. net::LocalHostTestURLRequestInterceptor interceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); interceptor.SetResponseIgnoreQuery( @@ -273,7 +273,7 @@ // Note: This interceptor gets requests on the IO thread. net::LocalHostTestURLRequestInterceptor interceptor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); interceptor.SetResponseIgnoreQuery(
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc index 5544f4cb..3fec1246 100644 --- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc +++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -197,10 +197,10 @@ content::BrowserContext* context) { Profile* profile = Profile::FromBrowserContext(context); scoped_refptr<base::SequencedTaskRunner> ui_thread = - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI); scoped_refptr<base::SequencedTaskRunner> io_thread = - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); base::SequencedWorkerPool* worker_pool = content::BrowserThread::GetBlockingPool();
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index 4735bb1..fd3e8f36 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc
@@ -869,6 +869,12 @@ } const Extension* extension = GetInstalledExtension(extension_id); + + // Shared modules cannot be disabled, they are just resources used by other + // extensions, and are not user controlled. + if (extension && SharedModuleInfo::IsSharedModule(extension)) + return; + // |extension| can be nullptr if sync disables an extension that is not // installed yet. // EXTERNAL_COMPONENT extensions are not generally modifiable by users, but @@ -1420,6 +1426,18 @@ if (updater_) updater_->Start(); + // Enable any Shared Modules that incorrectly got disabled previously. + // This is temporary code to fix incorrect behavior from previous versions of + // Chrome and can be removed after several releases (perhaps M60). + extensions::ExtensionList to_enable; + for (const auto& extension : registry_->disabled_extensions()) { + if (SharedModuleInfo::IsSharedModule(extension.get())) + to_enable.push_back(extension); + } + for (const auto& extension : to_enable) { + EnableExtension(extension->id()); + } + OnBlacklistUpdated(); }
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index d3df70f1..471cd5d7 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -6776,6 +6776,36 @@ EXPECT_TRUE(ExtensionPrefs::Get(profile())->IsExtensionBlacklisted(id)); } +// Test that calls to disable Shared Modules do not work. +TEST_F(ExtensionServiceTest, CannotDisableSharedModules) { + InitializeEmptyExtensionService(); + std::unique_ptr<base::DictionaryValue> manifest = + extensions::DictionaryBuilder() + .Set("name", "Shared Module") + .Set("version", "1.0") + .Set("manifest_version", 2) + .Set("export", + extensions::DictionaryBuilder() + .Set("resources", + extensions::ListBuilder().Append("foo.js").Build()) + .Build()) + .Build(); + + scoped_refptr<Extension> extension = extensions::ExtensionBuilder() + .SetManifest(std::move(manifest)) + .AddFlags(Extension::FROM_WEBSTORE) + .Build(); + + service()->OnExtensionInstalled(extension.get(), syncer::StringOrdinal(), + extensions::kInstallFlagInstallImmediately); + + ASSERT_TRUE(registry()->enabled_extensions().Contains(extension->id())); + // Try to disable the extension. + service()->DisableExtension(extension->id(), Extension::DISABLE_USER_ACTION); + // Shared Module should still be enabled. + EXPECT_TRUE(registry()->enabled_extensions().Contains(extension->id())); +} + // Make sure we can uninstall a blacklisted extension TEST_F(ExtensionServiceTest, UninstallBlacklistedExtension) { InitializeGoodInstalledExtensionService();
diff --git a/chrome/browser/extensions/extension_special_storage_policy.cc b/chrome/browser/extensions/extension_special_storage_policy.cc index a45cb9d..07ac1465 100644 --- a/chrome/browser/extensions/extension_special_storage_policy.cc +++ b/chrome/browser/extensions/extension_special_storage_policy.cc
@@ -69,11 +69,9 @@ // cannot ask for any more temporary storage, according to // https://developers.google.com/chrome/whitepapers/storage. BrowserThread::PostAfterStartupTask( - FROM_HERE, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + FROM_HERE, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), base::Bind(&storage::QuotaManager::GetUsageAndQuotaForWebApps, - partition->GetQuotaManager(), - launch_url, + partition->GetQuotaManager(), launch_url, storage::kStorageTypePersistent, base::Bind(&ReportQuotaUsage))); }
diff --git a/chrome/browser/extensions/startup_helper.cc b/chrome/browser/extensions/startup_helper.cc index 4b5a94bf..b4e9a61 100644 --- a/chrome/browser/extensions/startup_helper.cc +++ b/chrome/browser/extensions/startup_helper.cc
@@ -131,7 +131,7 @@ void StartOnFileThread() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); scoped_refptr<SandboxedUnpacker> unpacker(new SandboxedUnpacker( Manifest::INTERNAL, 0, /* no special creation flags */
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc index 7f66c06..8fdfb7b 100644 --- a/chrome/browser/extensions/tab_helper.cc +++ b/chrome/browser/extensions/tab_helper.cc
@@ -82,7 +82,7 @@ InlineInstallObserver(TabHelper* tab_helper, content::BrowserContext* browser_context, int routing_id, - const std::string& extension_id, + const ExtensionId& extension_id, bool observe_download_progress, bool observe_install_stage) : tab_helper_(tab_helper), @@ -102,24 +102,24 @@ private: // InstallObserver: - void OnBeginExtensionDownload(const std::string& extension_id) override { + void OnBeginExtensionDownload(const ExtensionId& extension_id) override { SendInstallStageChangedMessage(extension_id, api::webstore::INSTALL_STAGE_DOWNLOADING); } - void OnDownloadProgress(const std::string& extension_id, + void OnDownloadProgress(const ExtensionId& extension_id, int percent_downloaded) override { if (observe_download_progress_ && extension_id == extension_id_) { tab_helper_->Send(new ExtensionMsg_InlineInstallDownloadProgress( routing_id_, percent_downloaded)); } } - void OnBeginCrxInstall(const std::string& extension_id) override { + void OnBeginCrxInstall(const ExtensionId& extension_id) override { SendInstallStageChangedMessage(extension_id, api::webstore::INSTALL_STAGE_INSTALLING); } void OnShutdown() override { install_observer_.RemoveAll(); } - void SendInstallStageChangedMessage(const std::string& extension_id, + void SendInstallStageChangedMessage(const ExtensionId& extension_id, api::webstore::InstallStage stage) { if (observe_install_stage_ && extension_id == extension_id_) { tab_helper_->Send( @@ -134,7 +134,7 @@ int routing_id_; // The id of the extension to observe. - std::string extension_id_; + ExtensionId extension_id_; // Whether or not to observe download/install progress. const bool observe_download_progress_; @@ -258,13 +258,13 @@ content::NotificationService::NoDetails()); } -void TabHelper::SetExtensionAppById(const std::string& extension_app_id) { +void TabHelper::SetExtensionAppById(const ExtensionId& extension_app_id) { const Extension* extension = GetExtension(extension_app_id); if (extension) SetExtensionApp(extension); } -void TabHelper::SetExtensionAppIconById(const std::string& extension_app_id) { +void TabHelper::SetExtensionAppIconById(const ExtensionId& extension_app_id) { const Extension* extension = GetExtension(extension_app_id); if (extension) UpdateExtensionAppIcon(extension); @@ -530,7 +530,7 @@ OnScriptsExecuted(web_contents(), executing_scripts_map, on_url)); } -const Extension* TabHelper::GetExtension(const std::string& extension_app_id) { +const Extension* TabHelper::GetExtension(const ExtensionId& extension_app_id) { if (extension_app_id.empty()) return NULL; @@ -582,7 +582,7 @@ void TabHelper::OnReenableComplete(int install_id, int return_route_id, - const std::string& extension_id, + const ExtensionId& extension_id, ExtensionReenabler::ReenableResult result) { // Map the re-enable results to webstore-install results. webstore_install::Result webstore_result = webstore_install::SUCCESS; @@ -614,7 +614,7 @@ void TabHelper::OnInlineInstallComplete(int install_id, int return_route_id, - const std::string& extension_id, + const ExtensionId& extension_id, bool success, const std::string& error, webstore_install::Result result) {
diff --git a/chrome/browser/extensions/tab_helper.h b/chrome/browser/extensions/tab_helper.h index 6a79054..a392070 100644 --- a/chrome/browser/extensions/tab_helper.h +++ b/chrome/browser/extensions/tab_helper.h
@@ -26,6 +26,7 @@ #include "extensions/browser/extension_registry_observer.h" #include "extensions/browser/script_execution_observer.h" #include "extensions/browser/script_executor.h" +#include "extensions/common/extension_id.h" #include "extensions/common/stack_frame.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -82,10 +83,10 @@ // Convenience for setting the app extension by id. This does nothing if // |extension_app_id| is empty, or an extension can't be found given the // specified id. - void SetExtensionAppById(const std::string& extension_app_id); + void SetExtensionAppById(const ExtensionId& extension_app_id); // Set just the app icon, used by panels created by an extension. - void SetExtensionAppIconById(const std::string& extension_app_id); + void SetExtensionAppIconById(const ExtensionId& extension_app_id); const Extension* extension_app() const { return extension_app_; } bool is_app() const { return extension_app_ != NULL; } @@ -193,14 +194,14 @@ // the extension's image asynchronously. void UpdateExtensionAppIcon(const Extension* extension); - const Extension* GetExtension(const std::string& extension_app_id); + const Extension* GetExtension(const ExtensionId& extension_app_id); void OnImageLoaded(const gfx::Image& image); // WebstoreStandaloneInstaller::Callback. void OnInlineInstallComplete(int install_id, int return_route_id, - const std::string& extension_id, + const ExtensionId& extension_id, bool success, const std::string& error, webstore_install::Result result); @@ -208,7 +209,7 @@ // ExtensionReenabler::Callback. void OnReenableComplete(int install_id, int return_route_id, - const std::string& extension_id, + const ExtensionId& extension_id, ExtensionReenabler::ReenableResult result); // content::NotificationObserver. @@ -274,13 +275,13 @@ ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> registry_observer_; - // Map of extension id -> InlineInstallObserver for inline installations that - // have progress listeners. - std::map<std::string, std::unique_ptr<InlineInstallObserver>> + // Map of InlineInstallObservers for inline installations that have progress + // listeners. + std::map<ExtensionId, std::unique_ptr<InlineInstallObserver>> install_observers_; // The set of extension ids that are currently being installed. - std::set<std::string> pending_inline_installations_; + std::set<ExtensionId> pending_inline_installations_; // Vend weak pointers that can be invalidated to stop in-progress loads. base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_;
diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc index 66cdfbc..9999edc 100644 --- a/chrome/browser/history/top_sites_factory.cc +++ b/chrome/browser/history/top_sites_factory.cc
@@ -104,7 +104,7 @@ profile, ServiceAccessType::EXPLICIT_ACCESS), prepopulated_page_list, base::Bind(CanAddURLToHistory))); top_sites->Init(context->GetPath().Append(history::kTopSitesFilename), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB)); return top_sites; }
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc index 7e0c4fd9..61fce7a 100644 --- a/chrome/browser/importer/external_process_importer_client.cc +++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -310,9 +310,10 @@ void ExternalProcessImporterClient::StartProcessOnIOThread( BrowserThread::ID thread_id) { - utility_process_host_ = UtilityProcessHost::Create( - this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get()) - ->AsWeakPtr(); + utility_process_host_ = + UtilityProcessHost::Create( + this, BrowserThread::GetTaskRunnerForThread(thread_id).get()) + ->AsWeakPtr(); utility_process_host_->SetName(l10n_util::GetStringUTF16( IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME)); utility_process_host_->DisableSandbox();
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 2573e976..33ee5ea4 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc
@@ -264,8 +264,7 @@ IOThread* io_thread) : io_thread_(io_thread), network_task_runner_( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)) { -} + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)) {} SystemURLRequestContextGetter::~SystemURLRequestContextGetter() {} @@ -311,12 +310,11 @@ extension_event_router_forwarder_(extension_event_router_forwarder), #endif globals_(NULL), - is_spdy_allowed_by_policy_(true), is_quic_allowed_by_policy_(true), creation_time_(base::TimeTicks::Now()), weak_factory_(this) { scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); auth_schemes_ = local_state->GetString(prefs::kAuthSchemes); negotiate_disable_cname_lookup_.Init( prefs::kDisableAuthNegotiateCnameLookup, local_state, @@ -358,7 +356,7 @@ ssl_config_service_manager_.reset( ssl_config::SSLConfigServiceManager::CreateDefaultManager( local_state, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); base::Value* dns_client_enabled_default = new base::FundamentalValue( chrome_browser_net::ConfigureAsyncDnsFieldTrial()); @@ -381,12 +379,6 @@ local_state); pac_https_url_stripping_enabled_.MoveToThread(io_thread_proxy); - is_spdy_allowed_by_policy_ = - policy_service - ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, - std::string())) - .Get(policy::key::kDisableSpdy) == nullptr; - const base::Value* value = policy_service->GetPolicies( policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string())).GetValue(policy::key::kQuicAllowed); @@ -468,7 +460,7 @@ if (!ssl_keylog_file.empty()) { net::SSLClientSocket::SetSSLKeyLogFile( ssl_keylog_file, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); } DCHECK(!globals_); @@ -511,8 +503,8 @@ globals_->external_data_use_observer.reset( new chrome::android::ExternalDataUseObserver( globals_->data_use_aggregator.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); #endif globals_->system_network_delegate = std::move(chrome_network_delegate); @@ -635,8 +627,7 @@ quic_user_agent_id.push_back(' '); quic_user_agent_id.append(content::BuildOSCpuInfo()); network_session_configurator::ParseFieldTrialsAndCommandLine( - is_spdy_allowed_by_policy_, is_quic_allowed_by_policy_, - quic_user_agent_id, ¶ms_); + is_quic_allowed_by_policy_, quic_user_agent_id, ¶ms_); bool always_enable_tfo_if_supported = command_line.HasSwitch(switches::kEnableTcpFastOpen);
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index dd780b8c..c63fa3e2 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h
@@ -374,9 +374,6 @@ scoped_refptr<net::URLRequestContextGetter> system_url_request_context_getter_; - // True if SPDY is allowed by policy. - bool is_spdy_allowed_by_policy_; - // True if QUIC is allowed by policy. bool is_quic_allowed_by_policy_;
diff --git a/chrome/browser/local_discovery/service_discovery_client_mdns.cc b/chrome/browser/local_discovery/service_discovery_client_mdns.cc index 2333b32..cefff6c 100644 --- a/chrome/browser/local_discovery/service_discovery_client_mdns.cc +++ b/chrome/browser/local_discovery/service_discovery_client_mdns.cc
@@ -326,8 +326,7 @@ } // namespace ServiceDiscoveryClientMdns::ServiceDiscoveryClientMdns() - : mdns_runner_( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)), + : mdns_runner_(BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)), restart_attempts_(0), need_dalay_mdns_tasks_(true), weak_ptr_factory_(this) {
diff --git a/chrome/browser/media/cast_transport_host_filter.cc b/chrome/browser/media/cast_transport_host_filter.cc index 3e91f41..a4bf0f1 100644 --- a/chrome/browser/media/cast_transport_host_filter.cc +++ b/chrome/browser/media/cast_transport_host_filter.cc
@@ -153,9 +153,9 @@ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, device::PowerSaveBlocker::kReasonOther, "Cast is streaming content to a remote receiver", - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE))); }
diff --git a/chrome/browser/media/webrtc_apprtc_browsertest.cc b/chrome/browser/media/webrtc_apprtc_browsertest.cc index 4821d4e..0af80d4 100644 --- a/chrome/browser/media/webrtc_apprtc_browsertest.cc +++ b/chrome/browser/media/webrtc_apprtc_browsertest.cc
@@ -270,7 +270,8 @@ } #if defined(OS_LINUX) -#define MAYBE_MANUAL_FirefoxApprtcInteropTest MANUAL_FirefoxApprtcInteropTest +// So-far unexplained breakage only on bots: http:/crbug.com/626556. +#define MAYBE_MANUAL_FirefoxApprtcInteropTest DISABLED_MANUAL_FirefoxApprtcInteropTest #else // Not implemented yet on Windows and Mac. #define MAYBE_MANUAL_FirefoxApprtcInteropTest DISABLED_MANUAL_FirefoxApprtcInteropTest
diff --git a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc index c599d16..03c0156 100644 --- a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc +++ b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc
@@ -60,7 +60,7 @@ DCHECK_EQ(INITIAL_STATE, parser_state_); scoped_refptr<base::SingleThreadTaskRunner> task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); utility_process_host_ = UtilityProcessHost::Create(this, task_runner.get())->AsWeakPtr(); utility_process_host_->SetName(l10n_util::GetStringUTF16(
diff --git a/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc b/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc index 0533edb..4a242e1 100644 --- a/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc +++ b/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc
@@ -65,10 +65,10 @@ DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_EQ(INITIAL_STATE, parser_state_); - utility_process_host_ = content::UtilityProcessHost::Create( - this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()) - ->AsWeakPtr(); + utility_process_host_ = + content::UtilityProcessHost::Create( + this, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get()) + ->AsWeakPtr(); utility_process_host_->SetName(l10n_util::GetStringUTF16( IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME));
diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc b/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc index 8d49f83..55f4d8f 100644 --- a/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc +++ b/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
@@ -70,7 +70,7 @@ : got_results_(false), expect_unhashed_value_(GetParam()), provider_(new AntiVirusMetricsProvider( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE))), thread_bundle_(content::TestBrowserThreadBundle::REAL_FILE_THREAD), weak_ptr_factory_(this) {}
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc index 867b96791..854cccb 100644 --- a/chrome/browser/metrics/chrome_metrics_service_client.cc +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -440,7 +440,7 @@ metrics_state_manager_->IsMetricsReportingEnabled())); drive_metrics_provider_ = new metrics::DriveMetricsProvider( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), chrome::FILE_LOCAL_STATE); metrics_service_->RegisterMetricsProvider(
diff --git a/chrome/browser/metrics/leak_detector/leak_detector_controller.cc b/chrome/browser/metrics/leak_detector/leak_detector_controller.cc index 9f36c5d..a95597b 100644 --- a/chrome/browser/metrics/leak_detector/leak_detector_controller.cc +++ b/chrome/browser/metrics/leak_detector/leak_detector_controller.cc
@@ -94,7 +94,7 @@ detector->AddObserver(this); // Leak detector parameters are stored in |params_|. - detector->Init(params_, content::BrowserThread::GetMessageLoopProxyForThread( + detector->Init(params_, content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI)); }
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index e4eb8f3..84a00ae 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc
@@ -39,8 +39,7 @@ ThreadWatcher::ThreadWatcher(const WatchingParams& params) : thread_id_(params.thread_id), thread_name_(params.thread_name), - watched_runner_( - BrowserThread::GetMessageLoopProxyForThread(params.thread_id)), + watched_runner_(BrowserThread::GetTaskRunnerForThread(params.thread_id)), sleep_time_(params.sleep_time), unresponsive_time_(params.unresponsive_time), ping_time_(base::TimeTicks::Now()),
diff --git a/chrome/browser/net/chrome_http_user_agent_settings.cc b/chrome/browser/net/chrome_http_user_agent_settings.cc index e380322..25e3c7d 100644 --- a/chrome/browser/net/chrome_http_user_agent_settings.cc +++ b/chrome/browser/net/chrome_http_user_agent_settings.cc
@@ -17,7 +17,7 @@ last_http_accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader(last_pref_accept_language_); pref_accept_language_.MoveToThread( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)); }
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index 7df2649..82c7d49 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -63,8 +63,7 @@ #if BUILDFLAG(ANDROID_JAVA_UI) #include "chrome/browser/io_thread.h" -#include "chrome/browser/precache/precache_manager_factory.h" -#include "components/precache/content/precache_manager.h" +#include "chrome/browser/precache/precache_util.h" #endif #if defined(OS_CHROMEOS) @@ -107,31 +106,6 @@ callback.Run(rv); } -#if BUILDFLAG(ANDROID_JAVA_UI) -void RecordPrecacheStatsOnUIThread(const GURL& url, - const GURL& referrer, - base::TimeDelta latency, - const base::Time& fetch_time, - int64_t size, - bool was_cached, - void* profile_id) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - - if (!g_browser_process->profile_manager()->IsValidProfile(profile_id)) - return; - Profile* profile = reinterpret_cast<Profile*>(profile_id); - - precache::PrecacheManager* precache_manager = - precache::PrecacheManagerFactory::GetForBrowserContext(profile); - // |precache_manager| could be NULL if the profile is off the record. - if (!precache_manager || !precache_manager->IsPrecachingAllowed()) - return; - - precache_manager->RecordStatsForFetch(url, referrer, latency, fetch_time, - size, was_cached); -} -#endif // BUILDFLAG(ANDROID_JAVA_UI) - void ReportInvalidReferrerSendOnUI() { base::RecordAction( base::UserMetricsAction("Net.URLRequest_StartJob_InvalidReferrer")); @@ -341,27 +315,27 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); enable_referrers->Init(prefs::kEnableReferrers, pref_service); enable_referrers->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); if (enable_do_not_track) { enable_do_not_track->Init(prefs::kEnableDoNotTrack, pref_service); enable_do_not_track->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } if (force_google_safe_search) { force_google_safe_search->Init(prefs::kForceGoogleSafeSearch, pref_service); force_google_safe_search->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } if (force_youtube_safety_mode) { force_youtube_safety_mode->Init(prefs::kForceYouTubeSafetyMode, pref_service); force_youtube_safety_mode->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } if (allowed_domains_for_apps) { allowed_domains_for_apps->Init(prefs::kAllowedDomainsForApps, pref_service); allowed_domains_for_apps->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } } @@ -529,20 +503,7 @@ if (request->status().status() == net::URLRequestStatus::SUCCESS) { #if BUILDFLAG(ANDROID_JAVA_UI) - // For better accuracy, we use the actual bytes read instead of the length - // specified with the Content-Length header, which may be inaccurate, - // or missing, as is the case with chunked encoding. - int64_t received_content_length = - request->received_response_content_length(); - base::TimeDelta latency = base::TimeTicks::Now() - request->creation_time(); - - // Record precache metrics when a fetch is completed successfully, if - // precaching is allowed. - BrowserThread::PostTask( - BrowserThread::UI, FROM_HERE, - base::Bind(&RecordPrecacheStatsOnUIThread, request->url(), - GURL(request->referrer()), latency, base::Time::Now(), - received_content_length, request->was_cached(), profile_)); + precache::UpdatePrecacheMetricsAndState(request, profile_); #endif // BUILDFLAG(ANDROID_JAVA_UI) extensions_delegate_->OnCompleted(request, started); } else if (request->status().status() == net::URLRequestStatus::FAILED ||
diff --git a/chrome/browser/net/chrome_url_request_context_getter.cc b/chrome/browser/net/chrome_url_request_context_getter.cc index 0144ce8..e95e09eb 100644 --- a/chrome/browser/net/chrome_url_request_context_getter.cc +++ b/chrome/browser/net/chrome_url_request_context_getter.cc
@@ -206,7 +206,7 @@ scoped_refptr<base::SingleThreadTaskRunner> ChromeURLRequestContextGetter::GetNetworkTaskRunner() const { - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } // static
diff --git a/chrome/browser/net/chrome_url_request_context_getter.h b/chrome/browser/net/chrome_url_request_context_getter.h index 9193a41..d0337fe 100644 --- a/chrome/browser/net/chrome_url_request_context_getter.h +++ b/chrome/browser/net/chrome_url_request_context_getter.h
@@ -35,7 +35,7 @@ // Note that GetURLRequestContext() can only be called from the IO // thread (it will assert otherwise). - // GetIOMessageLoopProxy however can be called from any thread. + // GetIOTaskRunner however can be called from any thread. // // net::URLRequestContextGetter implementation. net::URLRequestContext* GetURLRequestContext() override;
diff --git a/chrome/browser/net/file_downloader.cc b/chrome/browser/net/file_downloader.cc index 2f7d044..aa57047 100644 --- a/chrome/browser/net/file_downloader.cc +++ b/chrome/browser/net/file_downloader.cc
@@ -33,7 +33,7 @@ net::LOAD_DO_NOT_SAVE_COOKIES); fetcher_->SetAutomaticallyRetryOnNetworkChanges(kNumRetries); fetcher_->SaveResponseToTemporaryFile( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); if (overwrite) { fetcher_->Start();
diff --git a/chrome/browser/net/http_server_properties_manager_factory.cc b/chrome/browser/net/http_server_properties_manager_factory.cc index 4454c59..aa22ac3 100644 --- a/chrome/browser/net/http_server_properties_manager_factory.cc +++ b/chrome/browser/net/http_server_properties_manager_factory.cc
@@ -63,7 +63,7 @@ using content::BrowserThread; return new net::HttpServerPropertiesManager( new PrefServiceAdapter(pref_service), // Transfers ownership. - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } /* static */
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc index c67427c..9197793e 100644 --- a/chrome/browser/net/proxy_service_factory.cc +++ b/chrome/browser/net/proxy_service_factory.cc
@@ -76,8 +76,8 @@ // that code be moved to chrome/browser instead of being in net, so that it // can use BrowserThread instead of raw MessageLoop pointers? See bug 25354. base_service = net::ProxyService::CreateSystemProxyConfigService( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); #endif // !defined(OS_CHROMEOS) return tracker->CreateTrackingProxyConfigService(std::move(base_service)); @@ -92,8 +92,7 @@ return new chromeos::ProxyConfigServiceImpl(profile_prefs, local_state_prefs); #else return new PrefProxyConfigTrackerImpl( - profile_prefs, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + profile_prefs, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); #endif // defined(OS_CHROMEOS) } @@ -106,7 +105,7 @@ #else return new PrefProxyConfigTrackerImpl( local_state_prefs, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); #endif // defined(OS_CHROMEOS) }
diff --git a/chrome/browser/notifications/message_center_display_service.cc b/chrome/browser/notifications/message_center_display_service.cc index 8dc7420c..34beeab 100644 --- a/chrome/browser/notifications/message_center_display_service.cc +++ b/chrome/browser/notifications/message_center_display_service.cc
@@ -15,12 +15,19 @@ MessageCenterDisplayService::~MessageCenterDisplayService() {} -void MessageCenterDisplayService::Display(const std::string& notification_id, - const Notification& notification) { +void MessageCenterDisplayService::Display( + NotificationCommon::Type notification_type, + const std::string& notification_id, + const Notification& notification) { + // TODO(miguelg): MCDS should stop relying on the |notification|'s delegate + // for Close/Click operations once the Notification object becomes a mojom + // type. ui_manager_->Add(notification, profile_); } -void MessageCenterDisplayService::Close(const std::string& notification_id) { +void MessageCenterDisplayService::Close( + NotificationCommon::Type notification_type, + const std::string& notification_id) { ui_manager_->CancelById(notification_id, NotificationUIManager::GetProfileID(profile_)); }
diff --git a/chrome/browser/notifications/message_center_display_service.h b/chrome/browser/notifications/message_center_display_service.h index bbe9063..83ba314e 100644 --- a/chrome/browser/notifications/message_center_display_service.h +++ b/chrome/browser/notifications/message_center_display_service.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_DISPLAY_SERVICE_H_ #include "base/macros.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_display_service.h" class Notification; @@ -21,9 +22,11 @@ ~MessageCenterDisplayService() override; // NotificationDisplayService implementation. - void Display(const std::string& notification_id, + void Display(NotificationCommon::Type notification_type, + const std::string& notification_id, const Notification& notification) override; - void Close(const std::string& notification_id) override; + void Close(NotificationCommon::Type notification_type, + const std::string& notification_id) override; bool GetDisplayed(std::set<std::string>* notifications) const override; bool SupportsNotificationCenter() const override;
diff --git a/chrome/browser/notifications/native_notification_display_service.cc b/chrome/browser/notifications/native_notification_display_service.cc index 64f71b0..dbe6025 100644 --- a/chrome/browser/notifications/native_notification_display_service.cc +++ b/chrome/browser/notifications/native_notification_display_service.cc
@@ -4,9 +4,14 @@ #include "chrome/browser/notifications/native_notification_display_service.h" +#include "base/memory/ptr_util.h" #include "base/strings/utf_string_conversions.h" +#include "chrome/browser/notifications/non_persistent_notification_handler.h" #include "chrome/browser/notifications/notification.h" +#include "chrome/browser/notifications/notification_delegate.h" +#include "chrome/browser/notifications/notification_handler.h" #include "chrome/browser/notifications/notification_platform_bridge.h" +#include "chrome/browser/notifications/persistent_notification_handler.h" #include "chrome/browser/profiles/profile.h" namespace { @@ -29,21 +34,38 @@ : profile_(profile), notification_bridge_(notification_bridge) { DCHECK(profile_); DCHECK(notification_bridge_); + + AddNotificationHandler(NotificationCommon::NON_PERSISTENT, + base::MakeUnique<NonPersistentNotificationHandler>()); + AddNotificationHandler(NotificationCommon::PERSISTENT, + base::MakeUnique<PersistentNotificationHandler>()); } NativeNotificationDisplayService::~NativeNotificationDisplayService() {} void NativeNotificationDisplayService::Display( + NotificationCommon::Type notification_type, const std::string& notification_id, const Notification& notification) { - notification_bridge_->Display(notification_id, GetProfileId(profile_), + notification_bridge_->Display(notification_type, notification_id, + GetProfileId(profile_), profile_->IsOffTheRecord(), notification); notification.delegate()->Display(); + NotificationHandler* handler = GetNotificationHandler(notification_type); + handler->RegisterNotification(notification_id, notification.delegate()); } void NativeNotificationDisplayService::Close( + NotificationCommon::Type notification_type, const std::string& notification_id) { + NotificationHandler* handler = GetNotificationHandler(notification_type); notification_bridge_->Close(GetProfileId(profile_), notification_id); + + // TODO(miguelg): Figure out something better here, passing an empty + // origin works because only non persistent notifications care about + // this method for JS generated close calls and they don't require + // the origin. + handler->OnClose(profile_, "", notification_id, false /* by user */); } bool NativeNotificationDisplayService::GetDisplayed( @@ -52,6 +74,48 @@ GetProfileId(profile_), profile_->IsOffTheRecord(), notifications); } +void NativeNotificationDisplayService::ProcessNotificationOperation( + NotificationCommon::Operation operation, + NotificationCommon::Type notification_type, + const std::string& origin, + const std::string& notification_id, + int action_index) { + NotificationHandler* handler = GetNotificationHandler(notification_type); + CHECK(handler); + switch (operation) { + case NotificationCommon::CLICK: + handler->OnClick(profile_, origin, notification_id, action_index); + break; + case NotificationCommon::CLOSE: + handler->OnClose(profile_, origin, notification_id, true /* by_user */); + break; + case NotificationCommon::SETTINGS: + handler->OpenSettings(profile_); + break; + } +} + +void NativeNotificationDisplayService::AddNotificationHandler( + NotificationCommon::Type notification_type, + std::unique_ptr<NotificationHandler> handler) { + DCHECK(handler); + DCHECK_EQ(notification_handlers_.count(notification_type), 0u); + notification_handlers_[notification_type] = std::move(handler); +} + +void NativeNotificationDisplayService::RemoveNotificationHandler( + NotificationCommon::Type notification_type) { + notification_handlers_.erase(notification_type); +} + +NotificationHandler* NativeNotificationDisplayService::GetNotificationHandler( + NotificationCommon::Type notification_type) { + DCHECK(notification_handlers_.find(notification_type) != + notification_handlers_.end()) + << notification_type << " is not registered."; + return notification_handlers_[notification_type].get(); +} + bool NativeNotificationDisplayService::SupportsNotificationCenter() const { return notification_bridge_->SupportsNotificationCenter(); }
diff --git a/chrome/browser/notifications/native_notification_display_service.h b/chrome/browser/notifications/native_notification_display_service.h index 37989383..afa6f7c 100644 --- a/chrome/browser/notifications/native_notification_display_service.h +++ b/chrome/browser/notifications/native_notification_display_service.h
@@ -5,12 +5,17 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ #define CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ +#include <map> +#include <memory> #include <set> #include <string> + #include "base/macros.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_display_service.h" class Notification; +class NotificationHandler; class NotificationPlatformBridge; class Profile; @@ -24,15 +29,37 @@ ~NativeNotificationDisplayService() override; // NotificationDisplayService implementation. - void Display(const std::string& notification_id, + void Display(NotificationCommon::Type notification_type, + const std::string& notification_id, const Notification& notification) override; - void Close(const std::string& notification_id) override; + void Close(NotificationCommon::Type notification_type, + const std::string& notification_id) override; bool GetDisplayed(std::set<std::string>* notifications) const override; bool SupportsNotificationCenter() const override; + // Used by the notification bridge to propagate back events (click, close...). + void ProcessNotificationOperation(NotificationCommon::Operation operation, + NotificationCommon::Type notification_type, + const std::string& origin, + const std::string& notification_id, + int action_index); + + // Registers an implementation object to handle notification operations + // for |notification_type|. + void AddNotificationHandler(NotificationCommon::Type notification_type, + std::unique_ptr<NotificationHandler> handler); + + // Removes an implementation added via |AddNotificationHandler|. + void RemoveNotificationHandler(NotificationCommon::Type notification_type); + private: + NotificationHandler* GetNotificationHandler( + NotificationCommon::Type notification_type); + Profile* profile_; NotificationPlatformBridge* notification_bridge_; + std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>> + notification_handlers_; DISALLOW_COPY_AND_ASSIGN(NativeNotificationDisplayService); };
diff --git a/chrome/browser/notifications/non_persistent_notification_handler.cc b/chrome/browser/notifications/non_persistent_notification_handler.cc new file mode 100644 index 0000000..3e21f926 --- /dev/null +++ b/chrome/browser/notifications/non_persistent_notification_handler.cc
@@ -0,0 +1,46 @@ +// 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/notifications/non_persistent_notification_handler.h" + +#include "chrome/browser/notifications/notification_delegate.h" +#include "chrome/browser/notifications/platform_notification_service_impl.h" + +NonPersistentNotificationHandler::NonPersistentNotificationHandler() {} +NonPersistentNotificationHandler::~NonPersistentNotificationHandler() {} + +void NonPersistentNotificationHandler::OnClose( + Profile* profile, + const std::string& origin, + const std::string& notification_id, + bool by_user) { + if (notifications_.find(notification_id) != notifications_.end()) { + notifications_[notification_id]->Close(by_user); + notifications_.erase(notification_id); + } +} + +void NonPersistentNotificationHandler::OnClick( + Profile* profile, + const std::string& origin, + const std::string& notification_id, + int action_index) { + // Buttons not supported for non persistent notifications. + DCHECK_EQ(action_index, -1); + if (notifications_.find(notification_id) != notifications_.end()) { + notifications_[notification_id]->Click(); + } +} + +void NonPersistentNotificationHandler::OpenSettings(Profile* profile) { + NotificationCommon::OpenNotificationSettings(profile); +} + +void NonPersistentNotificationHandler::RegisterNotification( + const std::string& notification_id, + NotificationDelegate* delegate) { + DCHECK_EQ(notifications_.count(notification_id), 0u); + notifications_[notification_id] = + scoped_refptr<NotificationDelegate>(delegate); +}
diff --git a/chrome/browser/notifications/non_persistent_notification_handler.h b/chrome/browser/notifications/non_persistent_notification_handler.h new file mode 100644 index 0000000..51b8d36 --- /dev/null +++ b/chrome/browser/notifications/non_persistent_notification_handler.h
@@ -0,0 +1,46 @@ +// 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 CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ +#define CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ + +#include <unordered_map> + +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "chrome/browser/notifications/notification_handler.h" + +class NotificationDelegate; + +// NotificationHandler implementation for non persistent notifications. +class NonPersistentNotificationHandler : public NotificationHandler { + public: + NonPersistentNotificationHandler(); + ~NonPersistentNotificationHandler() override; + + // NotificationHandler implementation + void OnClose(Profile* profile, + const std::string& origin, + const std::string& notification_id, + bool by_user) override; + + void OnClick(Profile* profile, + const std::string& origin, + const std::string& notification_id, + int action_index) override; + + void OpenSettings(Profile* profile) override; + + void RegisterNotification(const std::string& notification_id, + NotificationDelegate* delegate) override; + + private: + // map of delegate objects keyed by notification id. + std::unordered_map<std::string, scoped_refptr<NotificationDelegate>> + notifications_; + + DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler); +}; + +#endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_
diff --git a/chrome/browser/notifications/notification_common.h b/chrome/browser/notifications/notification_common.h index 79ac93e..280c84d 100644 --- a/chrome/browser/notifications/notification_common.h +++ b/chrome/browser/notifications/notification_common.h
@@ -20,6 +20,13 @@ OPERATION_MAX = SETTINGS }; + // Possible kinds of notifications + enum Type { + PERSISTENT = 0, + NON_PERSISTENT = 1, + TYPE_MAX = NON_PERSISTENT + }; + // Open the Notification settings screen when clicking the right button. // TODO(miguelg) have it take a Profile instead once NotificationObjectProxy // is updated.
diff --git a/chrome/browser/notifications/notification_display_service.h b/chrome/browser/notifications/notification_display_service.h index 6bbd645..635c398 100644 --- a/chrome/browser/notifications/notification_display_service.h +++ b/chrome/browser/notifications/notification_display_service.h
@@ -7,7 +7,9 @@ #include <set> #include <string> + #include "base/macros.h" +#include "chrome/browser/notifications/notification_common.h" #include "components/keyed_service/core/keyed_service.h" class Notification; @@ -27,11 +29,13 @@ ~NotificationDisplayService() override {} // Displays the |notification| identified by |notification_id|. - virtual void Display(const std::string& notification_id, + virtual void Display(NotificationCommon::Type notification_type, + const std::string& notification_id, const Notification& notification) = 0; // Closes the notification identified by |notification_id|. - virtual void Close(const std::string& notification_id) = 0; + virtual void Close(NotificationCommon::Type notification_type, + const std::string& notification_id) = 0; // Returns whether the implementation can retrieve a list of currently visible // notifications and stores them in |*notification_ids| when possible.
diff --git a/chrome/browser/notifications/notification_handler.h b/chrome/browser/notifications/notification_handler.h new file mode 100644 index 0000000..b410d49 --- /dev/null +++ b/chrome/browser/notifications/notification_handler.h
@@ -0,0 +1,41 @@ +// 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 CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_HANDLER_H_ +#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_HANDLER_H_ + +#include <memory> +#include <string> + +class NotificationDelegate; +class Profile; + +// Interface that enables the different kind of notifications to process +// operations coming from the user. +class NotificationHandler { + public: + virtual ~NotificationHandler() {} + + // Process notification close events. + virtual void OnClose(Profile* profile, + const std::string& origin, + const std::string& notification_id, + bool by_user) = 0; + + // Process cliks to a notification or its buttons, depending on + // |action_index|. + virtual void OnClick(Profile* profile, + const std::string& origin, + const std::string& notification_id, + int action_index) = 0; + + // Open notification settings. + virtual void OpenSettings(Profile* profile) = 0; + + // Registers a |delegate| object with this handler. + virtual void RegisterNotification(const std::string& notification_id, + NotificationDelegate* delegate) = 0; +}; + +#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_HANDLER_H_
diff --git a/chrome/browser/notifications/notification_platform_bridge.h b/chrome/browser/notifications/notification_platform_bridge.h index 4b7d3c67..722a497 100644 --- a/chrome/browser/notifications/notification_platform_bridge.h +++ b/chrome/browser/notifications/notification_platform_bridge.h
@@ -9,6 +9,7 @@ #include <string> #include "base/macros.h" +#include "chrome/browser/notifications/notification_common.h" class Notification; @@ -23,7 +24,8 @@ virtual ~NotificationPlatformBridge() {} // Shows a toast on screen using the data passed in |notification|. - virtual void Display(const std::string& notification_id, + virtual void Display(NotificationCommon::Type notification_type, + const std::string& notification_id, const std::string& profile_id, bool is_incognito, const Notification& notification) = 0;
diff --git a/chrome/browser/notifications/notification_platform_bridge_android.cc b/chrome/browser/notifications/notification_platform_bridge_android.cc index 3e1204e..8fc3e89 100644 --- a/chrome/browser/notifications/notification_platform_bridge_android.cc +++ b/chrome/browser/notifications/notification_platform_bridge_android.cc
@@ -14,8 +14,10 @@ #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/notifications/native_notification_display_service.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_common.h" +#include "chrome/browser/notifications/notification_display_service_factory.h" #include "chrome/browser/notifications/persistent_notification_delegate.h" #include "chrome/browser/notifications/platform_notification_service_impl.h" #include "chrome/browser/profiles/profile_manager.h" @@ -59,6 +61,30 @@ return ScopedJavaLocalRef<jobjectArray>(env, array); } +// Callback to run once the profile has been loaded in order to perform a +// given |operation| in a notification. +// TODO(miguelg) move it to notification_common? +void ProfileLoadedCallback(NotificationCommon::Operation operation, + NotificationCommon::Type notification_type, + const std::string& origin, + const std::string& notification_id, + int action_index, + Profile* profile) { + if (!profile) { + // TODO(miguelg): Add UMA for this condition. + // Perhaps propagate this through PersistentNotificationStatus. + LOG(WARNING) << "Profile not loaded correctly"; + return; + } + + NotificationDisplayService* display_service = + NotificationDisplayServiceFactory::GetForProfile(profile); + + static_cast<NativeNotificationDisplayService*>(display_service) + ->ProcessNotificationOperation(operation, notification_type, origin, + notification_id, action_index); +} + } // namespace // Called by the Java side when a notification event has been received, but the @@ -88,68 +114,73 @@ void NotificationPlatformBridgeAndroid::OnNotificationClicked( JNIEnv* env, const JavaParamRef<jobject>& java_object, - jlong persistent_notification_id, + const JavaParamRef<jstring>& java_notification_id, const JavaParamRef<jstring>& java_origin, const JavaParamRef<jstring>& java_profile_id, jboolean incognito, const JavaParamRef<jstring>& java_tag, const JavaParamRef<jstring>& java_webapk_package, jint action_index) { - GURL origin(ConvertJavaStringToUTF8(env, java_origin)); + std::string notification_id = + ConvertJavaStringToUTF8(env, java_notification_id); std::string tag = ConvertJavaStringToUTF8(env, java_tag); std::string profile_id = ConvertJavaStringToUTF8(env, java_profile_id); std::string webapk_package = ConvertJavaStringToUTF8(env, java_webapk_package); - regenerated_notification_infos_[persistent_notification_id] = + GURL origin(ConvertJavaStringToUTF8(env, java_origin)); + regenerated_notification_infos_[notification_id] = RegeneratedNotificationInfo(origin.spec(), tag, webapk_package); - PlatformNotificationServiceImpl::GetInstance() - ->ProcessPersistentNotificationOperation( - NotificationCommon::CLICK, profile_id, incognito, origin, - persistent_notification_id, action_index); + ProfileManager* profile_manager = g_browser_process->profile_manager(); + DCHECK(profile_manager); + + profile_manager->LoadProfile( + profile_id, incognito, + base::Bind(&ProfileLoadedCallback, NotificationCommon::CLICK, + NotificationCommon::PERSISTENT, origin.spec(), notification_id, + action_index)); } void NotificationPlatformBridgeAndroid::OnNotificationClosed( JNIEnv* env, const JavaParamRef<jobject>& java_object, - jlong persistent_notification_id, + const JavaParamRef<jstring>& java_notification_id, const JavaParamRef<jstring>& java_origin, const JavaParamRef<jstring>& java_profile_id, jboolean incognito, const JavaParamRef<jstring>& java_tag, jboolean by_user) { - GURL origin(ConvertJavaStringToUTF8(env, java_origin)); std::string profile_id = ConvertJavaStringToUTF8(env, java_profile_id); - std::string tag = ConvertJavaStringToUTF8(env, java_tag); + std::string notification_id = + ConvertJavaStringToUTF8(env, java_notification_id); // The notification was closed by the platform, so clear all local state. - regenerated_notification_infos_.erase(persistent_notification_id); - PlatformNotificationServiceImpl::GetInstance() - ->ProcessPersistentNotificationOperation( - NotificationCommon::CLOSE, profile_id, incognito, origin, - persistent_notification_id, -1); + regenerated_notification_infos_.erase(notification_id); + + ProfileManager* profile_manager = g_browser_process->profile_manager(); + DCHECK(profile_manager); + + profile_manager->LoadProfile( + profile_id, incognito, + base::Bind(&ProfileLoadedCallback, NotificationCommon::CLOSE, + NotificationCommon::PERSISTENT, + ConvertJavaStringToUTF8(env, java_origin), notification_id, + -1 /* action index */)); } void NotificationPlatformBridgeAndroid::Display( + NotificationCommon::Type notification_type, const std::string& notification_id, const std::string& profile_id, bool incognito, const Notification& notification) { JNIEnv* env = AttachCurrentThread(); + // TODO(miguelg): Store the notification type in java instead of assuming it's + // persistent once/if non persistent notifications are ever implemented on + // Android. + DCHECK_EQ(notification_type, NotificationCommon::PERSISTENT); - // The Android notification platform bridge only supports Web Notifications, - // which have a PersistentNotificationDelegate. The persistent id of the - // notification is exposed through it's interface. - // - // TODO(peter): When content/ passes a message_center::Notification to the - // chrome/ layer, the persistent notification id should be captured as a - // property on that object instead, making this cast unnecessary. - PersistentNotificationDelegate* delegate = - static_cast<PersistentNotificationDelegate*>(notification.delegate()); - DCHECK(delegate); - - int64_t persistent_notification_id = delegate->persistent_notification_id(); GURL origin_url(notification.origin_url().GetOrigin()); ScopedJavaLocalRef<jstring> origin = @@ -164,6 +195,8 @@ webapk_package = ConvertUTF8ToJavaString(env, ""); } + ScopedJavaLocalRef<jstring> j_notification_id = + ConvertUTF8ToJavaString(env, notification_id); ScopedJavaLocalRef<jstring> tag = ConvertUTF8ToJavaString(env, notification.tag()); ScopedJavaLocalRef<jstring> title = @@ -197,33 +230,22 @@ ConvertUTF8ToJavaString(env, profile_id); Java_NotificationPlatformBridge_displayNotification( - env, java_object_.obj(), persistent_notification_id, origin.obj(), + env, java_object_.obj(), j_notification_id.obj(), origin.obj(), j_profile_id.obj(), incognito, tag.obj(), webapk_package.obj(), title.obj(), body.obj(), notification_icon.obj(), badge.obj(), vibration_pattern.obj(), notification.timestamp().ToJavaTime(), notification.renotify(), notification.silent(), action_titles.obj(), action_icons.obj()); - regenerated_notification_infos_[persistent_notification_id] = - RegeneratedNotificationInfo( - origin_url.spec(), notification.tag(), - ConvertJavaStringToUTF8(env, webapk_package)); + regenerated_notification_infos_[notification_id] = + RegeneratedNotificationInfo(origin_url.spec(), notification.tag(), + ConvertJavaStringToUTF8(env, webapk_package)); } void NotificationPlatformBridgeAndroid::Close( const std::string& profile_id, const std::string& notification_id) { - int64_t persistent_notification_id = 0; - - // TODO(peter): Use the |delegate_id| directly when notification ids are being - // generated by content/ instead of us. - if (!base::StringToInt64(notification_id, &persistent_notification_id)) { - LOG(WARNING) << "Unable to decode notification_id " << notification_id; - return; - } - - const auto iterator = - regenerated_notification_infos_.find(persistent_notification_id); + const auto iterator = regenerated_notification_infos_.find(notification_id); if (iterator == regenerated_notification_infos_.end()) return; @@ -231,6 +253,8 @@ JNIEnv* env = AttachCurrentThread(); + ScopedJavaLocalRef<jstring> j_notification_id = + ConvertUTF8ToJavaString(env, notification_id); ScopedJavaLocalRef<jstring> origin = ConvertUTF8ToJavaString(env, notification_info.origin); ScopedJavaLocalRef<jstring> tag = @@ -244,7 +268,7 @@ regenerated_notification_infos_.erase(iterator); Java_NotificationPlatformBridge_closeNotification( - env, java_object_.obj(), j_profile_id.obj(), persistent_notification_id, + env, java_object_.obj(), j_profile_id.obj(), j_notification_id.obj(), origin.obj(), tag.obj(), webapk_package.obj()); }
diff --git a/chrome/browser/notifications/notification_platform_bridge_android.h b/chrome/browser/notifications/notification_platform_bridge_android.h index c3c612b..8464065 100644 --- a/chrome/browser/notifications/notification_platform_bridge_android.h +++ b/chrome/browser/notifications/notification_platform_bridge_android.h
@@ -13,6 +13,7 @@ #include "base/android/scoped_java_ref.h" #include "base/macros.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_platform_bridge.h" namespace user_prefs { @@ -40,7 +41,7 @@ void OnNotificationClicked( JNIEnv* env, const base::android::JavaParamRef<jobject>& java_object, - jlong persistent_notification_id, + const base::android::JavaParamRef<jstring>& java_notification_id, const base::android::JavaParamRef<jstring>& java_origin, const base::android::JavaParamRef<jstring>& java_profile_id, jboolean incognito, @@ -52,7 +53,7 @@ void OnNotificationClosed( JNIEnv* env, const base::android::JavaParamRef<jobject>& java_object, - jlong persistent_notification_id, + const base::android::JavaParamRef<jstring>& java_notification_id, const base::android::JavaParamRef<jstring>& java_origin, const base::android::JavaParamRef<jstring>& java_profile_id, jboolean incognito, @@ -60,7 +61,8 @@ jboolean by_user); // NotificationPlatformBridge implementation. - void Display(const std::string& notification_id, + void Display(NotificationCommon::Type notification_type, + const std::string& notification_id, const std::string& profile_id, bool incognito, const Notification& notification) override; @@ -92,10 +94,10 @@ std::string webapk_package; }; - // Mapping of a persistent notification id to renegerated notification info. + // Mapping of notification id to renegerated notification info. // TODO(peter): Remove this map once notification delegate ids for Web // notifications are created by the content/ layer. - std::map<int64_t, RegeneratedNotificationInfo> + std::map<std::string, RegeneratedNotificationInfo> regenerated_notification_infos_; base::android::ScopedJavaGlobalRef<jobject> java_object_;
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.h b/chrome/browser/notifications/notification_platform_bridge_mac.h index 88c198be..b48f189 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac.h +++ b/chrome/browser/notifications/notification_platform_bridge_mac.h
@@ -11,10 +11,12 @@ #include "base/compiler_specific.h" #include "base/mac/scoped_nsobject.h" #include "base/macros.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_platform_bridge.h" class Notification; @class NotificationCenterDelegate; +@class NSDictionary; @class NSUserNotificationCenter; class PrefService; @@ -27,7 +29,8 @@ ~NotificationPlatformBridgeMac() override; // NotificationPlatformBridge implementation. - void Display(const std::string& notification_id, + void Display(NotificationCommon::Type notification_type, + const std::string& notification_id, const std::string& profile_id, bool incognito, const Notification& notification) override;
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.mm b/chrome/browser/notifications/notification_platform_bridge_mac.mm index 76da2bd..e96756b 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac.mm +++ b/chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -11,6 +11,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/sys_string_conversions.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/notifications/native_notification_display_service.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_display_service_factory.h" @@ -47,6 +48,32 @@ // - Sound names can be implemented by setting soundName in NSUserNotification // NSUserNotificationDefaultSoundName gives you the platform default. +namespace { + +// Callback to run once the profile has been loaded in order to perform a +// given |operation| in a notification. +void ProfileLoadedCallback(NotificationCommon::Operation operation, + NotificationCommon::Type notification_type, + const std::string& origin, + const std::string& notification_id, + int action_index, + Profile* profile) { + if (!profile) { + // TODO(miguelg): Add UMA for this condition. + // Perhaps propagate this through PersistentNotificationStatus. + LOG(WARNING) << "Profile not loaded correctly"; + return; + } + + NotificationDisplayService* display_service = + NotificationDisplayServiceFactory::GetForProfile(profile); + + static_cast<NativeNotificationDisplayService*>(display_service) + ->ProcessNotificationOperation(operation, notification_type, origin, + notification_id, action_index); +} + +} // namespace // static NotificationPlatformBridge* NotificationPlatformBridge::Create() { @@ -77,10 +104,12 @@ [notification_center_ removeAllDeliveredNotifications]; } -void NotificationPlatformBridgeMac::Display(const std::string& notification_id, - const std::string& profile_id, - bool incognito, - const Notification& notification) { +void NotificationPlatformBridgeMac::Display( + NotificationCommon::Type notification_type, + const std::string& notification_id, + const std::string& profile_id, + bool incognito, + const Notification& notification) { base::scoped_nsobject<NotificationBuilder> builder( [[NotificationBuilder alloc] init]); @@ -137,6 +166,7 @@ [builder setNotificationId:base::SysUTF8ToNSString(notification_id)]; [builder setProfileId:base::SysUTF8ToNSString(profile_id)]; [builder setIncognito:incognito]; + [builder setNotificationType:[NSNumber numberWithInteger:notification_type]]; NSUserNotification* toast = [builder buildUserNotification]; [notification_center_ deliverNotification:toast]; @@ -154,6 +184,7 @@ NSString* persistent_profile_id = [toast.userInfo objectForKey:notification_constants::kNotificationProfileId]; + if ([toast_id isEqualToString:candidate_id] && [persistent_profile_id isEqualToString:current_profile_id]) { [notification_center_ removeDeliveredNotification:toast]; @@ -192,7 +223,8 @@ ![response objectForKey:notification_constants::kNotificationOperation] || ![response objectForKey:notification_constants::kNotificationId] || ![response objectForKey:notification_constants::kNotificationProfileId] || - ![response objectForKey:notification_constants::kNotificationIncognito]) { + ![response objectForKey:notification_constants::kNotificationIncognito] || + ![response objectForKey:notification_constants::kNotificationType]) { LOG(ERROR) << "Missing required key"; return false; } @@ -205,6 +237,8 @@ [response objectForKey:notification_constants::kNotificationId]; NSString* profile_id = [response objectForKey:notification_constants::kNotificationProfileId]; + NSNumber* notification_type = + [response objectForKey:notification_constants::kNotificationType]; if (button_index.intValue < -1 || button_index.intValue >= @@ -226,7 +260,13 @@ } if (profile_id.length <= 0) { - LOG(ERROR) << "Profile Id is empty"; + LOG(ERROR) << "ProfileId not provided"; + return false; + } + + if (notification_type.unsignedIntValue > NotificationCommon::TYPE_MAX) { + LOG(ERROR) << notification_type.unsignedIntValue + << " Does not correspond to a valid operation."; return false; } @@ -264,24 +304,24 @@ [response objectForKey:notification_constants::kNotificationId]; std::string persistentNotificationId = base::SysNSStringToUTF8(notificationId); - int64_t persistentId; - if (!base::StringToInt64(persistentNotificationId, &persistentId)) { - LOG(ERROR) << "Unable to convert notification ID: " - << persistentNotificationId << " to integer."; - return; - } std::string profileId = base::SysNSStringToUTF8( [response objectForKey:notification_constants::kNotificationProfileId]); NSNumber* isIncognito = [response objectForKey:notification_constants::kNotificationIncognito]; + NSNumber* notificationType = + [response objectForKey:notification_constants::kNotificationType]; - GURL origin(notificationOrigin); + ProfileManager* profileManager = g_browser_process->profile_manager(); + DCHECK(profileManager); - PlatformNotificationServiceImpl::GetInstance() - ->ProcessPersistentNotificationOperation( - static_cast<NotificationCommon::Operation>(operation.intValue), - profileId, [isIncognito boolValue], origin, persistentId, - buttonIndex.intValue); + profileManager->LoadProfile( + profileId, [isIncognito boolValue], + base::Bind( + &ProfileLoadedCallback, static_cast<NotificationCommon::Operation>( + operation.unsignedIntValue), + static_cast<NotificationCommon::Type>( + notificationType.unsignedIntValue), + notificationOrigin, persistentNotificationId, buttonIndex.intValue)); } - (BOOL)userNotificationCenter:(NSUserNotificationCenter*)center
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm index 509729a..05d30e5 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm +++ b/chrome/browser/notifications/notification_platform_bridge_mac_unittest.mm
@@ -5,6 +5,7 @@ #import <AppKit/AppKit.h> #include "base/mac/scoped_nsobject.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_platform_bridge_mac.h" #include "chrome/browser/ui/cocoa/notifications/notification_builder_mac.h" #include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h" @@ -26,6 +27,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; return [NSMutableDictionary @@ -40,6 +44,13 @@ EXPECT_TRUE(NotificationPlatformBridgeMac::VerifyNotificationData(response)); } +TEST(NotificationPlatformBridgeMacTest, TestNotificationUnknownType) { + NSMutableDictionary* response = BuildDefaultNotificationResponse(); + [response setValue:[NSNumber numberWithInt:210581] + forKey:notification_constants::kNotificationType]; + EXPECT_FALSE(NotificationPlatformBridgeMac::VerifyNotificationData(response)); +} + TEST(NotificationPlatformBridgeMacTest, TestNotificationUnknownOperation) { NSMutableDictionary* response = BuildDefaultNotificationResponse(); [response setValue:[NSNumber numberWithInt:40782]
diff --git a/chrome/browser/notifications/persistent_notification_handler.cc b/chrome/browser/notifications/persistent_notification_handler.cc new file mode 100644 index 0000000..37db8aa5 --- /dev/null +++ b/chrome/browser/notifications/persistent_notification_handler.cc
@@ -0,0 +1,59 @@ +// 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/notifications/persistent_notification_handler.h" + +#include "base/logging.h" +#include "base/strings/string_number_conversions.h" +#include "chrome/browser/notifications/platform_notification_service_impl.h" +#include "chrome/browser/profiles/profile.h" + +PersistentNotificationHandler::PersistentNotificationHandler() {} +PersistentNotificationHandler::~PersistentNotificationHandler() {} + +void PersistentNotificationHandler::OnClose(Profile* profile, + const std::string& origin, + const std::string& notification_id, + bool by_user) { + // No need to propage back Close events from JS. + if (!by_user) + return; + + int64_t persistent_notification_id; + GURL notification_origin(origin); + DCHECK(notification_origin.is_valid()); + if (!base::StringToInt64(notification_id, &persistent_notification_id)) { + LOG(ERROR) << "Unable to convert notification ID: " << notification_id + << " to integer."; + return; + } + PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose( + profile, persistent_notification_id, notification_origin, by_user); +} + +void PersistentNotificationHandler::OnClick(Profile* profile, + const std::string& origin, + const std::string& notification_id, + int action_index) { + int64_t persistent_notification_id; + if (!base::StringToInt64(notification_id, &persistent_notification_id)) { + LOG(ERROR) << "Unable to convert notification ID: " << notification_id + << " to integer."; + return; + } + GURL notification_origin(origin); + DCHECK(notification_origin.is_valid()); + PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( + profile, persistent_notification_id, notification_origin, action_index); +} + +void PersistentNotificationHandler::OpenSettings(Profile* profile) { + NotificationCommon::OpenNotificationSettings(profile); +} + +void PersistentNotificationHandler::RegisterNotification( + const std::string& notification_id, + NotificationDelegate* delegate) { + // Nothing to do here since there is no state kept. +}
diff --git a/chrome/browser/notifications/persistent_notification_handler.h b/chrome/browser/notifications/persistent_notification_handler.h new file mode 100644 index 0000000..e0d5e56 --- /dev/null +++ b/chrome/browser/notifications/persistent_notification_handler.h
@@ -0,0 +1,40 @@ +// 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 CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_ +#define CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_ + +#include "base/macros.h" +#include "chrome/browser/notifications/notification_handler.h" + +class NotificationDelegate; + +// NotificationHandler implementation for persistent, service worker backed, +// notifications. +class PersistentNotificationHandler : public NotificationHandler { + public: + PersistentNotificationHandler(); + ~PersistentNotificationHandler() override; + + // NotificationHandler implementation + void OnClose(Profile* profile, + const std::string& origin, + const std::string& notification_id, + bool by_user) override; + + void OnClick(Profile* profile, + const std::string& origin, + const std::string& notification_id, + int action_index) override; + + void OpenSettings(Profile* profile) override; + + void RegisterNotification(const std::string& notification_id, + NotificationDelegate* delegate) override; + + private: + DISALLOW_COPY_AND_ASSIGN(PersistentNotificationHandler); +}; + +#endif // CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc index 61ab36d..6e52f15 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -81,38 +81,7 @@ const std::string& notification_id, Profile* profile) { NotificationDisplayServiceFactory::GetForProfile(profile)->Close( - notification_id); -} - -// Callback to run once the profile has been loaded in order to perform a -// given |operation| in a notification. -void ProfileLoadedCallback(NotificationCommon::Operation operation, - const GURL& origin, - int64_t persistent_notification_id, - int action_index, - Profile* profile) { - if (!profile) { - // TODO(miguelg): Add UMA for this condition. - // Perhaps propagate this through PersistentNotificationStatus. - LOG(WARNING) << "Profile not loaded correctly"; - return; - } - - switch (operation) { - case NotificationCommon::CLICK: - PlatformNotificationServiceImpl::GetInstance() - ->OnPersistentNotificationClick(profile, persistent_notification_id, - origin, action_index); - break; - case NotificationCommon::CLOSE: - PlatformNotificationServiceImpl::GetInstance() - ->OnPersistentNotificationClose(profile, persistent_notification_id, - origin, true); - break; - case NotificationCommon::SETTINGS: - NotificationCommon::OpenNotificationSettings(profile); - break; - } + NotificationCommon::NON_PERSISTENT, notification_id); } // Callback used to close an non-persistent notification from blink. @@ -144,22 +113,6 @@ PlatformNotificationServiceImpl::~PlatformNotificationServiceImpl() {} -void PlatformNotificationServiceImpl::ProcessPersistentNotificationOperation( - NotificationCommon::Operation operation, - const std::string& profile_id, - bool incognito, - const GURL& origin, - int64_t persistent_notification_id, - int action_index) { - ProfileManager* profile_manager = g_browser_process->profile_manager(); - DCHECK(profile_manager); - - profile_manager->LoadProfile( - profile_id, incognito, - base::Bind(&ProfileLoadedCallback, operation, origin, - persistent_notification_id, action_index)); -} - void PlatformNotificationServiceImpl::OnPersistentNotificationClick( BrowserContext* browser_context, int64_t persistent_notification_id, @@ -337,8 +290,10 @@ new NotificationObjectProxy(browser_context, std::move(delegate)); Notification notification = CreateNotificationFromData( profile, origin, notification_data, notification_resources, proxy); - GetNotificationDisplayService(profile)->Display(notification.delegate_id(), - notification); + + GetNotificationDisplayService(profile)->Display( + NotificationCommon::NON_PERSISTENT, notification.delegate_id(), + notification); if (cancel_callback) { #if defined(OS_WIN) std::string profile_id = @@ -381,6 +336,7 @@ persistent_notifications_[persistent_notification_id] = notification.id(); GetNotificationDisplayService(profile)->Display( + NotificationCommon::PERSISTENT, base::Int64ToString(delegate->persistent_notification_id()), notification); content::RecordAction( @@ -411,12 +367,14 @@ // TODO(peter): Remove this conversion when the notification ids are being // generated by the caller of this method. GetNotificationDisplayService(profile)->Close( + NotificationCommon::PERSISTENT, base::Int64ToString(persistent_notification_id)); } else { auto iter = persistent_notifications_.find(persistent_notification_id); if (iter == persistent_notifications_.end()) return; - GetNotificationDisplayService(profile)->Close(iter->second); + GetNotificationDisplayService(profile)->Close( + NotificationCommon::PERSISTENT, iter->second); } persistent_notifications_.erase(persistent_notification_id);
diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h index 4dd39778..88f0b08 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h
@@ -47,16 +47,6 @@ // be called from any thread. static PlatformNotificationServiceImpl* GetInstance(); - // Load the profile corresponding to |profile_id| and perform the - // |operation| on the given notification once it has been loaded. - void ProcessPersistentNotificationOperation( - NotificationCommon::Operation operation, - const std::string& profile_id, - bool incognito, - const GURL& origin, - int64_t persistent_notification_id, - int action_index); - // To be called when a persistent notification has been clicked on. The // Service Worker associated with the registration will be started if // needed, on which the event will be fired. Must be called on the UI thread.
diff --git a/chrome/browser/notifications/stub_notification_platform_bridge.cc b/chrome/browser/notifications/stub_notification_platform_bridge.cc index 257a5ec..78c21c6 100644 --- a/chrome/browser/notifications/stub_notification_platform_bridge.cc +++ b/chrome/browser/notifications/stub_notification_platform_bridge.cc
@@ -18,10 +18,12 @@ return notifications_[profile_id][index]; } -void StubNotificationPlatformBridge::Display(const std::string& notification_id, - const std::string& profile_id, - bool incognito, - const Notification& notification) { +void StubNotificationPlatformBridge::Display( + NotificationCommon::Type notification_type, + const std::string& notification_id, + const std::string& profile_id, + bool incognito, + const Notification& notification) { notifications_[profile_id].push_back(notification); }
diff --git a/chrome/browser/notifications/stub_notification_platform_bridge.h b/chrome/browser/notifications/stub_notification_platform_bridge.h index 368c502f..49d8cd4 100644 --- a/chrome/browser/notifications/stub_notification_platform_bridge.h +++ b/chrome/browser/notifications/stub_notification_platform_bridge.h
@@ -10,6 +10,7 @@ #include "base/macros.h" #include "chrome/browser/notifications/notification.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_platform_bridge.h" // Implementation of NotificationPlatformBridge used for tests. @@ -22,7 +23,8 @@ Notification GetNotificationAt(std::string profile_id, size_t index); // NotificationPlatformBridge implementation. - void Display(const std::string& notification_id, + void Display(NotificationCommon::Type notification_type, + const std::string& notification_id, const std::string& profile_id, bool incognito, const Notification& notification) override;
diff --git a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc new file mode 100644 index 0000000..6e16f96 --- /dev/null +++ b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
@@ -0,0 +1,56 @@ +// 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/ntp_snippets/content_suggestions_service_factory.h" + +#include "base/feature_list.h" +#include "base/memory/singleton.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/common/pref_names.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/ntp_snippets/content_suggestions_service.h" +#include "components/prefs/pref_service.h" +#include "content/public/browser/browser_context.h" + +#if defined(OS_ANDROID) +#include "chrome/browser/android/chrome_feature_list.h" +#endif // OS_ANDROID + +// static +ContentSuggestionsServiceFactory* +ContentSuggestionsServiceFactory::GetInstance() { + return base::Singleton<ContentSuggestionsServiceFactory>::get(); +} + +// static +ntp_snippets::ContentSuggestionsService* +ContentSuggestionsServiceFactory::GetForProfile(Profile* profile) { + DCHECK(!profile->IsOffTheRecord()); + return static_cast<ntp_snippets::ContentSuggestionsService*>( + GetInstance()->GetServiceForBrowserContext(profile, true)); +} + +ContentSuggestionsServiceFactory::ContentSuggestionsServiceFactory() + : BrowserContextKeyedServiceFactory( + "ContentSuggestionsService", + BrowserContextDependencyManager::GetInstance()) {} + +ContentSuggestionsServiceFactory::~ContentSuggestionsServiceFactory() {} + +KeyedService* ContentSuggestionsServiceFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + using State = ntp_snippets::ContentSuggestionsService::State; + + // TODO(mvanouwerkerk): Move the enable logic into the service once we start + // observing pref changes. + State enabled = State::DISABLED; +#if defined(OS_ANDROID) + // TODO(pke): Split that feature into suggestions overall and article + // suggestions in particular. + if (base::FeatureList::IsEnabled(chrome::android::kNTPSnippetsFeature)) + enabled = State::ENABLED; +#endif // OS_ANDROID + + return new ntp_snippets::ContentSuggestionsService(enabled); +}
diff --git a/chrome/browser/ntp_snippets/content_suggestions_service_factory.h b/chrome/browser/ntp_snippets/content_suggestions_service_factory.h new file mode 100644 index 0000000..e09f157f --- /dev/null +++ b/chrome/browser/ntp_snippets/content_suggestions_service_factory.h
@@ -0,0 +1,44 @@ +// 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 CHROME_BROWSER_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_FACTORY_H_ +#define CHROME_BROWSER_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_FACTORY_H_ + +#include <memory> + +#include "base/macros.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" + +class Profile; + +namespace base { +template <typename T> +struct DefaultSingletonTraits; +} // namespace base + +namespace ntp_snippets { +class ContentSuggestionsService; +} // namespace ntp_snippets + +class ContentSuggestionsServiceFactory + : public BrowserContextKeyedServiceFactory { + public: + static ContentSuggestionsServiceFactory* GetInstance(); + static ntp_snippets::ContentSuggestionsService* GetForProfile( + Profile* profile); + + private: + friend struct base::DefaultSingletonTraits<ContentSuggestionsServiceFactory>; + + ContentSuggestionsServiceFactory(); + ~ContentSuggestionsServiceFactory() override; + + // BrowserStateKeyedServiceFactory implementation. + KeyedService* BuildServiceInstanceFor( + content::BrowserContext* context) const override; + + DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceFactory); +}; + +#endif // CHROME_BROWSER_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_FACTORY_H_
diff --git a/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.cc index 562c655..e311b718 100644 --- a/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.cc
@@ -201,11 +201,11 @@ if (timing.IsEmpty()) return; - if (!timing.parse_start.is_zero() && time_to_abort >= timing.parse_start && - (timing.parse_stop.is_zero() || timing.parse_stop >= time_to_abort)) { + if (timing.parse_start && time_to_abort >= timing.parse_start && + (!timing.parse_stop || timing.parse_stop >= time_to_abort)) { RecordAbortDuringParse(abort_type, time_to_abort); } - if (timing.first_paint.is_zero() || timing.first_paint >= time_to_abort) { + if (!timing.first_paint || timing.first_paint >= time_to_abort) { RecordAbortAfterCommitBeforePaint(abort_type, time_to_abort); } }
diff --git a/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc index d13ba64..d5dd2d533 100644 --- a/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc
@@ -240,107 +240,112 @@ void CorePageLoadMetricsObserver::OnDomContentLoadedEventStart( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground( + if (WasStartedInForegroundOptionalEventInForeground( timing.dom_content_loaded_event_start, info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramDomContentLoadedImmediate, - timing.dom_content_loaded_event_start); + timing.dom_content_loaded_event_start.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramDomContentLoadedImmediate, - timing.dom_content_loaded_event_start); + timing.dom_content_loaded_event_start.value()); } } void CorePageLoadMetricsObserver::OnLoadEventStart( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.load_event_start, info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.load_event_start, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramLoadImmediate, - timing.load_event_start); + timing.load_event_start.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramLoadImmediate, - timing.load_event_start); + timing.load_event_start.value()); } } void CorePageLoadMetricsObserver::OnFirstLayout( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.first_layout, info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_layout, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstLayoutImmediate, - timing.first_layout); + timing.first_layout.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstLayoutImmediate, - timing.first_layout); + timing.first_layout.value()); } } void CorePageLoadMetricsObserver::OnFirstPaint( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.first_paint, info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_paint, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstPaintImmediate, - timing.first_paint); + timing.first_paint.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstPaintImmediate, - timing.first_paint); + timing.first_paint.value()); } } void CorePageLoadMetricsObserver::OnFirstTextPaint( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.first_text_paint, info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_text_paint, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstTextPaintImmediate, - timing.first_text_paint); + timing.first_text_paint.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstTextPaintImmediate, - timing.first_text_paint); + timing.first_text_paint.value()); } } void CorePageLoadMetricsObserver::OnFirstImagePaint( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.first_image_paint, info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_image_paint, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstImagePaintImmediate, - timing.first_image_paint); + timing.first_image_paint.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstImagePaintImmediate, - timing.first_image_paint); + timing.first_image_paint.value()); } } void CorePageLoadMetricsObserver::OnFirstContentfulPaint( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { + if (WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstContentfulPaintImmediate, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); PAGE_LOAD_HISTOGRAM( internal::kHistogramParseStartToFirstContentfulPaintImmediate, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); switch (GetPageLoadType(transition_)) { case LOAD_TYPE_RELOAD: PAGE_LOAD_HISTOGRAM( internal::kHistogramLoadTypeFirstContentfulPaintReload, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); if (initiated_by_user_gesture_) { PAGE_LOAD_HISTOGRAM( internal::kHistogramLoadTypeFirstContentfulPaintReloadByGesture, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); } break; case LOAD_TYPE_FORWARD_BACK: PAGE_LOAD_HISTOGRAM( internal::kHistogramLoadTypeFirstContentfulPaintForwardBack, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); break; case LOAD_TYPE_NEW_NAVIGATION: PAGE_LOAD_HISTOGRAM( internal::kHistogramLoadTypeFirstContentfulPaintNewNavigation, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); break; case LOAD_TYPE_NONE: NOTREACHED(); @@ -349,32 +354,33 @@ } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramFirstContentfulPaintImmediate, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramParseStartToFirstContentfulPaintImmediate, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); } } void CorePageLoadMetricsObserver::OnParseStart( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.parse_start, info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.parse_start, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramParseStartImmediate, - timing.parse_start); + timing.parse_start.value()); switch (GetPageLoadType(transition_)) { case LOAD_TYPE_RELOAD: PAGE_LOAD_HISTOGRAM(internal::kHistogramLoadTypeParseStartReload, - timing.parse_start); + timing.parse_start.value()); break; case LOAD_TYPE_FORWARD_BACK: PAGE_LOAD_HISTOGRAM(internal::kHistogramLoadTypeParseStartForwardBack, - timing.parse_start); + timing.parse_start.value()); break; case LOAD_TYPE_NEW_NAVIGATION: PAGE_LOAD_HISTOGRAM(internal::kHistogramLoadTypeParseStartNewNavigation, - timing.parse_start); + timing.parse_start.value()); break; case LOAD_TYPE_NONE: NOTREACHED(); @@ -382,32 +388,36 @@ } } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramParseStartImmediate, - timing.parse_start); + timing.parse_start.value()); } } void CorePageLoadMetricsObserver::OnParseStop( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - base::TimeDelta parse_duration = timing.parse_stop - timing.parse_start; - if (WasStartedInForegroundEventInForeground(timing.parse_stop, info)) { + base::TimeDelta parse_duration = + timing.parse_stop.value() - timing.parse_start.value(); + if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramParseDurationImmediate, parse_duration); PAGE_LOAD_HISTOGRAM(internal::kHistogramParseBlockedOnScriptLoadImmediate, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal::kHistogramParseBlockedOnScriptLoadDocumentWriteImmediate, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramParseDurationImmediate, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramParseBlockedOnScriptLoadImmediate, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kBackgroundHistogramParseBlockedOnScriptLoadDocumentWriteImmediate, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } } @@ -455,15 +465,13 @@ if (!info.time_to_commit) { PAGE_LOAD_HISTOGRAM(internal::kHistogramBackgroundBeforeCommit, first_background_time); - } else if (timing.first_paint.is_zero() || + } else if (!timing.first_paint || timing.first_paint > first_background_time) { PAGE_LOAD_HISTOGRAM(internal::kHistogramBackgroundBeforePaint, first_background_time); } - if (!timing.parse_start.is_zero() && - first_background_time >= timing.parse_start && - (timing.parse_stop.is_zero() || - timing.parse_stop > first_background_time)) { + if (timing.parse_start && first_background_time >= timing.parse_start && + (!timing.parse_stop || timing.parse_stop > first_background_time)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramBackgroundDuringParse, first_background_time); } @@ -493,42 +501,47 @@ } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramCommit, time_to_commit); } - if (!timing.dom_content_loaded_event_start.is_zero()) { - if (WasStartedInForegroundEventInForeground( + if (timing.dom_content_loaded_event_start) { + if (WasStartedInForegroundOptionalEventInForeground( timing.dom_content_loaded_event_start, info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramDomContentLoaded, - timing.dom_content_loaded_event_start); - PAGE_LOAD_HISTOGRAM( - internal::kHistogramDomLoadingToDomContentLoaded, - timing.dom_content_loaded_event_start - timing.dom_loading); + timing.dom_content_loaded_event_start.value()); + PAGE_LOAD_HISTOGRAM(internal::kHistogramDomLoadingToDomContentLoaded, + timing.dom_content_loaded_event_start.value() - + timing.dom_loading.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramDomContentLoaded, - timing.dom_content_loaded_event_start); + timing.dom_content_loaded_event_start.value()); } } - if (!timing.load_event_start.is_zero()) { - if (WasStartedInForegroundEventInForeground(timing.load_event_start, - info)) { - PAGE_LOAD_HISTOGRAM(internal::kHistogramLoad, timing.load_event_start); + if (timing.load_event_start) { + if (WasStartedInForegroundOptionalEventInForeground(timing.load_event_start, + info)) { + PAGE_LOAD_HISTOGRAM(internal::kHistogramLoad, + timing.load_event_start.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramLoad, - timing.load_event_start); + timing.load_event_start.value()); } } - if (!timing.first_layout.is_zero()) { - if (WasStartedInForegroundEventInForeground(timing.first_layout, info)) { - PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstLayout, timing.first_layout); + if (timing.first_layout) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_layout, + info)) { + PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstLayout, + timing.first_layout.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstLayout, - timing.first_layout); + timing.first_layout.value()); } } - if (!timing.first_paint.is_zero()) { - if (WasStartedInForegroundEventInForeground(timing.first_paint, info)) { - PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstPaint, timing.first_paint); + if (timing.first_paint) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_paint, + info)) { + PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstPaint, + timing.first_paint.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstPaint, - timing.first_paint); + timing.first_paint.value()); } // Record the time to first paint for pages which were: @@ -541,90 +554,98 @@ timing.first_paint < info.first_background_time.value())) { PAGE_LOAD_HISTOGRAM( internal::kHistogramForegroundToFirstPaint, - timing.first_paint - info.first_foreground_time.value()); + timing.first_paint.value() - info.first_foreground_time.value()); } } - if (!timing.first_text_paint.is_zero()) { - if (WasStartedInForegroundEventInForeground(timing.first_text_paint, - info)) { + if (timing.first_text_paint) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_text_paint, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstTextPaint, - timing.first_text_paint); + timing.first_text_paint.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstTextPaint, - timing.first_text_paint); + timing.first_text_paint.value()); } } - if (!timing.first_image_paint.is_zero()) { - if (WasStartedInForegroundEventInForeground(timing.first_image_paint, - info)) { + if (timing.first_image_paint) { + if (WasStartedInForegroundOptionalEventInForeground( + timing.first_image_paint, info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstImagePaint, - timing.first_image_paint); + timing.first_image_paint.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstImagePaint, - timing.first_image_paint); + timing.first_image_paint.value()); } } - if (!timing.first_contentful_paint.is_zero()) { - if (WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { + if (timing.first_contentful_paint) { + if (WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstContentfulPaint, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); // Bucket these histograms into high/low resolution clock systems. This // might point us to directions that will de-noise some UMA. if (base::TimeTicks::IsHighResolution()) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstContentfulPaintHigh, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstContentfulPaintLow, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); } - PAGE_LOAD_HISTOGRAM(internal::kHistogramParseStartToFirstContentfulPaint, - timing.first_contentful_paint - timing.parse_start); - PAGE_LOAD_HISTOGRAM(internal::kHistogramDomLoadingToFirstContentfulPaint, - timing.first_contentful_paint - timing.dom_loading); + PAGE_LOAD_HISTOGRAM( + internal::kHistogramParseStartToFirstContentfulPaint, + timing.first_contentful_paint.value() - timing.parse_start.value()); + PAGE_LOAD_HISTOGRAM( + internal::kHistogramDomLoadingToFirstContentfulPaint, + timing.first_contentful_paint.value() - timing.dom_loading.value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramFirstContentfulPaint, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); } } - if (!timing.parse_start.is_zero()) { + if (timing.parse_start) { if (WasParseInForeground(timing.parse_start, timing.parse_stop, info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramParseBlockedOnScriptLoad, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal::kHistogramParseBlockedOnScriptLoadDocumentWrite, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramParseBlockedOnScriptLoad, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramParseBlockedOnScriptLoadDocumentWrite, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } } - if (!timing.parse_stop.is_zero()) { - base::TimeDelta parse_duration = timing.parse_stop - timing.parse_start; - if (WasStartedInForegroundEventInForeground(timing.parse_stop, info)) { + if (timing.parse_stop) { + base::TimeDelta parse_duration = + timing.parse_stop.value() - timing.parse_start.value(); + if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramParseDuration, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kHistogramParseBlockedOnScriptLoadParseComplete, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kHistogramParseBlockedOnScriptLoadDocumentWriteParseComplete, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } else { PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramParseDuration, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramParseBlockedOnScriptLoadParseComplete, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kBackgroundHistogramParseBlockedOnScriptLoadDocumentWriteParseComplete, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } } @@ -657,8 +678,8 @@ return; DCHECK(!info.committed_url.is_empty()); // Log the eTLD+1 of sites that show poor loading performance. - if (!WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { + if (!WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { return; } std::unique_ptr<rappor::Sample> sample = @@ -666,13 +687,13 @@ sample->SetStringField( "Domain", rappor::GetDomainAndRegistrySampleFromGURL(info.committed_url)); uint64_t bucket_index = - RapporHistogramBucketIndex(timing.first_contentful_paint); + RapporHistogramBucketIndex(timing.first_contentful_paint.value()); sample->SetFlagsField("Bucket", uint64_t(1) << bucket_index, kNumRapporHistogramBuckets); // The IsSlow flag is just a one bit boolean if the first contentful paint // was > 10s. - sample->SetFlagsField("IsSlow", - timing.first_contentful_paint.InSecondsF() >= 10, 1); + sample->SetFlagsField( + "IsSlow", timing.first_contentful_paint.value().InSecondsF() >= 10, 1); rappor_service->RecordSampleObj(internal::kRapporMetricsNameCoarseTiming, std::move(sample)); }
diff --git a/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer_unittest.cc index 1f00e10..5657d3d4 100644 --- a/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer_unittest.cc +++ b/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer_unittest.cc
@@ -311,13 +311,13 @@ histogram_tester().ExpectTotalCount(internal::kBackgroundHistogramCommit, 0); - if (page_load_metrics::WasStartedInForegroundEventInForeground( + if (page_load_metrics::WasStartedInForegroundOptionalEventInForeground( timing.dom_content_loaded_event_start, info)) { histogram_tester().ExpectTotalCount(internal::kHistogramDomContentLoaded, 1); histogram_tester().ExpectBucketCount( internal::kHistogramDomContentLoaded, - timing.dom_content_loaded_event_start.InMilliseconds(), 1); + timing.dom_content_loaded_event_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kBackgroundHistogramDomContentLoaded, 0); } else { @@ -332,12 +332,12 @@ 1); histogram_tester().ExpectBucketCount( internal::kBackgroundHistogramFirstLayout, - timing.first_layout.InMilliseconds(), 1); + timing.first_layout.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kBackgroundHistogramFirstTextPaint, 1); histogram_tester().ExpectBucketCount( internal::kBackgroundHistogramFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount(internal::kHistogramCommit, 1); histogram_tester().ExpectTotalCount(internal::kHistogramLoad, 0); @@ -502,7 +502,7 @@ internal::kHistogramLoadTypeFirstContentfulPaintReload, 1); histogram_tester().ExpectBucketCount( internal::kHistogramLoadTypeFirstContentfulPaintReload, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramLoadTypeFirstContentfulPaintForwardBack, 0); histogram_tester().ExpectTotalCount( @@ -511,7 +511,7 @@ internal::kHistogramLoadTypeParseStartReload, 1); histogram_tester().ExpectBucketCount( internal::kHistogramLoadTypeParseStartReload, - timing.parse_start.InMilliseconds(), 1); + timing.parse_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramLoadTypeParseStartForwardBack, 0); histogram_tester().ExpectTotalCount( @@ -542,7 +542,7 @@ internal::kHistogramLoadTypeFirstContentfulPaintForwardBack, 1); histogram_tester().ExpectBucketCount( internal::kHistogramLoadTypeFirstContentfulPaintForwardBack, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramLoadTypeFirstContentfulPaintNewNavigation, 0); histogram_tester().ExpectTotalCount( @@ -551,7 +551,7 @@ internal::kHistogramLoadTypeParseStartForwardBack, 1); histogram_tester().ExpectBucketCount( internal::kHistogramLoadTypeParseStartForwardBack, - timing.parse_start.InMilliseconds(), 1); + timing.parse_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramLoadTypeParseStartNewNavigation, 0); } @@ -576,7 +576,7 @@ internal::kHistogramLoadTypeFirstContentfulPaintNewNavigation, 1); histogram_tester().ExpectBucketCount( internal::kHistogramLoadTypeFirstContentfulPaintNewNavigation, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramLoadTypeParseStartReload, 0); histogram_tester().ExpectTotalCount( @@ -585,5 +585,5 @@ internal::kHistogramLoadTypeParseStartNewNavigation, 1); histogram_tester().ExpectBucketCount( internal::kHistogramLoadTypeParseStartNewNavigation, - timing.parse_start.InMilliseconds(), 1); + timing.parse_start.value().InMilliseconds(), 1); }
diff --git a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc index cd3265627..56cbe9b 100644 --- a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc
@@ -28,10 +28,10 @@ namespace { bool ShouldRecordHistogram(const DataReductionProxyData* data, - const base::TimeDelta& event, + const base::Optional<base::TimeDelta>& event, const page_load_metrics::PageLoadExtraInfo& info) { return data && data->used_data_reduction_proxy() && - WasStartedInForegroundEventInForeground(event, info); + WasStartedInForegroundOptionalEventInForeground(event, info); } // A macro is needed because PAGE_LOAD_HISTOGRAM creates a static instance of @@ -43,12 +43,12 @@ PAGE_LOAD_HISTOGRAM( \ std::string(internal::kHistogramDataReductionProxyPrefix) \ .append(histogram_suffix), \ - event); \ + event.value()); \ if (data->lofi_requested()) { \ PAGE_LOAD_HISTOGRAM( \ std::string(internal::kHistogramDataReductionProxyLoFiOnPrefix) \ .append(histogram_suffix), \ - event); \ + event.value()); \ } \ } \ } while (false) @@ -130,16 +130,24 @@ base::TimeDelta load_event_start; base::TimeDelta first_image_paint; base::TimeDelta first_contentful_paint; - if (WasStartedInForegroundEventInForeground(timing.response_start, info)) - response_start = timing.response_start; - if (WasStartedInForegroundEventInForeground(timing.load_event_start, info)) - load_event_start = timing.load_event_start; - if (WasStartedInForegroundEventInForeground(timing.first_image_paint, info)) - first_image_paint = timing.first_image_paint; - if (WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { - first_contentful_paint = timing.first_contentful_paint; + if (WasStartedInForegroundOptionalEventInForeground(timing.response_start, + info)) { + response_start = timing.response_start.value(); } + if (WasStartedInForegroundOptionalEventInForeground(timing.load_event_start, + info)) { + load_event_start = timing.load_event_start.value(); + } + if (WasStartedInForegroundOptionalEventInForeground(timing.first_image_paint, + info)) { + first_image_paint = timing.first_image_paint.value(); + } + if (WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { + first_contentful_paint = timing.first_contentful_paint.value(); + } + // TODO(ryansturm): Change DataReductionProxyPageLoadTiming to take + // base::Optional<>s (see crbug.com/626040). DataReductionProxyPageLoadTiming data_reduction_proxy_timing( timing.navigation_start, response_start, load_event_start, first_image_paint, first_contentful_paint);
diff --git a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc index 55c5b46..5323504 100644 --- a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc +++ b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc
@@ -152,18 +152,29 @@ NavigateAndCommit(GURL(kDefaultTestUrl2)); } + // Verify that, if expected is set, its value equals that of + // actual. Otherwise, if expected is unset, verify that actual is zero. + void ExpectEqualOrUnset(const base::Optional<base::TimeDelta>& expected, + base::TimeDelta actual) { + if (expected) { + EXPECT_EQ(expected.value(), actual); + } else { + EXPECT_TRUE(actual.is_zero()); + } + } + void ValidateTimes() { EXPECT_TRUE(pingback_client_->send_pingback_called()); EXPECT_EQ(timing_.navigation_start, pingback_client_->timing()->navigation_start); - EXPECT_EQ(timing_.first_contentful_paint, - pingback_client_->timing()->first_contentful_paint); - EXPECT_EQ(timing_.response_start, - pingback_client_->timing()->response_start); - EXPECT_EQ(timing_.load_event_start, - pingback_client_->timing()->load_event_start); - EXPECT_EQ(timing_.first_image_paint, - pingback_client_->timing()->first_image_paint); + ExpectEqualOrUnset(timing_.first_contentful_paint, + pingback_client_->timing()->first_contentful_paint); + ExpectEqualOrUnset(timing_.response_start, + pingback_client_->timing()->response_start); + ExpectEqualOrUnset(timing_.load_event_start, + pingback_client_->timing()->load_event_start); + ExpectEqualOrUnset(timing_.first_image_paint, + pingback_client_->timing()->first_image_paint); } void ValidateHistograms() { @@ -186,8 +197,9 @@ timing_.parse_start); } - void ValidateHistogramsForSuffix(const std::string& histogram_suffix, - const base::TimeDelta& event) { + void ValidateHistogramsForSuffix( + const std::string& histogram_suffix, + const base::Optional<base::TimeDelta>& event) { histogram_tester().ExpectTotalCount( std::string(internal::kHistogramDataReductionProxyPrefix) .append(histogram_suffix), @@ -201,13 +213,15 @@ histogram_tester().ExpectUniqueSample( std::string(internal::kHistogramDataReductionProxyPrefix) .append(histogram_suffix), - static_cast<base::HistogramBase::Sample>(event.InMilliseconds()), 1); + static_cast<base::HistogramBase::Sample>( + event.value().InMilliseconds()), + 1); if (!is_using_lofi_) return; histogram_tester().ExpectUniqueSample( std::string(internal::kHistogramDataReductionProxyLoFiOnPrefix) .append(histogram_suffix), - event.InMilliseconds(), is_using_lofi_ ? 1 : 0); + event.value().InMilliseconds(), is_using_lofi_ ? 1 : 0); } protected: @@ -260,22 +274,22 @@ ResetTest(); // Verify that when data reduction proxy was used but first image paint is - // zero, the correct timing information is sent to SendPingback. - timing_.first_image_paint = base::TimeDelta::FromSeconds(0); + // unset, the correct timing information is sent to SendPingback. + timing_.first_image_paint = base::nullopt; RunTest(true, false); ValidateTimes(); ResetTest(); // Verify that when data reduction proxy was used but first contentful paint - // is zero, SendPingback is not called. - timing_.first_contentful_paint = base::TimeDelta::FromSeconds(0); + // is unset, SendPingback is not called. + timing_.first_contentful_paint = base::nullopt; RunTest(true, false); ValidateTimes(); ResetTest(); // Verify that when data reduction proxy was used but load event start is - // zero, SendPingback is not called. - timing_.load_event_start = base::TimeDelta::FromSeconds(0); + // unset, SendPingback is not called. + timing_.load_event_start = base::nullopt; RunTest(true, false); ValidateTimes();
diff --git a/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc index bc18f8eb..1fb91ed3 100644 --- a/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc
@@ -188,107 +188,119 @@ LogDocumentWriteEvaluatorFirstContentfulPaint( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { + if (WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { PAGE_LOAD_HISTOGRAM( internal::kHistogramDocWriteFirstContentfulPaintImmediate, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); PAGE_LOAD_HISTOGRAM( internal::kHistogramDocWriteParseStartToFirstContentfulPaintImmediate, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteFirstContentfulPaintImmediate, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); } } void DocumentWritePageLoadMetricsObserver::LogDocumentWriteEvaluatorParseStop( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - base::TimeDelta parse_duration = timing.parse_stop - timing.parse_start; - if (WasStartedInForegroundEventInForeground(timing.parse_stop, info)) { + base::TimeDelta parse_duration = + timing.parse_stop.value() - timing.parse_start.value(); + if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteParseDurationImmediate, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kHistogramDocWriteParseBlockedOnScriptImmediate, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kHistogramDocWriteParseBlockedOnScriptLoadDocumentWriteImmediate, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteParseDurationImmediate, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteParseBlockedOnScriptImmediate, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kBackgroundHistogramDocWriteParseBlockedOnScriptLoadDocumentWriteImmediate, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } } void DocumentWritePageLoadMetricsObserver::LogDocumentWriteEvaluatorData( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - bool foreground_paint = WasStartedInForegroundEventInForeground( + bool foreground_paint = WasStartedInForegroundOptionalEventInForeground( timing.first_contentful_paint, info); - if (!timing.first_contentful_paint.is_zero()) { + + if (timing.first_contentful_paint) { if (foreground_paint) { PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteFirstContentfulPaint, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteFirstContentfulPaint, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); } } // Log parse based metrics. - if (!timing.parse_start.is_zero()) { - if (foreground_paint) { - PAGE_LOAD_HISTOGRAM( - internal::kHistogramDocWriteParseStartToFirstContentfulPaint, - timing.first_contentful_paint - timing.parse_start); - } + if (!timing.parse_start) + return; - if (WasParseInForeground(timing.parse_start, timing.parse_stop, info)) { - PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteParseBlockedOnScript, - timing.parse_blocked_on_script_load_duration); - PAGE_LOAD_HISTOGRAM( - internal::kHistogramDocWriteParseBlockedOnScriptLoadDocumentWrite, - timing.parse_blocked_on_script_load_from_document_write_duration); - } else { - PAGE_LOAD_HISTOGRAM( - internal::kBackgroundHistogramDocWriteParseBlockedOnScript, - timing.parse_blocked_on_script_load_duration); - PAGE_LOAD_HISTOGRAM( - internal:: - kBackgroundHistogramDocWriteParseBlockedOnScriptLoadDocumentWrite, - timing.parse_blocked_on_script_load_from_document_write_duration); - } + if (foreground_paint) { + PAGE_LOAD_HISTOGRAM( + internal::kHistogramDocWriteParseStartToFirstContentfulPaint, + timing.first_contentful_paint.value() - timing.parse_start.value()); + } - // These metrics require a full parse. - if (!timing.parse_stop.is_zero()) { - base::TimeDelta parse_duration = timing.parse_stop - timing.parse_start; - if (WasStartedInForegroundEventInForeground(timing.parse_stop, info)) { - PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteParseDuration, - parse_duration); - PAGE_LOAD_HISTOGRAM( - internal::kHistogramDocWriteParseBlockedOnScriptParseComplete, - timing.parse_blocked_on_script_load_duration); - PAGE_LOAD_HISTOGRAM( - internal:: - kHistogramDocWriteParseBlockedOnScriptLoadDocumentWriteParseComplete, - timing.parse_blocked_on_script_load_from_document_write_duration); - } else { - PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramDocWriteParseDuration, - parse_duration); - } - } + if (WasParseInForeground(timing.parse_start, timing.parse_stop, info)) { + PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteParseBlockedOnScript, + timing.parse_blocked_on_script_load_duration.value()); + PAGE_LOAD_HISTOGRAM( + internal::kHistogramDocWriteParseBlockedOnScriptLoadDocumentWrite, + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); + } else { + PAGE_LOAD_HISTOGRAM( + internal::kBackgroundHistogramDocWriteParseBlockedOnScript, + timing.parse_blocked_on_script_load_duration.value()); + PAGE_LOAD_HISTOGRAM( + internal:: + kBackgroundHistogramDocWriteParseBlockedOnScriptLoadDocumentWrite, + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); + } + + // These metrics require a full parse. + if (!timing.parse_stop) + return; + + base::TimeDelta parse_duration = + timing.parse_stop.value() - timing.parse_start.value(); + if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, + info)) { + PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteParseDuration, + parse_duration); + PAGE_LOAD_HISTOGRAM( + internal::kHistogramDocWriteParseBlockedOnScriptParseComplete, + timing.parse_blocked_on_script_load_duration.value()); + PAGE_LOAD_HISTOGRAM( + internal:: + kHistogramDocWriteParseBlockedOnScriptLoadDocumentWriteParseComplete, + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); + } else { + PAGE_LOAD_HISTOGRAM(internal::kBackgroundHistogramDocWriteParseDuration, + parse_duration); } } @@ -296,29 +308,32 @@ LogDocumentWriteBlockFirstContentfulPaint( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { + if (WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { PAGE_LOAD_HISTOGRAM( internal:: kHistogramDocWriteBlockParseStartToFirstContentfulPaintImmediate, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); } } void DocumentWritePageLoadMetricsObserver::LogDocumentWriteBlockParseStop( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - base::TimeDelta parse_duration = timing.parse_stop - timing.parse_start; - if (WasStartedInForegroundEventInForeground(timing.parse_stop, info)) { + base::TimeDelta parse_duration = + timing.parse_stop.value() - timing.parse_start.value(); + if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteBlockParseDurationImmediate, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kHistogramDocWriteBlockParseBlockedOnScriptImmediate, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kHistogramDocWriteBlockParseBlockedOnScriptLoadDocumentWriteImmediate, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteBlockParseDurationImmediate, @@ -326,68 +341,75 @@ PAGE_LOAD_HISTOGRAM( internal:: kBackgroundHistogramDocWriteBlockParseBlockedOnScriptImmediate, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kBackgroundDocWriteBlockParseBlockedOnScriptLoadDocumentWriteImmediate, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } } void DocumentWritePageLoadMetricsObserver::LogDocumentWriteBlockData( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& info) { - if (timing.parse_start.is_zero()) { + if (!timing.parse_start) { return; } - if (WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { + if (WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { PAGE_LOAD_HISTOGRAM( internal::kHistogramDocWriteBlockParseStartToFirstContentfulPaint, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); } if (WasParseInForeground(timing.parse_start, timing.parse_stop, info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteBlockParseBlockedOnScript, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal::kHistogramDocWriteBlockParseBlockedOnScriptLoadDocumentWrite, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteBlockParseBlockedOnScript, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal::kBackgroundDocWriteBlockParseBlockedOnScriptLoadDocumentWrite, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } - if (timing.parse_stop.is_zero()) { + if (!timing.parse_stop) { return; } - base::TimeDelta parse_duration = timing.parse_stop - timing.parse_start; - if (WasStartedInForegroundEventInForeground(timing.parse_stop, info)) { + base::TimeDelta parse_duration = + timing.parse_stop.value() - timing.parse_start.value(); + if (WasStartedInForegroundOptionalEventInForeground(timing.parse_stop, + info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramDocWriteBlockParseDuration, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kHistogramDocWriteBlockParseBlockedOnScriptParseComplete, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kDocWriteBlockParseBlockedOnScriptLoadDocumentWriteParseComplete, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } else { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteBlockParseDuration, parse_duration); PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramDocWriteBlockParseBlockedOnScriptComplete, - timing.parse_blocked_on_script_load_duration); + timing.parse_blocked_on_script_load_duration.value()); PAGE_LOAD_HISTOGRAM( internal:: kBackgroundDocWriteBlockParseBlockedOnScriptLoadDocWriteComplete, - timing.parse_blocked_on_script_load_from_document_write_duration); + timing.parse_blocked_on_script_load_from_document_write_duration + .value()); } }
diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc index 11c35bd..9db65ac 100644 --- a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc
@@ -206,9 +206,18 @@ return false; } -bool WasAbortedBeforeInteraction(UserAbortType abort_type, - base::TimeDelta time_to_interaction, - base::TimeDelta time_to_abort) { +bool WasAbortedBeforeInteraction( + UserAbortType abort_type, + const base::Optional<base::TimeDelta>& time_to_interaction, + const base::Optional<base::TimeDelta>& time_to_abort) { + // These conditions should be guaranteed by the call to + // WasAbortedInForeground, which is called before WasAbortedBeforeInteraction + // gets invoked. + DCHECK(time_to_abort); + DCHECK(abort_type != UserAbortType::ABORT_NONE); + + if (!time_to_interaction) + return true; // For the case the abort is a reload or forward_back. Since pull to // reload / forward_back is the most common user case such aborts being // triggered, add a sanitization threshold here: if the first user @@ -221,7 +230,8 @@ // revealed by the interaction. if (abort_type == UserAbortType::ABORT_RELOAD || abort_type == UserAbortType::ABORT_FORWARD_BACK) { - return time_to_interaction + base::TimeDelta::FromMilliseconds(1000) > + return time_to_interaction.value() + + base::TimeDelta::FromMilliseconds(1000) > time_to_abort; } else { return time_to_interaction > time_to_abort; @@ -371,6 +381,8 @@ return false; } +FromGWSPageLoadMetricsLogger::FromGWSPageLoadMetricsLogger() {} + void FromGWSPageLoadMetricsLogger::SetPreviouslyCommittedUrl(const GURL& url) { previously_committed_url_is_search_results_ = IsGoogleSearchResultUrl(url); previously_committed_url_is_search_redirector_ = @@ -495,16 +507,13 @@ if (timing.IsEmpty()) return; - if (timing.first_paint.is_zero() || timing.first_paint >= time_to_abort) + if (!timing.first_paint || timing.first_paint >= time_to_abort) { LogCommittedAbortsBeforePaint(abort_type, time_to_abort); - - // Temporary hack as we can't distinguish TimeDelta unset from zero - // TODO(bmcquade): change back to else if once crbug.com/616901 is addressed - if (first_paint_triggered_ && timing.first_paint <= time_to_abort && - (!has_user_interaction_after_paint_ || - WasAbortedBeforeInteraction( - abort_type, first_user_interaction_after_paint_, time_to_abort))) + } else if (WasAbortedBeforeInteraction(abort_type, + first_user_interaction_after_paint_, + extra_info.time_to_abort)) { LogAbortsAfterPaintBeforeInteraction(abort_type, time_to_abort); + } } bool FromGWSPageLoadMetricsLogger::ShouldLogMetrics(const GURL& committed_url) { @@ -546,12 +555,12 @@ } bool FromGWSPageLoadMetricsLogger::ShouldLogForegroundEventAfterCommit( - base::TimeDelta event, + const base::Optional<base::TimeDelta>& event, const page_load_metrics::PageLoadExtraInfo& info) { DCHECK(!info.committed_url.is_empty()) << "ShouldLogForegroundEventAfterCommit called without committed URL."; return ShouldLogMetrics(info.committed_url) && - WasStartedInForegroundEventInForeground(event, info); + WasStartedInForegroundOptionalEventInForeground(event, info); } void FromGWSPageLoadMetricsLogger::OnDomContentLoadedEventStart( @@ -560,7 +569,7 @@ if (ShouldLogForegroundEventAfterCommit(timing.dom_content_loaded_event_start, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSDomContentLoaded, - timing.dom_content_loaded_event_start); + timing.dom_content_loaded_event_start.value()); } } @@ -570,7 +579,7 @@ if (ShouldLogForegroundEventAfterCommit(timing.load_event_start, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSLoad, - timing.load_event_start); + timing.load_event_start.value()); } } @@ -579,7 +588,7 @@ const page_load_metrics::PageLoadExtraInfo& extra_info) { if (ShouldLogForegroundEventAfterCommit(timing.first_paint, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSFirstPaint, - timing.first_paint); + timing.first_paint.value()); } first_paint_triggered_ = true; } @@ -590,7 +599,7 @@ if (ShouldLogForegroundEventAfterCommit(timing.first_text_paint, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint); + timing.first_text_paint.value()); } } @@ -600,7 +609,7 @@ if (ShouldLogForegroundEventAfterCommit(timing.first_image_paint, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSFirstImagePaint, - timing.first_image_paint); + timing.first_image_paint.value()); } } @@ -610,15 +619,15 @@ if (ShouldLogForegroundEventAfterCommit(timing.first_contentful_paint, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSFirstContentfulPaint, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); // If we have a foreground paint, we should have a foreground parse start, // since paints can't happen until after parsing starts. - DCHECK(WasStartedInForegroundEventInForeground(timing.parse_start, - extra_info)); + DCHECK(WasStartedInForegroundOptionalEventInForeground(timing.parse_start, + extra_info)); PAGE_LOAD_HISTOGRAM( internal::kHistogramFromGWSParseStartToFirstContentfulPaint, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); } } @@ -627,7 +636,7 @@ const page_load_metrics::PageLoadExtraInfo& extra_info) { if (ShouldLogForegroundEventAfterCommit(timing.parse_start, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSParseStart, - timing.parse_start); + timing.parse_start.value()); } } @@ -636,14 +645,13 @@ const page_load_metrics::PageLoadExtraInfo& extra_info) { if (ShouldLogForegroundEventAfterCommit(timing.parse_stop, extra_info)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramFromGWSParseDuration, - timing.parse_stop - timing.parse_start); + timing.parse_stop.value() - timing.parse_start.value()); } } void FromGWSPageLoadMetricsLogger::OnUserInput( const blink::WebInputEvent& event) { - if (first_paint_triggered_ && first_user_interaction_after_paint_.is_zero()) { - has_user_interaction_after_paint_ = true; + if (first_paint_triggered_ && !first_user_interaction_after_paint_) { DCHECK(!navigation_start_.is_null()); first_user_interaction_after_paint_ = base::TimeTicks::Now() - navigation_start_;
diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h index 9decb45..408907f 100644 --- a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h +++ b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_FROM_GWS_PAGE_LOAD_METRICS_OBSERVER_H_ #include "base/macros.h" +#include "base/optional.h" #include "components/page_load_metrics/browser/page_load_metrics_observer.h" #include "url/gurl.h" @@ -42,7 +43,7 @@ // the code more unit testable. class FromGWSPageLoadMetricsLogger { public: - FromGWSPageLoadMetricsLogger() {} + FromGWSPageLoadMetricsLogger(); void SetPreviouslyCommittedUrl(const GURL& url); void SetProvisionalUrl(const GURL& url); @@ -57,12 +58,6 @@ navigation_start_ = navigation_start; } - // TODO(bmcquade): remove SetFirstPaintTriggered as part of fixing - // crbug.com/616901 - void SetFirstPaintTriggered(const bool first_paint_triggered) { - first_paint_triggered_ = first_paint_triggered; - } - // Invoked when metrics for the given page are complete. void OnComplete(const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& extra_info); @@ -94,7 +89,7 @@ static bool IsGoogleSearchRedirectorUrl(const GURL& url); bool ShouldLogMetrics(const GURL& url); bool ShouldLogForegroundEventAfterCommit( - base::TimeDelta event, + const base::Optional<base::TimeDelta>& event, const page_load_metrics::PageLoadExtraInfo& info); // Whether the given query string contains the given component. The query @@ -124,10 +119,8 @@ base::TimeTicks navigation_start_; - bool has_user_interaction_after_paint_ = false; - // The time of first user interaction after paint from navigation start. - base::TimeDelta first_user_interaction_after_paint_; + base::Optional<base::TimeDelta> first_user_interaction_after_paint_; // Common helper for QueryContainsComponent and QueryContainsComponentPrefix. static bool QueryContainsComponentHelper(const base::StringPiece query, @@ -142,9 +135,6 @@ public: FromGWSPageLoadMetricsObserver(); - // TODO(bmcquade): remove this as part of fixing crbug.com/616901 - FromGWSPageLoadMetricsLogger* GetLogger() { return &logger_; } - // page_load_metrics::PageLoadMetricsObserver implementation: void OnStart(content::NavigationHandle* navigation_handle, const GURL& currently_committed_url,
diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer_unittest.cc index d8cb1117..752bab5 100644 --- a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer_unittest.cc +++ b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer_unittest.cc
@@ -20,7 +20,6 @@ void RegisterObservers(page_load_metrics::PageLoadTracker* tracker) override { FromGWSPageLoadMetricsObserver* observer = new FromGWSPageLoadMetricsObserver(); - logger_ = observer->GetLogger(); tracker->AddObserver(base::WrapUnique(observer)); } @@ -33,15 +32,9 @@ void SimulateTimingWithFirstPaint() { page_load_metrics::PageLoadTiming timing; timing.navigation_start = base::Time::FromDoubleT(1); - // Use 0 and invoke OnFirstPaint here as a hack for current time_to_abort - // in cases in release env are always 0 - // TODO(bmcquade): replace it by 1 timing.first_paint = base::TimeDelta::FromMilliseconds(0); PopulateRequiredTimingFields(&timing); SimulateTimingUpdate(timing); - // TODO(bmcquade): remove SetFirstPaintTriggered as part of fixing - // crbug.com/616901 - logger_->SetFirstPaintTriggered(true); } void SimulateMouseEvent() { @@ -53,10 +46,6 @@ mouse_event.clickCount = 1; SimulateInputEvent(mouse_event); } - - protected: - // TODO(bmcquade): remove once crbug.com/616901 is addressed - FromGWSPageLoadMetricsLogger* logger_; }; class FromGWSPageLoadMetricsLoggerTest : public testing::Test {}; @@ -155,53 +144,58 @@ NavigateAndCommit(GURL("http://www.final.com")); histogram_tester().ExpectTotalCount(internal::kHistogramFromGWSParseStart, 1); - histogram_tester().ExpectBucketCount(internal::kHistogramFromGWSParseStart, - timing.parse_start.InMilliseconds(), 1); + histogram_tester().ExpectBucketCount( + internal::kHistogramFromGWSParseStart, + timing.parse_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount(internal::kHistogramFromGWSFirstPaint, 1); - histogram_tester().ExpectBucketCount(internal::kHistogramFromGWSFirstPaint, - timing.first_paint.InMilliseconds(), 1); + histogram_tester().ExpectBucketCount( + internal::kHistogramFromGWSFirstPaint, + timing.first_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramFromGWSFirstContentfulPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstContentfulPaint, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramFromGWSParseStartToFirstContentfulPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSParseStartToFirstContentfulPaint, - (timing.first_contentful_paint - timing.parse_start).InMilliseconds(), 1); + (timing.first_contentful_paint.value() - timing.parse_start.value()) + .InMilliseconds(), + 1); histogram_tester().ExpectTotalCount(internal::kHistogramFromGWSFirstTextPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramFromGWSFirstImagePaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstImagePaint, - timing.first_image_paint.InMilliseconds(), 1); + timing.first_image_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount(internal::kHistogramFromGWSParseDuration, 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSParseDuration, - (timing.parse_stop - timing.parse_start).InMilliseconds(), 1); + (timing.parse_stop.value() - timing.parse_start.value()).InMilliseconds(), + 1); histogram_tester().ExpectTotalCount( internal::kHistogramFromGWSDomContentLoaded, 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSDomContentLoaded, - timing.dom_content_loaded_event_start.InMilliseconds(), 1); + timing.dom_content_loaded_event_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount(internal::kHistogramFromGWSLoad, 1); - histogram_tester().ExpectBucketCount(internal::kHistogramFromGWSLoad, - timing.load_event_start.InMilliseconds(), - 1); + histogram_tester().ExpectBucketCount( + internal::kHistogramFromGWSLoad, + timing.load_event_start.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, SearchPreviousCommittedUrl2) { @@ -220,7 +214,7 @@ 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, SearchPreviousCommittedUrl3) { @@ -239,7 +233,7 @@ 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, SearchPreviousCommittedUrl4) { @@ -258,7 +252,7 @@ 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, SearchToNonSearchToOtherPage) { @@ -283,7 +277,7 @@ 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, SearchToNonSearchToSearch) { @@ -308,7 +302,7 @@ 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, @@ -340,10 +334,10 @@ 2); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing3.first_text_paint.InMilliseconds(), 1); + timing3.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, @@ -376,7 +370,7 @@ 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, @@ -397,7 +391,7 @@ 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } TEST_F(FromGWSPageLoadMetricsObserverTest, @@ -436,13 +430,13 @@ // If the system clock is low resolution PageLoadTracker's background_time_ // may be < timing.first_text_paint. - if (page_load_metrics::WasStartedInForegroundEventInForeground( + if (page_load_metrics::WasStartedInForegroundOptionalEventInForeground( timing.first_text_paint, info)) { histogram_tester().ExpectTotalCount( internal::kHistogramFromGWSFirstTextPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramFromGWSFirstTextPaint, - timing.first_text_paint.InMilliseconds(), 1); + timing.first_text_paint.value().InMilliseconds(), 1); } else { histogram_tester().ExpectTotalCount( internal::kHistogramFromGWSFirstTextPaint, 0);
diff --git a/chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc b/chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc index 5710c995..0bb5566 100644 --- a/chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc +++ b/chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc
@@ -51,47 +51,50 @@ // static void PageLoadMetricsObserverTestHarness::PopulateRequiredTimingFields( PageLoadTiming* inout_timing) { - if (!inout_timing->first_contentful_paint.is_zero() && - inout_timing->first_paint.is_zero()) { + if (inout_timing->first_contentful_paint && !inout_timing->first_paint) { inout_timing->first_paint = inout_timing->first_contentful_paint; } - if (!inout_timing->first_text_paint.is_zero() && - inout_timing->first_paint.is_zero()) { + if (inout_timing->first_text_paint && !inout_timing->first_paint) { inout_timing->first_paint = inout_timing->first_text_paint; } - if (!inout_timing->first_image_paint.is_zero() && - inout_timing->first_paint.is_zero()) { + if (inout_timing->first_image_paint && !inout_timing->first_paint) { inout_timing->first_paint = inout_timing->first_image_paint; } - if (!inout_timing->first_paint.is_zero() && - inout_timing->first_layout.is_zero()) { + if (inout_timing->first_paint && !inout_timing->first_layout) { inout_timing->first_layout = inout_timing->first_paint; } - if (!inout_timing->load_event_start.is_zero() && - inout_timing->dom_content_loaded_event_start.is_zero()) { + if (inout_timing->load_event_start && + !inout_timing->dom_content_loaded_event_start) { inout_timing->dom_content_loaded_event_start = inout_timing->load_event_start; } - if (!inout_timing->first_layout.is_zero() && - inout_timing->dom_loading.is_zero()) { + if (inout_timing->first_layout && !inout_timing->dom_loading) { inout_timing->dom_loading = inout_timing->first_layout; } - if (!inout_timing->dom_content_loaded_event_start.is_zero() && - inout_timing->dom_loading.is_zero()) { + if (inout_timing->dom_content_loaded_event_start && + !inout_timing->dom_loading) { inout_timing->dom_loading = inout_timing->dom_content_loaded_event_start; } - if (!inout_timing->parse_stop.is_zero() && - inout_timing->parse_start.is_zero()) { + if (inout_timing->dom_loading && !inout_timing->parse_start) { + inout_timing->parse_start = inout_timing->dom_loading; + } + if (inout_timing->parse_stop && !inout_timing->parse_start) { inout_timing->parse_start = inout_timing->parse_stop; } - if (!inout_timing->parse_start.is_zero() && - inout_timing->response_start.is_zero()) { + if (inout_timing->parse_start && !inout_timing->response_start) { inout_timing->response_start = inout_timing->parse_start; } - if (!inout_timing->dom_loading.is_zero() && - inout_timing->response_start.is_zero()) { + if (inout_timing->dom_loading && !inout_timing->response_start) { inout_timing->response_start = inout_timing->dom_loading; } + if (inout_timing->parse_start) { + if (!inout_timing->parse_blocked_on_script_load_duration) + inout_timing->parse_blocked_on_script_load_duration = base::TimeDelta(); + if (!inout_timing + ->parse_blocked_on_script_load_from_document_write_duration) + inout_timing->parse_blocked_on_script_load_from_document_write_duration = + base::TimeDelta(); + } } void PageLoadMetricsObserverTestHarness::SetUp() {
diff --git a/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.cc index 8d12a74..0811fe9 100644 --- a/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.cc
@@ -61,26 +61,26 @@ const page_load_metrics::PageLoadExtraInfo& info) { if (!IsServiceWorkerControlled(info)) return; - if (!WasStartedInForegroundEventInForeground(timing.first_contentful_paint, - info)) { + if (!WasStartedInForegroundOptionalEventInForeground( + timing.first_contentful_paint, info)) { PAGE_LOAD_HISTOGRAM( internal::kBackgroundHistogramServiceWorkerFirstContentfulPaint, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); return; } PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerFirstContentfulPaint, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); PAGE_LOAD_HISTOGRAM( internal::kHistogramServiceWorkerParseStartToFirstContentfulPaint, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); if (IsInboxSite(info.committed_url)) { PAGE_LOAD_HISTOGRAM( internal::kHistogramServiceWorkerFirstContentfulPaintInbox, - timing.first_contentful_paint); + timing.first_contentful_paint.value()); PAGE_LOAD_HISTOGRAM( internal::kHistogramServiceWorkerParseStartToFirstContentfulPaintInbox, - timing.first_contentful_paint - timing.parse_start); + timing.first_contentful_paint.value() - timing.parse_start.value()); } } @@ -89,15 +89,15 @@ const page_load_metrics::PageLoadExtraInfo& info) { if (!IsServiceWorkerControlled(info)) return; - if (!WasStartedInForegroundEventInForeground( + if (!WasStartedInForegroundOptionalEventInForeground( timing.dom_content_loaded_event_start, info)) { return; } PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerDomContentLoaded, - timing.dom_content_loaded_event_start); + timing.dom_content_loaded_event_start.value()); if (IsInboxSite(info.committed_url)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerDomContentLoadedInbox, - timing.dom_content_loaded_event_start); + timing.dom_content_loaded_event_start.value()); } } @@ -106,12 +106,13 @@ const page_load_metrics::PageLoadExtraInfo& info) { if (!IsServiceWorkerControlled(info)) return; - if (!WasStartedInForegroundEventInForeground(timing.load_event_start, info)) + if (!WasStartedInForegroundOptionalEventInForeground(timing.load_event_start, + info)) return; PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerLoad, - timing.load_event_start); + timing.load_event_start.value()); if (IsInboxSite(info.committed_url)) { PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerLoadInbox, - timing.load_event_start); + timing.load_event_start.value()); } }
diff --git a/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer_unittest.cc index e95a638..c99e256 100644 --- a/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer_unittest.cc +++ b/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer_unittest.cc
@@ -94,7 +94,7 @@ internal::kHistogramServiceWorkerFirstContentfulPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerFirstContentfulPaint, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kBackgroundHistogramServiceWorkerFirstContentfulPaint, 0); @@ -103,18 +103,20 @@ internal::kHistogramServiceWorkerParseStartToFirstContentfulPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerParseStartToFirstContentfulPaint, - (timing.first_contentful_paint - timing.parse_start).InMilliseconds(), 1); + (timing.first_contentful_paint.value() - timing.parse_start.value()) + .InMilliseconds(), + 1); histogram_tester().ExpectTotalCount( internal::kHistogramServiceWorkerDomContentLoaded, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerDomContentLoaded, - (timing.dom_content_loaded_event_start).InMilliseconds(), 1); + timing.dom_content_loaded_event_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount(internal::kHistogramServiceWorkerLoad, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerLoad, - (timing.load_event_start).InMilliseconds(), 1); + timing.load_event_start.value().InMilliseconds(), 1); AssertNoInboxHistogramsLogged(); } @@ -143,7 +145,7 @@ internal::kBackgroundHistogramServiceWorkerFirstContentfulPaint, 1); histogram_tester().ExpectBucketCount( internal::kBackgroundHistogramServiceWorkerFirstContentfulPaint, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramServiceWorkerParseStartToFirstContentfulPaint, 0); histogram_tester().ExpectTotalCount( @@ -167,12 +169,12 @@ internal::kHistogramServiceWorkerFirstContentfulPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerFirstContentfulPaint, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramServiceWorkerFirstContentfulPaintInbox, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerFirstContentfulPaintInbox, - timing.first_contentful_paint.InMilliseconds(), 1); + timing.first_contentful_paint.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kBackgroundHistogramServiceWorkerFirstContentfulPaint, 0); @@ -181,32 +183,36 @@ internal::kHistogramServiceWorkerParseStartToFirstContentfulPaint, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerParseStartToFirstContentfulPaint, - (timing.first_contentful_paint - timing.parse_start).InMilliseconds(), 1); + (timing.first_contentful_paint.value() - timing.parse_start.value()) + .InMilliseconds(), + 1); histogram_tester().ExpectTotalCount( internal::kHistogramServiceWorkerParseStartToFirstContentfulPaintInbox, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerParseStartToFirstContentfulPaintInbox, - (timing.first_contentful_paint - timing.parse_start).InMilliseconds(), 1); + (timing.first_contentful_paint.value() - timing.parse_start.value()) + .InMilliseconds(), + 1); histogram_tester().ExpectTotalCount( internal::kHistogramServiceWorkerDomContentLoaded, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerDomContentLoaded, - (timing.dom_content_loaded_event_start).InMilliseconds(), 1); + timing.dom_content_loaded_event_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramServiceWorkerDomContentLoadedInbox, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerDomContentLoadedInbox, - (timing.dom_content_loaded_event_start).InMilliseconds(), 1); + timing.dom_content_loaded_event_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount(internal::kHistogramServiceWorkerLoad, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerLoad, - (timing.load_event_start).InMilliseconds(), 1); + timing.load_event_start.value().InMilliseconds(), 1); histogram_tester().ExpectTotalCount( internal::kHistogramServiceWorkerLoadInbox, 1); histogram_tester().ExpectBucketCount( internal::kHistogramServiceWorkerLoadInbox, - (timing.load_event_start).InMilliseconds(), 1); + timing.load_event_start.value().InMilliseconds(), 1); }
diff --git a/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc index b021704..ab8e8f1 100644 --- a/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc
@@ -23,31 +23,31 @@ void StaleWhileRevalidateMetricsObserver::OnComplete( const page_load_metrics::PageLoadTiming& timing, const page_load_metrics::PageLoadExtraInfo& extra_info) { - using page_load_metrics::WasStartedInForegroundEventInForeground; + using page_load_metrics::WasStartedInForegroundOptionalEventInForeground; if (!is_interesting_domain_) return; - if (WasStartedInForegroundEventInForeground(timing.load_event_start, - extra_info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.load_event_start, + extra_info)) { PAGE_LOAD_HISTOGRAM( "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2." "NavigationToLoadEventFired", - timing.load_event_start); + timing.load_event_start.value()); } - if (WasStartedInForegroundEventInForeground(timing.first_layout, - extra_info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_layout, + extra_info)) { PAGE_LOAD_HISTOGRAM( "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2." "NavigationToFirstLayout", - timing.first_layout); + timing.first_layout.value()); } - if (WasStartedInForegroundEventInForeground(timing.first_text_paint, - extra_info)) { + if (WasStartedInForegroundOptionalEventInForeground(timing.first_text_paint, + extra_info)) { PAGE_LOAD_HISTOGRAM( "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2." "NavigationToFirstTextPaint", - timing.first_text_paint); + timing.first_text_paint.value()); } }
diff --git a/chrome/browser/password_manager/account_chooser_dialog_android.cc b/chrome/browser/password_manager/account_chooser_dialog_android.cc index 035cfa1..aa3cd3de 100644 --- a/chrome/browser/password_manager/account_chooser_dialog_android.cc +++ b/chrome/browser/password_manager/account_chooser_dialog_android.cc
@@ -25,6 +25,7 @@ #include "components/password_manager/core/common/credential_manager_types.h" #include "jni/AccountChooserDialog_jni.h" #include "ui/android/window_android.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/gfx/android/java_bitmap.h" #include "ui/gfx/range/range.h" @@ -147,14 +148,19 @@ password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED, local_credentials_forms().size()); base::android::ScopedJavaGlobalRef<jobject> java_dialog_global; + const std::string origin = password_manager::GetShownOrigin(origin_); + base::string16 signin_button; + if (local_credentials_forms().size() == 1) { + signin_button = + l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_SIGN_IN); + } dialog_jobject_.Reset(Java_AccountChooserDialog_createAndShowAccountChooser( env, native_window->GetJavaObject().obj(), reinterpret_cast<intptr_t>(this), java_credentials_array.obj(), base::android::ConvertUTF16ToJavaString(env, title).obj(), title_link_range.start(), title_link_range.end(), - base::android::ConvertUTF8ToJavaString( - env, password_manager::GetShownOrigin(origin_)) - .obj())); + base::android::ConvertUTF8ToJavaString(env, origin).obj(), + base::android::ConvertUTF16ToJavaString(env, signin_button).obj())); net::URLRequestContextGetter* request_context = Profile::FromBrowserContext(web_contents_->GetBrowserContext()) ->GetRequestContext(); @@ -167,10 +173,12 @@ JNIEnv* env, const JavaParamRef<jobject>& obj, jint credential_item, - jint credential_type) { + jint credential_type, + jboolean signin_button_clicked) { ChooseCredential( credential_item, - static_cast<password_manager::CredentialType>(credential_type)); + static_cast<password_manager::CredentialType>(credential_type), + signin_button_clicked); } void AccountChooserDialogAndroid::Destroy(JNIEnv* env, @@ -207,7 +215,8 @@ } void AccountChooserDialogAndroid::OnDialogCancel() { - ChooseCredential(-1, password_manager::CredentialType::CREDENTIAL_TYPE_EMPTY); + ChooseCredential(-1, password_manager::CredentialType::CREDENTIAL_TYPE_EMPTY, + false /* signin_button_clicked */); } const std::vector<const autofill::PasswordForm*>& @@ -222,14 +231,17 @@ void AccountChooserDialogAndroid::ChooseCredential( size_t index, - password_manager::CredentialType type) { + password_manager::CredentialType type, + bool signin_button_clicked) { using namespace password_manager; password_manager::metrics_util::AccountChooserUserAction action; if (type == CredentialType::CREDENTIAL_TYPE_EMPTY) { passwords_data_.ChooseCredential(nullptr); - action = password_manager::metrics_util::ACCOUNT_CHOOSER_DISMISSED; + action = metrics_util::ACCOUNT_CHOOSER_DISMISSED; } else { - action = password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN; + action = signin_button_clicked + ? metrics_util::ACCOUNT_CHOOSER_SIGN_IN + : metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN; const auto& credentials_forms = (type == CredentialType::CREDENTIAL_TYPE_PASSWORD) ? local_credentials_forms()
diff --git a/chrome/browser/password_manager/account_chooser_dialog_android.h b/chrome/browser/password_manager/account_chooser_dialog_android.h index 139591ff..7326976 100644 --- a/chrome/browser/password_manager/account_chooser_dialog_android.h +++ b/chrome/browser/password_manager/account_chooser_dialog_android.h
@@ -47,7 +47,8 @@ void OnCredentialClicked(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj, jint credential_item, - jint credential_type); + jint credential_type, + jboolean sign_button_clicked); // Opens new tab with page which explains the Smart Lock branding. void OnLinkClicked(JNIEnv* env, @@ -66,7 +67,9 @@ const std::vector<const autofill::PasswordForm*>& federated_credentials_forms() const; - void ChooseCredential(size_t index, password_manager::CredentialType type); + void ChooseCredential(size_t index, + password_manager::CredentialType type, + bool sign_button_clicked); content::WebContents* web_contents_; ManagePasswordsState passwords_data_;
diff --git a/chrome/browser/password_manager/account_chooser_dialog_android_unittest.cc b/chrome/browser/password_manager/account_chooser_dialog_android_unittest.cc new file mode 100644 index 0000000..bb12485 --- /dev/null +++ b/chrome/browser/password_manager/account_chooser_dialog_android_unittest.cc
@@ -0,0 +1,152 @@ +// 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/password_manager/account_chooser_dialog_android.h" + +#include "base/macros.h" +#include "base/test/histogram_tester.h" +#include "chrome/browser/password_manager/chrome_password_manager_client.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/test/base/chrome_render_view_host_test_harness.h" +#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_manager_metrics_util.h" +#include "components/password_manager/core/browser/password_manager_test_utils.h" +#include "components/password_manager/core/common/password_manager_pref_names.h" +#include "content/public/browser/web_contents.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace { + +password_manager::PasswordFormData kFormData = { + autofill::PasswordForm::SCHEME_HTML, + "http://example.com/", + "http://example.com/origin", + "http://example.com/action", + L"submit_element", + L"username_element", + L"password_element", + L"", + L"", + true, + false, + 1, +}; + +} // namespace + +class AccountChooserDialogAndroidTest : public ChromeRenderViewHostTestHarness { + public: + AccountChooserDialogAndroidTest() {} + ~AccountChooserDialogAndroidTest() override {} + + void SetUp() override; + + MOCK_METHOD1(OnChooseCredential, void(const autofill::PasswordForm*)); + + protected: + AccountChooserDialogAndroid* CreateDialogOneAccount(); + AccountChooserDialogAndroid* CreateDialogManyAccounts(); + + AccountChooserDialogAndroid* CreateDialog( + ScopedVector<autofill::PasswordForm> credentials); + + private: + DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogAndroidTest); +}; + +void AccountChooserDialogAndroidTest::SetUp() { + ChromeRenderViewHostTestHarness::SetUp(); + ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( + web_contents(), nullptr); +} + +AccountChooserDialogAndroid* AccountChooserDialogAndroidTest::CreateDialog( + ScopedVector<autofill::PasswordForm> credentials) { + ScopedVector<autofill::PasswordForm> deprecated_federated; + return new AccountChooserDialogAndroid( + web_contents(), std::move(credentials), std::move(deprecated_federated), + GURL("https://example.com"), + base::Bind(&AccountChooserDialogAndroidTest::OnChooseCredential, + base::Unretained(this))); +} + +AccountChooserDialogAndroid* +AccountChooserDialogAndroidTest::CreateDialogOneAccount() { + ScopedVector<autofill::PasswordForm> credentials; + credentials.push_back(CreatePasswordFormFromDataForTesting(kFormData)); + return CreateDialog(std::move(credentials)); +} + +AccountChooserDialogAndroid* +AccountChooserDialogAndroidTest::CreateDialogManyAccounts() { + ScopedVector<autofill::PasswordForm> credentials; + credentials.push_back(CreatePasswordFormFromDataForTesting(kFormData)); + credentials.push_back(CreatePasswordFormFromDataForTesting(kFormData)); + return CreateDialog(std::move(credentials)); +} + +TEST_F(AccountChooserDialogAndroidTest, + CheckHistogramsReportingOnceAccountViaOnAccountClick) { + base::HistogramTester histogram_tester; + AccountChooserDialogAndroid* dialog = CreateDialogOneAccount(); + dialog->OnCredentialClicked( + base::android::AttachCurrentThread(), nullptr /* obj */, + 0 /* credential_item */, + static_cast<int>( + password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD), + false /* signin_button_clicked */); + dialog->Destroy(base::android::AttachCurrentThread(), nullptr); + + histogram_tester.ExpectUniqueSample( + "PasswordManager.AccountChooserDialog", + password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); + histogram_tester.ExpectUniqueSample( + "PasswordManager.AccountChooserDialogOneAccount", + password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); + histogram_tester.ExpectTotalCount( + "PasswordManager.AccountChooserDialogMultipleAccounts", 0); +} + +TEST_F(AccountChooserDialogAndroidTest, + CheckHistogramsReportingOneAccountChoosenViaSigninButton) { + base::HistogramTester histogram_tester; + AccountChooserDialogAndroid* dialog = CreateDialogOneAccount(); + dialog->OnCredentialClicked( + base::android::AttachCurrentThread(), nullptr /* obj */, + 0 /* credential_item */, + static_cast<int>( + password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD), + true /* signin_button_clicked */); + dialog->Destroy(base::android::AttachCurrentThread(), nullptr); + histogram_tester.ExpectUniqueSample( + "PasswordManager.AccountChooserDialog", + password_manager::metrics_util::ACCOUNT_CHOOSER_SIGN_IN, 1); + histogram_tester.ExpectUniqueSample( + "PasswordManager.AccountChooserDialogOneAccount", + password_manager::metrics_util::ACCOUNT_CHOOSER_SIGN_IN, 1); + histogram_tester.ExpectTotalCount( + "PasswordManager.AccountChooserDialogMultipleAccounts", 0); +} + +TEST_F(AccountChooserDialogAndroidTest, CheckHistogramsReportingManyAccounts) { + base::HistogramTester histogram_tester; + AccountChooserDialogAndroid* dialog = CreateDialogManyAccounts(); + dialog->OnCredentialClicked( + base::android::AttachCurrentThread(), nullptr /* obj */, + 0 /* credential_item */, + static_cast<int>( + password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD), + false /* signin_button_clicked */); + dialog->Destroy(base::android::AttachCurrentThread(), nullptr); + + histogram_tester.ExpectUniqueSample( + "PasswordManager.AccountChooserDialog", + password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); + histogram_tester.ExpectUniqueSample( + "PasswordManager.AccountChooserDialogMultipleAccounts", + password_manager::metrics_util::ACCOUNT_CHOOSER_CREDENTIAL_CHOSEN, 1); + histogram_tester.ExpectTotalCount( + "PasswordManager.AccountChooserDialogOneAccount", 0); +}
diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc index a6829907..bb575a5 100644 --- a/chrome/browser/password_manager/password_store_factory.cc +++ b/chrome/browser/password_manager/password_store_factory.cc
@@ -97,7 +97,7 @@ password_manager::ToggleAffiliationBasedMatchingBasedOnPasswordSyncedState( password_store.get(), sync_service, request_context_getter, - profile->GetPath(), content::BrowserThread::GetMessageLoopProxyForThread( + profile->GetPath(), content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB)); } @@ -107,7 +107,7 @@ GetForProfile(profile, ServiceAccessType::EXPLICIT_ACCESS); password_manager::TrimOrDeleteAffiliationCacheForStoreAndPath( password_store.get(), profile->GetPath(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB)); } @@ -156,7 +156,7 @@ scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner( base::ThreadTaskRunnerHandle::Get()); scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB)); scoped_refptr<PasswordStore> ps;
diff --git a/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc b/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc index bcdd8ce..ee1bac1 100644 --- a/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc +++ b/chrome/browser/password_manager/password_store_proxy_mac_unittest.cc
@@ -160,7 +160,7 @@ void PasswordStoreProxyMacTest::CreateAndInitPasswordStore( std::unique_ptr<password_manager::LoginDatabase> login_db) { store_ = new PasswordStoreProxyMac( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), base::WrapUnique(new crypto::MockAppleKeychain), std::move(login_db), &testing_prefs_); ASSERT_TRUE(store_->Init(syncer::SyncableService::StartSyncFlare())); @@ -456,7 +456,7 @@ if (lock_keychain) keychain_->set_locked(true); store_ = new PasswordStoreProxyMac( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), std::move(keychain_), std::move(login_db_), &testing_prefs_); ASSERT_TRUE(store_->Init(syncer::SyncableService::StartSyncFlare())); FinishAsyncProcessing();
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc index 21508c5..2185a5e8 100644 --- a/chrome/browser/password_manager/password_store_win_unittest.cc +++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -129,13 +129,13 @@ base::FilePath path = temp_dir_.path().AppendASCII("web_data_test"); wdbs_ = new WebDatabaseService( - path, BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)); + path, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB)); // Need to add at least one table so the database gets created. wdbs_->AddTable(std::unique_ptr<WebDatabaseTable>(new LoginsTable())); wdbs_->LoadDatabase(); wds_ = new PasswordWebDataService( - wdbs_, BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + wdbs_, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), WebDataServiceBase::ProfileErrorCallback()); wds_->Init(); } @@ -170,7 +170,7 @@ PasswordStoreWin* CreatePasswordStore() { return new PasswordStoreWin( base::ThreadTaskRunnerHandle::Get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), base::WrapUnique(new LoginDatabase(test_login_db_file_path())), wds_.get()); }
diff --git a/chrome/browser/password_manager/simple_password_store_mac_unittest.cc b/chrome/browser/password_manager/simple_password_store_mac_unittest.cc index 2a1987ce..5adfcb93 100644 --- a/chrome/browser/password_manager/simple_password_store_mac_unittest.cc +++ b/chrome/browser/password_manager/simple_password_store_mac_unittest.cc
@@ -44,13 +44,13 @@ std::unique_ptr<password_manager::LoginDatabase> login_db( new password_manager::LoginDatabase(test_login_db_file_path())); scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); ASSERT_TRUE(file_task_runner); file_task_runner->PostTask( FROM_HERE, base::Bind(&InitOnBackgroundThread, base::Unretained(login_db.get()))); store_ = new SimplePasswordStoreMac( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), nullptr, + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), nullptr, std::unique_ptr<password_manager::LoginDatabase>()); file_task_runner->PostTask( FROM_HERE,
diff --git a/chrome/browser/platform_util_mac.mm b/chrome/browser/platform_util_mac.mm index 507b23b..cb0c309 100644 --- a/chrome/browser/platform_util_mac.mm +++ b/chrome/browser/platform_util_mac.mm
@@ -4,17 +4,13 @@ #include "chrome/browser/platform_util.h" -#include <Carbon/Carbon.h> #import <Cocoa/Cocoa.h> -#include <CoreServices/CoreServices.h> #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/logging.h" #include "base/mac/mac_logging.h" -#import "base/mac/mac_util.h" -#include "base/mac/scoped_aedesc.h" #import "base/mac/sdk_forward_declarations.h" #include "base/strings/sys_string_conversions.h" #include "chrome/browser/platform_util_internal.h" @@ -41,104 +37,17 @@ // properly handle Finder activation for quarantined files // (http://crbug.com/32921) and unassociated file types // (http://crbug.com/50263). - if (base::mac::IsOSMavericksOrLater()) { - NSURL* url = [NSURL fileURLWithPath:path_string]; - if (!url) - return; - - const NSWorkspaceLaunchOptions launch_options = - NSWorkspaceLaunchAsync | NSWorkspaceLaunchWithErrorPresentation; - [[NSWorkspace sharedWorkspace] openURLs:@[ url ] - withAppBundleIdentifier:nil - options:launch_options - additionalEventParamDescriptor:nil - launchIdentifiers:NULL]; + NSURL* url = [NSURL fileURLWithPath:path_string]; + if (!url) return; - } - // On older OSes, both LaunchServices and NSWorkspace will fail silently for - // the two cases described above. On those platforms, use an AppleEvent to - // instruct the Finder to open the file. - - // Create the target of this AppleEvent, the Finder. - base::mac::ScopedAEDesc<AEAddressDesc> address; - const OSType finderCreatorCode = 'MACS'; - OSErr status = AECreateDesc(typeApplSignature, // type - &finderCreatorCode, // data - sizeof(finderCreatorCode), // dataSize - address.OutPointer()); // result - if (status != noErr) { - OSSTATUS_LOG(WARNING, status) << "Could not create OpenFile() AE target"; - return; - } - - // Build the AppleEvent data structure that instructs Finder to open files. - base::mac::ScopedAEDesc<AppleEvent> theEvent; - status = AECreateAppleEvent(kCoreEventClass, // theAEEventClass - kAEOpenDocuments, // theAEEventID - address, // target - kAutoGenerateReturnID, // returnID - kAnyTransactionID, // transactionID - theEvent.OutPointer()); // result - if (status != noErr) { - OSSTATUS_LOG(WARNING, status) << "Could not create OpenFile() AE event"; - return; - } - - // Create the list of files (only ever one) to open. - base::mac::ScopedAEDesc<AEDescList> fileList; - status = AECreateList(NULL, // factoringPtr - 0, // factoredSize - false, // isRecord - fileList.OutPointer()); // resultList - if (status != noErr) { - OSSTATUS_LOG(WARNING, status) << "Could not create OpenFile() AE file list"; - return; - } - - // Add the single path to the file list. C-style cast to avoid both a - // static_cast and a const_cast to get across the toll-free bridge. - CFURLRef pathURLRef = (CFURLRef)[NSURL fileURLWithPath:path_string]; - FSRef pathRef; - if (CFURLGetFSRef(pathURLRef, &pathRef)) { - status = AEPutPtr(fileList.OutPointer(), // theAEDescList - 0, // index - typeFSRef, // typeCode - &pathRef, // dataPtr - sizeof(pathRef)); // dataSize - if (status != noErr) { - OSSTATUS_LOG(WARNING, status) - << "Could not add file path to AE list in OpenFile()"; - return; - } - } else { - LOG(WARNING) << "Could not get FSRef for path URL in OpenFile()"; - return; - } - - // Attach the file list to the AppleEvent. - status = AEPutParamDesc(theEvent.OutPointer(), // theAppleEvent - keyDirectObject, // theAEKeyword - fileList); // theAEDesc - if (status != noErr) { - OSSTATUS_LOG(WARNING, status) - << "Could not put the AE file list the path in OpenFile()"; - return; - } - - // Send the actual event. Do not care about the reply. - base::mac::ScopedAEDesc<AppleEvent> reply; - status = AESend(theEvent, // theAppleEvent - reply.OutPointer(), // reply - kAENoReply + kAEAlwaysInteract, // sendMode - kAENormalPriority, // sendPriority - kAEDefaultTimeout, // timeOutInTicks - NULL, // idleProc - NULL); // filterProc - if (status != noErr) { - OSSTATUS_LOG(WARNING, status) - << "Could not send AE to Finder in OpenFile()"; - } + const NSWorkspaceLaunchOptions launch_options = + NSWorkspaceLaunchAsync | NSWorkspaceLaunchWithErrorPresentation; + [[NSWorkspace sharedWorkspace] openURLs:@[ url ] + withAppBundleIdentifier:nil + options:launch_options + additionalEventParamDescriptor:nil + launchIdentifiers:NULL]; } namespace internal {
diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc index 517ab60a..2c6a5a6 100644 --- a/chrome/browser/plugins/plugin_info_message_filter.cc +++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -178,12 +178,12 @@ allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated, profile->GetPrefs()); allow_outdated_plugins_.MoveToThread( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)); always_authorize_plugins_.Init(prefs::kPluginsAlwaysAuthorize, profile->GetPrefs()); always_authorize_plugins_.MoveToThread( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)); }
diff --git a/chrome/browser/policy/chrome_browser_policy_connector.cc b/chrome/browser/policy/chrome_browser_policy_connector.cc index 888f13a..f39a05f7 100644 --- a/chrome/browser/policy/chrome_browser_policy_connector.cc +++ b/chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -96,19 +96,19 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() { #if defined(OS_WIN) std::unique_ptr<AsyncPolicyLoader> loader(PolicyLoaderWin::Create( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), kRegistryChromePolicyKey)); return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader)); #elif defined(OS_MACOSX) std::unique_ptr<AsyncPolicyLoader> loader(new PolicyLoaderMac( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), GetManagedPolicyPath(), new MacPreferences())); return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader)); #elif defined(OS_POSIX) && !defined(OS_ANDROID) base::FilePath config_dir_path; if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { std::unique_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), config_dir_path, POLICY_SCOPE_MACHINE)); return new AsyncPolicyProvider(GetSchemaRegistry(), std::move(loader)); } else {
diff --git a/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc index 7733a2d..35419003 100644 --- a/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc +++ b/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc
@@ -66,8 +66,7 @@ << "Pre-existing policies in this machine will make this test fail."; interceptor_.reset(new TestRequestInterceptor( - "localhost", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); + "localhost", BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); BrowserPolicyConnector* connector = g_browser_process->browser_policy_connector();
diff --git a/chrome/browser/policy/cloud/device_management_service_browsertest.cc b/chrome/browser/policy/cloud/device_management_service_browsertest.cc index 090b7b0..b8b1d0ca 100644 --- a/chrome/browser/policy/cloud/device_management_service_browsertest.cc +++ b/chrome/browser/policy/cloud/device_management_service_browsertest.cc
@@ -104,8 +104,7 @@ std::string InitCannedResponse() { interceptor_.reset(new TestRequestInterceptor( - "localhost", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); + "localhost", BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); return "http://localhost"; }
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 197b3ea..1725076 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1852,7 +1852,7 @@ TestRequestInterceptor interceptor( "update.extension", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); interceptor.PushJobCallback( TestRequestInterceptor::FileJob( test_path.Append(kTestExtensionsDir).Append(kGood2CrxManifestName))); @@ -2063,7 +2063,7 @@ ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_path)); TestRequestInterceptor interceptor( "update.extension", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); interceptor.PushJobCallback(TestRequestInterceptor::BadRequestJob()); interceptor.PushJobCallback(TestRequestInterceptor::FileJob( test_path.Append(kTestExtensionsDir).Append(kGood2CrxManifestName))); @@ -2133,7 +2133,7 @@ ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_path)); TestRequestInterceptor interceptor( "update.extension", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); interceptor.PushJobCallback(TestRequestInterceptor::FileJob( test_path.Append(kTestExtensionsDir).Append(kGood2CrxManifestName)));
diff --git a/chrome/browser/precache/precache_util.cc b/chrome/browser/precache/precache_util.cc new file mode 100644 index 0000000..80ec4a1e --- /dev/null +++ b/chrome/browser/precache/precache_util.cc
@@ -0,0 +1,72 @@ +// 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/precache/precache_util.h" + +#include "base/time/time.h" +#include "chrome/browser/browser_process.h" +#include "chrome/browser/precache/precache_manager_factory.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" +#include "components/data_use_measurement/content/data_use_measurement.h" +#include "components/precache/content/precache_manager.h" +#include "content/public/browser/browser_thread.h" +#include "net/url_request/url_request.h" +#include "url/gurl.h" + +namespace { + +void UpdatePrecacheMetricsAndStateOnUIThread(const GURL& url, + const GURL& referrer, + base::TimeDelta latency, + const base::Time& fetch_time, + int64_t size, + bool was_cached, + bool is_user_traffic, + void* profile_id) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + + if (!g_browser_process->profile_manager()->IsValidProfile(profile_id)) + return; + Profile* profile = reinterpret_cast<Profile*>(profile_id); + + precache::PrecacheManager* precache_manager = + precache::PrecacheManagerFactory::GetForBrowserContext(profile); + // |precache_manager| could be NULL if the profile is off the record. + if (!precache_manager || !precache_manager->IsPrecachingAllowed()) + return; + + precache_manager->UpdatePrecacheMetricsAndState( + url, referrer, latency, fetch_time, size, was_cached, is_user_traffic); +} + +} // namespace + +namespace precache { + +// TODO(rajendrant): Add unittests for this function. +void UpdatePrecacheMetricsAndState(const net::URLRequest* request, + void* profile_id) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + + // For better accuracy, we use the actual bytes read instead of the length + // specified with the Content-Length header, which may be inaccurate, + // or missing, as is the case with chunked encoding. + int64_t received_content_length = request->received_response_content_length(); + base::TimeDelta latency = base::TimeTicks::Now() - request->creation_time(); + + // Record precache metrics when a fetch is completed successfully, if + // precaching is allowed. + content::BrowserThread::PostTask( + content::BrowserThread::UI, FROM_HERE, + base::Bind( + &UpdatePrecacheMetricsAndStateOnUIThread, request->url(), + GURL(request->referrer()), latency, base::Time::Now(), + received_content_length, request->was_cached(), + data_use_measurement::DataUseMeasurement::IsUserInitiatedRequest( + request), + profile_id)); +} + +} // namespace precache
diff --git a/chrome/browser/precache/precache_util.h b/chrome/browser/precache/precache_util.h new file mode 100644 index 0000000..80a1fc8 --- /dev/null +++ b/chrome/browser/precache/precache_util.h
@@ -0,0 +1,19 @@ +// 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 CHROME_BROWSER_PRECACHE_PRECACHE_UTIL_H_ +#define CHROME_BROWSER_PRECACHE_PRECACHE_UTIL_H_ + +namespace net { +class URLRequest; +} + +namespace precache { + +void UpdatePrecacheMetricsAndState(const net::URLRequest* request, + void* profile_id); + +} // namespace precache + +#endif // CHROME_BROWSER_PRECACHE_PRECACHE_UTIL_H_
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index fd98e033..9fa545c 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -113,7 +113,6 @@ #include "chrome/browser/apps/shortcut_manager.h" #include "chrome/browser/extensions/activity_log/activity_log.h" #include "chrome/browser/extensions/api/commands/command_service.h" -#include "chrome/browser/extensions/api/copresence/copresence_api.h" #include "chrome/browser/extensions/api/tabs/tabs_api.h" #include "chrome/browser/extensions/component_migration_helper.h" #include "chrome/browser/extensions/extension_web_ui.h" @@ -491,7 +490,6 @@ ToolbarActionsBar::RegisterProfilePrefs(registry); extensions::ActivityLog::RegisterProfilePrefs(registry); extensions::ComponentMigrationHelper::RegisterPrefs(registry); - extensions::CopresenceService::RegisterProfilePrefs(registry); extensions::ExtensionPrefs::RegisterProfilePrefs(registry); extensions::launch_util::RegisterProfilePrefs(registry); extensions::RuntimeAPI::RegisterPrefs(registry);
diff --git a/chrome/browser/printing/cloud_print/privet_http_unittest.cc b/chrome/browser/printing/cloud_print/privet_http_unittest.cc index ab86142..843553b 100644 --- a/chrome/browser/printing/cloud_print/privet_http_unittest.cc +++ b/chrome/browser/printing/cloud_print/privet_http_unittest.cc
@@ -1039,7 +1039,7 @@ void SetUp() override { context_getter_ = new net::TestURLRequestContextGetter( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); server_.reset(new EmbeddedTestServer(EmbeddedTestServer::TYPE_HTTP)); ASSERT_TRUE(server_->Start());
diff --git a/chrome/browser/printing/cloud_print/privet_url_fetcher.cc b/chrome/browser/printing/cloud_print/privet_url_fetcher.cc index b9b06321..1fdccbda 100644 --- a/chrome/browser/printing/cloud_print/privet_url_fetcher.cc +++ b/chrome/browser/printing/cloud_print/privet_url_fetcher.cc
@@ -171,7 +171,7 @@ if (make_response_file_) { url_fetcher_->SaveResponseToTemporaryFile( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE)); } @@ -181,7 +181,7 @@ url_fetcher_->SetUploadFilePath( upload_content_type_, upload_file_path_, 0 /*offset*/, std::numeric_limits<uint64_t>::max() /*length*/, - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE)); } else { url_fetcher_->SetUploadData(upload_content_type_, upload_data_);
diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc index a7f75bf5..25903ed 100644 --- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc +++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
@@ -319,7 +319,7 @@ void TearDown() override; scoped_refptr<base::SingleThreadTaskRunner> IOTaskRunner() { - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } base::Process Launch(const std::string& name); void WaitForConnect();
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc index ac2af18c..94b791c 100644 --- a/chrome/browser/printing/printing_message_filter.cc +++ b/chrome/browser/printing/printing_message_filter.cc
@@ -76,7 +76,7 @@ DCHECK(queue_.get()); is_printing_enabled_->Init(prefs::kPrintingEnabled, profile->GetPrefs()); is_printing_enabled_->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } PrintingMessageFilter::~PrintingMessageFilter() {
diff --git a/chrome/browser/process_singleton_posix_unittest.cc b/chrome/browser/process_singleton_posix_unittest.cc index 59a811c5..fa538be 100644 --- a/chrome/browser/process_singleton_posix_unittest.cc +++ b/chrome/browser/process_singleton_posix_unittest.cc
@@ -97,7 +97,7 @@ void TearDown() override { scoped_refptr<base::ThreadTestHelper> io_helper(new base::ThreadTestHelper( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())); ASSERT_TRUE(io_helper->Run()); // Destruct the ProcessSingleton object before the IO thread so that its
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc index b256432..904c59b9 100644 --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -162,7 +162,7 @@ io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, profile_->GetPrefs()); io_data_->safe_browsing_enabled()->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); io_data_->InitializeOnUIThread(profile_); }
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index c80ec42..f520e2a5 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -442,11 +442,9 @@ #else cloud_policy_manager_ = policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext( - this, - force_immediate_policy_load, - sequenced_task_runner, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + this, force_immediate_policy_load, sequenced_task_runner, + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); #endif profile_policy_connector_ = policy::ProfilePolicyConnectorFactory::CreateForBrowserContext( @@ -564,7 +562,7 @@ ssl_config_service_manager_.reset( ssl_config::SSLConfigServiceManager::CreateDefaultManager( local_state, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); #if BUILDFLAG(ENABLE_BACKGROUND) // Initialize the BackgroundModeManager - this has to be done here before @@ -1287,5 +1285,5 @@ return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); return service->CreateMonitor( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); }
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc index 7f1204c..04a4e743 100644 --- a/chrome/browser/profiles/profile_impl_io_data.cc +++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -187,8 +187,8 @@ io_data_->set_data_reduction_proxy_io_data( CreateDataReductionProxyChromeIOData( g_browser_process->io_thread()->net_log(), profile_->GetPrefs(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); scoped_refptr<base::SequencedTaskRunner> db_task_runner = @@ -201,7 +201,7 @@ ->InitDataReductionProxySettings( io_data_->data_reduction_proxy_io_data(), profile_->GetPrefs(), profile_->GetRequestContext(), std::move(store), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), db_task_runner); } @@ -370,11 +370,11 @@ io_data_->session_startup_pref()->Init( prefs::kRestoreOnStartup, pref_service); io_data_->session_startup_pref()->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, pref_service); io_data_->safe_browsing_enabled()->MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); io_data_->InitializeOnUIThread(profile_); } @@ -520,7 +520,7 @@ new net::HttpCache::DefaultBackend( net::DISK_CACHE, ChooseCacheBackendType(), lazy_params_->cache_path, lazy_params_->cache_max_size, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE))); http_network_session_ = CreateHttpNetworkSession(*profile_params); main_http_factory_ = CreateMainHttpFactory(http_network_session_.get(), std::move(main_backend)); @@ -635,11 +635,9 @@ app_backend = net::HttpCache::DefaultBackend::InMemory(0); } else { app_backend.reset(new net::HttpCache::DefaultBackend( - net::DISK_CACHE, - ChooseCacheBackendType(), - cache_path, + net::DISK_CACHE, ChooseCacheBackendType(), cache_path, app_cache_max_size_, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE))); } std::unique_ptr<net::CookieStore> cookie_store; @@ -736,7 +734,7 @@ new net::HttpCache::DefaultBackend( net::MEDIA_CACHE, ChooseCacheBackendType(), cache_path, cache_max_size, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE))); std::unique_ptr<net::HttpCache> media_http_cache = CreateHttpFactory(http_network_session_.get(), std::move(media_backend));
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index 1ac33c4f..dd0f063 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc
@@ -482,7 +482,7 @@ pref_service); scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); chrome_http_user_agent_settings_.reset( new ChromeHttpUserAgentSettings(pref_service)); @@ -895,14 +895,14 @@ enable_metrics_.Init(prefs::kCrashReportingEnabled, g_browser_process->local_state()); enable_metrics_.MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); #else // Prep the PrefMember and send it to the IO thread, since this value will be // read from there. enable_metrics_.Init(metrics::prefs::kMetricsReportingEnabled, g_browser_process->local_state()); enable_metrics_.MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); #endif // BUILDFLAG(ANDROID_JAVA_UI) }
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index 3b49cbf..becbd9c 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc
@@ -107,8 +107,8 @@ #endif #if defined(OS_ANDROID) +#include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h" -#include "components/ntp_snippets/ntp_snippets_service.h" #endif #if defined(OS_CHROMEOS) @@ -1227,6 +1227,7 @@ #if defined(OS_ANDROID) // Service is responsible for fetching content snippets for the NTP. + ContentSuggestionsServiceFactory::GetForProfile(profile); NTPSnippetsServiceFactory::GetForProfile(profile); #endif }
diff --git a/chrome/browser/profiles/profile_statistics_aggregator.cc b/chrome/browser/profiles/profile_statistics_aggregator.cc index c882487..303be356 100644 --- a/chrome/browser/profiles/profile_statistics_aggregator.cc +++ b/chrome/browser/profiles/profile_statistics_aggregator.cc
@@ -90,8 +90,8 @@ // Initiate bookmark counting (async). tracker_.PostTask( - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::UI).get(), + content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::UI) + .get(), FROM_HERE, base::Bind(&ProfileStatisticsAggregator::WaitOrCountBookmarks, this)); @@ -122,12 +122,11 @@ // Initiate preference counting (async). tracker_.PostTaskAndReplyWithResult( - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::UI).get(), - FROM_HERE, - base::Bind(&ProfileStatisticsAggregator::CountPrefs, this), - base::Bind(&ProfileStatisticsAggregator::StatisticsCallback, - this, profiles::kProfileStatisticsSettings)); + content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::UI) + .get(), + FROM_HERE, base::Bind(&ProfileStatisticsAggregator::CountPrefs, this), + base::Bind(&ProfileStatisticsAggregator::StatisticsCallback, this, + profiles::kProfileStatisticsSettings)); } void ProfileStatisticsAggregator::StatisticsCallback(
diff --git a/chrome/browser/profiles/profile_statistics_unittest.cc b/chrome/browser/profiles/profile_statistics_unittest.cc index 4344df9..b38fe0d 100644 --- a/chrome/browser/profiles/profile_statistics_unittest.cc +++ b/chrome/browser/profiles/profile_statistics_unittest.cc
@@ -42,10 +42,9 @@ void LoadBookmarkModel(Profile* profile, bookmarks::BookmarkModel* bookmark_model) { - bookmark_model->Load(profile->GetPrefs(), - profile->GetPath(), + bookmark_model->Load(profile->GetPrefs(), profile->GetPath(), profile->GetIOTaskRunner(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI)); }
diff --git a/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc b/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc index ce0a5cb..907099a 100644 --- a/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc +++ b/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc
@@ -96,7 +96,7 @@ unsafe_resource.callback = base::Bind( &DataReductionProxyResourceThrottle::OnBlockingPageComplete, AsWeakPtr()); unsafe_resource.callback_thread = - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); unsafe_resource.render_process_host_id = info->GetChildID(); unsafe_resource.render_frame_id = info->GetRenderFrameID();
diff --git a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc index a8d926f9..e04368f 100644 --- a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
@@ -37,7 +37,7 @@ scoped_refptr<base::TaskRunner> PepperBrokerMessageFilter::OverrideTaskRunnerForMessage( const IPC::Message& message) { - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); } int32_t PepperBrokerMessageFilter::OnResourceMessageReceived(
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc index 072a16f..55fc1b6 100644 --- a/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc
@@ -111,16 +111,16 @@ // restrictions of various platform APIs. In general, the clipboard is not // thread-safe, so all clipboard calls should be serviced from the UI thread. if (msg.type() == PpapiHostMsg_FlashClipboard_WriteData::ID) - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); // Windows needs clipboard reads to be serviced from the IO thread because // these are sync IPCs which can result in deadlocks with plugins if serviced // from the UI thread. Note that Windows clipboard calls ARE thread-safe so it // is ok for reads and writes to be serviced from different threads. #if !defined(OS_WIN) - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); #else - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); #endif }
diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc index a2d29f8b..09d7c0b9 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
@@ -79,7 +79,7 @@ const IPC::Message& msg) { // In order to reach ExtensionSystem, we need to get ProfileManager first. // ProfileManager lives in UI thread, so we need to do this in UI thread. - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI); }
diff --git a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc index 121430a7..0a40ff42 100644 --- a/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc
@@ -91,7 +91,7 @@ scoped_refptr<base::TaskRunner> PepperOutputProtectionMessageFilter::OverrideTaskRunnerForMessage( const IPC::Message& message) { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI); }
diff --git a/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.cc index 1c2cd64..14f1e00 100644 --- a/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.cc
@@ -33,7 +33,7 @@ scoped_refptr<base::TaskRunner> PepperPlatformVerificationMessageFilter::OverrideTaskRunnerForMessage( const IPC::Message& msg) { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI); }
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc index 35565b19..54f7a85 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc +++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle.cc
@@ -260,9 +260,8 @@ resource.threat_metadata = metadata; resource.callback = base::Bind( &SafeBrowsingResourceThrottle::OnBlockingPageComplete, AsWeakPtr()); - resource.callback_thread = - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::IO); + resource.callback_thread = content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::IO); resource.render_process_host_id = info->GetChildID(); resource.render_frame_id = info->GetRenderFrameID(); resource.threat_source = database_manager_->GetThreatSource();
diff --git a/chrome/browser/resources/chromeos/arc_support/background.js b/chrome/browser/resources/chromeos/arc_support/background.js index d72b57d..41a744e6 100644 --- a/chrome/browser/resources/chromeos/arc_support/background.js +++ b/chrome/browser/resources/chromeos/arc_support/background.js
@@ -8,7 +8,8 @@ * @type {Array<string>} */ var UI_PAGES = ['none', - 'start', + 'terms-loading', + 'terms', 'lso-loading', 'lso', 'arc-loading', @@ -59,6 +60,12 @@ var currentDeviceId = null; /** + * Indicates that terms were accepted by user. + * @type {boolean} + */ +var termsAccepted = false; + +/** * Closes current window in response to request from native code. This does not * issue 'cancelAuthCode' message to native code. */ @@ -105,9 +112,6 @@ js: { files: ['playstore.js'] }, run_at: 'document_end' }]); - - // Applying localization changes page layout, update terms height. - updateTermsHeight(); } /** @@ -171,6 +175,9 @@ var setTermsHeight = function() { var doc = appWindow.contentWindow.document; var termsContainer = doc.getElementById('terms-container'); + // Reset terms-view height in order to stabilize style computation. For + // some reason, child webview affects final result. + termsView.style.height = '0px'; var style = window.getComputedStyle(termsContainer, null); var height = style.getPropertyValue('height'); termsView.style.height = height; @@ -277,10 +284,17 @@ return; } - if (UI_PAGES[pageId] == 'start') { + if (UI_PAGES[pageId] == 'terms-loading') { + termsAccepted = false; loadInitialTerms(); - } else if (UI_PAGES[pageId] == 'error' || - UI_PAGES[pageId] == 'error-with-feedback') { + } else { + // Explicit request to start not from start page. Assume terms are + // accepted in this case. + termsAccepted = true; + } + + if (UI_PAGES[pageId] == 'error' || + UI_PAGES[pageId] == 'error-with-feedback') { setErrorMessage(status); } showPage(UI_PAGES[pageId]); @@ -297,25 +311,32 @@ var onAppContentLoad = function() { var doc = appWindow.contentWindow.document; lsoView = doc.getElementById('arc-support'); - // Apply absolute dimension to webview tag in order to avoid UI glitch - // when embedded content layout is visible for user, even if 100% width and - // height are set in css file. - // TODO(khmel): Investigate why relative layout is not enough. - lsoView.style.width = appWindow.innerBounds.width + 'px'; - lsoView.style.height = appWindow.innerBounds.height + 'px'; var isApprovalResponse = function(url) { var resultUrlPrefix = 'https://accounts.google.com/o/oauth2/approval?'; return url.substring(0, resultUrlPrefix.length) == resultUrlPrefix; }; + var lsoError = false; var onLsoViewRequestResponseStarted = function(details) { if (isApprovalResponse(details.url)) { showPage('arc-loading'); } + lsoError = false; + }; + + var onLsoViewErrorOccurred = function(details) { + setErrorMessage(appWindow.contentWindow.loadTimeData.getString( + 'serverError')); + showPage('error'); + lsoError = true; }; var onLsoViewContentLoad = function() { + if (lsoError) { + return; + } + if (!isApprovalResponse(lsoView.src)) { // Show LSO page when its content is ready. showPage('lso'); @@ -324,8 +345,8 @@ lsoView.executeScript({code: 'document.title;'}, function(results) { var authCodePrefix = 'Success code='; - if (results[0].substring(0, authCodePrefix.length) == - authCodePrefix) { + if (results && results.length == 1 && typeof results[0] == 'string' && + results[0].substring(0, authCodePrefix.length) == authCodePrefix) { var authCode = results[0].substring(authCodePrefix.length); sendNativeMessage('setAuthCode', {code: authCode}); } else { @@ -343,31 +364,40 @@ lsoView.request.onResponseStarted.addListener( onLsoViewRequestResponseStarted, requestFilter); + lsoView.request.onErrorOccurred.addListener( + onLsoViewErrorOccurred, requestFilter); lsoView.addEventListener('contentload', onLsoViewContentLoad); - termsView = doc.getElementById('terms'); + termsView = doc.getElementById('terms-view'); - // Handle terms view completed event. Enable button 'Agree' in case terms - // were loaded successfully and try to reload its content on error. - var termsReloadRetryTimeMs = 1000; // 1 second - function onTermsViewRequestCompleted(details) { - if (termsReloadTimeout) { - clearTimeout(termsReloadTimeout); - termsReloadTimeout = null; + var termsError = false; + var onTermsViewBeforeRequest = function(details) { + showPage('terms-loading'); + termsError = false; + }; + + var onTermsViewErrorOccurred = function(details) { + termsAccepted = false; + setErrorMessage(appWindow.contentWindow.loadTimeData.getString( + 'serverError')); + showPage('error'); + termsError = true; + }; + + var onTermsViewContentLoad = function() { + if (termsError) { + return; } - if (details.statusCode == 200) { - doc.getElementById('button-agree').disabled = false; - } else { - termsReloadTimeout = setTimeout(loadInitialTerms, - termsReloadRetryTimeMs); - termsReloadRetryTimeMs = termsReloadRetryTimeMs * 2; - if (termsReloadRetryTimeMs > 30000) { - termsReloadRetryTimeMs = 30000; - } - } - } - termsView.request.onCompleted.addListener(onTermsViewRequestCompleted, - requestFilter); + showPage('terms'); + updateTermsHeight(); + }; + + termsView.request.onBeforeRequest.addListener(onTermsViewBeforeRequest, + requestFilter); + termsView.request.onErrorOccurred.addListener(onTermsViewErrorOccurred, + requestFilter); + termsView.addEventListener('contentload', onTermsViewContentLoad); + // webview is not allowed to open links in the new window. Hook these events // and open links in context of main page. @@ -377,6 +407,8 @@ }); var onAgree = function() { + termsAccepted = true; + var enableMetrics = doc.getElementById('enable-metrics'); if (!enableMetrics.hidden) { sendNativeMessage('enableMetrics', { @@ -401,7 +433,11 @@ }; var onRetry = function() { - sendNativeMessage('startLso'); + if (termsAccepted) { + sendNativeMessage('startLso'); + } else { + loadInitialTerms(); + } }; var onSendFeedback = function() {
diff --git a/chrome/browser/resources/chromeos/arc_support/main.css b/chrome/browser/resources/chromeos/arc_support/main.css index ce23289..1ca1369a 100644 --- a/chrome/browser/resources/chromeos/arc_support/main.css +++ b/chrome/browser/resources/chromeos/arc_support/main.css
@@ -16,7 +16,11 @@ } #arc-support { - padding: 0; + width: 960px; +} + +#terms-view { + width: 468px; } .button-separator { @@ -55,7 +59,7 @@ .section-checkbox-container { margin: auto; - padding: 16px 0 0 0; + padding: 8px 0 0 0; text-align: left; width: 468px; } @@ -64,7 +68,7 @@ border: 1px solid #e6e6e6; color: rgba(0, 0, 0, 0.54); flex: auto; - margin: auto; + margin: 0 auto 8px auto; overflow: hidden; padding: 0; width: 468px;
diff --git a/chrome/browser/resources/chromeos/arc_support/main.html b/chrome/browser/resources/chromeos/arc_support/main.html index 435a8efdd..4cd3b6d 100644 --- a/chrome/browser/resources/chromeos/arc_support/main.html +++ b/chrome/browser/resources/chromeos/arc_support/main.html
@@ -42,13 +42,19 @@ <script src="chrome://resources/js/i18n_template_no_process.js"></script> </head> <body> - <div id="start" class="section section-flex"> + <div id="terms-loading" class="section"> + <img class="image-header" src="images/header.png"> + <p class="text-title" i18n-content="greetingHeader"></p> + <p class="text-desc" i18n-content="greetingDescription"></p> + <paper-progress class="blue" indeterminate></paper-progress> + </div> + <div id="terms" class="section section-flex" hidden> <img class="image-header" src="images/header.png"> <p class="text-title" i18n-content="greetingHeader"></p> <p class="text-desc" i18n-content="greetingDescription"></p> <p class="text-terms-title" i18n-content="termsOfService"></p> <div class="section-terms" id ="terms-container"> - <webview id="terms" partition="persist:arc_support"></webview> + <webview id="terms-view" partition="persist:arc_support"></webview> </div> <div class="layout horizontal section-checkbox-container"> <input type="checkbox" class="checkbox-option" id="enable-metrics" hidden> @@ -64,8 +70,7 @@ i18n-content="buttonCancel"> </paper-button> <div class="button-separator"></div> - <paper-button class="blue" id="button-agree" i18n-content="buttonAgree" - disabled> + <paper-button class="blue" id="button-agree" i18n-content="buttonAgree"> </paper-button> </div> </div>
diff --git a/chrome/browser/resources/copresence.css b/chrome/browser/resources/copresence.css deleted file mode 100644 index 6d7b5806..0000000 --- a/chrome/browser/resources/copresence.css +++ /dev/null
@@ -1,69 +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. */ - -body { - margin: 10px 20px; -} - -section { - margin-top: 40px; -} - -table { - border: 1px solid gray; - border-spacing: 0; - margin-top: 15px; - width: 600px; -} - -thead { - background-color: rgb(220, 240, 255); - font-weight: bold; -} - -tbody { - border-top: 1px solid gray; - height: 200px; - overflow-x: hidden; - overflow-y: scroll; -} - -td { - padding: 5px; - text-align: left; -} - -td::first-letter { - text-transform: capitalize; -} - -.confirmed, -.valid { - color: green; -} - -.done { - color: darkGray; -} - -.invalid { - color: red; -} - -.directives td { - width: 190px; -} - -.tokens td { - width: 140px; -} - -table td.spacer { - width: 5px; -} - -tbody, -thead > tr { - display: block; -}
diff --git a/chrome/browser/resources/copresence.html b/chrome/browser/resources/copresence.html deleted file mode 100644 index 985a64e..0000000 --- a/chrome/browser/resources/copresence.html +++ /dev/null
@@ -1,75 +0,0 @@ -<!doctype html> -<html i18n-values="dir:textdirection;lang:language"> - -<head> - <meta charset="utf-8"> - <title i18n-content="title"></title> - <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css"> - <link rel="stylesheet" href="chrome://copresence/copresence.css"> -</head> - -<body> - <header> - <h1 i18n-content="title"></h1> - </header> - - <main> - <section> - <h2 i18n-content="directives_title"></h2> - <table class="directives" id="directives-table"> - <thead> - <tr> - <td i18n-content="directive_type"> - <td i18n-content="token_medium"> - <td i18n-content="duration"> - <td class="spacer"> - <tbody> - </table> - </section> - - <section> - <h2 i18n-content="transmitted_tokens_title"></h2> - <table class="tokens" id="transmitted-tokens-table"> - <thead> - <tr> - <td i18n-content="token_id"> - <td i18n-content="token_status"> - <td i18n-content="token_medium"> - <td i18n-content="token_transmit_time"> - <td class="spacer"> - <tbody> - </table> - </section> - - <section> - <h2 i18n-content="received_tokens_title"></h2> - <table class="tokens" id="received-tokens-table"> - <thead> - <tr> - <td i18n-content="token_id"> - <td i18n-content="token_status"> - <td i18n-content="token_medium"> - <td i18n-content="token_receive_time"> - <td class="spacer"> - <tbody> - </table> - </section> - - <!-- TODO(ckehoe): Add server calls. --> - - <!-- TODO(ckehoe): Add GCM pings. --> - - <section> - <button i18n-content="clear_state" id="reset-button"> - </section> - - </main> - - <script src="chrome://resources/js/load_time_data.js"></script> - <script src="chrome://resources/js/util.js"></script> - <script src="chrome://copresence/copresence.js"></script> - <script src="chrome://copresence/strings.js"></script> - <script src="chrome://resources/js/i18n_template.js"></script> -</body> - -</html>
diff --git a/chrome/browser/resources/copresence.js b/chrome/browser/resources/copresence.js deleted file mode 100644 index ce38e889..0000000 --- a/chrome/browser/resources/copresence.js +++ /dev/null
@@ -1,130 +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. - -/** - * Debug information about an active copresence directive. - * @typedef {{ - * type: string, - * medium: string, - * duration: string - * }} - */ -var Directive; - -/** - * Debug information about a recent copresence token. - * @typedef {{ - * id: string, - * statuses: string, - * medium: string, - * time: string - * }} - */ -var Token; - -/** - * Callback to refresh the list of directives. - * @param {Array<Directive>} directives - */ -function refreshDirectives(directives) { - var table = $('directives-table').tBodies[0]; - - // Fix the directives table to have the correct number of rows. - while (table.rows.length < directives.length) - table.insertRow(); - while (table.rows.length > directives.length) - table.deleteRow(); - - // Populate the directives into the table. - directives.forEach(function(directive, index) { - var row = table.rows.item(index); - while (row.cells.length < 3) - row.insertCell(); - - row.cells.item(0).textContent = directive.type; - row.cells.item(1).textContent = directive.medium; - row.cells.item(2).textContent = directive.duration; - }); -} - -/** - * Callback to add or update transmitted tokens. - * @param {Token} token - */ -function updateTransmittedToken(token) { - updateTokenTable($('transmitted-tokens-table'), token); -} - -/** - * Callback to add or update received tokens. - * @param {Token} token - */ -function updateReceivedToken(token) { - updateTokenTable($('received-tokens-table'), token); -} - -/** - * Callback to clear out the token tables. - */ -function clearTokens() { - clearTable($('transmitted-tokens-table')); - clearTable($('received-tokens-table')); -} - -/** - * Add or update a token in the specified table. - * @param {HTMLTableElement} table - * @param {Token} token - */ -function updateTokenTable(table, token) { - var rows = table.tBodies[0].rows; - - var index; - for (index = 0; index < rows.length; index++) { - var row = rows.item(index); - if (row.cells[0].textContent == token.id) { - updateTokenRow(row, token); - break; - } - } - - if (index == rows.length) - updateTokenRow(table.tBodies[0].insertRow(), token); -} - -/** - * Update a token on the specified row. - * @param {HTMLTableRowElement} row - * @param {Token} token - */ -function updateTokenRow(row, token) { - while (row.cells.length < 4) - row.insertCell(); - row.className = token.statuses; - - row.cells[0].textContent = token.id; - row.cells[1].textContent = - token.statuses.replace('confirmed', '(Confirmed)'); - row.cells[2].textContent = token.medium; - row.cells[3].textContent = token.time; -} - -/** - * Delete all the rows in a table. - * @param {HTMLTableElement} table - */ -function clearTable(table) { - var body = table.tBodies[0]; - while (body.rows.length > 0) - body.deleteRow(); -} - -document.addEventListener('DOMContentLoaded', function() { - chrome.send('populateCopresenceState'); - - $('reset-button').addEventListener('click', function() { - if (confirm(loadTimeData.getString('confirm_delete'))) - chrome.send('clearCopresenceState'); - }); -});
diff --git a/chrome/browser/resources/local_ntp/most_visited_single.js b/chrome/browser/resources/local_ntp/most_visited_single.js index 70f9dcbb..c10cd54 100644 --- a/chrome/browser/resources/local_ntp/most_visited_single.js +++ b/chrome/browser/resources/local_ntp/most_visited_single.js
@@ -25,22 +25,9 @@ NTP_TILE: 2, // The tile uses a local thumbnail image. NTP_THUMBNAIL_TILE: 3, - // Used when no thumbnail is specified and a gray tile with the domain is used - // as the main tile. Unused here. - NTP_GRAY_TILE: 4, - // The visuals of that tile are handled externally by the page itself. - // Unused here. - NTP_EXTERNAL_TILE: 5, // There was an error in loading both the thumbnail image and the fallback // (if it was provided), resulting in a gray tile. NTP_THUMBNAIL_ERROR: 6, - // Used a gray tile with the domain as the fallback for a failed thumbnail. - // Unused here. - NTP_GRAY_TILE_FALLBACK: 7, - // The visuals of that tile's fallback are handled externally. Unused here. - NTP_EXTERNAL_TILE_FALLBACK: 8, - // The user moused over an NTP tile. - NTP_MOUSEOVER: 9, // A NTP Tile has finished loading (successfully or failing). NTP_TILE_LOADED: 10, }; @@ -459,10 +446,6 @@ } } }); - // TODO(fserb): remove this or at least change to mouseenter. - tile.addEventListener('mouseover', function() { - logEvent(LOG_TYPE.NTP_MOUSEOVER); - }); var title = tile.querySelector('.mv-title'); title.innerText = data.title;
diff --git a/chrome/browser/resources/local_ntp/most_visited_util.js b/chrome/browser/resources/local_ntp/most_visited_util.js index 50c089b0..7c10a59 100644 --- a/chrome/browser/resources/local_ntp/most_visited_util.js +++ b/chrome/browser/resources/local_ntp/most_visited_util.js
@@ -44,8 +44,6 @@ NTP_GRAY_TILE_FALLBACK: 7, // The visuals of that tile's fallback are handled externally. NTP_EXTERNAL_TILE_FALLBACK: 8, - // The user moused over an NTP tile or title. - NTP_MOUSEOVER: 9, // A NTP Tile has finished loading (successfully or failing). NTP_TILE_LOADED: 10, }; @@ -136,10 +134,6 @@ spanWrap.textContent = text; link.appendChild(spanWrap); } - link.addEventListener('mouseover', function() { - var ntpApiHandle = chrome.embeddedSearch.newTabPage; - ntpApiHandle.logEvent(NTP_LOGGING_EVENT_TYPE.NTP_MOUSEOVER); - }); link.addEventListener('focus', function() { window.parent.postMessage('linkFocused', DOMAIN_ORIGIN); });
diff --git a/chrome/browser/resources/md_extensions/compiled_resources2.gyp b/chrome/browser/resources/md_extensions/compiled_resources2.gyp index fcc7620..61cdcbe 100644 --- a/chrome/browser/resources/md_extensions/compiled_resources2.gyp +++ b/chrome/browser/resources/md_extensions/compiled_resources2.gyp
@@ -109,6 +109,17 @@ 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'], }, { + 'target_name': 'shortcut_input', + 'dependencies': [ + '<(DEPTH)/chrome/browser/resources/extensions/compiled_resources2.gyp:shortcut_util', + '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert', + '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', + '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr', + '<(EXTERNS_GYP):developer_private', + ], + 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'], + }, + { 'target_name': 'sidebar', 'dependencies': [ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
diff --git a/chrome/browser/resources/md_extensions/keyboard_shortcuts.html b/chrome/browser/resources/md_extensions/keyboard_shortcuts.html index 6fad24d..ef81412e9 100644 --- a/chrome/browser/resources/md_extensions/keyboard_shortcuts.html +++ b/chrome/browser/resources/md_extensions/keyboard_shortcuts.html
@@ -6,7 +6,7 @@ <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-listbox.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> <link rel="import" href="chrome://extensions/animation_helper.html"> -<link rel="import" href="chrome://extensions/shortcut_util.html"> +<link rel="import" href="chrome://extensions/shortcut_input.html"> <dom-module id="extensions-keyboard-shortcuts"> <template> @@ -58,16 +58,12 @@ </div> <div class="card-controls"> <template is="dom-repeat" items="[[item.commands]]" as="command"> - <div class="command-entry"> + <div class="command-entry" command="[[command]]"> <span class="command-name">[[command.description]]</span> - <span class="command-keys" - hidden$="[[!hasKeybinding_(command.keybinding)]]"> - [[command.keybinding]] - </span> - <span class="no-command-set" - hidden$="[[hasKeybinding_(command.keybinding)]]"> - $i18n{shortcutNotSet} - </span> + <extensions-shortcut-input item="[[item.id]]" + shortcut="[[command.keybinding]]" + command-name="[[command.name]]"> + </extensions-shortcut-input> <paper-dropdown-menu label="$i18n{shortcutScopeLabel}"> <paper-listbox class="dropdown-content" selected="[[computeSelectedScope_(command)]]">
diff --git a/chrome/browser/resources/md_extensions/service.js b/chrome/browser/resources/md_extensions/service.js index 40ddf4c..4f1f35c 100644 --- a/chrome/browser/resources/md_extensions/service.js +++ b/chrome/browser/resources/md_extensions/service.js
@@ -24,6 +24,16 @@ this.manager_.sidebar.setDelegate(this); this.manager_.set('itemDelegate', this); this.manager_.$['pack-dialog'].set('delegate', this); + var keyboardShortcuts = this.manager_.$['keyboard-shortcuts']; + keyboardShortcuts.addEventListener( + 'shortcut-updated', + this.onExtensionCommandUpdated_.bind(this)); + keyboardShortcuts.addEventListener( + 'shortcut-capture-started', + this.onShortcutCaptureChanged_.bind(this, true)); + keyboardShortcuts.addEventListener( + 'shortcut-capture-ended', + this.onShortcutCaptureChanged_.bind(this, false)); chrome.developerPrivate.onProfileStateChanged.addListener( this.onProfileStateChanged_.bind(this)); chrome.developerPrivate.onItemStateChanged.addListener( @@ -111,6 +121,34 @@ }); }, + /** + * Updates an extension command. + * @param {!CustomEvent} e + * @private + */ + onExtensionCommandUpdated_: function(e) { + chrome.developerPrivate.updateExtensionCommand({ + extensionId: e.detail.item, + commandName: e.detail.commandName, + keybinding: e.detail.keybinding, + }); + }, + + /** + * Called when shortcut capturing changes in order to suspend or re-enable + * global shortcut handling. This is important so that the shortcuts aren't + * processed normally as the user types them. + * TODO(devlin): From very brief experimentation, it looks like preventing + * the default handling on the event also does this. Investigate more in the + * future. + * @param {boolean} isCapturing + * @param {!CustomEvent} e + * @private + */ + onShortcutCaptureChanged_: function(isCapturing, e) { + chrome.developerPrivate.setShortcutHandlingSuspended(isCapturing); + }, + /** @override */ deleteItem: function(id) { if (this.isDeleting_)
diff --git a/chrome/browser/resources/md_extensions/shortcut_input.html b/chrome/browser/resources/md_extensions/shortcut_input.html new file mode 100644 index 0000000..bac3dbb --- /dev/null +++ b/chrome/browser/resources/md_extensions/shortcut_input.html
@@ -0,0 +1,20 @@ +<link rel="import" href="chrome://resources/html/assert.html"> +<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/html/polymer.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> +<link rel="import" href="chrome://extensions/shortcut_util.html"> + +<dom-module id="extensions-shortcut-input"> + <template> + <div id="main"> + <span id="input" tabindex="0"> + [[computeText_(capturing_, shortcut, pendingShortcut_)]] + </span> + <paper-icon-button id="clear" icon="clear" on-tap="onClearTap_"> + </paper-icon-button> + </div> + </template> + <script src="chrome://extensions/shortcut_input.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/md_extensions/shortcut_input.js b/chrome/browser/resources/md_extensions/shortcut_input.js new file mode 100644 index 0000000..e32cc6e2 --- /dev/null +++ b/chrome/browser/resources/md_extensions/shortcut_input.js
@@ -0,0 +1,159 @@ +// 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. + +cr.define('extensions', function() { + 'use strict'; + + // The UI to display and manage keyboard shortcuts set for extension commands. + var ShortcutInput = Polymer({ + is: 'extensions-shortcut-input', + + properties: { + item: { + type: String, + value: '', + }, + commandName: { + type: String, + value: '', + }, + shortcut: { + type: String, + value: '', + }, + /** @private */ + capturing_: { + type: Boolean, + value: false, + }, + /** @private */ + pendingShortcut_: { + type: String, + value: '', + }, + }, + + behaviors: [I18nBehavior], + + ready: function() { + var node = this.$['input']; + node.addEventListener('mouseup', this.startCapture_.bind(this)); + node.addEventListener('blur', this.endCapture_.bind(this)); + node.addEventListener('focus', this.startCapture_.bind(this)); + node.addEventListener('keydown', this.onKeyDown_.bind(this)); + node.addEventListener('keyup', this.onKeyUp_.bind(this)); + }, + + /** @private */ + startCapture_: function() { + if (this.capturing_) + return; + this.capturing_ = true; + this.fire('shortcut-capture-started'); + }, + + /** @private */ + endCapture_: function() { + if (!this.capturing_) + return; + this.pendingShortcut_ = ''; + this.capturing_ = false; + this.$['input'].blur(); + this.fire('shortcut-capture-ended'); + }, + + /** + * @param {!KeyboardEvent} e + * @private + */ + onKeyDown_: function(e) { + if (e.keyCode == extensions.Key.Escape) { + if (!this.capturing_) { + // If we're not currently capturing, allow escape to propagate. + return; + } + // Otherwise, escape cancels capturing. + this.endCapture_(); + e.preventDefault(); + e.stopPropagation(); + return; + } + if (e.keyCode == extensions.Key.Tab) { + // Allow tab propagation for keyboard navigation. + return; + } + + if (!this.capturing_) + this.startCapture_(); + + this.handleKey_(e); + }, + + /** + * @param {!KeyboardEvent} e + * @private + */ + onKeyUp_: function(e) { + if (e.keyCode == extensions.Key.Escape || e.keyCode == extensions.Key.Tab) + return; + + this.handleKey_(e); + }, + + /** + * @param {!KeyboardEvent} e + * @private + */ + handleKey_: function(e) { + // While capturing, we prevent all events from bubbling, to prevent + // shortcuts lacking the right modifier (F3 for example) from activating + // and ending capture prematurely. + e.preventDefault(); + e.stopPropagation(); + + // We don't allow both Ctrl and Alt in the same keybinding. + // TODO(devlin): This really should go in extensions.hasValidModifiers, + // but that requires updating the existing page as well. + if ((e.ctrlKey && e.altKey) || !extensions.hasValidModifiers(e)) { + this.pendingShortcut_ = 'invalid'; + return; + } + + this.pendingShortcut_ = extensions.keystrokeToString(e); + + if (extensions.isValidKeyCode(e.keyCode)) { + this.commitPending_(); + this.endCapture_(); + } + }, + + /** @private */ + commitPending_: function() { + this.shortcut = this.pendingShortcut_; + this.fire('shortcut-updated', {keybinding: this.shortcut, + item: this.item, + commandName: this.commandName}); + }, + + /** + * @return {string} The text to be displayed in the shortcut field. + * @private + */ + computeText_: function() { + if (this.capturing_) + return this.pendingShortcut_ || this.i18n('shortcutTypeAShortcut'); + return this.shortcut || this.i18n('shortcutNotSet'); + }, + + /** @private */ + onClearTap_: function() { + if (this.shortcut) { + this.pendingShortcut_ = ''; + this.commitPending_(); + } + }, + }); + + return {ShortcutInput: ShortcutInput}; +});
diff --git a/chrome/browser/resources/print_preview/settings/advanced_settings/advanced_settings.js b/chrome/browser/resources/print_preview/settings/advanced_settings/advanced_settings.js index 892dbc8..3185ca2 100644 --- a/chrome/browser/resources/print_preview/settings/advanced_settings/advanced_settings.js +++ b/chrome/browser/resources/print_preview/settings/advanced_settings/advanced_settings.js
@@ -193,6 +193,13 @@ this.items_.push(item); }.bind(this)); + if (this.items_.length <= 1) { + setIsVisible(this.getChildElement('.search-box-area'), false); + } else { + setIsVisible(this.getChildElement('.search-box-area'), true); + this.searchBox_.focus(); + } + extraPadding = document.createElement('div'); extraPadding.classList.add(AdvancedSettings.Classes_.EXTRA_PADDING); extraPadding.hidden = true;
diff --git a/chrome/browser/resources/settings/people_page/people_page.html b/chrome/browser/resources/settings/people_page/people_page.html index 42a68667..8605081 100644 --- a/chrome/browser/resources/settings/people_page/people_page.html +++ b/chrome/browser/resources/settings/people_page/people_page.html
@@ -146,7 +146,8 @@ </template> <div class="settings-box two-line" id="activity-controls" - on-tap="onActivityControlsTap_" actionable> + on-tap="onActivityControlsTap_" actionable + hidden="[[!syncStatus.signedIn]]"> <div class="icon-container"> <div id="googleg-logo"></div> </div>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html index 8659e7e..fbd2986 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -11,6 +11,7 @@ <link rel="import" href="/site_settings/all_sites.html"> <link rel="import" href="/site_settings/constants.html"> <link rel="import" href="/site_settings/media_picker.html"> +<link rel="import" href="/site_settings/site_data.html"> <link rel="import" href="/site_settings_page/site_settings_page.html"> <if expr="use_nss_certs"> @@ -169,6 +170,7 @@ pref="{{prefs.profile.block_third_party_cookies}}"> </settings-checkbox> </div> + <site-data class="site-data"></site-data> </site-settings-category> </settings-subpage> </template>
diff --git a/chrome/browser/resources/settings/settings_resources.grd b/chrome/browser/resources/settings/settings_resources.grd index 61b8218..38fb84a9 100644 --- a/chrome/browser/resources/settings/settings_resources.grd +++ b/chrome/browser/resources/settings/settings_resources.grd
@@ -347,6 +347,12 @@ <structure name="IDR_SETTINGS_CONTROLS_RADIO_GROUP_JS" file="controls/settings_radio_group.js" type="chrome_html" /> + <structure name="IDR_SETTINGS_COOKIE_INFO_JS" + file="site_settings/cookie_info.js" + type="chrome_html" /> + <structure name="IDR_SETTINGS_COOKIE_TREE_NODE_JS" + file="site_settings/cookie_tree_node.js" + type="chrome_html" /> <if expr="not chromeos"> <structure name="IDR_SETTINGS_DEFAULT_BROWSER_PAGE_HTML" file="default_browser_page/default_browser_page.html" @@ -649,6 +655,18 @@ type="chrome_html" flattenhtml="true" allowexternalscript="true" /> + <structure name="IDR_SETTINGS_SITE_DATA_HTML" + file="site_settings/site_data.html" + type="chrome_html" /> + <structure name="IDR_SETTINGS_SITE_DATA_JS" + file="site_settings/site_data.js" + type="chrome_html" /> + <structure name="IDR_SETTINGS_SITE_DATA_DETAILS_DIALOG_HTML" + file="site_settings/site_data_details_dialog.html" + type="chrome_html" /> + <structure name="IDR_SETTINGS_SITE_DATA_DETAILS_DIALOG_JS" + file="site_settings/site_data_details_dialog.js" + type="chrome_html" /> <structure name="IDR_SETTINGS_SITE_LIST_HTML" file="site_settings/site_list.html" type="chrome_html" />
diff --git a/chrome/browser/resources/settings/site_settings/compiled_resources2.gyp b/chrome/browser/resources/settings/site_settings/compiled_resources2.gyp index 2044ab9..911f67aa 100644 --- a/chrome/browser/resources/settings/site_settings/compiled_resources2.gyp +++ b/chrome/browser/resources/settings/site_settings/compiled_resources2.gyp
@@ -38,6 +38,37 @@ 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], }, { + 'target_name': 'cookie_tree_node', + 'dependencies': [ + '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr', + '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:load_time_data', + 'cookie_info', + ], + 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], + }, + { + 'target_name': 'cookie_info', + 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], + }, + { + 'target_name': 'site_data', + 'dependencies': [ + '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:web_ui_listener_behavior', + 'cookie_tree_node', + 'site_settings_behavior', + ], + 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], + }, + { + 'target_name': 'site_data_details_dialog', + 'dependencies': [ + '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:web_ui_listener_behavior', + 'cookie_tree_node', + 'site_settings_behavior', + ], + 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], + }, + { 'target_name': 'site_details', 'dependencies': [ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
diff --git a/chrome/browser/resources/settings/site_settings/cookie_info.js b/chrome/browser/resources/settings/site_settings/cookie_info.js new file mode 100644 index 0000000..3b912a3 --- /dev/null +++ b/chrome/browser/resources/settings/site_settings/cookie_info.js
@@ -0,0 +1,48 @@ +// 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 structure maps the various cookie type names from C++ (hence the +// underscores) to arrays of the different types of data each has, along with +// the i18n name for the description of that data type. +// This structure serves three purposes: +// 1) to list what subset of the cookie data we want to show in the UI. +// 2) What order to show it in. +// 3) What user friendly label to prefix the data with. +/** @const */ var cookieInfo = { + 'cookie': [['name', 'cookieName'], + ['content', 'cookieContent'], + ['domain', 'cookieDomain'], + ['path', 'cookiePath'], + ['sendfor', 'cookieSendFor'], + ['accessibleToScript', 'cookieAccessibleToScript'], + ['created', 'cookieCreated'], + ['expires', 'cookieExpires']], + 'app_cache': [['manifest', 'appCacheManifest'], + ['size', 'localStorageSize'], + ['created', 'cookieCreated'], + ['accessed', 'cookieLastAccessed']], + 'database': [['name', 'cookieName'], + ['desc', 'webdbDesc'], + ['size', 'localStorageSize'], + ['modified', 'localStorageLastModified']], + 'local_storage': [['origin', 'localStorageOrigin'], + ['size', 'localStorageSize'], + ['modified', 'localStorageLastModified']], + 'indexed_db': [['origin', 'indexedDbOrigin'], + ['size', 'indexedDbSize'], + ['modified', 'indexedDbLastModified']], + 'file_system': [['origin', 'fileSystemOrigin'], + ['persistent', 'fileSystemPersistentUsage'], + ['temporary', 'fileSystemTemporaryUsage']], + 'channel_id': [['serverId', 'channelIdServerId'], + ['certType', 'channelIdType'], + ['created', 'channelIdCreated']], + 'service_worker': [['origin', 'serviceWorkerOrigin'], + ['size', 'serviceWorkerSize'], + ['scopes', 'serviceWorkerScopes']], + 'cache_storage': [['origin', 'cacheStorageOrigin'], + ['size', 'cacheStorageSize'], + ['modified', 'cacheStorageLastModified']], + 'flash_lso': [['domain', 'cookieDomain']], +};
diff --git a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js new file mode 100644 index 0000000..7e5420b6 --- /dev/null +++ b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js
@@ -0,0 +1,229 @@ +// 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. + +/** + * @typedef {{hasChildren: boolean, + * id: string, + * title: string, + * totalUsage: string, + * type: string}} + */ +var CookieDetails; + +/** + * @typedef {{title: string, + * id: string, + * data: CookieDetails}} + */ +var CookieDataItem; + +/** + * @typedef {{site: string, + * id: string, + * localData: string}} + */ +var CookieDataSummaryItem; + +cr.define('settings', function() { + 'use strict'; + + /** + * @constructor + */ + function CookieTreeNode(data) { + /** + * The data for this cookie node. + * @private {CookieDetails} + */ + this.data_ = data; + + /** + * The child cookie nodes. + * @private {!Array<!settings.CookieTreeNode>} + */ + this.children_ = []; + }; + + CookieTreeNode.prototype = { + /** + * Converts a list of cookies and add them as CookieTreeNode children to + * the given parent node. + * @param {!settings.CookieTreeNode} parentNode The parent node to add + * children to. + * @param {!Array<!CookieDetails>} newNodes The list containing the data to + * add. + */ + addChildNodes: function(parentNode, newNodes) { + var nodes = newNodes.map(function(x) { + return new settings.CookieTreeNode(x); + }); + parentNode.children_ = nodes; + }, + + /** + * Looks up a parent node and adds a list of CookieTreeNodes to them. + * @param {string} parentId The ID of the parent to add the nodes to. + * @param {!settings.CookieTreeNode} startingNode The node to start with + * when looking for the parent node to add the children to. + * @param {!Array<!CookieDetails>} newNodes The list containing the data to + add. + * @return {boolean} True if the parent node was found. + */ + populateChildNodes: function(parentId, startingNode, newNodes) { + for (var i = 0; i < startingNode.children_.length; ++i) { + if (startingNode.children_[i].data_.id == parentId) { + this.addChildNodes(startingNode.children_[i], newNodes); + return true; + } + + if (this.populateChildNodes( + parentId, startingNode.children_[i], newNodes)) { + return true; + } + } + return false; + }, + + /** + * Removes child nodes from a node with a given id. + * @param {string} id The id of the parent node to delete from. + * @param {number} firstChild The index of the first child to start deleting + * from. + * @param {number} count The number of children to delete. + */ + removeByParentId: function(id, firstChild, count) { + var node = id == null ? this : this.fetchNodeById(id, true); + node.children_.splice(firstChild, count); + }, + + /** + * Returns an array of cookies from the current node within the cookie tree. + * @return {!Array<!CookieDataItem>} The Cookie List. + */ + getCookieList: function() { + var list = []; + + for (var group of this.children_) { + for (var cookie of group.children_) { + list.push({title: cookie.data_.title, + id: cookie.data_.id, + data: cookie.data_}); + } + } + + return list; + }, + + /** + * Get a summary list of all sites and their stored data. + * @return {!Array<!CookieDataSummaryItem>} The summary list. + */ + getSummaryList: function() { + var list = []; + for (var i = 0; i < this.children_.length; ++i) { + var siteEntry = this.children_[i]; + var title = siteEntry.data_.title; + var id = siteEntry.data_.id; + var description = ''; + + for (var j = 0; j < siteEntry.children_.length; ++j) { + var descriptionNode = siteEntry.children_[j]; + if (j > 0) + description += ', '; + + // Some types, like quota, have no description nodes. + var dataType = ''; + if (descriptionNode.data_.type != undefined) + dataType = descriptionNode.data_.type; + else + dataType = descriptionNode.children_[0].data_.type; + + var category = ''; + if (dataType == 'cookie') { + var cookieCount = descriptionNode.children_.length; + if (cookieCount > 1) + category = loadTimeData.getStringF('cookiePlural', cookieCount); + else + category = loadTimeData.getString('cookieSingular'); + } else if (dataType == 'database') { + category = loadTimeData.getString('cookieDatabaseStorage'); + } else if (dataType == 'local_storage' || dataType == 'indexed_db') { + category = loadTimeData.getString('cookieLocalStorage'); + } else if (dataType == 'app_cache') { + category = loadTimeData.getString('cookieAppCache'); + } else if (dataType == 'file_system') { + category = loadTimeData.getString('cookieFileSystem'); + } else if (dataType == 'quota') { + category = descriptionNode.data_.totalUsage; + } else if (dataType == 'channel_id') { + category = loadTimeData.getString('cookieChannelId'); + } else if (dataType == 'service_worker') { + category = loadTimeData.getString('cookieServiceWorker'); + } else if (dataType == 'cache_storage') { + category = loadTimeData.getString('cookieCacheStorage'); + } else if (dataType == 'flash_lso') { + category = loadTimeData.getString('cookieFlashLso'); + } + + description += category; + } + list.push({ site: title, id: id, localData: description }); + } + list.sort(function(a, b) { + return a.site.localeCompare(b.site); + }); + return list; + }, + + /** + * Fetch a CookieTreeNode by ID. + * @param {string} id The ID to look up. + * @param {boolean} recursive Whether to search the children also. + * @return {settings.CookieTreeNode} The node found, if any. + */ + fetchNodeById: function(id, recursive) { + for (var i = 0; i < this.children_.length; ++i) { + if (this.children_[i] == null) + return null; + if (this.children_[i].data_.id == id) + return this.children_[i]; + if (recursive) { + var node = this.children_[i].fetchNodeById(id, true); + if (node != null) + return node; + } + } + return null; + }, + + /** + * Add cookie data to a given HTML node. + * @param {HTMLElement} root The node to add the data to. + * @param {!settings.CookieTreeNode} item The data to add. + */ + addCookieData: function(root, item) { + var fields = cookieInfo[item.data_.type]; + for (var field of fields) { + // Iterate through the keys found in |cookieInfo| for the given |type| + // and see if those keys are present in the data. If so, display them + // (in the order determined by |cookieInfo|). + var key = field[0]; + if (item.data_[key].length > 0) { + var label = loadTimeData.getString(field[1]); + + var header = document.createElement('div'); + header.appendChild(document.createTextNode(label)); + var content = document.createElement('div'); + content.appendChild(document.createTextNode(item.data_[key])); + root.appendChild(header); + root.appendChild(content); + } + } + }, + }; + + return { + CookieTreeNode: CookieTreeNode, + }; +});
diff --git a/chrome/browser/resources/settings/site_settings/site_data.html b/chrome/browser/resources/settings/site_settings/site_data.html new file mode 100644 index 0000000..0cd9192 --- /dev/null +++ b/chrome/browser/resources/settings/site_settings/site_data.html
@@ -0,0 +1,44 @@ +<link rel="import" href="chrome://resources/html/polymer.html"> +<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> +<link rel="import" href="/settings_shared_css.html"> +<link rel="import" href="/site_settings/site_data_details_dialog.html"> +<link rel="import" href="/site_settings/site_settings_behavior.html"> + +<dom-module id="site-data"> + <template> + <style include="settings-shared"> + :host { + display: block; + margin-top: 18px; + width: 100%; + } + + .list-frame { + -webkit-padding-start: 36px; + margin-top: 10px; + } + + .site { + margin-top: 3px; + } + </style> + <div>$i18n{siteSettingsCookieHeader}</div> + <div class="list-frame vertical-list"> + <template is="dom-repeat" items="[[sites]]"> + <div class="list-item underscore"> + <div class="favicon-image" style$="[[computeSiteIcon(item.site)]]" + on-tap="onOriginTap_"></div> + <div class="middle layout horizontal" on-tap="onSiteTap_"> + <div class="site flex">[[item.site]]</div> + <div class="secondary">[[item.localData]]</div> + </div> + </div> + </template> + </div> + + </template> + <script src="cookie_info.js"></script> + <script src="cookie_tree_node.js"></script> + <script src="site_data.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/settings/site_settings/site_data.js b/chrome/browser/resources/settings/site_settings/site_data.js new file mode 100644 index 0000000..ef86f1d --- /dev/null +++ b/chrome/browser/resources/settings/site_settings/site_data.js
@@ -0,0 +1,94 @@ +// 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. + +/** + * @fileoverview + * 'site-data' handles showing the local storage summary list for all sites. + */ + +Polymer({ + is: 'site-data', + + behaviors: [SiteSettingsBehavior, WebUIListenerBehavior], + + properties: { + /** + * A summary list of all sites and how many entities each contain. + * @type {Array<CookieDataSummaryItem>} + */ + sites: Array, + + /** + * The cookie tree with the details needed to display individual sites and + * their contained data. + * @type {!settings.CookieTreeNode} + */ + treeNodes_: Object, + + /** + * Keeps track of how many outstanding requests for more data there are. + */ + requests_: Number, + }, + + ready: function() { + this.addWebUIListener('loadChildren', this.loadChildren_.bind(this)); + this.addWebUIListener('onTreeItemRemoved', + this.onTreeItemRemoved_.bind(this)); + this.treeNodes_ = new settings.CookieTreeNode(null); + // Start the initial request. + this.browserProxy.reloadCookies(); + this.requests_ = 1; + }, + + loadChildren_: function(list) { + var parentId = list[0]; + var data = list[1]; + + if (parentId == null) { + this.treeNodes_.addChildNodes(this.treeNodes_, data); + } else { + this.treeNodes_.populateChildNodes(parentId, this.treeNodes_, data); + } + + for (var i = 0; i < data.length; ++i) { + var prefix = parentId == null ? '' : parentId + ', '; + if (data[i].hasChildren) { + this.requests_ += 1; + this.browserProxy.loadCookieChildren(prefix + data[i].id); + } + } + + if (--this.requests_ == 0) + this.sites = this.treeNodes_.getSummaryList(); + }, + + /** + * Called when an item is removed. + */ + onTreeItemRemoved_: function(args) { + this.treeNodes_.removeByParentId(args[0], args[1], args[2]); + this.sites = this.treeNodes_.getSummaryList(); + }, + + /** + * @param {!{model: !{item: !{title: string, id: string}}}} event + * @private + */ + onSiteTap_: function(event) { + var dialog = document.createElement('site-data-details-dialog'); + dialog.category = this.category; + this.shadowRoot.appendChild(dialog); + + var node = this.treeNodes_.fetchNodeById(event.model.item.id, false); + dialog.open(node); + + dialog.addEventListener('iron-overlay-closed', function(event) { + // The drop-down box in the dialog also generates iron-overlay-closed. + // Ignore anything but that event coming from a dialog object. + if (event.path[0].id == 'dialog') + dialog.remove(); + }); + }, +});
diff --git a/chrome/browser/resources/settings/site_settings/site_data_details_dialog.html b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.html new file mode 100644 index 0000000..a854e24 --- /dev/null +++ b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.html
@@ -0,0 +1,59 @@ +<link rel="import" href="chrome://resources/html/polymer.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/paper-dropdown-menu.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-listbox.html"> +<link rel="import" href="/i18n_setup.html"> +<link rel="import" href="/settings_shared_css.html"> + +<dom-module id="site-data-details-dialog"> + <template> + <style include="settings-shared"> + .remove-button { + margin-top: 12px; + } + </style> + <cr-dialog id="dialog"> + <div class="title"> + [[title_]] + </div> + <div class="body"> + <div class="layout horizontal" id="container"> + <div class="flex"> + <paper-dropdown-menu> + <paper-listbox id="picker" class="dropdown-content" + attr-for-selected="picker-value" + on-iron-activate="onItemSelected_"> + <template is="dom-repeat" items="[[entries_]]"> + <paper-item picker-value$="[[item.id]]"> + [[item.title]] + </paper-item> + </template> + </paper-listbox> + </paper-dropdown-menu> + </div> + <div class="button-container"> + <paper-button on-tap="onRemove_" + class="cancel-button remove-button"> + $i18n{siteSettingsCookieRemove} + </paper-button> + </div> + </div> + + <div id="content"></div> + + <div class="button-container"> + <paper-button class="cancel-button" dialog-dismiss> + $i18n{cancel} + </paper-button> + <paper-button class="action-button" dialog-confirm + id="clear" on-tap="onRemoveAll_"> + $i18n{siteSettingsCookieRemoveAll} + </paper-button> + </div> + </div> + </cr-dialog> + </template> + <script src="cookie_info.js"></script> + <script src="cookie_tree_node.js"></script> + <script src="site_data_details_dialog.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js new file mode 100644 index 0000000..c9388e5 --- /dev/null +++ b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
@@ -0,0 +1,166 @@ +// 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. + +/** + * @fileoverview + * 'site-data-details-dialog' provides a dialog to show details of site data + * stored by a given site. + */ +Polymer({ + is: 'site-data-details-dialog', + + behaviors: [SiteSettingsBehavior], + + properties: { + /** + * The title of the dialog. + */ + title_: String, + + /** + * The site to show details for. + * @type {!settings.CookieTreeNode} + * @private + */ + site_: Object, + + /** + * The cookie entries for the given site. + * @type {!Array<!CookieDataItem>} + * @private + */ + entries_: Array, + + /** + * The index of the last selected item. + */ + lastSelectedIndex_: Number, + + /** + * Our WebUI listener. + * @type {?WebUIListener} + */ + listener_: Object, + }, + + /** + * Opens the dialog. + * @param {!settings.CookieTreeNode} site The site to show data for. + */ + open: function(site) { + this.site_ = site; + this.populateDialog_(); + this.listener_ = cr.addWebUIListener( + 'onTreeItemRemoved', this.onTreeItemRemoved_.bind(this)); + this.$.dialog.open(); + }, + + /** + * Populates the dialog with the data about the site. + */ + populateDialog_: function() { + this.title_ = loadTimeData.getStringF('siteSettingsCookieDialog', + this.site_.data_.title); + + this.entries_ = this.site_.getCookieList(); + if (this.entries_.length < 2) { + // When there's only one item to show, hide the picker and change the + // 'Remove All' button to read 'Remove' instead. + this.$.container.hidden = true; + this.$.clear.textContent = + loadTimeData.getString('siteSettingsCookieRemove'); + } else { + this.$.picker.selected = this.entries_[0].id; + this.lastSelectedIndex_ = 0; + } + + this.populateItem_(this.entries_[0].id, this.site_); + }, + + /** + * Recursively look up a node path for a leaf node with a given id. + * @param {!settings.CookieTreeNode} node The node to start with. + * @param {string} currentPath The path constructed so far. + * @param {string} targetId The id of the target leaf node to look for. + * @return {string} The path of the node returned (or blank if not found). + */ + nodePath_: function(node, currentPath, targetId) { + if (node.data_.id == targetId) + return currentPath; + + for (var i = 0; i < node.children_.length; ++i) { + var child = node.children_[i]; + var path = this.nodePath_( + child, currentPath + ',' + child.data_.id, targetId); + if (path.length > 0) + return path; + } + + return ''; + }, + + /** + * Add the cookie data to the content section of this dialog. + * @param {string} id The id of the cookie node to display. + * @param {!settings.CookieTreeNode} site The current site. + */ + populateItem_: function(id, site) { + // Out with the old... + var root = this.$.content; + while (root.lastChild) { + root.removeChild(root.lastChild); + } + + // In with the new... + var node = site.fetchNodeById(id, true); + if (node) + site.addCookieData(root, node); + }, + + onTreeItemRemoved_: function(args) { + this.entries_ = this.site_.getCookieList(); + if (args[0] == this.site_.data_.id || this.entries_.length == 0) { + this.$.dialog.close(); + return; + } + + if (this.entries_.length <= this.lastSelectedIndex_) + this.lastSelectedIndex_ = this.entries_.length - 1; + var selectedId = this.entries_[this.lastSelectedIndex_].id; + this.$.picker.selected = selectedId; + this.populateItem_(selectedId, this.site_); + }, + + /** + * A handler for when the user changes the dropdown box (switches cookies). + */ + onItemSelected_: function(event) { + this.populateItem_(event.detail.selected, this.site_); + + // Store the index of what was selected so we can re-select the next value + // when things get deleted. + for (var i = 0; i < this.entries_.length; ++i) { + if (this.entries_[i].data.id == event.detail.selected) { + this.lastSelectedIndex_ = i; + break; + } + } + }, + + /** + * A handler for when the user opts to remove a single cookie. + */ + onRemove_: function(event) { + this.browserProxy.removeCookie(this.nodePath_( + this.site_, this.site_.data_.id, this.$.picker.selected)); + }, + + /** + * A handler for when the user opts to remove all cookies. + */ + onRemoveAll_: function(event) { + cr.removeWebUIListener(this.listener_); + this.browserProxy.removeCookie(this.site_.data_.id); + }, +});
diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html index ee7a43f..38ff9db 100644 --- a/chrome/browser/resources/settings/site_settings/site_details.html +++ b/chrome/browser/resources/settings/site_settings/site_details.html
@@ -43,7 +43,8 @@ </style> <div class="settings-box block"> <div class="horizontal layout origin-box"> - <div class="website-icon" style$="[[computeSiteIcon(site)]]"></div> + <div class="website-icon" + style$="[[computeSiteIcon(site.originForDisplay)]]"></div> <div class="origin flex">[[site.originForDisplay]]</div> </div> <h2 id="usage" hidden$="[[!storedData_]]">$i18n{siteSettingsUsage}</h2>
diff --git a/chrome/browser/resources/settings/site_settings/site_list.html b/chrome/browser/resources/settings/site_settings/site_list.html index 8a94d00e..63be66d 100644 --- a/chrome/browser/resources/settings/site_settings/site_list.html +++ b/chrome/browser/resources/settings/site_settings/site_list.html
@@ -45,7 +45,8 @@ <div class="list-frame menu-content vertical-list" id="listContainer"> <template is="dom-repeat" items="[[sites]]"> <div class="list-item underscore"> - <div class="favicon-image" style$="[[computeSiteIcon(item)]]" + <div class="favicon-image" + style$="[[computeSiteIcon(item.originForDisplay)]]" on-tap="onOriginTap_" actionable></div> <div class="middle" on-tap="onOriginTap_" actionable> <div>[[item.originForDisplay]]</div>
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_behavior.js b/chrome/browser/resources/settings/site_settings/site_settings_behavior.js index a89c24b..86ee14b3 100644 --- a/chrome/browser/resources/settings/site_settings/site_settings_behavior.js +++ b/chrome/browser/resources/settings/site_settings/site_settings_behavior.js
@@ -362,12 +362,12 @@ /** * Returns the icon to use for a given site. - * @param {SiteException} site The url of the site to fetch the icon for. + * @param {string} site The url of the site to fetch the icon for. * @return {string} The background-image style with the favicon. * @private */ computeSiteIcon: function(site) { - var url = this.ensureUrlHasScheme(site.originForDisplay); + var url = this.ensureUrlHasScheme(site); return 'background-image: ' + cr.icon.getFaviconImageSet(url); }, };
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_category.html b/chrome/browser/resources/settings/site_settings/site_settings_category.html index 13c970a..60842ba 100644 --- a/chrome/browser/resources/settings/site_settings/site_settings_category.html +++ b/chrome/browser/resources/settings/site_settings/site_settings_category.html
@@ -70,6 +70,10 @@ category-enabled="[[categoryEnabled]]" selected-site="{{selectedSite}}"> </settings-site-list> + + <div class="settings-box"> + <content select=".site-data"></content> + </div> </template> <script src="site_settings_category.js"></script> </dom-module>
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js index 494cd1e0..99af3cd 100644 --- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js +++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -109,6 +109,24 @@ * @param {string} defaultValue The id of the media device to set. */ setDefaultCaptureDevice: function(type, defaultValue) {}, + + /** + * Reloads all cookies. List is returned through a JS call to loadChildren. + */ + reloadCookies: function() {}, + + /** + * Fetches all children of a given cookie. List is returned through a JS + * call to loadChildren. + * @param {string} path The path to the parent cookie. + */ + loadCookieChildren: function(path) {}, + + /** + * Removes a given cookie. + * @param {string} path The path to the parent cookie. + */ + removeCookie: function(path) {}, }; /** @@ -165,6 +183,21 @@ setDefaultCaptureDevice: function(type, defaultValue) { chrome.send('setDefaultCaptureDevice', [type, defaultValue]); }, + + /** @override */ + reloadCookies: function() { + chrome.send('reloadCookies'); + }, + + /** @override */ + loadCookieChildren: function(path) { + chrome.send('loadCookie', [path]); + }, + + /** @override */ + removeCookie: function(path) { + chrome.send('removeCookie', [path]); + } }; return {
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc index 3b1c94e0..5e00925 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -364,7 +364,7 @@ resource.threat_type = SB_THREAT_TYPE_URL_MALWARE; resource.callback = base::Bind(&EmptyUrlCheckCallback); resource.callback_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); resource.render_process_host_id = web_contents()->GetRenderProcessHost()-> GetID(); resource.render_frame_id = web_contents()->GetMainFrame()->GetRoutingID(); @@ -395,7 +395,7 @@ resource.threat_type = SB_THREAT_TYPE_URL_MALWARE; resource.callback = base::Bind(&EmptyUrlCheckCallback); resource.callback_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); resource.render_process_host_id = pending_rvh()->GetProcess()->GetID(); resource.render_frame_id = pending_main_rfh()->GetRoutingID(); csd_host_->OnSafeBrowsingHit(resource);
diff --git a/chrome/browser/safe_browsing/download_feedback_service_unittest.cc b/chrome/browser/safe_browsing/download_feedback_service_unittest.cc index a932dbf3..5bb379f 100644 --- a/chrome/browser/safe_browsing/download_feedback_service_unittest.cc +++ b/chrome/browser/safe_browsing/download_feedback_service_unittest.cc
@@ -132,13 +132,12 @@ class DownloadFeedbackServiceTest : public testing::Test { public: DownloadFeedbackServiceTest() - : file_task_runner_(content::BrowserThread::GetMessageLoopProxyForThread( + : file_task_runner_(content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE)), - io_task_runner_(content::BrowserThread::GetMessageLoopProxyForThread( + io_task_runner_(content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)), request_context_getter_( - new net::TestURLRequestContextGetter(io_task_runner_)) { - } + new net::TestURLRequestContextGetter(io_task_runner_)) {} void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
diff --git a/chrome/browser/safe_browsing/download_feedback_unittest.cc b/chrome/browser/safe_browsing/download_feedback_unittest.cc index f4fe38a..2ce8b49 100644 --- a/chrome/browser/safe_browsing/download_feedback_unittest.cc +++ b/chrome/browser/safe_browsing/download_feedback_unittest.cc
@@ -100,9 +100,9 @@ class DownloadFeedbackTest : public testing::Test { public: DownloadFeedbackTest() - : file_task_runner_(content::BrowserThread::GetMessageLoopProxyForThread( + : file_task_runner_(content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE)), - io_task_runner_(content::BrowserThread::GetMessageLoopProxyForThread( + io_task_runner_(content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)), url_request_context_getter_( new net::TestURLRequestContextGetter(io_task_runner_)),
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc index f60d43b..450d5e91 100644 --- a/chrome/browser/safe_browsing/download_protection_service.cc +++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -471,37 +471,44 @@ // Ignore the verdict because we were just reporting a sampled file. reason = REASON_SAMPLED_UNSUPPORTED_FILE; result = UNKNOWN; - } else if (response.verdict() == ClientDownloadResponse::SAFE) { - reason = REASON_DOWNLOAD_SAFE; - result = SAFE; - } else if (service_ && !service_->IsSupportedDownload( - *item_, item_->GetTargetFilePath())) { - // TODO(nparker): Remove this check since it should be impossible. - reason = REASON_DOWNLOAD_NOT_SUPPORTED; - result = UNKNOWN; - } else if (response.verdict() == ClientDownloadResponse::DANGEROUS) { - reason = REASON_DOWNLOAD_DANGEROUS; - result = DANGEROUS; - token = response.token(); - } else if (response.verdict() == ClientDownloadResponse::UNCOMMON) { - reason = REASON_DOWNLOAD_UNCOMMON; - result = UNCOMMON; - token = response.token(); - } else if (response.verdict() == ClientDownloadResponse::DANGEROUS_HOST) { - reason = REASON_DOWNLOAD_DANGEROUS_HOST; - result = DANGEROUS_HOST; - token = response.token(); - } else if ( - response.verdict() == ClientDownloadResponse::POTENTIALLY_UNWANTED) { - reason = REASON_DOWNLOAD_POTENTIALLY_UNWANTED; - result = POTENTIALLY_UNWANTED; - token = response.token(); } else { - LOG(DFATAL) << "Unknown download response verdict: " - << response.verdict(); - reason = REASON_INVALID_RESPONSE_VERDICT; - result = UNKNOWN; + switch (response.verdict()) { + case ClientDownloadResponse::SAFE: + reason = REASON_DOWNLOAD_SAFE; + result = SAFE; + break; + case ClientDownloadResponse::DANGEROUS: + reason = REASON_DOWNLOAD_DANGEROUS; + result = DANGEROUS; + token = response.token(); + break; + case ClientDownloadResponse::UNCOMMON: + reason = REASON_DOWNLOAD_UNCOMMON; + result = UNCOMMON; + token = response.token(); + break; + case ClientDownloadResponse::DANGEROUS_HOST: + reason = REASON_DOWNLOAD_DANGEROUS_HOST; + result = DANGEROUS_HOST; + token = response.token(); + break; + case ClientDownloadResponse::POTENTIALLY_UNWANTED: + reason = REASON_DOWNLOAD_POTENTIALLY_UNWANTED; + result = POTENTIALLY_UNWANTED; + token = response.token(); + break; + case ClientDownloadResponse::UNKNOWN: + reason = REASON_VERDICT_UNKNOWN; + result = UNKNOWN; + break; + default: + LOG(DFATAL) << "Unknown download response verdict: " + << response.verdict(); + reason = REASON_INVALID_RESPONSE_VERDICT; + result = UNKNOWN; + } } + if (!token.empty()) SetDownloadPingToken(item_, token); @@ -1394,6 +1401,8 @@ return DANGEROUS; case ClientDownloadResponse::DANGEROUS_HOST: return DANGEROUS_HOST; + case ClientDownloadResponse::UNKNOWN: + return UNKNOWN; } return UNKNOWN; }
diff --git a/chrome/browser/safe_browsing/download_protection_service.h b/chrome/browser/safe_browsing/download_protection_service.h index bd096b0ba..51bb0aac 100644 --- a/chrome/browser/safe_browsing/download_protection_service.h +++ b/chrome/browser/safe_browsing/download_protection_service.h
@@ -187,6 +187,7 @@ REASON_LOCAL_FILE = 24, REASON_REMOTE_FILE = 25, REASON_SAMPLED_UNSUPPORTED_FILE = 26, + REASON_VERDICT_UNKNOWN = 27, REASON_MAX // Always add new values before this one. };
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc index c80ac41..5f2c85c 100644 --- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -975,11 +975,11 @@ MatchDownloadWhitelistUrl(_)) .WillRepeatedly(Return(false)); EXPECT_CALL(*binary_feature_extractor_.get(), CheckSignature(tmp_path_, _)) - .Times(6); + .Times(7); EXPECT_CALL(*binary_feature_extractor_.get(), ExtractImageFeatures( tmp_path_, BinaryFeatureExtractor::kDefaultOptions, _, _)) - .Times(6); + .Times(7); download_service_->CheckClientDownload( &item, @@ -1084,6 +1084,22 @@ EXPECT_TRUE(IsResult(DownloadProtectionService::POTENTIALLY_UNWANTED)); EXPECT_TRUE(HasClientDownloadRequest()); ClearClientDownloadRequest(); + + // If the response is UNKNOWN the result should also be marked as + // UNKNOWN + PrepareResponse( + &factory, ClientDownloadResponse::UNKNOWN, net::HTTP_OK, + net::URLRequestStatus::SUCCESS); + + download_service_->CheckClientDownload( + &item, + base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, + base::Unretained(this))); + base::RunLoop().Run(); + + EXPECT_TRUE(IsResult(DownloadProtectionService::UNKNOWN)); + EXPECT_TRUE(HasClientDownloadRequest()); + ClearClientDownloadRequest(); } TEST_F(DownloadProtectionServiceTest, CheckClientDownloadHTTPS) { @@ -1374,42 +1390,6 @@ } #endif -TEST_F(DownloadProtectionServiceTest, CheckClientCrxDownloadSuccess) { - // Even if the server verdict is dangerous we should return SAFE because - // DownloadProtectionService::IsSupportedDownload() will return false - // for crx downloads. - net::FakeURLFetcherFactory factory(NULL); - PrepareResponse( - &factory, ClientDownloadResponse::DANGEROUS, net::HTTP_OK, - net::URLRequestStatus::SUCCESS); - - content::MockDownloadItem item; - PrepareBasicDownloadItem( - &item, - {"http://www.evil.com/a.crx"}, // url_chain - "http://www.google.com/", // referrer - FILE_PATH_LITERAL("a.tmp"), // tmp_path - FILE_PATH_LITERAL("a.crx")); // final_path - - EXPECT_CALL(*sb_service_->mock_database_manager(), - MatchDownloadWhitelistUrl(_)) - .WillRepeatedly(Return(false)); - EXPECT_CALL(*binary_feature_extractor_.get(), CheckSignature(tmp_path_, _)) - .Times(1); - EXPECT_CALL(*binary_feature_extractor_.get(), - ExtractImageFeatures( - tmp_path_, BinaryFeatureExtractor::kDefaultOptions, _, _)) - .Times(1); - - EXPECT_FALSE(download_service_->IsSupportedDownload(item, final_path_)); - download_service_->CheckClientDownload( - &item, - base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, - base::Unretained(this))); - base::RunLoop().Run(); - EXPECT_TRUE(IsResult(DownloadProtectionService::UNKNOWN)); -} - TEST_F(DownloadProtectionServiceTest, CheckClientDownloadValidateRequest) { net::TestURLFetcherFactory factory; @@ -2032,6 +2012,7 @@ DownloadProtectionService::DANGEROUS_HOST}, {ClientDownloadResponse::POTENTIALLY_UNWANTED, DownloadProtectionService::POTENTIALLY_UNWANTED}, + {ClientDownloadResponse::UNKNOWN, DownloadProtectionService::UNKNOWN}, }; for (const auto& test_case : kExpectedResults) {
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc index 5a5bc65..de3da1ec 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -212,9 +212,8 @@ resource->callback = base::Bind(&SafeBrowsingBlockingPageTest::OnBlockingPageComplete, base::Unretained(this)); - resource->callback_thread = - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::IO); + resource->callback_thread = content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::IO); resource->url = url; resource->is_subresource = is_subresource; resource->threat_type = SB_THREAT_TYPE_URL_MALWARE;
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 782341d..ae689f3 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -159,7 +159,7 @@ : shut_down_(false), system_context_getter_(system_context_getter), network_task_runner_( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)) {} + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)) {} net::URLRequestContext* SafeBrowsingURLRequestContextGetter::GetURLRequestContext() {
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc index 895178e..e24a4a5 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -642,7 +642,7 @@ // to wait for the SafeBrowsingService to finish loading/stopping. void WaitForIOThread() { scoped_refptr<base::ThreadTestHelper> io_helper(new base::ThreadTestHelper( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())); ASSERT_TRUE(io_helper->Run()); } @@ -651,7 +651,7 @@ void WaitForIOAndCheckEnabled(SafeBrowsingService* service, bool enabled) { scoped_refptr<ServiceEnabledHelper> enabled_helper(new ServiceEnabledHelper( service, enabled, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())); ASSERT_TRUE(enabled_helper->Run()); }
diff --git a/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc b/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc index 8377e7b2..4aaa3ac5 100644 --- a/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc +++ b/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc
@@ -59,8 +59,8 @@ DCHECK_CURRENTLY_ON(BrowserThread::IO); content::UtilityProcessHost* utility_process_host = - content::UtilityProcessHost::Create(this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + content::UtilityProcessHost::Create( + this, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); utility_process_host->SetName(l10n_util::GetStringUTF16( IDS_UTILITY_PROCESS_SAFE_BROWSING_ZIP_FILE_ANALYZER_NAME));
diff --git a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc index b7ce56f3..a467ef21 100644 --- a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc +++ b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
@@ -122,10 +122,10 @@ void SandboxedZipAnalyzer::StartProcessOnIOThread() { DCHECK_CURRENTLY_ON(BrowserThread::IO); - utility_process_host_ = content::UtilityProcessHost::Create( - this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()) - ->AsWeakPtr(); + utility_process_host_ = + content::UtilityProcessHost::Create( + this, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get()) + ->AsWeakPtr(); utility_process_host_->SetName(l10n_util::GetStringUTF16( IDS_UTILITY_PROCESS_SAFE_BROWSING_ZIP_FILE_ANALYZER_NAME)); utility_process_host_->Send(
diff --git a/chrome/browser/safe_browsing/srt_fetcher_win.cc b/chrome/browser/safe_browsing/srt_fetcher_win.cc index 03f3e2b..ccba9a6c 100644 --- a/chrome/browser/safe_browsing/srt_fetcher_win.cc +++ b/chrome/browser/safe_browsing/srt_fetcher_win.cc
@@ -255,7 +255,7 @@ url_fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE); url_fetcher_->SetMaxRetriesOn5xx(3); url_fetcher_->SaveResponseToTemporaryFile( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); url_fetcher_->SetRequestContext( g_browser_process->system_request_context()); // Adds the UMA bit to the download request if the user is enrolled in UMA.
diff --git a/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc b/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc index 03ca9e1..dbb22b0 100644 --- a/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc +++ b/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc
@@ -65,8 +65,7 @@ TwoPhaseUploaderTest() : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), url_request_context_getter_(new net::TestURLRequestContextGetter( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))) { - } + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))) {} protected: content::TestBrowserThreadBundle thread_bundle_; @@ -81,7 +80,7 @@ Delegate delegate; std::unique_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create( url_request_context_getter_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), test_server.GetURL("start"), "metadata", GetTestFilePath(), base::Bind(&Delegate::ProgressCallback, base::Unretained(&delegate)), base::Bind(&Delegate::FinishCallback, base::Unretained(&delegate), @@ -105,7 +104,7 @@ Delegate delegate; std::unique_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create( url_request_context_getter_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), test_server.GetURL("start?p1code=500"), "metadata", GetTestFilePath(), base::Bind(&Delegate::ProgressCallback, base::Unretained(&delegate)), base::Bind(&Delegate::FinishCallback, base::Unretained(&delegate), @@ -125,7 +124,7 @@ Delegate delegate; std::unique_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create( url_request_context_getter_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), test_server.GetURL("start?p2code=500"), "metadata", GetTestFilePath(), base::Bind(&Delegate::ProgressCallback, base::Unretained(&delegate)), base::Bind(&Delegate::FinishCallback, base::Unretained(&delegate), @@ -149,7 +148,7 @@ Delegate delegate; std::unique_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create( url_request_context_getter_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), test_server.GetURL("start?p1close=1"), "metadata", GetTestFilePath(), base::Bind(&Delegate::ProgressCallback, base::Unretained(&delegate)), base::Bind(&Delegate::FinishCallback, base::Unretained(&delegate), @@ -169,7 +168,7 @@ Delegate delegate; std::unique_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create( url_request_context_getter_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), test_server.GetURL("start?p2close=1"), "metadata", GetTestFilePath(), base::Bind(&Delegate::ProgressCallback, base::Unretained(&delegate)), base::Bind(&Delegate::FinishCallback, base::Unretained(&delegate),
diff --git a/chrome/browser/safe_browsing/ui_manager_unittest.cc b/chrome/browser/safe_browsing/ui_manager_unittest.cc index 1213733..9516f371 100644 --- a/chrome/browser/safe_browsing/ui_manager_unittest.cc +++ b/chrome/browser/safe_browsing/ui_manager_unittest.cc
@@ -205,7 +205,7 @@ base::Bind(&SafeBrowsingCallbackWaiter::OnBlockingPageDone, base::Unretained(&waiter)); resource.callback_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); std::vector<SafeBrowsingUIManager::UnsafeResource> resources; resources.push_back(resource); SimulateBlockingPageDone(resources, true); @@ -223,7 +223,7 @@ base::Bind(&SafeBrowsingCallbackWaiter::OnBlockingPageDone, base::Unretained(&waiter)); resource.callback_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); std::vector<SafeBrowsingUIManager::UnsafeResource> resources; resources.push_back(resource); SimulateBlockingPageDone(resources, false); @@ -241,7 +241,7 @@ base::Bind(&SafeBrowsingCallbackWaiter::OnBlockingPageDoneOnIO, base::Unretained(&waiter)); resource.callback_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); std::vector<SafeBrowsingUIManager::UnsafeResource> resources; resources.push_back(resource); SimulateBlockingPageDone(resources, true); @@ -259,7 +259,7 @@ base::Bind(&SafeBrowsingCallbackWaiter::OnBlockingPageDoneOnIO, base::Unretained(&waiter)); resource.callback_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); std::vector<SafeBrowsingUIManager::UnsafeResource> resources; resources.push_back(resource); SimulateBlockingPageDone(resources, false);
diff --git a/chrome/browser/search/suggestions/suggestions_service_factory.cc b/chrome/browser/search/suggestions/suggestions_service_factory.cc index 5084066..bc5d4af 100644 --- a/chrome/browser/search/suggestions/suggestions_service_factory.cc +++ b/chrome/browser/search/suggestions/suggestions_service_factory.cc
@@ -91,7 +91,7 @@ profile->GetRequestContext())); std::unique_ptr<ImageManager> thumbnail_manager(new ImageManager( std::move(image_fetcher), std::move(db), database_dir, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB))); return new SuggestionsService( signin_manager, token_service, sync_service, profile->GetRequestContext(), std::move(suggestions_store), std::move(thumbnail_manager),
diff --git a/chrome/browser/service_process/service_process_control.cc b/chrome/browser/service_process/service_process_control.cc index 99769c5..c1b7bd81 100644 --- a/chrome/browser/service_process/service_process_control.cc +++ b/chrome/browser/service_process/service_process_control.cc
@@ -52,10 +52,8 @@ // TODO(hclam): Handle error connecting to channel. const IPC::ChannelHandle channel_id = GetServiceProcessChannel(); SetChannel(IPC::ChannelProxy::Create( - channel_id, - IPC::Channel::MODE_NAMED_CLIENT, - this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())); + channel_id, IPC::Channel::MODE_NAMED_CLIENT, this, + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())); } void ServiceProcessControl::SetChannel(
diff --git a/chrome/browser/services/gcm/gcm_profile_service_factory.cc b/chrome/browser/services/gcm/gcm_profile_service_factory.cc index 1ea2058..6d3c864 100644 --- a/chrome/browser/services/gcm/gcm_profile_service_factory.cc +++ b/chrome/browser/services/gcm/gcm_profile_service_factory.cc
@@ -77,9 +77,9 @@ ProfileOAuth2TokenServiceFactory::GetForProfile(profile), LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(profile))), std::unique_ptr<GCMClientFactory>(new GCMClientFactory), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), blocking_task_runner); #endif
diff --git a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc index 3247467..8787bde 100644 --- a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc +++ b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
@@ -59,13 +59,13 @@ ProfileOAuth2TokenServiceFactory::GetForProfile(profile), LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(profile))), std::unique_ptr<gcm::GCMClientFactory>(new gcm::FakeGCMClientFactory( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO))), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), blocking_task_runner)); }
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc index 525aaf41..3a06283 100644 --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -432,8 +432,7 @@ base::Bind(&SpellcheckCustomDictionary::FixInvalidFile, weak_ptr_factory_.GetWeakPtr(), base::Passed(&result))); BrowserThread::PostAfterStartupTask( - FROM_HERE, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + FROM_HERE, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), fix_invalid_file_.callback()); } }
diff --git a/chrome/browser/supervised_user/supervised_user_sync_data_type_controller.cc b/chrome/browser/supervised_user/supervised_user_sync_data_type_controller.cc index e3e6acaf..e8a8c52 100644 --- a/chrome/browser/supervised_user/supervised_user_sync_data_type_controller.cc +++ b/chrome/browser/supervised_user/supervised_user_sync_data_type_controller.cc
@@ -13,7 +13,7 @@ sync_driver::SyncClient* sync_client, Profile* profile) : sync_driver::UIDataTypeController( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), error_callback, type,
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc index 59cc4cac..a601e1d 100644 --- a/chrome/browser/sync/chrome_sync_client.cc +++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -208,9 +208,9 @@ ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET, *base::CommandLine::ForCurrentProcess(), prefs::kSavingBrowserHistoryDisabled, sync_service_url, - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB), token_service, url_request_context_getter, web_data_service_, password_store_)); @@ -442,16 +442,15 @@ switch (group) { case syncer::GROUP_DB: return new BrowserThreadModelWorker( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), syncer::GROUP_DB, observer); case syncer::GROUP_FILE: return new BrowserThreadModelWorker( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), syncer::GROUP_FILE, observer); case syncer::GROUP_UI: return new UIModelWorker( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - observer); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), observer); case syncer::GROUP_PASSIVE: return new syncer::PassiveModelWorker(observer); case syncer::GROUP_HISTORY: { @@ -460,8 +459,7 @@ return nullptr; return new HistoryModelWorker( history_service->AsWeakPtr(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - observer); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), observer); } case syncer::GROUP_PASSWORD: { if (!password_store_.get()) @@ -512,7 +510,7 @@ base::Closure error_callback = base::Bind(&ChromeReportUnrecoverableError, chrome::GetChannel()); const scoped_refptr<base::SingleThreadTaskRunner> ui_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); #if defined(ENABLE_EXTENSIONS) // App sync is enabled by default. Register unless explicitly
diff --git a/chrome/browser/sync/glue/extension_data_type_controller.cc b/chrome/browser/sync/glue/extension_data_type_controller.cc index cbdb600..d0dcbefe 100644 --- a/chrome/browser/sync/glue/extension_data_type_controller.cc +++ b/chrome/browser/sync/glue/extension_data_type_controller.cc
@@ -19,7 +19,7 @@ sync_driver::SyncClient* sync_client, Profile* profile) : UIDataTypeController( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), error_callback, type, sync_client),
diff --git a/chrome/browser/sync/glue/extension_setting_data_type_controller.cc b/chrome/browser/sync/glue/extension_setting_data_type_controller.cc index 67cc9db0..970cfa091 100644 --- a/chrome/browser/sync/glue/extension_setting_data_type_controller.cc +++ b/chrome/browser/sync/glue/extension_setting_data_type_controller.cc
@@ -23,7 +23,7 @@ sync_driver::SyncClient* sync_client, Profile* profile) : NonUIDataTypeController( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), error_callback, sync_client), type_(type),
diff --git a/chrome/browser/sync/glue/theme_data_type_controller.cc b/chrome/browser/sync/glue/theme_data_type_controller.cc index 38123b8b..a375b1b 100644 --- a/chrome/browser/sync/glue/theme_data_type_controller.cc +++ b/chrome/browser/sync/glue/theme_data_type_controller.cc
@@ -17,7 +17,7 @@ sync_driver::SyncClient* sync_client, Profile* profile) : UIDataTypeController( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), error_callback, syncer::THEMES, sync_client),
diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc index b4abcdf..7b984703 100644 --- a/chrome/browser/sync/profile_sync_service_factory.cc +++ b/chrome/browser/sync/profile_sync_service_factory.cc
@@ -179,11 +179,10 @@ init_params.debug_identifier = profile->GetDebugName(); init_params.channel = chrome::GetChannel(); - init_params.db_thread = content::BrowserThread::GetMessageLoopProxyForThread( + init_params.db_thread = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB); - init_params.file_thread = - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::FILE); + init_params.file_thread = content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::FILE); init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); auto pss = base::WrapUnique(new ProfileSyncService(std::move(init_params)));
diff --git a/chrome/browser/sync/profile_sync_test_util.cc b/chrome/browser/sync/profile_sync_test_util.cc index 0e8e8769..5f6ce7e 100644 --- a/chrome/browser/sync/profile_sync_test_util.cc +++ b/chrome/browser/sync/profile_sync_test_util.cc
@@ -52,11 +52,10 @@ init_params.url_request_context = profile->GetRequestContext(); init_params.debug_identifier = profile->GetDebugName(); init_params.channel = chrome::GetChannel(); - init_params.db_thread = content::BrowserThread::GetMessageLoopProxyForThread( + init_params.db_thread = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB); - init_params.file_thread = - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::FILE); + init_params.file_thread = content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::FILE); init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); return init_params;
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc index c95fb48d..76f7d20a 100644 --- a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
@@ -85,7 +85,7 @@ ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); - io_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + io_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); scoped_refptr<base::SequencedWorkerPool> worker_pool( content::BrowserThread::GetBlockingPool()); @@ -93,7 +93,7 @@ worker_pool->GetSequencedTaskRunnerWithShutdownBehavior( worker_pool->GetSequenceToken(), base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); - file_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + file_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE); scoped_refptr<base::SequencedTaskRunner> drive_task_runner = worker_pool->GetSequencedTaskRunnerWithShutdownBehavior(
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc index f709ec8..3484ef7 100644 --- a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc +++ b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
@@ -73,10 +73,9 @@ in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); ui_task_runner_ = base::ThreadTaskRunnerHandle::Get(); - io_task_runner_ = BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::IO); - file_task_runner_ = BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::IO); + io_task_runner_ = BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); + file_task_runner_ = + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } void TearDown() override { RevokeSyncableFileSystem(); }
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service.cc b/chrome/browser/sync_file_system/local/local_file_sync_service.cc index 25fc1ee3..e62b953 100644 --- a/chrome/browser/sync_file_system/local/local_file_sync_service.cc +++ b/chrome/browser/sync_file_system/local/local_file_sync_service.cc
@@ -345,9 +345,8 @@ sync_context_(new LocalFileSyncContext( profile_->GetPath(), env_override, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO) - .get())), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())), local_change_processor_(nullptr) { DCHECK_CURRENTLY_ON(BrowserThread::UI); sync_context_->AddOriginChangeObserver(this);
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc index 779860f1..723a77f 100644 --- a/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc +++ b/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
@@ -117,10 +117,9 @@ in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); file_system_.reset(new CannedSyncableFileSystem( - GURL(kOrigin), - in_memory_env_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + GURL(kOrigin), in_memory_env_.get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); local_service_ = LocalFileSyncService::CreateForTesting( &profile_, in_memory_env_.get()); @@ -300,10 +299,9 @@ TEST_F(LocalFileSyncServiceTest, MAYBE_LocalChangeObserverMultipleContexts) { const char kOrigin2[] = "http://foo"; CannedSyncableFileSystem file_system2( - GURL(kOrigin2), - in_memory_env_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + GURL(kOrigin2), in_memory_env_.get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); file_system2.SetUp(CannedSyncableFileSystem::QUOTA_ENABLED); base::RunLoop run_loop;
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc index 31a89c8..16829edd 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc +++ b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
@@ -136,10 +136,9 @@ void SetUp() override { in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); file_system_.reset(new CannedSyncableFileSystem( - GURL(kOrigin), - in_memory_env_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + GURL(kOrigin), in_memory_env_.get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); std::unique_ptr<LocalFileSyncService> local_service = LocalFileSyncService::CreateForTesting(&profile_, in_memory_env_.get());
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index d8e6346..149da999 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -209,7 +209,6 @@ "//chrome/browser/profile_resetter:profile_reset_report_proto", "//chrome/common:features", "//components/chooser_controller:chooser_controller", - "//components/copresence", "//components/feedback/proto", "//components/proximity_auth/webui", "//device/bluetooth", @@ -324,6 +323,13 @@ "//services/ui/public/cpp", "//services/ui/public/interfaces", ] + + # TODO(erg): These files hard depend on mus, and thus can't be in a gyp + # build. When gyp goes away, merge this back into the sources list. + sources += [ + "views/tabs/window_finder_mus.cc", + "views/tabs/window_finder_mus.h", + ] } if (enable_extensions) { sources += rebase_path(
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc index 81660f9..264b5f7 100644 --- a/chrome/browser/ui/ash/chrome_shell_delegate.cc +++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -487,22 +487,6 @@ return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile()); } -void ChromeShellDelegate::VirtualKeyboardActivated(bool activated) { - FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver, - keyboard_state_observer_list_, - OnVirtualKeyboardStateChanged(activated)); -} - -void ChromeShellDelegate::AddVirtualKeyboardStateObserver( - ash::VirtualKeyboardStateObserver* observer) { - keyboard_state_observer_list_.AddObserver(observer); -} - -void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( - ash::VirtualKeyboardStateObserver* observer) { - keyboard_state_observer_list_.RemoveObserver(observer); -} - ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { return new SessionStateDelegateChromeos; }
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.h b/chrome/browser/ui/ash/chrome_shell_delegate.h index b70ea6f0..5d3c6dbe 100644 --- a/chrome/browser/ui/ash/chrome_shell_delegate.h +++ b/chrome/browser/ui/ash/chrome_shell_delegate.h
@@ -10,7 +10,6 @@ #include "ash/common/shell_delegate.h" #include "base/macros.h" -#include "base/observer_list.h" #include "build/build_config.h" #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h" #include "content/public/browser/notification_observer.h" @@ -43,11 +42,6 @@ void PreShutdown() override; void Exit() override; keyboard::KeyboardUI* CreateKeyboardUI() override; - void VirtualKeyboardActivated(bool activated) override; - void AddVirtualKeyboardStateObserver( - ash::VirtualKeyboardStateObserver* observer) override; - void RemoveVirtualKeyboardStateObserver( - ash::VirtualKeyboardStateObserver* observer) override; void OpenUrl(const GURL& url) override; app_list::AppListPresenter* GetAppListPresenter() override; ash::ShelfDelegate* CreateShelfDelegate(ash::ShelfModel* model) override; @@ -80,9 +74,6 @@ ChromeLauncherControllerImpl* shelf_delegate_; - base::ObserverList<ash::VirtualKeyboardStateObserver> - keyboard_state_observer_list_; - // Proxies events from chrome/browser to ash::UserMetricsRecorder. std::unique_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_;
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc index 53386c2..2922e94 100644 --- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc +++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
@@ -408,6 +408,7 @@ case POPUP_ITEM_ID_AUTOFILL_OPTIONS: case POPUP_ITEM_ID_SCAN_CREDIT_CARD: case POPUP_ITEM_ID_SEPARATOR: + case POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO: return normal_font_list_; case POPUP_ITEM_ID_TITLE: case POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY:
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc index 2f58f12..a791663 100644 --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -19,6 +19,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" +#include "chrome/browser/signin/signin_promo.h" #include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" #include "chrome/browser/ui/autofill/create_card_unmask_prompt_view.h" @@ -42,6 +43,8 @@ #include "components/password_manager/content/browser/content_password_manager_driver.h" #include "components/prefs/pref_service.h" #include "components/signin/core/browser/profile_identity_provider.h" +#include "components/signin/core/browser/signin_header_helper.h" +#include "components/signin/core/browser/signin_metrics.h" #include "components/user_prefs/user_prefs.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/render_frame_host.h" @@ -336,4 +339,28 @@ content::SSLStatus::RAN_INSECURE_CONTENT); } +bool ChromeAutofillClient::ShouldShowSigninPromo() { +#if defined(OS_ANDROID) || defined(OS_IOS) + // TODO(crbug.com/626383): Implement signin promo for Android and iOS by + // changing the logic of StartSigninFlow() below. + return false; +#else + return chrome::FindBrowserWithWebContents(web_contents()) && + signin::ShouldShowPromo( + Profile::FromBrowserContext(web_contents()->GetBrowserContext())); +#endif +} + +void ChromeAutofillClient::StartSigninFlow() { +// See ShouldShowSigninPromo. +#if !defined(OS_ANDROID) && !defined(OS_IOS) + chrome::FindBrowserWithWebContents(web_contents()) + ->window() + ->ShowAvatarBubbleFromAvatarButton( + BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, + signin::ManageAccountsParams(), + signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN); +#endif +} + } // namespace autofill
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.h b/chrome/browser/ui/autofill/chrome_autofill_client.h index 1e910d6..81791fc 100644 --- a/chrome/browser/ui/autofill/chrome_autofill_client.h +++ b/chrome/browser/ui/autofill/chrome_autofill_client.h
@@ -79,6 +79,8 @@ const base::string16& profile_full_name) override; void OnFirstUserGestureObserved() override; bool IsContextSecure(const GURL& form_origin) override; + bool ShouldShowSigninPromo() override; + void StartSigninFlow() override; // content::WebContentsObserver implementation. void MainFrameWasResized(bool width_changed) override;
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc index 4c39d62..a7b8870 100644 --- a/chrome/browser/ui/browser_list.cc +++ b/chrome/browser/ui/browser_list.cc
@@ -186,6 +186,36 @@ } // static +void BrowserList::MoveBrowsersInWorkspaceToFront( + const std::string& new_workspace) { + DCHECK(!new_workspace.empty()); + + BrowserList* instance = GetInstance(); + + Browser* old_last_active = instance->GetLastActive(); + BrowserVector& last_active_browsers = instance->last_active_browsers_; + + // Perform a stable partition on the browsers in the list so that the browsers + // in the new workspace appear after the browsers in the other workspaces. + // + // For example, if we have a list of browser-workspace pairs + // [{b1, 0}, {b2, 1}, {b3, 0}, {b4, 1}] + // and we switch to workspace 1, we want the resulting browser list to look + // like [{b1, 0}, {b3, 0}, {b2, 1}, {b4, 1}]. + std::stable_partition( + last_active_browsers.begin(), last_active_browsers.end(), + [&new_workspace](Browser* browser) { + return browser->window()->GetWorkspace() != new_workspace; + }); + + Browser* new_last_active = instance->GetLastActive(); + if (old_last_active != new_last_active) { + FOR_EACH_OBSERVER(chrome::BrowserListObserver, observers_.Get(), + OnBrowserSetLastActive(new_last_active)); + } +} + +// static void BrowserList::SetLastActive(Browser* browser) { content::RecordAction(UserMetricsAction("ActiveBrowserChanged"));
diff --git a/chrome/browser/ui/browser_list.h b/chrome/browser/ui/browser_list.h index 33fdb59f4..4270d45b 100644 --- a/chrome/browser/ui/browser_list.h +++ b/chrome/browser/ui/browser_list.h
@@ -69,6 +69,10 @@ static void AddObserver(chrome::BrowserListObserver* observer); static void RemoveObserver(chrome::BrowserListObserver* observer); + // Moves all the browsers that show on workspace |new_workspace| to the end of + // the browser list (i.e. the browsers that were "activated" most recently). + static void MoveBrowsersInWorkspaceToFront(const std::string& new_workspace); + // Called by Browser objects when their window is activated (focused). This // allows us to determine what the last active Browser was on each desktop. static void SetLastActive(Browser* browser);
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm index 4fdcc76b..8f197be 100644 --- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm +++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm
@@ -28,8 +28,8 @@ std::unique_ptr<DesktopMediaList> tab_list, bool request_audio, const DoneCallback& done_callback) { - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( - extensions::switches::kDisableDesktopCapturePickerOldUI)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + extensions::switches::kDisableDesktopCapturePickerNewUI)) { controller_deprecated_.reset([[DesktopMediaPickerControllerDeprecated alloc] initWithScreenList:std::move(screen_list) windowList:std::move(window_list)
diff --git a/chrome/browser/ui/cocoa/notifications/notification_builder_mac.h b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.h index c9d5042..9813e23 100644 --- a/chrome/browser/ui/cocoa/notifications/notification_builder_mac.h +++ b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.h
@@ -54,6 +54,7 @@ - (void)setNotificationId:(NSString*)notificationId; - (void)setProfileId:(NSString*)profileId; - (void)setIncognito:(BOOL)incognito; +- (void)setNotificationType:(NSNumber*)notificationType; // Returns a notification ready to be displayed out of the provided // |notificationData|.
diff --git a/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm index 1d64752..6bd715d01 100644 --- a/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm +++ b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm
@@ -114,6 +114,11 @@ forKey:notification_constants::kNotificationIncognito]; } +- (void)setNotificationType:(NSNumber*)notificationType { + [notificationData_ setObject:notificationType + forKey:notification_constants::kNotificationType]; +} + - (NSUserNotification*)buildUserNotification { base::scoped_nsobject<NSUserNotification> toast( [[NSUserNotification alloc] init]); @@ -205,12 +210,15 @@ objectForKey:notification_constants::kNotificationIncognito]); NSNumber* incognito = [notificationData_ objectForKey:notification_constants::kNotificationIncognito]; + NSNumber* type = [notificationData_ + objectForKey:notification_constants::kNotificationType]; toast.get().userInfo = @{ notification_constants::kNotificationOrigin : origin, notification_constants::kNotificationId : notificationId, notification_constants::kNotificationProfileId : profileId, notification_constants::kNotificationIncognito : incognito, + notification_constants::kNotificationType : type, }; return toast.autorelease();
diff --git a/chrome/browser/ui/cocoa/notifications/notification_builder_mac_unittest.mm b/chrome/browser/ui/cocoa/notifications/notification_builder_mac_unittest.mm index 9baa9f55..63edf34 100644 --- a/chrome/browser/ui/cocoa/notifications/notification_builder_mac_unittest.mm +++ b/chrome/browser/ui/cocoa/notifications/notification_builder_mac_unittest.mm
@@ -7,6 +7,7 @@ #include "base/mac/foundation_util.h" #include "base/mac/scoped_nsobject.h" #include "base/strings/sys_string_conversions.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/ui/cocoa/notifications/notification_builder_mac.h" #include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h" #include "testing/gtest/include/gtest/gtest.h" @@ -22,6 +23,8 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder setNotificationType: + [NSNumber numberWithInt:NotificationCommon::NON_PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; EXPECT_EQ("Title", base::SysNSStringToUTF8([notification title])); @@ -47,6 +50,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; @@ -78,6 +84,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; @@ -108,6 +117,9 @@ [builder setOrigin:@"https://www.miguel.com"]; [builder setNotificationId:@"Notification1"]; [builder setIncognito:true]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; EXPECT_EQ("Title", base::SysNSStringToUTF8([notification title])); @@ -138,6 +150,10 @@ [sourceBuilder setNotificationId:@"notificationId"]; [sourceBuilder setProfileId:@"profileId"]; [sourceBuilder setIncognito:false]; + [sourceBuilder + setNotificationType: + [NSNumber numberWithInt:NotificationCommon::NON_PERSISTENT]]; + notificationData = [sourceBuilder buildDictionary]; } base::scoped_nsobject<NotificationBuilder> finalBuilder(
diff --git a/chrome/browser/ui/cocoa/notifications/notification_constants_mac.h b/chrome/browser/ui/cocoa/notifications/notification_constants_mac.h index e651130..23ca7aa 100644 --- a/chrome/browser/ui/cocoa/notifications/notification_constants_mac.h +++ b/chrome/browser/ui/cocoa/notifications/notification_constants_mac.h
@@ -13,7 +13,7 @@ extern NSString* const kNotificationId; extern NSString* const kNotificationProfileId; extern NSString* const kNotificationIncognito; - +extern NSString* const kNotificationType; extern NSString* const kNotificationOperation; extern NSString* const kNotificationButtonIndex;
diff --git a/chrome/browser/ui/cocoa/notifications/notification_constants_mac.mm b/chrome/browser/ui/cocoa/notifications/notification_constants_mac.mm index bd9dcfbb1..f5062b95 100644 --- a/chrome/browser/ui/cocoa/notifications/notification_constants_mac.mm +++ b/chrome/browser/ui/cocoa/notifications/notification_constants_mac.mm
@@ -11,6 +11,7 @@ NSString* const kNotificationId = @"notificationId"; NSString* const kNotificationProfileId = @"notificationProfileId"; NSString* const kNotificationIncognito = @"notificationIncognito"; +NSString* const kNotificationType = @"notificationType"; // Only applicable to the NotificationResponseBuilder NSString* const kNotificationOperation = @"notificationOperation";
diff --git a/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm b/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm index 1e78261..c773dc54 100644 --- a/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm +++ b/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.mm
@@ -43,6 +43,8 @@ objectForKey:notification_constants::kNotificationIncognito]); NSNumber* incognito = [[notification userInfo] objectForKey:notification_constants::kNotificationIncognito]; + NSNumber* notificationType = [[notification userInfo] + objectForKey:notification_constants::kNotificationType]; // Initialize operation and button index for the case where the // notification itself was clicked. @@ -88,8 +90,9 @@ notification_constants::kNotificationId : notificationId, notification_constants::kNotificationProfileId : profileId, notification_constants::kNotificationIncognito : incognito, - notification_constants::kNotificationOperation : - [NSNumber numberWithInt:operation], + notification_constants::kNotificationType : notificationType, + notification_constants:: + kNotificationOperation : [NSNumber numberWithInt:operation], notification_constants:: kNotificationButtonIndex : [NSNumber numberWithInt:buttonIndex], };
diff --git a/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac_unittest.mm b/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac_unittest.mm index 0d4a78dc..9c81d5a 100644 --- a/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac_unittest.mm +++ b/chrome/browser/ui/cocoa/notifications/notification_response_builder_mac_unittest.mm
@@ -5,6 +5,7 @@ #import <AppKit/AppKit.h> #include "base/mac/scoped_nsobject.h" +#include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/ui/cocoa/notifications/notification_builder_mac.h" #include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h" #include "chrome/browser/ui/cocoa/notifications/notification_response_builder_mac.h" @@ -21,6 +22,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; NSDictionary* response = @@ -45,6 +49,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; @@ -78,6 +85,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; @@ -113,6 +123,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification]; @@ -150,6 +163,9 @@ [builder setNotificationId:@"notificationId"]; [builder setProfileId:@"profileId"]; [builder setIncognito:false]; + [builder + setNotificationType:[NSNumber + numberWithInt:NotificationCommon::PERSISTENT]]; NSUserNotification* notification = [builder buildUserNotification];
diff --git a/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm b/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm index 8db7968b4..a73c8647 100644 --- a/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm +++ b/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm
@@ -73,6 +73,12 @@ [super removeFromSuperview]; } +- (void)viewDidMoveToWindow { + // In Material Design, the icon color depends on the theme. When the tab + // is moved into another window, make sure that it updates the theme. + [self updateIconForState:showingAlertState_]; +} + - (void)updateIconForState:(TabAlertState)aState { if (aState != TabAlertState::NONE) { TabView* const tabView = base::mac::ObjCCast<TabView>([self superview]);
diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm index 85b91a7..6785aaa6 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
@@ -45,6 +45,10 @@ return [[self parentWindow] themeImagePositionForAlignment:alignment]; } +- (BOOL)hasDarkTheme { + return [[self parentWindow] hasDarkTheme]; +} + @end @implementation TabWindowController
diff --git a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc index 3566414..59157a4 100644 --- a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc +++ b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
@@ -535,10 +535,8 @@ if (print_job) g_object_unref(print_job); base::FileUtilProxy::DeleteFile( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), - path_to_pdf_, - false, - base::FileUtilProxy::StatusCallback()); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), + path_to_pdf_, false, base::FileUtilProxy::StatusCallback()); // Printing finished. Matches AddRef() in PrintDocument(); Release(); }
diff --git a/chrome/browser/ui/search/search_ipc_router_unittest.cc b/chrome/browser/ui/search/search_ipc_router_unittest.cc index a7beb0b..38ee413 100644 --- a/chrome/browser/ui/search/search_ipc_router_unittest.cc +++ b/chrome/browser/ui/search/search_ipc_router_unittest.cc
@@ -279,14 +279,14 @@ NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl)); SetupMockDelegateAndPolicy(); MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy(); - EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_MOUSEOVER, delta)).Times(1); + EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_TILE, delta)).Times(1); EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(1) .WillOnce(testing::Return(true)); content::WebContents* contents = web_contents(); OnMessageReceived(ChromeViewHostMsg_LogEvent( contents->GetRoutingID(), GetSearchIPCRouterSeqNo(), - NTP_MOUSEOVER, delta)); + NTP_TILE, delta)); } TEST_F(SearchIPCRouterTest, IgnoreLogEventMsg) { @@ -294,14 +294,14 @@ NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar")); SetupMockDelegateAndPolicy(); MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy(); - EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_MOUSEOVER, delta)).Times(0); + EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_TILE, delta)).Times(0); EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(1) .WillOnce(testing::Return(false)); content::WebContents* contents = web_contents(); OnMessageReceived(ChromeViewHostMsg_LogEvent( contents->GetRoutingID(), GetSearchIPCRouterSeqNo(), - NTP_MOUSEOVER, delta)); + NTP_TILE, delta)); } TEST_F(SearchIPCRouterTest, ProcessLogMostVisitedImpressionMsg) { @@ -506,11 +506,11 @@ contents->GetRoutingID(), page_seq_no, OMNIBOX_FOCUS_VISIBLE)); base::TimeDelta delta = base::TimeDelta::FromMilliseconds(123); - EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_MOUSEOVER, delta)).Times(0); + EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_TILE, delta)).Times(0); EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(0); OnMessageReceived(ChromeViewHostMsg_LogEvent(contents->GetRoutingID(), page_seq_no, - NTP_MOUSEOVER, delta)); + NTP_TILE, delta)); base::string16 text; EXPECT_CALL(*mock_delegate(), PasteIntoOmnibox(text)).Times(0);
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc index 83556779..ecd4f8ec 100644 --- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc +++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
@@ -10,6 +10,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" +#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" #include "chrome/browser/ui/simple_message_box.h" #include "chrome/browser/ui/views/frame/browser_view.h" @@ -18,6 +19,7 @@ #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" #include "components/prefs/pref_service.h" +#include "ui/aura/env.h" #include "ui/aura/window.h" #include "ui/base/ime/input_method_initializer.h" #include "ui/base/l10n/l10n_util.h" @@ -28,6 +30,7 @@ #include "ui/native_theme/native_theme_dark_aura.h" #include "ui/views/linux_ui/linux_ui.h" #include "ui/views/widget/desktop_aura/desktop_screen.h" +#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" #include "ui/views/widget/native_widget_aura.h" namespace { @@ -68,7 +71,11 @@ } ChromeBrowserMainExtraPartsViewsLinux:: - ~ChromeBrowserMainExtraPartsViewsLinux() {} + ~ChromeBrowserMainExtraPartsViewsLinux() { + // X11DesktopHandler is destructed at this point, so we don't need to remove + // ourselves as an X11DesktopHandlerObserver + DCHECK(!aura::Env::GetInstanceDontCreate()); +} void ChromeBrowserMainExtraPartsViewsLinux::PreEarlyInitialization() { // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. @@ -89,6 +96,8 @@ views::LinuxUI::instance()->MaterialDesignControllerReady(); views::LinuxUI::instance()->UpdateDeviceScaleFactor( display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor()); + + views::X11DesktopHandler::get()->AddObserver(this); } void ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() { @@ -117,3 +126,8 @@ exit(EXIT_FAILURE); } + +void ChromeBrowserMainExtraPartsViewsLinux::OnWorkspaceChanged( + const std::string& new_workspace) { + BrowserList::MoveBrowsersInWorkspaceToFront(new_workspace); +}
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h index 0b542ed..ed3a86bd 100644 --- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h +++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h
@@ -11,9 +11,11 @@ #include "base/macros.h" #include "build/build_config.h" #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" +#include "ui/views/widget/desktop_aura/x11_desktop_handler_observer.h" class ChromeBrowserMainExtraPartsViewsLinux - : public ChromeBrowserMainExtraPartsViews { + : public ChromeBrowserMainExtraPartsViews, + public views::X11DesktopHandlerObserver { public: ChromeBrowserMainExtraPartsViewsLinux(); ~ChromeBrowserMainExtraPartsViewsLinux() override; @@ -24,6 +26,9 @@ void PreCreateThreads() override; void PreProfileInit() override; + // Overridden from views::X11DesktopHandlerObserver. + void OnWorkspaceChanged(const std::string& new_workspace) override; + private: DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsViewsLinux); };
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc index a24101e..0ed18bd 100644 --- a/chrome/browser/ui/views/content_setting_bubble_contents.cc +++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -324,7 +324,9 @@ !(i->second.disabled || model->GetDevices().empty())); combobox->set_listener(this); combobox->SetSelectedIndex( - model->GetDeviceIndex(i->second.selected_device)); + model->GetDevices().empty() + ? 0 + : model->GetDeviceIndex(i->second.selected_device)); layout->AddView(combobox); bubble_content_empty = false;
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc index b76839a..4773b4c1 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc
@@ -438,8 +438,8 @@ // static std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( - extensions::switches::kDisableDesktopCapturePickerOldUI)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + extensions::switches::kDisableDesktopCapturePickerNewUI)) { return std::unique_ptr<DesktopMediaPicker>( new deprecated::DesktopMediaPickerViews()); }
diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc index d1c767c..37bcfbb 100644 --- a/chrome/browser/ui/views/frame/browser_frame.cc +++ b/chrome/browser/ui/views/frame/browser_frame.cc
@@ -41,6 +41,10 @@ #include "chrome/browser/ui/views/frame/browser_command_handler_linux.h" #endif +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" +#endif + #if defined(OS_WIN) #include "ui/native_theme/native_theme_dark_win.h" #endif @@ -221,6 +225,10 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) + BrowserList::MoveBrowsersInWorkspaceToFront( + views::X11DesktopHandler::get()->GetWorkspace()); +#endif Widget::OnNativeWidgetWorkspaceChanged(); }
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc index 6c192ae..9c1a3ed 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -54,6 +54,12 @@ #include "ui/wm/core/window_modality_controller.h" #endif +#if defined(MOJO_SHELL_CLIENT) +#include "chrome/browser/ui/views/tabs/window_finder_mus.h" +#include "content/public/common/mojo_shell_connection.h" +#include "services/shell/runner/common/client_util.h" +#endif + using base::UserMetricsAction; using content::OpenURLParams; using content::WebContents; @@ -222,9 +228,17 @@ is_mutating_(false), attach_x_(-1), attach_index_(-1), - window_finder_(new WindowFinder), weak_factory_(this) { instance_ = this; + +#if defined(MOJO_SHELL_CLIENT) + content::MojoShellConnection* mojo_shell_connection = + content::MojoShellConnection::GetForProcess(); + if (mojo_shell_connection && shell::ShellIsRemote()) + window_finder_.reset(new WindowFinderMus); + else +#endif + window_finder_.reset(new WindowFinder); } TabDragController::~TabDragController() {
diff --git a/chrome/browser/ui/views/tabs/window_finder.h b/chrome/browser/ui/views/tabs/window_finder.h index 160fb6a..4ce91d5 100644 --- a/chrome/browser/ui/views/tabs/window_finder.h +++ b/chrome/browser/ui/views/tabs/window_finder.h
@@ -17,11 +17,17 @@ class Point; } +// Class used by the tabstrip to find chrome windows that we can attach tabs +// to. class WindowFinder { public: WindowFinder(); virtual ~WindowFinder(); + // Finds the topmost visible chrome window at |screen_point|. This should + // return nullptr if |screen_point| is in another program's window which + // occludes the topmost chrome window. Ignores the windows in |ignore|, which + // contain windows such as the tab being dragged right now. virtual gfx::NativeWindow GetLocalProcessWindowAtPoint( const gfx::Point& screen_point, const std::set<gfx::NativeWindow>& ignore);
diff --git a/chrome/browser/ui/views/tabs/window_finder_mus.cc b/chrome/browser/ui/views/tabs/window_finder_mus.cc new file mode 100644 index 0000000..af753aa --- /dev/null +++ b/chrome/browser/ui/views/tabs/window_finder_mus.cc
@@ -0,0 +1,38 @@ +// 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/views/tabs/window_finder_mus.h" + +#include "ui/aura/window.h" +#include "ui/views/mus/native_widget_mus.h" +#include "ui/views/mus/window_manager_connection.h" + +WindowFinderMus::WindowFinderMus() {} + +WindowFinderMus::~WindowFinderMus() {} + +gfx::NativeWindow WindowFinderMus::GetLocalProcessWindowAtPoint( + const gfx::Point& screen_point, + const std::set<gfx::NativeWindow>& ignore) { + std::set<ui::Window*> mus_windows = + views::WindowManagerConnection::Get()->GetRoots(); + // TODO(erg): Needs to deal with stacking order here. + + // For every mus window, look at the associated aura window and see if we're + // in that. + for (ui::Window* mus : mus_windows) { + views::Widget* widget = views::NativeWidgetMus::GetWidgetForWindow(mus); + if (widget && widget->GetWindowBoundsInScreen().Contains(screen_point)) { + aura::Window* content_window = widget->GetNativeWindow(); + + // If we were instructed to ignore this window, ignore it. + if (ContainsKey(ignore, content_window)) + continue; + + return content_window; + } + } + + return nullptr; +}
diff --git a/chrome/browser/ui/views/tabs/window_finder_mus.h b/chrome/browser/ui/views/tabs/window_finder_mus.h new file mode 100644 index 0000000..6bded2d --- /dev/null +++ b/chrome/browser/ui/views/tabs/window_finder_mus.h
@@ -0,0 +1,24 @@ +// 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 CHROME_BROWSER_UI_VIEWS_TABS_WINDOW_FINDER_MUS_H_ +#define CHROME_BROWSER_UI_VIEWS_TABS_WINDOW_FINDER_MUS_H_ + +#include "chrome/browser/ui/views/tabs/window_finder.h" + +class WindowFinderMus : public WindowFinder { + public: + WindowFinderMus(); + ~WindowFinderMus() override; + + // Overridden from WindowFinder: + gfx::NativeWindow GetLocalProcessWindowAtPoint( + const gfx::Point& screen_point, + const std::set<gfx::NativeWindow>& ignore) override; + + private: + DISALLOW_COPY_AND_ASSIGN(WindowFinderMus); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_TABS_WINDOW_FINDER_MUS_H_
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 528863e..3f54361 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -109,7 +109,6 @@ #else #include "chrome/browser/signin/easy_unlock_service.h" #include "chrome/browser/signin/easy_unlock_service_factory.h" -#include "chrome/browser/ui/webui/copresence_ui.h" #include "chrome/browser/ui/webui/devtools_ui.h" #include "chrome/browser/ui/webui/inspect_ui.h" #include "chrome/browser/ui/webui/md_downloads/md_downloads_ui.h" @@ -515,8 +514,6 @@ !profile->IsOffTheRecord()) return &NewWebUI<SnippetsInternalsUI>; #else - if (url.host() == chrome::kChromeUICopresenceHost) - return &NewWebUI<CopresenceUI>; if (url.SchemeIs(content::kChromeDevToolsScheme)) return &NewWebUI<DevToolsUI>;
diff --git a/chrome/browser/ui/webui/copresence_ui.cc b/chrome/browser/ui/webui/copresence_ui.cc deleted file mode 100644 index 1bcfc23..0000000 --- a/chrome/browser/ui/webui/copresence_ui.cc +++ /dev/null
@@ -1,72 +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 "chrome/browser/ui/webui/copresence_ui.h" - -#include <memory> - -#include "chrome/browser/ui/webui/copresence_ui_handler.h" -#include "chrome/common/url_constants.h" -#include "chrome/grit/generated_resources.h" -#include "content/public/browser/web_contents.h" -#include "content/public/browser/web_ui.h" -#include "content/public/browser/web_ui_data_source.h" -#include "grit/browser_resources.h" - -using content::WebUIDataSource; - -namespace { - -std::unique_ptr<WebUIDataSource> CreateDataSource() { - std::unique_ptr<WebUIDataSource> data_source( - WebUIDataSource::Create(chrome::kChromeUICopresenceHost)); - - data_source->AddLocalizedString("title", IDS_COPRESENCE_TITLE); - - data_source->AddLocalizedString("directives_title", - IDS_COPRESENCE_DIRECTIVES_TITLE); - data_source->AddLocalizedString("directive_type", - IDS_COPRESENCE_DIRECTIVE_TYPE); - data_source->AddLocalizedString("token_medium", IDS_COPRESENCE_TOKEN_MEDIUM); - data_source->AddLocalizedString("duration", IDS_COPRESENCE_DURATION); - - data_source->AddLocalizedString("transmitted_tokens_title", - IDS_COPRESENCE_TRANSMITTED_TOKENS_TITLE); - data_source->AddLocalizedString("received_tokens_title", - IDS_COPRESENCE_RECEIVED_TOKENS_TITLE); - data_source->AddLocalizedString("token_id", - IDS_COPRESENCE_TOKEN_ID); - data_source->AddLocalizedString("token_status", - IDS_COPRESENCE_TOKEN_STATUS); - data_source->AddLocalizedString("token_transmit_time", - IDS_COPRESENCE_TOKEN_TRANSMIT_TIME); - data_source->AddLocalizedString("token_receive_time", - IDS_COPRESENCE_TOKEN_RECEIVE_TIME); - - data_source->AddLocalizedString("clear_state", - IDS_COPRESENCE_CLEAR_STATE); - data_source->AddLocalizedString("confirm_delete", - IDS_COPRESENCE_CONFIRM_DELETE); - - data_source->SetJsonPath("strings.js"); - data_source->AddResourcePath("copresence.css", IDR_COPRESENCE_CSS); - data_source->AddResourcePath("copresence.js", IDR_COPRESENCE_JS); - data_source->SetDefaultResource(IDR_COPRESENCE_HTML); - - return data_source; -} - -} // namespace - -CopresenceUI::CopresenceUI(content::WebUI* web_ui) - : content::WebUIController(web_ui) { - // This call takes ownership of the WebUIMessageHandler. - web_ui->AddMessageHandler(new CopresenceUIHandler(web_ui)); - - // This call takes ownership of the WebUIDataSource. - WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), - CreateDataSource().release()); -} - -CopresenceUI::~CopresenceUI() {}
diff --git a/chrome/browser/ui/webui/copresence_ui.h b/chrome/browser/ui/webui/copresence_ui.h deleted file mode 100644 index 88af60a..0000000 --- a/chrome/browser/ui/webui/copresence_ui.h +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_H_ -#define CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_H_ - -#include "base/macros.h" -#include "content/public/browser/web_ui_controller.h" - -class CopresenceUI final : public content::WebUIController { - public: - explicit CopresenceUI(content::WebUI* web_ui); - ~CopresenceUI() override; - - private: - DISALLOW_COPY_AND_ASSIGN(CopresenceUI); -}; - -#endif // CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_H_
diff --git a/chrome/browser/ui/webui/copresence_ui_handler.cc b/chrome/browser/ui/webui/copresence_ui_handler.cc deleted file mode 100644 index 0f03a57f..0000000 --- a/chrome/browser/ui/webui/copresence_ui_handler.cc +++ /dev/null
@@ -1,214 +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 "chrome/browser/ui/webui/copresence_ui_handler.h" - -#include <map> -#include <memory> -#include <string> -#include <utility> -#include <vector> - -#include "base/bind.h" -#include "base/i18n/time_formatting.h" -#include "base/time/time.h" -#include "base/values.h" -#include "chrome/browser/extensions/api/copresence/copresence_api.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/public/copresence_manager.h" -#include "components/copresence/public/copresence_state.h" -#include "components/copresence/tokens.h" -#include "content/public/browser/web_contents.h" -#include "content/public/browser/web_ui.h" -#include "ui/base/l10n/time_format.h" - -using base::ListValue; -using base::DictionaryValue; -using content::WebUI; -using copresence::Directive; -using copresence::ReceivedToken; -using copresence::TransmittedToken; -using extensions::CopresenceService; - -// TODO(ckehoe): Make debug strings translatable? - -namespace { - -std::string FormatInstructionType( - copresence::TokenInstructionType directive_type) { - switch (directive_type) { - case copresence::TRANSMIT: - return "Transmit"; - - case copresence::RECEIVE: - return "Receive"; - - default: - NOTREACHED(); - return "Unknown"; - } -} - -std::string FormatMedium(copresence::TokenMedium medium) { - switch (medium) { - case copresence::AUDIO_ULTRASOUND_PASSBAND: - return "Ultrasound"; - - case copresence::AUDIO_AUDIBLE_DTMF: - return "Audible"; - - default: - NOTREACHED(); - return "Unknown"; - } -} - -std::string ConvertStatus(const TransmittedToken& token) { - bool done = token.stop_time < base::Time::Now(); - std::string status = done ? "done" : "active"; - if (token.broadcast_confirmed) - status += " confirmed"; - return status; -} - -std::string ConvertStatus(const ReceivedToken& token) { - switch (token.valid) { - case ReceivedToken::VALID: - return "valid"; - - case ReceivedToken::INVALID: - return "invalid"; - - case ReceivedToken::UNKNOWN: - return std::string(); - - default: - NOTREACHED(); - return std::string(); - } -} - -template <class T> -std::unique_ptr<DictionaryValue> FormatToken(const T& token) { - std::unique_ptr<DictionaryValue> js_token(new DictionaryValue); - - js_token->SetString("id", token.id); - js_token->SetString("statuses", ConvertStatus(token)); - js_token->SetString("medium", FormatMedium(token.medium)); - DCHECK(!token.start_time.is_null()); - js_token->SetString("time", - base::TimeFormatTimeOfDay(token.start_time)); - - return js_token; -} - -// Retrieve the CopresenceService, if any. -CopresenceService* GetCopresenceService(WebUI* web_ui) { - DCHECK(web_ui); - return CopresenceService::GetFactoryInstance()->Get( - web_ui->GetWebContents()->GetBrowserContext()); -} - -// Safely retrieve the CopresenceState, if any. -copresence::CopresenceState* GetCopresenceState(CopresenceService* service) { - // During shutdown, there may be no CopresenceService. - return service && service->manager() ? service->manager()->state() : nullptr; -} - -// Safely retrieve the CopresenceState, if any. It would be cleaner if we could -// put this into CopresenceUIHandler and call WebUIMessageHandler::web_ui() -// instead of taking an argument. However, it turns out that web_ui() returns -// null when called in the constructor. So we pass in the web_ui explicitly. -copresence::CopresenceState* GetCopresenceState(WebUI* web_ui) { - return GetCopresenceState(GetCopresenceService(web_ui)); -} - -} // namespace - - -// Public functions. - -CopresenceUIHandler::CopresenceUIHandler(WebUI* web_ui) - : state_(GetCopresenceState(web_ui)) { - DCHECK(state_); - state_->AddObserver(this); -} - -CopresenceUIHandler::~CopresenceUIHandler() { - // Check if the CopresenceService is still up before unregistering. - state_ = GetCopresenceState(web_ui()); - if (state_) - state_->RemoveObserver(this); -} - - -// Private functions. - -void CopresenceUIHandler::RegisterMessages() { - web_ui()->RegisterMessageCallback( - "populateCopresenceState", - base::Bind(&CopresenceUIHandler::HandlePopulateState, - base::Unretained(this))); - web_ui()->RegisterMessageCallback( - "clearCopresenceState", - base::Bind(&CopresenceUIHandler::HandleClearState, - base::Unretained(this))); -} - -void CopresenceUIHandler::DirectivesUpdated() { - ListValue js_directives; - for (const Directive& directive : state_->active_directives()) { - std::unique_ptr<DictionaryValue> js_directive(new DictionaryValue); - - js_directive->SetString("type", FormatInstructionType( - directive.token_instruction().token_instruction_type())); - js_directive->SetString("medium", FormatMedium( - directive.token_instruction().medium())); - js_directive->SetString("duration", ui::TimeFormat::Simple( - ui::TimeFormat::FORMAT_DURATION, - ui::TimeFormat::LENGTH_LONG, - base::TimeDelta::FromMilliseconds(directive.ttl_millis()))); - - js_directives.Append(std::move(js_directive)); - } - - web_ui()->CallJavascriptFunctionUnsafe("refreshDirectives", js_directives); -} - -void CopresenceUIHandler::TokenTransmitted(const TransmittedToken& token) { - web_ui()->CallJavascriptFunctionUnsafe("updateTransmittedToken", - *FormatToken(token)); -} - -void CopresenceUIHandler::TokenReceived(const ReceivedToken& token) { - web_ui()->CallJavascriptFunctionUnsafe("updateReceivedToken", - *FormatToken(token)); -} - -void CopresenceUIHandler::HandlePopulateState(const ListValue* args) { - DCHECK(args->empty()); - DirectivesUpdated(); - // TODO(ckehoe): Pass tokens to JS as a batch. - for (const auto& token_entry : state_->transmitted_tokens()) - TokenTransmitted(token_entry.second); - for (const auto& token_entry : state_->received_tokens()) - TokenReceived(token_entry.second); -} - -void CopresenceUIHandler::HandleClearState(const ListValue* args) { - DCHECK(args->empty()); - - CopresenceService* service = GetCopresenceService(web_ui()); - DCHECK(service); - service->ResetState(); - - // CopresenceService::ResetState() deletes the CopresenceState object - // we were using. We have to get the new one and reconnect to it. - state_ = GetCopresenceState(service); - DCHECK(state_); - state_->AddObserver(this); - - web_ui()->CallJavascriptFunctionUnsafe("clearTokens"); - DirectivesUpdated(); -}
diff --git a/chrome/browser/ui/webui/copresence_ui_handler.h b/chrome/browser/ui/webui/copresence_ui_handler.h deleted file mode 100644 index f4d32ce4..0000000 --- a/chrome/browser/ui/webui/copresence_ui_handler.h +++ /dev/null
@@ -1,52 +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 CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_ -#define CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_ - -#include "base/macros.h" -#include "components/copresence/public/copresence_observer.h" -#include "content/public/browser/web_ui_message_handler.h" - -namespace base { -class ListValue; -} - -namespace content { -class WebUI; -} - -namespace copresence { -class CopresenceState; -} - -// UI Handler for the copresence page. -// TODO(crbug.com/444263): Write tests. -class CopresenceUIHandler final : public content::WebUIMessageHandler, - public copresence::CopresenceObserver { - public: - explicit CopresenceUIHandler(content::WebUI* web_ui); - ~CopresenceUIHandler() override; - - private: - // WebUIMessageHandler override. - void RegisterMessages() override; - - // CopresenceObserver overrides. - void DirectivesUpdated() override; - void TokenTransmitted(const copresence::TransmittedToken& token) override; - void TokenReceived(const copresence::ReceivedToken& token) override; - - // Handler to populate the page with its initial state. - void HandlePopulateState(const base::ListValue* args); - - // Handler for the clear state button. - void HandleClearState(const base::ListValue* args); - - copresence::CopresenceState* state_; - - DISALLOW_COPY_AND_ASSIGN(CopresenceUIHandler); -}; - -#endif // CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_
diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc index 2436222..771305d 100644 --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc
@@ -122,6 +122,8 @@ IDS_MD_EXTENSIONS_SHORTCUT_SCOPE_LABEL); source->AddLocalizedString("shortcutScopeInChrome", IDS_MD_EXTENSIONS_SHORTCUT_SCOPE_IN_CHROME); + source->AddLocalizedString("shortcutTypeAShortcut", + IDS_MD_EXTENSIONS_TYPE_A_SHORTCUT); source->AddLocalizedString("viewBackgroundPage", IDS_EXTENSIONS_BACKGROUND_PAGE); source->AddLocalizedString("viewIncognito", @@ -164,6 +166,10 @@ source->AddResourcePath("pack_dialog.js", IDR_MD_EXTENSIONS_PACK_DIALOG_JS); source->AddResourcePath("service.html", IDR_MD_EXTENSIONS_SERVICE_HTML); source->AddResourcePath("service.js", IDR_MD_EXTENSIONS_SERVICE_JS); + source->AddResourcePath("shortcut_input.html", + IDR_MD_EXTENSIONS_SHORTCUT_INPUT_HTML); + source->AddResourcePath("shortcut_input.js", + IDR_MD_EXTENSIONS_SHORTCUT_INPUT_JS); source->AddResourcePath("shortcut_util.html", IDR_EXTENSIONS_SHORTCUT_UTIL_HTML); source->AddResourcePath("shortcut_util.js", IDR_EXTENSIONS_SHORTCUT_UTIL_JS);
diff --git a/chrome/browser/ui/webui/help/version_updater_win.cc b/chrome/browser/ui/webui/help/version_updater_win.cc index 32861e2d..e0eb626d 100644 --- a/chrome/browser/ui/webui/help/version_updater_win.cc +++ b/chrome/browser/ui/webui/help/version_updater_win.cc
@@ -115,7 +115,7 @@ void VersionUpdaterWin::BeginUpdateCheckOnFileThread( bool install_update_if_possible) { - BeginUpdateCheck(content::BrowserThread::GetMessageLoopProxyForThread( + BeginUpdateCheck(content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), g_browser_process->GetApplicationLocale(), install_update_if_possible, owner_widget_,
diff --git a/chrome/browser/ui/webui/metrics_handler.cc b/chrome/browser/ui/webui/metrics_handler.cc index b4046e8..39ef3287a 100644 --- a/chrome/browser/ui/webui/metrics_handler.cc +++ b/chrome/browser/ui/webui/metrics_handler.cc
@@ -36,9 +36,6 @@ web_ui()->RegisterMessageCallback( "metricsHandler:logEventTime", base::Bind(&MetricsHandler::HandleLogEventTime, base::Unretained(this))); - web_ui()->RegisterMessageCallback( - "metricsHandler:logMouseover", - base::Bind(&MetricsHandler::HandleLogMouseover, base::Unretained(this))); } void MetricsHandler::HandleRecordAction(const base::ListValue* args) { @@ -106,12 +103,3 @@ NOTREACHED(); } } - -void MetricsHandler::HandleLogMouseover(const base::ListValue* args) { -#if !defined(OS_ANDROID) - // Android uses native UI for NTP. - NTPUserDataLogger::GetOrCreateFromWebContents( - web_ui()->GetWebContents())->LogEvent(NTP_MOUSEOVER, - base::TimeDelta::FromMilliseconds(0)); -#endif // !defined(OS_ANDROID) -}
diff --git a/chrome/browser/ui/webui/metrics_handler.h b/chrome/browser/ui/webui/metrics_handler.h index 07eb7d0..15ad9432 100644 --- a/chrome/browser/ui/webui/metrics_handler.h +++ b/chrome/browser/ui/webui/metrics_handler.h
@@ -47,9 +47,6 @@ // Callback for the "metricsHandler:logEventTime" message. void HandleLogEventTime(const base::ListValue* args); - // Used to log when a user mouses over a tile or title on the NTP. - void HandleLogMouseover(const base::ListValue* args); - private: DISALLOW_COPY_AND_ASSIGN(MetricsHandler); };
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc index 3a96c452..0fabeb1 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -988,7 +988,7 @@ error += network_error; chromeos::onc::CertificateImporterImpl cert_importer( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), nssdb); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), nssdb); cert_importer.ImportCertificates( certificates, onc_source,
diff --git a/chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc b/chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc index 2836822..9bf00d2 100644 --- a/chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc +++ b/chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc
@@ -110,9 +110,6 @@ } void NTPUserDataLogger::EmitNtpStatistics() { - UMA_HISTOGRAM_COUNTS("NewTabPage.NumberOfMouseOvers", number_of_mouseovers_); - number_of_mouseovers_ = 0; - // We only send statistics once per page. // And we don't send if there are no tiles recorded. if (has_emitted_ || !number_of_tiles_) @@ -203,9 +200,6 @@ case NTP_EXTERNAL_TILE_FALLBACK: number_of_external_tile_fallbacks_++; break; - case NTP_MOUSEOVER: - number_of_mouseovers_++; - break; case NTP_TILE_LOADED: // The time at which the last tile has loaded (title, thumbnail or single) // is a good proxy for the total load time of the NTP, therefore we keep @@ -277,7 +271,6 @@ number_of_thumbnail_errors_(0), number_of_gray_tile_fallbacks_(0), number_of_external_tile_fallbacks_(0), - number_of_mouseovers_(0), has_emitted_(false), during_startup_(false) { during_startup_ = !AfterStartupTaskUtils::IsBrowserStartupComplete();
diff --git a/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h b/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h index 27f858d3..c3efcc52 100644 --- a/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h +++ b/chrome/browser/ui/webui/ntp/ntp_user_data_logger.h
@@ -96,9 +96,6 @@ // handled by the page itself, was the fallback for a failed thumbnail. size_t number_of_external_tile_fallbacks_; - // Total number of mouseovers for this NTP session. - size_t number_of_mouseovers_; - // Time from navigation start it took to load the NTP in milliseconds. base::TimeDelta load_time_;
diff --git a/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc b/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc index 98d658d..81b7036 100644 --- a/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc +++ b/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc
@@ -43,17 +43,11 @@ TEST_F(NTPUserDataLoggerTest, TestLogging) { base::StatisticsRecorder::Initialize(); - // Ensure empty statistics. - EXPECT_EQ(0, GetTotalCount("NewTabPage.NumberOfMouseOvers")); - EXPECT_EQ(0, GetBinCount("NewTabPage.NumberOfMouseOvers", 0)); - // Enusure non-zero statistics. TestNTPUserDataLogger logger; base::TimeDelta delta = base::TimeDelta::FromMilliseconds(0); - for (int i = 0; i < 20; ++i) - logger.LogEvent(NTP_MOUSEOVER, delta); for (int i = 0; i < 8; ++i) logger.LogEvent(NTP_TILE, delta); for (int i = 0; i < 4; ++i) @@ -70,9 +64,6 @@ logger.EmitNtpStatistics(); - EXPECT_EQ(1, GetTotalCount("NewTabPage.NumberOfMouseOvers")); - EXPECT_EQ(0, GetBinCount("NewTabPage.NumberOfMouseOvers", 0)); - EXPECT_EQ(1, GetBinCount("NewTabPage.NumberOfMouseOvers", 20)); EXPECT_EQ(1, GetTotalCount("NewTabPage.NumberOfTiles")); EXPECT_EQ(1, GetBinCount("NewTabPage.NumberOfTiles", 8)); EXPECT_EQ(1, GetTotalCount("NewTabPage.NumberOfThumbnailTiles")); @@ -92,9 +83,6 @@ // Statistics should be reset to 0, so we should not log anything else. logger.EmitNtpStatistics(); - EXPECT_EQ(2, GetTotalCount("NewTabPage.NumberOfMouseOvers")); - EXPECT_EQ(1, GetBinCount("NewTabPage.NumberOfMouseOvers", 0)); - EXPECT_EQ(1, GetBinCount("NewTabPage.NumberOfMouseOvers", 20)); EXPECT_EQ(1, GetTotalCount("NewTabPage.NumberOfTiles")); EXPECT_EQ(1, GetTotalCount("NewTabPage.NumberOfThumbnailTiles")); EXPECT_EQ(1, GetTotalCount("NewTabPage.NumberOfThumbnailErrors"));
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc index 5792989..a799226 100644 --- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc +++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -299,7 +299,7 @@ // Post task to file thread to read file. return tracker->PostTaskAndReply( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), FROM_HERE, base::Bind(&FileAccessProvider::DoRead, this, path, saved_errno, data), base::Bind(callback, base::Owned(saved_errno), base::Owned(data))); @@ -316,16 +316,11 @@ // Post task to file thread to write file. return tracker->PostTaskAndReply( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), - FROM_HERE, - base::Bind(&FileAccessProvider::DoWrite, - this, - path, - data, - saved_errno, - bytes_written), - base::Bind( - callback, base::Owned(saved_errno), base::Owned(bytes_written))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), + FROM_HERE, base::Bind(&FileAccessProvider::DoWrite, this, path, data, + saved_errno, bytes_written), + base::Bind(callback, base::Owned(saved_errno), + base::Owned(bytes_written))); } void FileAccessProvider::DoRead(const base::FilePath& path,
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc index 405aa91..6f5b0e6 100644 --- a/chrome/browser/ui/webui/options/password_manager_handler.cc +++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -346,7 +346,7 @@ new ImportPasswordResultConsumer(GetProfile())); password_manager::PasswordImporter::Import( - path, content::BrowserThread::GetMessageLoopProxyForThread( + path, content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE) .get(), base::Bind(&ImportPasswordResultConsumer::ConsumePassword, @@ -409,7 +409,7 @@ UMA_HISTOGRAM_COUNTS("PasswordManager.ExportedPasswordsPerUserInCSV", password_list.size()); password_manager::PasswordExporter::Export( - path, password_list, content::BrowserThread::GetMessageLoopProxyForThread( + path, password_list, content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE) .get()); }
diff --git a/chrome/browser/ui/webui/settings/certificates_handler.cc b/chrome/browser/ui/webui/settings/certificates_handler.cc index 462257144..fd7d055 100644 --- a/chrome/browser/ui/webui/settings/certificates_handler.cc +++ b/chrome/browser/ui/webui/settings/certificates_handler.cc
@@ -300,7 +300,7 @@ // Post task to file thread to read file. return tracker->PostTaskAndReply( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), FROM_HERE, base::Bind(&FileAccessProvider::DoRead, this, path, saved_errno, data), base::Bind(callback, base::Owned(saved_errno), base::Owned(data))); @@ -317,7 +317,7 @@ // Post task to file thread to write file. return tracker->PostTaskAndReply( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), FROM_HERE, base::Bind(&FileAccessProvider::DoWrite, this, path, data, saved_errno, bytes_written), base::Bind(callback, base::Owned(saved_errno),
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 b0a0da4f..374fb38 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
@@ -986,7 +986,57 @@ {"addSiteHeader", IDS_SETTINGS_ADD_SITE_HEADER}, {"addSiteLink", IDS_SETTINGS_ADD_SITE_LINK}, {"addSite", IDS_SETTINGS_ADD_SITE}, + {"cookieAppCache", IDS_COOKIES_APPLICATION_CACHE}, + {"cookieCacheStorage", IDS_COOKIES_CACHE_STORAGE}, + {"cookieChannelId", IDS_COOKIES_CHANNEL_ID}, + {"cookieDatabaseStorage", IDS_COOKIES_DATABASE_STORAGE}, + {"cookieFileSystem", IDS_COOKIES_FILE_SYSTEM}, + {"cookieFlashLso", IDS_COOKIES_FLASH_LSO}, + {"cookieLocalStorage", IDS_COOKIES_LOCAL_STORAGE}, + {"cookiePlural", IDS_COOKIES_PLURAL_COOKIES}, + {"cookieServiceWorker", IDS_COOKIES_SERVICE_WORKER}, + {"cookieSingular", IDS_COOKIES_SINGLE_COOKIE}, {"embeddedOnHost", IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST}, + {"appCacheManifest", + IDS_COOKIES_APPLICATION_CACHE_MANIFEST_LABEL}, + {"cacheStorageLastModified", + IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL}, + {"cacheStorageOrigin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL}, + {"cacheStorageSize", + IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL}, + {"channelIdServerId", IDS_COOKIES_CHANNEL_ID_ORIGIN_LABEL}, + {"channelIdType", IDS_COOKIES_CHANNEL_ID_TYPE_LABEL}, + {"channelIdCreated", IDS_COOKIES_CHANNEL_ID_CREATED_LABEL}, + {"channelIdExpires", IDS_COOKIES_CHANNEL_ID_EXPIRES_LABEL}, + {"cookieAccessibleToScript", + IDS_COOKIES_COOKIE_ACCESSIBLE_TO_SCRIPT_LABEL}, + {"cookieLastAccessed", IDS_COOKIES_LAST_ACCESSED_LABEL}, + {"cookieContent", IDS_COOKIES_COOKIE_CONTENT_LABEL}, + {"cookieCreated", IDS_COOKIES_COOKIE_CREATED_LABEL}, + {"cookieDomain", IDS_COOKIES_COOKIE_DOMAIN_LABEL}, + {"cookieExpires", IDS_COOKIES_COOKIE_EXPIRES_LABEL}, + {"cookieName", IDS_COOKIES_COOKIE_NAME_LABEL}, + {"cookiePath", IDS_COOKIES_COOKIE_PATH_LABEL}, + {"cookieSendFor", IDS_COOKIES_COOKIE_SENDFOR_LABEL}, + {"fileSystemOrigin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL}, + {"fileSystemPersistentUsage", + IDS_COOKIES_FILE_SYSTEM_PERSISTENT_USAGE_LABEL}, + {"fileSystemTemporaryUsage", + IDS_COOKIES_FILE_SYSTEM_TEMPORARY_USAGE_LABEL}, + {"indexedDbSize", IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL}, + {"indexedDbLastModified", + IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL}, + {"indexedDbOrigin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL}, + {"localStorageLastModified", + IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL}, + {"localStorageOrigin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL}, + {"localStorageSize", + IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL}, + {"serviceWorkerOrigin", IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL}, + {"serviceWorkerScopes", IDS_COOKIES_SERVICE_WORKER_SCOPES_LABEL}, + {"serviceWorkerSize", + IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL}, + {"webdbDesc", IDS_COOKIES_WEB_DATABASE_DESCRIPTION_LABEL}, {"siteSettingsCategoryPageTitle", IDS_SETTINGS_SITE_SETTINGS_CATEGORY}, {"siteSettingsCategoryAllSites", IDS_SETTINGS_SITE_SETTINGS_ALL_SITES}, {"siteSettingsCategoryCamera", IDS_SETTINGS_SITE_SETTINGS_CAMERA}, @@ -1095,6 +1145,11 @@ {"siteSettingsPermissions", IDS_SETTINGS_SITE_SETTINGS_PERMISSIONS}, {"siteSettingsClearAndReset", IDS_SETTINGS_SITE_SETTINGS_CLEAR_BUTTON}, {"siteSettingsDelete", IDS_SETTINGS_SITE_SETTINGS_DELETE}, + {"siteSettingsCookieHeader", IDS_SETTINGS_SITE_SETTINGS_COOKIE_HEADER}, + {"siteSettingsCookieDialog", IDS_SETTINGS_SITE_SETTINGS_COOKIE_DIALOG}, + {"siteSettingsCookieRemove", IDS_SETTINGS_SITE_SETTINGS_COOKIE_REMOVE}, + {"siteSettingsCookieRemoveAll", + IDS_SETTINGS_SITE_SETTINGS_COOKIE_REMOVE_ALL}, {"thirdPartyCookie", IDS_SETTINGS_SITE_SETTINGS_THIRD_PARTY_COOKIE}, {"thirdPartyCookieSublabel", IDS_SETTINGS_SITE_SETTINGS_THIRD_PARTY_COOKIE_SUBLABEL},
diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.cc b/chrome/browser/ui/webui/settings/md_settings_ui.cc index da75d7ce..bd6d743 100644 --- a/chrome/browser/ui/webui/settings/md_settings_ui.cc +++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc
@@ -22,6 +22,7 @@ #include "chrome/browser/ui/webui/settings/reset_settings_handler.h" #include "chrome/browser/ui/webui/settings/search_engines_handler.h" #include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h" +#include "chrome/browser/ui/webui/settings/settings_cookies_view_handler.h" #include "chrome/browser/ui/webui/settings/settings_media_devices_selection_handler.h" #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" #include "chrome/browser/ui/webui/settings/settings_startup_pages_handler.h" @@ -65,6 +66,7 @@ AddSettingsPageUIHandler(new ClearBrowsingDataHandler(web_ui)); AddSettingsPageUIHandler(new BrowserLifetimeHandler()); + AddSettingsPageUIHandler(new CookiesViewHandler()); AddSettingsPageUIHandler(new DownloadsHandler()); AddSettingsPageUIHandler(new FontHandler(web_ui)); AddSettingsPageUIHandler(new LanguagesHandler(web_ui));
diff --git a/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc new file mode 100644 index 0000000..156ff88 --- /dev/null +++ b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
@@ -0,0 +1,236 @@ +// 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/webui/settings/settings_cookies_view_handler.h" + +#include <string> +#include <utility> + +#include "base/bind.h" +#include "base/bind_helpers.h" +#include "base/macros.h" +#include "base/strings/utf_string_conversions.h" +#include "base/values.h" +#include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" +#include "chrome/browser/browsing_data/browsing_data_cache_storage_helper.h" +#include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" +#include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" +#include "chrome/browser/browsing_data/browsing_data_database_helper.h" +#include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" +#include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h" +#include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" +#include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" +#include "chrome/browser/browsing_data/browsing_data_quota_helper.h" +#include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/webui/cookies_tree_model_util.h" +#include "chrome/grit/generated_resources.h" +#include "content/public/browser/browser_context.h" +#include "content/public/browser/render_process_host.h" +#include "content/public/browser/site_instance.h" +#include "content/public/browser/storage_partition.h" +#include "content/public/browser/web_ui.h" + +namespace storage { +class FileSystemContext; +} + +namespace settings { + +CookiesViewHandler::CookiesViewHandler() + : batch_update_(false), + model_util_(new CookiesTreeModelUtil) { +} + +CookiesViewHandler::~CookiesViewHandler() { +} + +void CookiesViewHandler::OnJavascriptAllowed() { +} + +void CookiesViewHandler::OnJavascriptDisallowed() { +} + +void CookiesViewHandler::RegisterMessages() { + web_ui()->RegisterMessageCallback("updateCookieSearchResults", + base::Bind(&CookiesViewHandler::UpdateSearchResults, + base::Unretained(this))); + web_ui()->RegisterMessageCallback("removeAllCookies", + base::Bind(&CookiesViewHandler::RemoveAll, + base::Unretained(this))); + web_ui()->RegisterMessageCallback("removeCookie", + base::Bind(&CookiesViewHandler::Remove, + base::Unretained(this))); + web_ui()->RegisterMessageCallback("loadCookie", + base::Bind(&CookiesViewHandler::LoadChildren, + base::Unretained(this))); + web_ui()->RegisterMessageCallback("reloadCookies", + base::Bind(&CookiesViewHandler::ReloadCookies, + base::Unretained(this))); +} + +void CookiesViewHandler::TreeNodesAdded(ui::TreeModel* model, + ui::TreeModelNode* parent, + int start, + int count) { + // Skip if there is a batch update in progress. + if (batch_update_) + return; + + AllowJavascript(); + + CookiesTreeModel* tree_model = static_cast<CookiesTreeModel*>(model); + CookieTreeNode* parent_node = tree_model->AsNode(parent); + + std::unique_ptr<base::ListValue> children(new base::ListValue); + model_util_->GetChildNodeList(parent_node, start, count, children.get()); + + base::ListValue args; + if (parent == tree_model->GetRoot()) + args.Append(base::Value::CreateNullValue()); + else + args.AppendString(model_util_->GetTreeNodeId(parent_node)); + args.AppendInteger(start); + args.Append(std::move(children)); + CallJavascriptFunction("cr.webUIListenerCallback", + base::StringValue("onTreeItemAdded"), + args); +} + +void CookiesViewHandler::TreeNodesRemoved(ui::TreeModel* model, + ui::TreeModelNode* parent, + int start, + int count) { + // Skip if there is a batch update in progress. + if (batch_update_) + return; + + AllowJavascript(); + + CookiesTreeModel* tree_model = static_cast<CookiesTreeModel*>(model); + + base::ListValue args; + if (parent == tree_model->GetRoot()) + args.Append(base::Value::CreateNullValue()); + else + args.AppendString(model_util_->GetTreeNodeId(tree_model->AsNode(parent))); + args.AppendInteger(start); + args.AppendInteger(count); + CallJavascriptFunction("cr.webUIListenerCallback", + base::StringValue("onTreeItemRemoved"), + args); +} + +void CookiesViewHandler::TreeModelBeginBatch(CookiesTreeModel* model) { + DCHECK(!batch_update_); // There should be no nested batch begin. + batch_update_ = true; +} + +void CookiesViewHandler::TreeModelEndBatch(CookiesTreeModel* model) { + DCHECK(batch_update_); + batch_update_ = false; + + SendChildren(model->GetRoot()); +} + +void CookiesViewHandler::EnsureCookiesTreeModelCreated() { + if (!cookies_tree_model_.get()) { + Profile* profile = Profile::FromWebUI(web_ui()); + content::StoragePartition* storage_partition = + content::BrowserContext::GetDefaultStoragePartition(profile); + content::IndexedDBContext* indexed_db_context = + storage_partition->GetIndexedDBContext(); + content::ServiceWorkerContext* service_worker_context = + storage_partition->GetServiceWorkerContext(); + content::CacheStorageContext* cache_storage_context = + storage_partition->GetCacheStorageContext(); + storage::FileSystemContext* file_system_context = + storage_partition->GetFileSystemContext(); + LocalDataContainer* container = new LocalDataContainer( + new BrowsingDataCookieHelper(profile->GetRequestContext()), + new BrowsingDataDatabaseHelper(profile), + new BrowsingDataLocalStorageHelper(profile), NULL, + new BrowsingDataAppCacheHelper(profile), + new BrowsingDataIndexedDBHelper(indexed_db_context), + BrowsingDataFileSystemHelper::Create(file_system_context), + BrowsingDataQuotaHelper::Create(profile), + BrowsingDataChannelIDHelper::Create(profile->GetRequestContext()), + new BrowsingDataServiceWorkerHelper(service_worker_context), + new BrowsingDataCacheStorageHelper(cache_storage_context), + BrowsingDataFlashLSOHelper::Create(profile)); + cookies_tree_model_.reset( + new CookiesTreeModel(container, + profile->GetExtensionSpecialStoragePolicy(), + false)); + cookies_tree_model_->AddCookiesTreeObserver(this); + } +} + +void CookiesViewHandler::UpdateSearchResults(const base::ListValue* args) { + base::string16 query; + if (!args->GetString(0, &query)) + return; + + EnsureCookiesTreeModelCreated(); + + cookies_tree_model_->UpdateSearchResults(query); +} + +void CookiesViewHandler::RemoveAll(const base::ListValue* args) { + EnsureCookiesTreeModelCreated(); + cookies_tree_model_->DeleteAllStoredObjects(); +} + +void CookiesViewHandler::Remove(const base::ListValue* args) { + std::string node_path; + if (!args->GetString(0, &node_path)) + return; + + EnsureCookiesTreeModelCreated(); + + const CookieTreeNode* node = model_util_->GetTreeNodeFromPath( + cookies_tree_model_->GetRoot(), node_path); + if (node) + cookies_tree_model_->DeleteCookieNode(const_cast<CookieTreeNode*>(node)); +} + +void CookiesViewHandler::LoadChildren(const base::ListValue* args) { + std::string node_path; + if (!args->GetString(0, &node_path)) + return; + + EnsureCookiesTreeModelCreated(); + + const CookieTreeNode* node = model_util_->GetTreeNodeFromPath( + cookies_tree_model_->GetRoot(), node_path); + if (node) + SendChildren(node); +} + +void CookiesViewHandler::SendChildren(const CookieTreeNode* parent) { + AllowJavascript(); + + std::unique_ptr<base::ListValue> children(new base::ListValue); + model_util_->GetChildNodeList(parent, 0, parent->child_count(), + children.get()); + + base::ListValue args; + if (parent == cookies_tree_model_->GetRoot()) + args.Append(base::Value::CreateNullValue()); + else + args.AppendString(model_util_->GetTreeNodeId(parent)); + args.Append(std::move(children)); + + CallJavascriptFunction("cr.webUIListenerCallback", + base::StringValue("loadChildren"), + args); +} + +void CookiesViewHandler::ReloadCookies(const base::ListValue* args) { + cookies_tree_model_.reset(); + + EnsureCookiesTreeModelCreated(); +} + +} // namespace settings
diff --git a/chrome/browser/ui/webui/settings/settings_cookies_view_handler.h b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.h new file mode 100644 index 0000000..0f1faa7 --- /dev/null +++ b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.h
@@ -0,0 +1,82 @@ +// 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 CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_COOKIES_VIEW_HANDLER_H_ +#define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_COOKIES_VIEW_HANDLER_H_ + +#include <memory> + +#include "base/compiler_specific.h" +#include "base/macros.h" +#include "chrome/browser/browsing_data/cookies_tree_model.h" +#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" + +class CookiesTreeModelUtil; + +namespace settings { + +class CookiesViewHandler : public SettingsPageUIHandler, + public CookiesTreeModel::Observer { + public: + CookiesViewHandler(); + ~CookiesViewHandler() override; + + // SettingsPageUIHandler: + void OnJavascriptAllowed() override; + void OnJavascriptDisallowed() override; + void RegisterMessages() override; + + // CookiesTreeModel::Observer: + void TreeNodesAdded(ui::TreeModel* model, + ui::TreeModelNode* parent, + int start, + int count) override; + void TreeNodesRemoved(ui::TreeModel* model, + ui::TreeModelNode* parent, + int start, + int count) override; + void TreeNodeChanged(ui::TreeModel* model, ui::TreeModelNode* node) override { + } + void TreeModelBeginBatch(CookiesTreeModel* model) override; + void TreeModelEndBatch(CookiesTreeModel* model) override; + + private: + // Creates the CookiesTreeModel if neccessary. + void EnsureCookiesTreeModelCreated(); + + // Updates search filter for cookies tree model. + void UpdateSearchResults(const base::ListValue* args); + + // Remove all sites data. + void RemoveAll(const base::ListValue* args); + + // Remove selected sites data. + void Remove(const base::ListValue* args); + + // Get the tree node using the tree path info in |args| and call + // SendChildren to pass back children nodes data to WebUI. + void LoadChildren(const base::ListValue* args); + + // Get children nodes data and pass it to 'CookiesView.loadChildren' to + // update the WebUI. + void SendChildren(const CookieTreeNode* parent); + + // Reloads the CookiesTreeModel and passes the nodes to + // 'CookiesView.loadChildren' to update the WebUI. + void ReloadCookies(const base::ListValue* args); + + // The Cookies Tree model + std::unique_ptr<CookiesTreeModel> cookies_tree_model_; + + // Flag to indicate whether there is a batch update in progress. + bool batch_update_; + + std::unique_ptr<CookiesTreeModelUtil> model_util_; + + DISALLOW_COPY_AND_ASSIGN(CookiesViewHandler); +}; + +} // namespace settings + +#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_COOKIES_VIEW_HANDLER_H_
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler.cc b/chrome/browser/ui/webui/signin/inline_login_handler.cc index 4b850c3..4f44e2a 100644 --- a/chrome/browser/ui/webui/signin/inline_login_handler.cc +++ b/chrome/browser/ui/webui/signin/inline_login_handler.cc
@@ -173,6 +173,10 @@ content::RecordAction( base::UserMetricsAction("Signin_Signin_FromPasswordBubble")); break; + case signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN: + content::RecordAction( + base::UserMetricsAction("Signin_Signin_FromAutofillDropdown")); + break; case signin_metrics::AccessPoint::ACCESS_POINT_MAX: NOTREACHED(); break;
diff --git a/chrome/browser/web_data_service_factory.cc b/chrome/browser/web_data_service_factory.cc index 1da606fa..8cac57d7 100644 --- a/chrome/browser/web_data_service_factory.cc +++ b/chrome/browser/web_data_service_factory.cc
@@ -167,8 +167,8 @@ const base::FilePath& profile_path = context->GetPath(); return new WebDataServiceWrapper( profile_path, g_browser_process->GetApplicationLocale(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), sync_start_util::GetFlareForSyncableService(profile_path), &ProfileErrorCallback); }
diff --git a/chrome/browser/web_dev_style/js_checker.py b/chrome/browser/web_dev_style/js_checker.py index cba3eae..e2906738 100644 --- a/chrome/browser/web_dev_style/js_checker.py +++ b/chrome/browser/web_dev_style/js_checker.py
@@ -185,9 +185,19 @@ errors.MISSING_JSDOC_TAG_THIS, ] - # Whitelist Polymer-specific JsDoc tags. - gflags.FLAGS.custom_jsdoc_tags = ('group', 'element', 'attribute', - 'default', 'polymerBehavior') + # Keep this in sync with third_party/closure_compiler/closure_args.gypi + gflags.FLAGS.custom_jsdoc_tags = ( + 'abstract', + 'attribute', + 'default', + 'demo', + 'element', + 'group', + 'hero', + 'polymerBehavior' + 'status', + 'submodule', + ) error_handler = ErrorHandlerImpl(self.input_api.re) runner.Run(file_to_lint, error_handler, source=source) return error_handler.GetErrors()
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 209d171..45e285a8 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi
@@ -394,6 +394,8 @@ 'browser/native_window_notification_source.h', 'browser/net/predictor_tab_helper.cc', 'browser/net/predictor_tab_helper.h', + 'browser/ntp_snippets/content_suggestions_service_factory.cc', + 'browser/ntp_snippets/content_suggestions_service_factory.h', 'browser/ntp_snippets/ntp_snippets_service_factory.cc', 'browser/ntp_snippets/ntp_snippets_service_factory.h', 'browser/page_load_metrics/observers/aborts_page_load_metrics_observer.cc', @@ -1043,6 +1045,8 @@ 'browser/platform_util_android.cc', 'browser/precache/precache_manager_factory.cc', 'browser/precache/precache_manager_factory.h', + 'browser/precache/precache_util.cc', + 'browser/precache/precache_util.h', 'browser/prerender/external_prerender_handler_android.cc', 'browser/prerender/external_prerender_handler_android.h', 'browser/profiles/profile_android.cc', @@ -2216,6 +2220,8 @@ 'browser/notifications/message_center_display_service.h', 'browser/notifications/native_notification_display_service.cc', 'browser/notifications/native_notification_display_service.h', + 'browser/notifications/non_persistent_notification_handler.cc', + 'browser/notifications/non_persistent_notification_handler.h', 'browser/notifications/notification.cc', 'browser/notifications/notification.h', 'browser/notifications/notification_common.cc', @@ -2224,6 +2230,7 @@ 'browser/notifications/notification_display_service.h', 'browser/notifications/notification_display_service_factory.cc', 'browser/notifications/notification_display_service_factory.h', + 'browser/notifications/notification_handler.h', 'browser/notifications/notification_object_proxy.cc', 'browser/notifications/notification_object_proxy.h', 'browser/notifications/notification_permission_context.cc', @@ -2238,6 +2245,8 @@ 'browser/notifications/notifier_state_tracker_factory.h', 'browser/notifications/persistent_notification_delegate.cc', 'browser/notifications/persistent_notification_delegate.h', + 'browser/notifications/persistent_notification_handler.cc', + 'browser/notifications/persistent_notification_handler.h', 'browser/notifications/platform_notification_service_impl.cc', 'browser/notifications/platform_notification_service_impl.h', 'browser/push_messaging/push_messaging_notification_manager.cc',
diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi index 141c77fb..121014a 100644 --- a/chrome/chrome_browser_extensions.gypi +++ b/chrome/chrome_browser_extensions.gypi
@@ -205,10 +205,6 @@ 'browser/extensions/api/cookies/cookies_api_constants.h', 'browser/extensions/api/cookies/cookies_helpers.cc', 'browser/extensions/api/cookies/cookies_helpers.h', - 'browser/extensions/api/copresence/copresence_api.cc', - 'browser/extensions/api/copresence/copresence_api.h', - 'browser/extensions/api/copresence/copresence_translations.cc', - 'browser/extensions/api/copresence/copresence_translations.h', 'browser/extensions/api/copresence_private/copresence_private_api.cc', 'browser/extensions/api/copresence_private/copresence_private_api.h', 'browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc', @@ -961,7 +957,7 @@ 'debugger', 'installer_util', 'safe_browsing_proto', - '../components/components.gyp:copresence', + '../components/components.gyp:audio_modem', '../components/components.gyp:dom_distiller_core', '../components/components.gyp:onc_component', '../components/components.gyp:policy',
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index c452006..ece3aa8 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi
@@ -1866,10 +1866,6 @@ 'browser/ui/webui/chrome_web_contents_handler.h', 'browser/ui/webui/constrained_web_dialog_delegate_base.cc', 'browser/ui/webui/constrained_web_dialog_delegate_base.h', - 'browser/ui/webui/copresence_ui.cc', - 'browser/ui/webui/copresence_ui.h', - 'browser/ui/webui/copresence_ui_handler.cc', - 'browser/ui/webui/copresence_ui_handler.h', 'browser/ui/webui/devtools_ui.cc', 'browser/ui/webui/devtools_ui.h', 'browser/ui/webui/extensions/extension_loader_handler.cc', @@ -2048,6 +2044,8 @@ 'browser/ui/webui/settings/chromeos/device_keyboard_handler.h', 'browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.cc', 'browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.h', + 'browser/ui/webui/settings/settings_cookies_view_handler.cc', + 'browser/ui/webui/settings/settings_cookies_view_handler.h', 'browser/ui/webui/settings/downloads_handler.cc', 'browser/ui/webui/settings/downloads_handler.h', 'browser/ui/webui/settings/font_handler.cc',
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 2804ede..a0c7de7 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi
@@ -171,8 +171,6 @@ 'common/extensions/manifest_handlers/automation.h', 'common/extensions/manifest_handlers/content_scripts_handler.cc', 'common/extensions/manifest_handlers/content_scripts_handler.h', - 'common/extensions/manifest_handlers/copresence_manifest.cc', - 'common/extensions/manifest_handlers/copresence_manifest.h', 'common/extensions/manifest_handlers/extension_action_handler.cc', 'common/extensions/manifest_handlers/extension_action_handler.h', 'common/extensions/manifest_handlers/linked_app_icons.cc',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 7a39751..7990a805 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi
@@ -2666,7 +2666,7 @@ 'browser/copresence/chrome_whispernet_client_browsertest.cc', ], 'dependencies': [ - '../components/components.gyp:copresence', + '../components/components.gyp:audio_modem', # build time dependency. '../v8/samples/samples.gyp:v8_shell#host', ],
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi index f9e8296..008d404 100644 --- a/chrome/chrome_tests_unit.gypi +++ b/chrome/chrome_tests_unit.gypi
@@ -348,6 +348,7 @@ ], 'chrome_unit_tests_android_sources': [ 'browser/autofill/autofill_save_card_infobar_delegate_mobile_unittest.cc', + 'browser/password_manager/account_chooser_dialog_android_unittest.cc', 'browser/password_manager/auto_signin_first_run_dialog_android_unittest.cc', 'browser/password_manager/save_password_infobar_delegate_android_unittest.cc', 'browser/permissions/permission_queue_controller_unittest.cc', @@ -419,7 +420,6 @@ 'browser/extensions/api/content_settings/content_settings_store_unittest.cc', 'browser/extensions/api/content_settings/content_settings_unittest.cc', 'browser/extensions/api/cookies/cookies_unittest.cc', - 'browser/extensions/api/copresence/copresence_api_unittest.cc', 'browser/extensions/api/cryptotoken_private/cryptotoken_private_api_unittest.cc', 'browser/extensions/api/declarative/rules_registry_service_unittest.cc', 'browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc',
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index f9134ad..761c6131 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -78,6 +78,10 @@ const base::Feature kSimplifiedFullscreenUI{"ViewsSimplifiedFullscreenUI", base::FEATURE_ENABLED_BY_DEFAULT}; +// Enables or disables the STH component-updater component. +const base::Feature kSTHSetComponent{"STHSetComponent", + base::FEATURE_ENABLED_BY_DEFAULT}; + #if defined(SYZYASAN) // Enable the deferred free mechanism in the syzyasan module, which helps the // performance by deferring some work on the critical path to a background
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h index 3446c1c..b1ebe26274 100644 --- a/chrome/common/chrome_features.h +++ b/chrome/common/chrome_features.h
@@ -51,6 +51,8 @@ extern const base::Feature kSimplifiedFullscreenUI; +extern const base::Feature kSTHSetComponent; + #if defined(SYZYASAN) extern const base::Feature kSyzyasanDeferredFree; #endif
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index cb94ef8..36d3023 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc
@@ -846,15 +846,6 @@ // The output will go to the value of kProfilingFile. const char kProfilingAtStart[] = "profiling-at-start"; -// Specifies a location for profiling output. This will only work if chrome has -// been built with the gyp variable profiling=1. -// -// {pid} if present will be replaced by the pid of the process. -// {count} if present will be incremented each time a profile is generated -// for this process. -// The default is chrome-profile-{pid}. -const char kProfilingFile[] = "profiling-file"; - // Controls whether profile data is periodically flushed to a file. Normally // the data gets written on exit but cases exist where chrome doesn't exit // cleanly (especially when using single-process). A time in seconds can be
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 37f1d0d8..4c50ffe 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h
@@ -244,7 +244,6 @@ extern const char kProductVersion[]; extern const char kProfileDirectory[]; extern const char kProfilingAtStart[]; -extern const char kProfilingFile[]; extern const char kProfilingFlush[]; extern const char kProxyAutoDetect[]; extern const char kProxyBypassList[];
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc index 3008497..e331053d 100644 --- a/chrome/common/crash_keys.cc +++ b/chrome/common/crash_keys.cc
@@ -202,6 +202,10 @@ // Temporary for https://crbug.com/616149. { "existing_extension_pref_value_type", crash_keys::kSmallSize }, + + // Temporary for https://crbug.com/625040 + { "swdh_not_handled_message_type", crash_keys::kMediumSize }, + { "swdh_not_handled_worker_status", crash_keys::kMediumSize }, }; // This dynamic set of keys is used for sets of key value pairs when gathering
diff --git a/chrome/common/extensions/api/BUILD.gn b/chrome/common/extensions/api/BUILD.gn index f38f6564..38da9c9 100644 --- a/chrome/common/extensions/api/BUILD.gn +++ b/chrome/common/extensions/api/BUILD.gn
@@ -33,7 +33,6 @@ # include generated headers from these targets. # TODO(brettw) this should be made unnecessary if possible. ":api", - "//components/copresence/proto", "//components/metrics/proto", "//skia", "//sync",
diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json index c0c7a812..dbabc8a 100644 --- a/chrome/common/extensions/api/_api_features.json +++ b/chrome/common/extensions/api/_api_features.json
@@ -269,10 +269,6 @@ "dependencies": ["permission:cookies"], "contexts": ["blessed_extension"] }, - "copresence": { - "dependencies": ["permission:copresence"], - "contexts": ["blessed_extension"] - }, "copresencePrivate": { "dependencies": ["permission:copresencePrivate"], "contexts": ["blessed_extension"]
diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json index 06c79965..fdd2255 100644 --- a/chrome/common/extensions/api/_permission_features.json +++ b/chrome/common/extensions/api/_permission_features.json
@@ -203,34 +203,6 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"] }, - "copresence": [ - { - "channel": "dev", - "extension_types": ["extension", "platform_app"] - }, - { - "channel": "stable", - "extension_types": ["extension", "platform_app"], - "whitelist": [ - "AFA728615D3A82D4017BDECEE86978543194D198", // http://crbug.com/387999 - "0C0426C12F94156F330FFAF346A976BA8878DE78", // http://crbug.com/387999 - "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/389230 - "A3BC37E2148AC4E99BE4B16AF9D42DD1E592BBBE", // http://crbug.com/389230 - "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB", // http://crbug.com/389230 - "307E96539209F95A1A8740C713E6998A73657D96", // http://crbug.com/389230 - "4F25792AF1AA7483936DE29C07806F203C7170A0", // http://crbug.com/407693 - "BD8781D757D830FC2E85470A1B6E8A718B7EE0D9", // http://crbug.com/407693 - "4AC2B6C63C6480D150DFDA13E4A5956EB1D0DDBB", // http://crbug.com/407693 - "81986D4F846CEDDDB962643FA501D1780DD441BB", // http://crbug.com/407693 - "FF78670081967CE21DB86A04AD94A0498F01E20A", // http://crbug.com/409192 - "05EBA3051DFCA6AF17070AEE5FE8C66322FF4738", // http://crbug.com/431978 - "11B478CEC461C766A2DC1E5BEEB7970AE06DC9C2", // http://crbug.com/458218 - "0EFB879311E9EFBB7C45251F89EC655711B1F6ED", // http://crbug.com/458218 - "9193D3A51E2FE33B496CDA53EA330423166E7F02", // http://crbug.com/458218 - "F9119B8B18C7C82B51E7BC6FF816B694F2EC3E89" // http://crbug.com/458218 - ] - } - ], "copresencePrivate": { "channel": "stable", "extension_types": ["extension"],
diff --git a/chrome/common/extensions/api/copresence.idl b/chrome/common/extensions/api/copresence.idl deleted file mode 100644 index a9c6090..0000000 --- a/chrome/common/extensions/api/copresence.idl +++ /dev/null
@@ -1,148 +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. - -// Use the <code>chrome.copresence</code> API to communicate with other nearby -// devices using Google's copresence service. -namespace copresence { - // Suggestions to copresence on how to do the publication and subscription. - // Note: These are only suggestions. Actual behavior may not always match - // what is requested. - dictionary Strategy { - // Attempt to use low power mode. Defaults to false. - boolean? lowPower; - // Attempt to only broadcast. Using this with onlyScan can result in both - // being ignored. Defaults to false. - boolean? onlyBroadcast; - // Attempt to only scan. Using this with onlyBroadcast can result in both - // being ignored. Defaults to false. - boolean? onlyScan; - // Attempt to use audible audio. Defaults to false. - boolean? audible; - }; - - dictionary Message { - // The type of message being published. Cannot be empty. - DOMString type; - // The message payload, in raw bytes. - ArrayBuffer payload; - }; - - dictionary MessageFilter { - // The type of messages to subscribe to. Cannot be empty. - DOMString type; - }; - - [noinline_doc] dictionary AccessPolicy { - // Only send this message to devices within hearing range. - // Defaults to false. - boolean? onlyEarshot; - }; - - [noinline_doc] dictionary PublishOperation { - // A unique ID that identifies this publish. - DOMString id; - // The message to publish. - Message message; - // The number of milliseconds for which this publication will be active. - // This is capped at 24 hours. If not provided, a default of 5 minutes is - // used. - long? timeToLiveMillis; - // A policy specifying who can get the message. - AccessPolicy? policy; - // A set of strategies to use when publishing the message. These - // strategies are suggestions to copresence that may or may not be followed. - Strategy? strategies; - }; - - [noinline_doc] dictionary SubscribeOperation { - // A unique ID that identifies this subscription. - DOMString id; - // Filter that defines which messages we want to subscribe to. - MessageFilter filter; - // The number of milliseconds for which this subscription will be active. - // This is capped at 24 hours. If not provided, a default of 5 minutes is - // used. - long? timeToLiveMillis; - // A set of strategies to use when subscribing with this filter. These - // strategies are suggestions to copresence that may or may not be followed. - Strategy? strategies; - }; - - [noinline_doc] dictionary UnpublishOperation { - // The ID of a message to unpublish. Required if the operation type - // is 'unpublish'. - DOMString unpublishId; - }; - - [noinline_doc] dictionary UnsubscribeOperation { - // The ID of a subscription to cancel. Required if the operation type - // is 'unsubscribe'. - DOMString unsubscribeId; - }; - - // Only one of these can be set. - [noinline_doc] dictionary Operation { - // Publication details. Required if the operation type is 'publish'. - PublishOperation? publish; - // Subscription details. Required if the operation type is 'subscribe'. - SubscribeOperation? subscribe; - // Unpublish details. Required if the operation type is 'unpublish'. - UnpublishOperation? unpublish; - // Unsubscribe details. Required if the operation type is 'unsubscribe'. - UnsubscribeOperation? unsubscribe; - }; - - // Indicates whether a batchExecute() call succeeded or encountered errors. - enum ExecuteStatus { - // All operations sent to batchExecute succeeded. - success, - // One of the operations sent to batchExecute failed. - failed, - // Contacting the Copresence server failed. - serverError, - // Initializing Copresence failed. - initFailed - }; - - // Specifies an asynchronous status event sent to the app. - enum Status { - // We attempted to broadcast audio but weren't able to. - audioFailed, - // Contacting the Copresence server failed. - serverError - }; - - // Callback to return the status of a completed batchExecute() call. - callback ExecuteCallback = void(ExecuteStatus status); - - interface Functions { - // Sets the API key to use with the app. This parameter only needs to be - // set to communicate with apps on other platforms. Once the API key is set, - // apps on any platform that are using this API key can publish/subscribe to - // each other. - [nodoc] static void setApiKey(DOMString apiKey); - - // Temporary call to enable authenticated copresence - // with an externally provided OAuth token. - // TODO(ckehoe): Replace this with a proper API. - [nodoc] static void setAuthToken(DOMString token); - - // Executes a set of copresence operations in one batch. They will either - // all be executed, or none will be executed (due to an error in one or - // more of them). Publish/Subscribe operations are executed in the order - // that they exist in the array. Unpublish and Unsubscribe are processsed - // at the end, again, in the order that they exist in the array. - static void execute(Operation[] operations, ExecuteCallback callback); - }; - - interface Events { - // Fired when new messages arrive. - static void onMessagesReceived(DOMString subscriptionId, - Message[] messages); - - // Fired when a new copresence status update is available. - static void onStatusUpdated(Status status); - }; -}; -
diff --git a/chrome/common/extensions/api/schemas.gypi b/chrome/common/extensions/api/schemas.gypi index 52e7e0f..db9ec033 100644 --- a/chrome/common/extensions/api/schemas.gypi +++ b/chrome/common/extensions/api/schemas.gypi
@@ -28,7 +28,6 @@ 'context_menus_internal.json', 'context_menus.json', 'cookies.json', - 'copresence.idl', 'copresence_private.idl', 'cryptotoken_private.idl', 'dashboard_private.json',
diff --git a/chrome/common/extensions/chrome_manifest_handlers.cc b/chrome/common/extensions/chrome_manifest_handlers.cc index 9751d04..ca7ecf5 100644 --- a/chrome/common/extensions/chrome_manifest_handlers.cc +++ b/chrome/common/extensions/chrome_manifest_handlers.cc
@@ -18,7 +18,6 @@ #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" #include "chrome/common/extensions/manifest_handlers/automation.h" #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" -#include "chrome/common/extensions/manifest_handlers/copresence_manifest.h" #include "chrome/common/extensions/manifest_handlers/extension_action_handler.h" #include "chrome/common/extensions/manifest_handlers/linked_app_icons.h" #include "chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h" @@ -47,7 +46,6 @@ (new AutomationHandler)->Register(); (new CommandsHandler)->Register(); (new ContentScriptsHandler)->Register(); - (new CopresenceManifestHandler)->Register(); (new DevToolsPageHandler)->Register(); (new ExtensionActionHandler)->Register(); (new HomepageURLHandler)->Register();
diff --git a/chrome/common/extensions/docs/templates/public/apps/copresence.html b/chrome/common/extensions/docs/templates/public/apps/copresence.html deleted file mode 100644 index 13c5a31..0000000 --- a/chrome/common/extensions/docs/templates/public/apps/copresence.html +++ /dev/null
@@ -1 +0,0 @@ -{{+partials.standard_apps_api api:apis.apps.copresence/}}
diff --git a/chrome/common/extensions/manifest_handlers/copresence_manifest.cc b/chrome/common/extensions/manifest_handlers/copresence_manifest.cc deleted file mode 100644 index 486d07f..0000000 --- a/chrome/common/extensions/manifest_handlers/copresence_manifest.cc +++ /dev/null
@@ -1,57 +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 "chrome/common/extensions/manifest_handlers/copresence_manifest.h" - -#include <memory> -#include <string> -#include <vector> - -#include "base/strings/utf_string_conversions.h" -#include "base/values.h" -#include "extensions/common/manifest_constants.h" - -namespace extensions { - -CopresenceManifestHandler::CopresenceManifestHandler() { -} - -CopresenceManifestHandler::~CopresenceManifestHandler() { -} - -bool CopresenceManifestHandler::Parse(Extension* extension, - base::string16* error) { - const base::DictionaryValue* copresence_config = nullptr; - - if (!extension->manifest()->GetDictionary(manifest_keys::kCopresence, - &copresence_config)) { - *error = base::ASCIIToUTF16(manifest_errors::kInvalidCopresenceConfig); - return false; - } - - std::unique_ptr<CopresenceManifestData> manifest_data( - new CopresenceManifestData); - if (!copresence_config->GetString(manifest_values::kApiKey, - &manifest_data->api_key) || - manifest_data->api_key.empty()) { - *error = base::ASCIIToUTF16(manifest_errors::kInvalidCopresenceApiKey); - return false; - } - - extension->SetManifestData(manifest_keys::kCopresence, - manifest_data.release()); - return true; -} - -const std::vector<std::string> CopresenceManifestHandler::Keys() const { - return SingleKey(manifest_keys::kCopresence); -} - -CopresenceManifestData::CopresenceManifestData() { -} - -CopresenceManifestData::~CopresenceManifestData() { -} - -} // namespace extensions
diff --git a/chrome/common/extensions/manifest_handlers/copresence_manifest.h b/chrome/common/extensions/manifest_handlers/copresence_manifest.h deleted file mode 100644 index b9ff707..0000000 --- a/chrome/common/extensions/manifest_handlers/copresence_manifest.h +++ /dev/null
@@ -1,43 +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 CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_COPRESENCE_MANIFEST_H_ -#define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_COPRESENCE_MANIFEST_H_ - -#include <string> -#include <vector> - -#include "base/macros.h" -#include "extensions/common/extension.h" -#include "extensions/common/manifest_handler.h" - -namespace extensions { - -// Parses the "copresence" manifest key. -// TODO(ckehoe): Handle the copresence permission here. -class CopresenceManifestHandler final : public ManifestHandler { - public: - CopresenceManifestHandler(); - ~CopresenceManifestHandler() override; - - bool Parse(Extension* extension, base::string16* error) override; - - private: - const std::vector<std::string> Keys() const override; - - DISALLOW_COPY_AND_ASSIGN(CopresenceManifestHandler); -}; - -// The parsed data from the copresence manifest entry. -struct CopresenceManifestData final : public Extension::ManifestData { - public: - CopresenceManifestData(); - ~CopresenceManifestData() override; - - std::string api_key; -}; - -} // namespace extensions - -#endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_COPRESENCE_MANIFEST_H_
diff --git a/chrome/common/extensions/permissions/chrome_api_permissions.cc b/chrome/common/extensions/permissions/chrome_api_permissions.cc index c494814..764afa9 100644 --- a/chrome/common/extensions/permissions/chrome_api_permissions.cc +++ b/chrome/common/extensions/permissions/chrome_api_permissions.cc
@@ -72,7 +72,6 @@ {APIPermission::kContentSettings, "contentSettings"}, {APIPermission::kContextMenus, "contextMenus"}, {APIPermission::kCookie, "cookies"}, - {APIPermission::kCopresence, "copresence"}, {APIPermission::kCopresencePrivate, "copresencePrivate"}, {APIPermission::kCryptotokenPrivate, "cryptotokenPrivate"}, {APIPermission::kDataReductionProxy, "dataReductionProxy",
diff --git a/chrome/common/extensions/permissions/chrome_permission_message_rules.cc b/chrome/common/extensions/permissions/chrome_permission_message_rules.cc index bcb1237..1f05d5b 100644 --- a/chrome/common/extensions/permissions/chrome_permission_message_rules.cc +++ b/chrome/common/extensions/permissions/chrome_permission_message_rules.cc
@@ -588,9 +588,6 @@ {IDS_EXTENSION_PROMPT_WARNING_CONTENT_SETTINGS, {APIPermission::kContentSettings}, {}}, - {IDS_EXTENSION_PROMPT_WARNING_COPRESENCE, - {APIPermission::kCopresence}, - {}}, {IDS_EXTENSION_PROMPT_WARNING_DOCUMENT_SCAN, {APIPermission::kDocumentScan}, {}},
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index b6cafc9..356fc944 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -1241,13 +1241,6 @@ const char kEasyUnlockProximityRequired[] = "easy_unlock.proximity_required"; #if defined(ENABLE_EXTENSIONS) -// These device IDs are used by the copresence component, to uniquely identify -// this device to the server. For privacy, authenticated and unauthenticated -// calls are made using different device IDs. -const char kCopresenceAuthenticatedDeviceId[] = - "apps.copresence.auth_device_id"; -const char kCopresenceAnonymousDeviceId[] = "apps.copresence.unauth_device_id"; - // Used to indicate whether or not the toolbar redesign bubble has been shown // and acknowledged, and the last time the bubble was shown. const char kToolbarIconSurfacingBubbleAcknowledged[] =
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 8b68eca..7a34ddd 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -427,8 +427,6 @@ extern const char kEasyUnlockProximityRequired[]; #if defined(ENABLE_EXTENSIONS) -extern const char kCopresenceAuthenticatedDeviceId[]; -extern const char kCopresenceAnonymousDeviceId[]; extern const char kToolbarIconSurfacingBubbleAcknowledged[]; extern const char kToolbarIconSurfacingBubbleLastShowTime[]; extern const char kToolbarMigratedComponentActionStatus[];
diff --git a/chrome/common/profiling.cc b/chrome/common/profiling.cc index 65eee450..40055183 100644 --- a/chrome/common/profiling.cc +++ b/chrome/common/profiling.cc
@@ -5,6 +5,7 @@ #include "chrome/common/profiling.h" #include "base/at_exit.h" +#include "base/base_switches.h" #include "base/bind.h" #include "base/command_line.h" #include "base/debug/profiler.h"
diff --git a/chrome/common/safe_browsing/csd.proto b/chrome/common/safe_browsing/csd.proto index 01214f1..f2dadfd 100644 --- a/chrome/common/safe_browsing/csd.proto +++ b/chrome/common/safe_browsing/csd.proto
@@ -390,12 +390,15 @@ // Download is considered dangerous. Chrome should show a warning to the // user. DANGEROUS = 1; - // Download is unknown. Chrome should display a less severe warning. + // Download is uncommon. Chrome should display a less severe warning. UNCOMMON = 2; // The download is potentially unwanted. POTENTIALLY_UNWANTED = 3; // The download is from a dangerous host. DANGEROUS_HOST = 4; + // The backend doesn't have confidence in its verdict of this file. + // Chrome should show the default warning if configured for this file type. + UNKNOWN = 5; } required Verdict verdict = 1;
diff --git a/chrome/common/search/ntp_logging_events.h b/chrome/common/search/ntp_logging_events.h index 5bee7df..5b98812 100644 --- a/chrome/common/search/ntp_logging_events.h +++ b/chrome/common/search/ntp_logging_events.h
@@ -9,6 +9,7 @@ // to transfer information from the NTP javascript to the renderer and is not // used as a UMA enum histogram's logged value. // Note: Keep in sync with browser/resources/local_ntp/most_visited_util.js +// and browser/resources/local_ntp/most_visited_single.js enum NTPLoggingEventType { // The suggestion is coming from the server. NTP_SERVER_SIDE_SUGGESTION = 0, @@ -40,8 +41,7 @@ // The visuals of that tile's fallback are handled externally. NTP_EXTERNAL_TILE_FALLBACK = 8, - // The user moused over an NTP tile or title. - NTP_MOUSEOVER = 9, + // Deleted: NTP_MOUSEOVER = 9 // A NTP Tile has finished loading (successfully or failing). NTP_TILE_LOADED = 10,
diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc index 9207654a..76a9935 100644 --- a/chrome/common/service_process_util_unittest.cc +++ b/chrome/common/service_process_util_unittest.cc
@@ -77,7 +77,7 @@ ServiceProcessStateTest(); ~ServiceProcessStateTest() override; void SetUp() override; - base::SingleThreadTaskRunner* IOMessageLoopProxy() { + base::SingleThreadTaskRunner* IOTaskRunner() { return io_thread_.task_runner().get(); } void LaunchAndWait(const std::string& name); @@ -119,7 +119,7 @@ ASSERT_FALSE(CheckServiceProcessReady()); ServiceProcessState state; ASSERT_TRUE(state.Initialize()); - ASSERT_TRUE(state.SignalReady(IOMessageLoopProxy(), base::Closure())); + ASSERT_TRUE(state.SignalReady(IOTaskRunner(), base::Closure())); LaunchAndWait("ServiceProcessStateTestReadyTrue"); state.SignalStopped(); LaunchAndWait("ServiceProcessStateTestReadyFalse"); @@ -293,7 +293,7 @@ const base::FilePath& bundle_path() const { return bundle_path_; } const base::FilePath& GetTempDirPath() const { return temp_dir_.path(); } - base::SingleThreadTaskRunner* GetIOMessageLoopProxy() { + base::SingleThreadTaskRunner* GetIOTaskRunner() { return io_thread_.task_runner().get(); } void Run() { loop_.Run(); } @@ -367,18 +367,16 @@ } TEST_F(ServiceProcessStateFileManipulationTest, DeleteFile) { - GetIOMessageLoopProxy()->PostTask( - FROM_HERE, - base::Bind(&DeleteFunc, executable_path())); + GetIOTaskRunner()->PostTask(FROM_HERE, + base::Bind(&DeleteFunc, executable_path())); Run(); ASSERT_TRUE(mock_launchd()->remove_called()); ASSERT_TRUE(mock_launchd()->delete_called()); } TEST_F(ServiceProcessStateFileManipulationTest, DeleteBundle) { - GetIOMessageLoopProxy()->PostTask( - FROM_HERE, - base::Bind(&DeleteFunc, bundle_path())); + GetIOTaskRunner()->PostTask(FROM_HERE, + base::Bind(&DeleteFunc, bundle_path())); Run(); ASSERT_TRUE(mock_launchd()->remove_called()); ASSERT_TRUE(mock_launchd()->delete_called()); @@ -386,9 +384,8 @@ TEST_F(ServiceProcessStateFileManipulationTest, MoveBundle) { base::FilePath new_loc = GetTempDirPath().AppendASCII("MoveBundle"); - GetIOMessageLoopProxy()->PostTask( - FROM_HERE, - base::Bind(&MoveFunc, bundle_path(), new_loc)); + GetIOTaskRunner()->PostTask(FROM_HERE, + base::Bind(&MoveFunc, bundle_path(), new_loc)); Run(); ASSERT_TRUE(mock_launchd()->restart_called()); ASSERT_TRUE(mock_launchd()->write_called()); @@ -396,9 +393,8 @@ TEST_F(ServiceProcessStateFileManipulationTest, MoveFile) { base::FilePath new_loc = GetTempDirPath().AppendASCII("MoveFile"); - GetIOMessageLoopProxy()->PostTask( - FROM_HERE, - base::Bind(&MoveFunc, executable_path(), new_loc)); + GetIOTaskRunner()->PostTask( + FROM_HERE, base::Bind(&MoveFunc, executable_path(), new_loc)); Run(); ASSERT_TRUE(mock_launchd()->remove_called()); ASSERT_TRUE(mock_launchd()->delete_called()); @@ -407,9 +403,7 @@ TEST_F(ServiceProcessStateFileManipulationTest, TrashBundle) { FSRef bundle_ref; ASSERT_TRUE(base::mac::FSRefFromPath(bundle_path().value(), &bundle_ref)); - GetIOMessageLoopProxy()->PostTask( - FROM_HERE, - base::Bind(&TrashFunc, bundle_path())); + GetIOTaskRunner()->PostTask(FROM_HERE, base::Bind(&TrashFunc, bundle_path())); Run(); ASSERT_TRUE(mock_launchd()->remove_called()); ASSERT_TRUE(mock_launchd()->delete_called()); @@ -420,9 +414,8 @@ TEST_F(ServiceProcessStateFileManipulationTest, ChangeAttr) { ScopedAttributesRestorer restorer(bundle_path(), 0777); - GetIOMessageLoopProxy()->PostTask( - FROM_HERE, - base::Bind(&ChangeAttr, bundle_path(), 0222)); + GetIOTaskRunner()->PostTask(FROM_HERE, + base::Bind(&ChangeAttr, bundle_path(), 0222)); Run(); ASSERT_TRUE(mock_launchd()->remove_called()); ASSERT_TRUE(mock_launchd()->delete_called());
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index b994412..e56f3cc 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc
@@ -136,10 +136,6 @@ "chrome://tab-modal-confirm-dialog/"; #endif -#if !defined(OS_ANDROID) -const char kChromeUICopresenceURL[] = "chrome://copresence/"; -#endif - #if defined(ENABLE_WEBRTC) const char kChromeUIWebRtcLogsURL[] = "chrome://webrtc-logs/"; #endif @@ -325,10 +321,6 @@ const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; #endif -#if !defined(OS_ANDROID) -const char kChromeUICopresenceHost[] = "copresence"; -#endif - #if defined(ENABLE_WEBRTC) const char kChromeUIWebRtcLogsHost[] = "webrtc-logs"; #endif @@ -667,8 +659,6 @@ kChromeUIOfflineInternalsHost, kChromeUIPopularSitesInternalsHost, kChromeUISnippetsInternalsHost, -#else // non-mobile - kChromeUICopresenceHost, #endif #if defined(OS_CHROMEOS) kChromeUICertificateManagerHost,
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index 86a58d16..e76921e 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h
@@ -125,11 +125,6 @@ extern const char kChromeUITabModalConfirmDialogURL[]; #endif -#if !defined(OS_ANDROID) -extern const char kChromeUICopresenceURL[]; -extern const char kChromeUICopresenceHost[]; -#endif - #if defined(ENABLE_WEBRTC) extern const char kChromeUIWebRtcLogsURL[]; #endif
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index 68c5529d..8999f1a 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -360,8 +360,8 @@ subresource_filter_ruleset_dealer_.reset( new subresource_filter::RulesetDealer()); #if defined(ENABLE_WEBRTC) - webrtc_logging_message_filter_ = new WebRtcLoggingMessageFilter( - thread->GetIOMessageLoopProxy()); + webrtc_logging_message_filter_ = + new WebRtcLoggingMessageFilter(thread->GetIOTaskRunner()); #endif thread->AddObserver(chrome_observer_.get());
diff --git a/chrome/renderer/chrome_content_renderer_client_browsertest.cc b/chrome/renderer/chrome_content_renderer_client_browsertest.cc index 88d9e2b..e61b4f9 100644 --- a/chrome/renderer/chrome_content_renderer_client_browsertest.cc +++ b/chrome/renderer/chrome_content_renderer_client_browsertest.cc
@@ -52,7 +52,7 @@ TEST_F(InstantProcessNavigationTest, ForkForNavigationsToSearchURLs) { ChromeContentRendererClient* client = static_cast<ChromeContentRendererClient*>(content_renderer_client_.get()); - chrome_render_thread_->set_io_message_loop_proxy( + chrome_render_thread_->set_io_task_runner( base::ThreadTaskRunnerHandle::Get()); client->RenderThreadStarted(); std::vector<GURL> search_urls;
diff --git a/chrome/renderer/chrome_mock_render_thread.cc b/chrome/renderer/chrome_mock_render_thread.cc index 64d809e..966191d 100644 --- a/chrome/renderer/chrome_mock_render_thread.cc +++ b/chrome/renderer/chrome_mock_render_thread.cc
@@ -18,11 +18,11 @@ } scoped_refptr<base::SingleThreadTaskRunner> -ChromeMockRenderThread::GetIOMessageLoopProxy() { +ChromeMockRenderThread::GetIOTaskRunner() { return io_task_runner_; } -void ChromeMockRenderThread::set_io_message_loop_proxy( +void ChromeMockRenderThread::set_io_task_runner( const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { io_task_runner_ = task_runner; }
diff --git a/chrome/renderer/chrome_mock_render_thread.h b/chrome/renderer/chrome_mock_render_thread.h index 996adff..a9a994e 100644 --- a/chrome/renderer/chrome_mock_render_thread.h +++ b/chrome/renderer/chrome_mock_render_thread.h
@@ -19,13 +19,12 @@ ~ChromeMockRenderThread() override; // content::RenderThread overrides. - scoped_refptr<base::SingleThreadTaskRunner> GetIOMessageLoopProxy() override; + scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; ////////////////////////////////////////////////////////////////////////// // The following functions are called by the test itself. - // Set IO message loop proxy. - void set_io_message_loop_proxy( + void set_io_task_runner( const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); private:
diff --git a/chrome/renderer/extensions/chrome_extensions_renderer_client.cc b/chrome/renderer/extensions/chrome_extensions_renderer_client.cc index 49d98dcc..8b09a98 100644 --- a/chrome/renderer/extensions/chrome_extensions_renderer_client.cc +++ b/chrome/renderer/extensions/chrome_extensions_renderer_client.cc
@@ -153,7 +153,7 @@ thread->AddObserver(extension_dispatcher_.get()); thread->AddObserver(guest_view_container_dispatcher_.get()); - thread->AddFilter(new CastIPCDispatcher(thread->GetIOMessageLoopProxy())); + thread->AddFilter(new CastIPCDispatcher(thread->GetIOTaskRunner())); } void ChromeExtensionsRendererClient::RenderFrameCreated(
diff --git a/chrome/renderer/media/cast_receiver_session.cc b/chrome/renderer/media/cast_receiver_session.cc index 9bf9ac30..5fbef986 100644 --- a/chrome/renderer/media/cast_receiver_session.cc +++ b/chrome/renderer/media/cast_receiver_session.cc
@@ -59,8 +59,7 @@ CastReceiverSession::CastReceiverSession() : delegate_(new CastReceiverSessionDelegate()), - io_task_runner_( - content::RenderThread::Get()->GetIOMessageLoopProxy()) {} + io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()) {} CastReceiverSession::~CastReceiverSession() { // We should always be able to delete the object on the IO thread.
diff --git a/chrome/renderer/media/cast_session.cc b/chrome/renderer/media/cast_session.cc index 2689bd1..61ce4379 100644 --- a/chrome/renderer/media/cast_session.cc +++ b/chrome/renderer/media/cast_session.cc
@@ -46,8 +46,7 @@ CastSession::CastSession() : delegate_(new CastSessionDelegate()), - io_task_runner_( - content::RenderThread::Get()->GetIOMessageLoopProxy()) {} + io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()) {} CastSession::~CastSession() { // We should always be able to delete the object on the IO thread.
diff --git a/chrome/renderer/media/cast_session_browsertest.cc b/chrome/renderer/media/cast_session_browsertest.cc index f7823fbb..ee40d39 100644 --- a/chrome/renderer/media/cast_session_browsertest.cc +++ b/chrome/renderer/media/cast_session_browsertest.cc
@@ -16,7 +16,7 @@ // Tests that CastSession is created and destroyed properly inside // chrome renderer. TEST_F(CastSessionBrowserTest, CreateAndDestroy) { - chrome_render_thread_->set_io_message_loop_proxy( + chrome_render_thread_->set_io_task_runner( base::ThreadTaskRunnerHandle::Get()); ChromeContentRendererClient* client = static_cast<ChromeContentRendererClient*>(content_renderer_client_.get());
diff --git a/chrome/renderer/media/cast_session_delegate.cc b/chrome/renderer/media/cast_session_delegate.cc index eddf8e34..90d98957 100644 --- a/chrome/renderer/media/cast_session_delegate.cc +++ b/chrome/renderer/media/cast_session_delegate.cc
@@ -38,8 +38,7 @@ LAZY_INSTANCE_INITIALIZER; CastSessionDelegateBase::CastSessionDelegateBase() - : io_task_runner_( - content::RenderThread::Get()->GetIOMessageLoopProxy()), + : io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()), weak_factory_(this) { DCHECK(io_task_runner_.get()); #if defined(OS_WIN) @@ -71,8 +70,8 @@ cast_environment_ = new CastEnvironment( std::unique_ptr<base::TickClock>(new base::DefaultTickClock()), base::ThreadTaskRunnerHandle::Get(), - g_cast_threads.Get().GetAudioEncodeMessageLoopProxy(), - g_cast_threads.Get().GetVideoEncodeMessageLoopProxy()); + g_cast_threads.Get().GetAudioEncodeTaskRunner(), + g_cast_threads.Get().GetVideoEncodeTaskRunner()); // Rationale for using unretained: The callback cannot be called after the // destruction of CastTransportIPC, and they both share the same thread.
diff --git a/chrome/renderer/media/cast_threads.cc b/chrome/renderer/media/cast_threads.cc index b6c808c..9f3786e 100644 --- a/chrome/renderer/media/cast_threads.cc +++ b/chrome/renderer/media/cast_threads.cc
@@ -15,11 +15,11 @@ } scoped_refptr<base::SingleThreadTaskRunner> -CastThreads::GetAudioEncodeMessageLoopProxy() { +CastThreads::GetAudioEncodeTaskRunner() { return audio_encode_thread_.task_runner(); } scoped_refptr<base::SingleThreadTaskRunner> -CastThreads::GetVideoEncodeMessageLoopProxy() { +CastThreads::GetVideoEncodeTaskRunner() { return video_encode_thread_.task_runner(); }
diff --git a/chrome/renderer/media/cast_threads.h b/chrome/renderer/media/cast_threads.h index 7fab124..63e2c85 100644 --- a/chrome/renderer/media/cast_threads.h +++ b/chrome/renderer/media/cast_threads.h
@@ -19,10 +19,8 @@ class CastThreads { public: - scoped_refptr<base::SingleThreadTaskRunner> - GetAudioEncodeMessageLoopProxy(); - scoped_refptr<base::SingleThreadTaskRunner> - GetVideoEncodeMessageLoopProxy(); + scoped_refptr<base::SingleThreadTaskRunner> GetAudioEncodeTaskRunner(); + scoped_refptr<base::SingleThreadTaskRunner> GetVideoEncodeTaskRunner(); private: friend struct base::DefaultLazyInstanceTraits<CastThreads>;
diff --git a/chrome/renderer/spellchecker/spellcheck_provider.cc b/chrome/renderer/spellchecker/spellcheck_provider.cc index 5afa759a..c898fc7cf 100644 --- a/chrome/renderer/spellchecker/spellcheck_provider.cc +++ b/chrome/renderer/spellchecker/spellcheck_provider.cc
@@ -16,14 +16,14 @@ #include "third_party/WebKit/public/platform/WebVector.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" -#include "third_party/WebKit/public/web/WebFrame.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" #include "third_party/WebKit/public/web/WebTextCheckingResult.h" #include "third_party/WebKit/public/web/WebTextDecorationType.h" #include "third_party/WebKit/public/web/WebView.h" using blink::WebElement; -using blink::WebFrame; +using blink::WebLocalFrame; using blink::WebString; using blink::WebTextCheckingCompletion; using blink::WebTextCheckingResult; @@ -112,7 +112,7 @@ void SpellCheckProvider::FocusedNodeChanged(const blink::WebNode& unused) { #if defined(USE_BROWSER_SPELLCHECKER) - WebFrame* frame = render_view()->GetWebView()->focusedFrame(); + WebLocalFrame* frame = render_view()->GetWebView()->focusedFrame(); WebElement element = frame->document().isNull() ? WebElement() : frame->document().focusedElement(); bool enabled = !element.isNull() && element.isEditable(); @@ -290,7 +290,12 @@ if (!render_view()->GetWebView()) return; - WebFrame* frame = render_view()->GetWebView()->focusedFrame(); + WebLocalFrame* frame = render_view()->GetWebView()->focusedFrame(); + // TODO(yabinh): The null check should be unnecessary. + // See crbug.com/625068 + if (!frame) + return; + frame->enableContinuousSpellChecking(enable); if (!enable) frame->removeSpellingMarkers();
diff --git a/chrome/service/cloud_print/printer_job_handler.h b/chrome/service/cloud_print/printer_job_handler.h index e6f9b498..6fea76b 100644 --- a/chrome/service/cloud_print/printer_job_handler.h +++ b/chrome/service/cloud_print/printer_job_handler.h
@@ -274,8 +274,8 @@ // The Job spooler object. This is only non-NULL during a print operation. // It lives and dies on |print_thread_| scoped_refptr<PrintSystem::JobSpooler> job_spooler_; - // The message loop proxy representing the thread on which this object - // was created. Used by the print thread. + // The task runner representing the thread on which this object was created. + // Used by the print thread. scoped_refptr<base::SingleThreadTaskRunner> job_handler_task_runner_; // There may be pending tasks in the message queue when Shutdown is called.
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 318e092..3e25168a 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -1389,7 +1389,7 @@ sources += [ "../browser/copresence/chrome_whispernet_client_browsertest.cc" ] deps += [ - "//components/copresence", + "//components/audio_modem", "//third_party/libaddressinput", ] }
diff --git a/chrome/test/base/mash_browser_tests_main.cc b/chrome/test/base/mash_browser_tests_main.cc index e23e754..47d736f 100644 --- a/chrome/test/base/mash_browser_tests_main.cc +++ b/chrome/test/base/mash_browser_tests_main.cc
@@ -10,6 +10,7 @@ #include "base/memory/ptr_util.h" #include "base/process/launch.h" #include "base/sys_info.h" +#include "base/threading/thread_task_runner_handle.h" #include "chrome/test/base/chrome_test_launcher.h" #include "chrome/test/base/chrome_test_suite.h" #include "chrome/test/base/mojo_test_connector.h" @@ -108,7 +109,9 @@ MashTestLauncherDelegate* delegate) { std::unique_ptr<content::MojoShellConnection> connection( content::MojoShellConnection::Create( - delegate->GetMojoTestConnectorForSingleProcess()->Init())); + delegate->GetMojoTestConnectorForSingleProcess()->Init(), + base::ThreadTaskRunnerHandle::Get())); + connection->Start(); ConnectToDefaultApps(connection->GetConnector()); return connection; }
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc index b92d3f4f..aa7e02ec 100644 --- a/chrome/test/base/testing_browser_process.cc +++ b/chrome/test/base/testing_browser_process.cc
@@ -151,7 +151,7 @@ browser_policy_connector_ = platform_part_->CreateBrowserPolicyConnector(); // Note: creating the ChromeBrowserPolicyConnector invokes BrowserThread:: - // GetMessageLoopProxyForThread(), which initializes a base::LazyInstance of + // GetTaskRunnerForThread(), which initializes a base::LazyInstance of // BrowserThreadTaskRunners. However, the threads that these task runners // would run tasks on are *also* created lazily and might not exist yet. // Creating them requires a MessageLoop, which a test can optionally create
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc index 78fbd5e..4be44c5 100644 --- a/chrome/test/base/testing_profile.cc +++ b/chrome/test/base/testing_profile.cc
@@ -182,7 +182,7 @@ } scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() const override { - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } protected: @@ -221,10 +221,9 @@ std::unique_ptr<BookmarkModel> bookmark_model( new BookmarkModel(base::WrapUnique(new ChromeBookmarkClient( profile, ManagedBookmarkServiceFactory::GetForProfile(profile))))); - bookmark_model->Load(profile->GetPrefs(), - profile->GetPath(), + bookmark_model->Load(profile->GetPrefs(), profile->GetPath(), profile->GetIOTaskRunner(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI)); return std::move(bookmark_model); } @@ -239,8 +238,8 @@ const base::FilePath& context_path = context->GetPath(); return base::WrapUnique(new WebDataServiceWrapper( context_path, g_browser_process->GetApplicationLocale(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), sync_start_util::GetFlareForSyncableService(context_path), &TestProfileErrorCallback)); } @@ -953,7 +952,7 @@ content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) { return new net::TestURLRequestContextGetter( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); } net::URLRequestContextGetter*
diff --git a/chrome/test/chromedriver/test/test_expectations b/chrome/test/chromedriver/test/test_expectations index 8963d84..7a2518b 100644 --- a/chrome/test/chromedriver/test/test_expectations +++ b/chrome/test/chromedriver/test/test_expectations
@@ -113,15 +113,6 @@ 'CombinedInputActionsTest.testCombiningShiftAndClickResultsInANewWindow', # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=1150 'BasicKeyboardInterfaceTest.testBasicKeyboardInputOnActiveElement', - - # Flaky on Linux32: - # https://bugs.chromium.org/p/chromedriver/issues/detail?id=1418 - 'ClickTest.testShouldOnlyFollowHrefOnce', - 'JavascriptEnabledDriverTest.testShouldFireOnChangeEventWhenSettingAnElementsValue', - 'WindowSwitchingTest.testCanCloseWindowWhenMultipleWindowsAreOpen', - 'WindowSwitchingTest.testCanCallGetWindowHandlesAfterClosingAWindow', - 'WindowSwitchingTest.testCanCloseWindowAndSwitchBackToMainWindow', - 'XPathElementFindingTest.testShouldFindElementsByXPath', ] _OS_NEGATIVE_FILTER['mac'] = [ # https://code.google.com/p/chromedriver/issues/detail?id=26
diff --git a/chrome/test/data/nacl/ppapi/ppp_instance/ppapi_ppp_instance.cc b/chrome/test/data/nacl/ppapi/ppp_instance/ppapi_ppp_instance.cc index d949469b..7439271 100644 --- a/chrome/test/data/nacl/ppapi/ppp_instance/ppapi_ppp_instance.cc +++ b/chrome/test/data/nacl/ppapi/ppp_instance/ppapi_ppp_instance.cc
@@ -49,9 +49,8 @@ // These are based on embed dimensions. PP_Rect position; PPBView()->GetRect(view, &position); - fprintf(stderr, "clip.size.height: %d\n", clip.size.height); EXPECT(position.size.width == 15 && clip.size.width == 15); - EXPECT(position.size.height == 20 && clip.size.height == 21); + EXPECT(position.size.height == 20 && clip.size.height == 20); TEST_PASSED; }
diff --git a/chrome/test/data/webui/extensions/cr_extensions_browsertest.js b/chrome/test/data/webui/extensions/cr_extensions_browsertest.js index 458c164..c9fb7ed 100644 --- a/chrome/test/data/webui/extensions/cr_extensions_browsertest.js +++ b/chrome/test/data/webui/extensions/cr_extensions_browsertest.js
@@ -42,6 +42,7 @@ 'extension_keyboard_shortcuts_test.js', 'extension_pack_dialog_test.js', 'extension_service_test.js', + 'extension_shortcut_input_test.js', 'extension_sidebar_test.js', 'extension_manager_test.js', '../mock_controller.js', @@ -228,6 +229,12 @@ assert(extension_keyboard_shortcut_tests.TestNames.ShortcutUtil)).run(); }); +TEST_F('CrExtensionsBrowserTest', 'ExtensionShortcutInputTest', function() { + extension_shortcut_input_tests.registerTests(); + mocha.grep( + assert(extension_shortcut_input_tests.TestNames.Basic)).run(); +}); + //////////////////////////////////////////////////////////////////////////////// // Extension Pack Dialog Tests
diff --git a/chrome/test/data/webui/extensions/extension_keyboard_shortcuts_test.js b/chrome/test/data/webui/extensions/extension_keyboard_shortcuts_test.js index 115399d..f2935d7 100644 --- a/chrome/test/data/webui/extensions/extension_keyboard_shortcuts_test.js +++ b/chrome/test/data/webui/extensions/extension_keyboard_shortcuts_test.js
@@ -82,15 +82,11 @@ var commands = card1.querySelectorAll('.command-entry'); assertEquals(1, commands.length); expectTrue(isVisibleOnCard(commands[0], '.command-name')); - expectTrue(isVisibleOnCard(commands[0], '.command-keys')); - expectFalse(isVisibleOnCard(commands[0], '.no-command-set')); expectTrue(isVisibleOnCard(commands[0], 'paper-dropdown-menu')); var card2 = cards[1]; commands = card2.querySelectorAll('.command-entry'); assertEquals(2, commands.length); - expectFalse(isVisibleOnCard(commands[1], '.command-keys')); - expectTrue(isVisibleOnCard(commands[1], '.no-command-set')); expectEquals( 1,
diff --git a/chrome/test/data/webui/extensions/extension_shortcut_input_test.js b/chrome/test/data/webui/extensions/extension_shortcut_input_test.js new file mode 100644 index 0000000..b55fda8 --- /dev/null +++ b/chrome/test/data/webui/extensions/extension_shortcut_input_test.js
@@ -0,0 +1,105 @@ +// 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. + +/** @fileoverview Suite of tests for extension-keyboard-shortcuts. */ +cr.define('extension_shortcut_input_tests', function() { + /** @enum {string} */ + var TestNames = { + Basic: 'basic', + }; + + function registerTests() { + suite('ExtensionShortcutInputTest', function() { + /** @type {extensions.ShortcutInput} */ + var input; + setup(function() { + PolymerTest.clearBody(); + input = new extensions.ShortcutInput(); + input.commandName = 'Command'; + input.item = 'itemid'; + document.body.appendChild(input); + Polymer.dom.flush(); + }); + + test(assert(TestNames.Basic), function() { + var field = input.$['input']; + var fieldText = function() { return field.textContent.trim(); }; + expectEquals('Not set', fieldText()); + + // Click the input. Capture should start. + { + let startCaptureListener = new extension_test_util.ListenerMock(); + startCaptureListener.addListener(input, 'shortcut-capture-started'); + MockInteractions.tap(field); + startCaptureListener.verify(); + } + expectEquals('Type a shortcut', fieldText()); + expectTrue(input.capturing_); + + // Press ctrl. + MockInteractions.keyDownOn(field, 17, ['ctrl']); + expectEquals('Ctrl', fieldText()); + expectTrue(input.capturing_); + // Add shift. + MockInteractions.keyDownOn(field, 16, ['ctrl', 'shift']); + expectEquals('Ctrl+Shift', fieldText()); + expectTrue(input.capturing_); + // Remove shift. + MockInteractions.keyUpOn(field, 16, ['ctrl']); + expectEquals('Ctrl', fieldText()); + // Add alt (ctrl + alt is invalid). + MockInteractions.keyDownOn(field, 18, ['ctrl', 'alt']); + expectEquals('invalid', fieldText()); + expectTrue(input.capturing_); + // Remove alt. + MockInteractions.keyUpOn(field, 18, ['ctrl']); + expectEquals('Ctrl', fieldText()); + expectTrue(input.capturing_); + { + // Add 'A'. Once a valid shortcut is typed (like Ctrl+A), it is + // committed. + let updatedListener = new extension_test_util.ListenerMock(); + updatedListener.addListener(input, 'shortcut-updated', + {keybinding: 'Ctrl+A', + item: 'itemid', + commandName: 'Command'}); + updatedListener.addListener(input, 'shortcut-capture-ended'); + MockInteractions.keyDownOn(field, 65, ['ctrl']); + updatedListener.verify(); + } + expectEquals('Ctrl+A', fieldText()); + expectFalse(input.capturing_); + expectEquals('Ctrl+A', input.shortcut); + + { + // Test clearing the shortcut. + let updatedListener = new extension_test_util.ListenerMock(); + updatedListener.addListener(input, 'shortcut-updated', + {keybinding: '', + item: 'itemid', + commandName: 'Command'}); + MockInteractions.tap(input.$['clear']); + updatedListener.verify(); + } + expectEquals('', input.shortcut); + + MockInteractions.tap(field); + { + // Test ending capture using the escape key. + expectTrue(input.capturing_); + let captureEndedListener = new extension_test_util.ListenerMock(); + captureEndedListener.addListener(input, 'shortcut-capture-ended'); + MockInteractions.keyDownOn(field, 27); // Escape key. + expectFalse(input.capturing_); + captureEndedListener.verify(); + } + }); + }); + } + + return { + registerTests: registerTests, + TestNames: TestNames, + }; +});
diff --git a/chrome/test/data/webui/extensions/extension_test_util.js b/chrome/test/data/webui/extensions/extension_test_util.js index 84c66b89..003c69a9 100644 --- a/chrome/test/data/webui/extensions/extension_test_util.js +++ b/chrome/test/data/webui/extensions/extension_test_util.js
@@ -29,6 +29,60 @@ }; /** + * A mock to test receiving expected events and verify that they were called + * with the proper detail values. + */ + function ListenerMock() { + this.listeners_ = {}; + } + + ListenerMock.prototype = { + /** @private {Object<{satisfied: boolean, args: !Object}>} */ + listeners_: undefined, + + /** + * @param {string} eventName + * @param {Event} e + */ + onEvent_: function(eventName, e) { + assert(this.listeners_.hasOwnProperty(eventName)); + if (this.listeners_[eventName].satisfied) { + // Event was already called and checked. We could always make this + // more intelligent by allowing for subsequent calls, removing the + // listener, etc, but there's no need right now. + return; + } + var expected = this.listeners_[eventName].args || {}; + expectDeepEquals(e.detail, expected); + this.listeners_[eventName].satisfied = true; + }, + + /** + * Adds an expected event. + * @param {!EventTarget} target + * @param {string} eventName + * @param {Object=} opt_eventArgs If omitted, will check that the details + * are empty (i.e., {}). + */ + addListener: function(target, eventName, opt_eventArgs) { + assert(!this.listeners_.hasOwnProperty(eventName)); + this.listeners_[eventName] = + {args: opt_eventArgs || {}, satisfied: false}; + target.addEventListener(eventName, this.onEvent_.bind(this, eventName)); + }, + + /** Verifies the expectations set. */ + verify: function() { + var missingEvents = []; + for (var key in this.listeners_) { + if (!this.listeners_[key].satisfied) + missingEvents.push(key); + } + expectEquals(0, missingEvents.length, JSON.stringify(missingEvents)); + }, + } + + /** * A mock delegate for the item, capable of testing functionality. * @constructor * @extends {ClickMock} @@ -146,6 +200,7 @@ return { ClickMock: ClickMock, + ListenerMock: ListenerMock, MockItemDelegate: MockItemDelegate, isVisible: isVisible, testVisible: testVisible,
diff --git a/chrome/test/data/webui/print_preview.js b/chrome/test/data/webui/print_preview.js index 5b93bd2..4f63f1e 100644 --- a/chrome/test/data/webui/print_preview.js +++ b/chrome/test/data/webui/print_preview.js
@@ -155,6 +155,23 @@ }, /** + * Repeated setup steps for the advanced settings tests. + * Disables accessiblity errors, sets initial settings, and verifies + * advanced options section is visible after expanding more settings. + */ + setupAdvancedSettingsTest: function(device) { + // Need to disable this since overlay animation will not fully complete. + this.accessibilityIssuesAreErrors = false; + this.setInitialSettings(); + this.setLocalDestinations(); + this.setCapabilities(device); + this.expandMoreSettings(); + + // Check that the advanced options settings section is visible. + checkSectionVisible($('advanced-options-settings'), true); + }, + + /** * Generate a real C++ class; don't typedef. * @type {?string} * @override @@ -957,3 +974,129 @@ this.waitForAnimationToEnd('more-settings'); }); + +function getCddTemplateWithAdvancedSettings(printerId) { + return { + printerId: printerId, + capabilities: { + version: '1.0', + printer: { + supported_content_type: [{content_type: 'application/pdf'}], + vendor_capability: + [ + {display_name: 'Print Area', + id: 'Print Area', + type: 'SELECT', + select_cap: { + option: [ + {display_name: 'A4', value: 4, is_default: true}, + {display_name: 'A6', value: 6}, + {display_name: 'A7', value: 7} + ] + } + } + ], + collate: {}, + color: { + option: [ + {type: 'STANDARD_COLOR', is_default: true}, + {type: 'STANDARD_MONOCHROME'} + ] + }, + copies: {}, + duplex: { + option: [ + {type: 'NO_DUPLEX', is_default: true}, + {type: 'LONG_EDGE'}, + {type: 'SHORT_EDGE'} + ] + }, + page_orientation: { + option: [ + {type: 'PORTRAIT', is_default: true}, + {type: 'LANDSCAPE'}, + {type: 'AUTO'} + ] + }, + media_size: { + option: [ + { name: 'NA_LETTER', + width_microns: 215900, + height_microns: 279400, + is_default: true + } + ] + }, + } + } + }; +} + +// Simulates a click of the advanced options settings button to bring up the +// advanced settings overlay. +function openAdvancedSettings() { + // Check for button and click to view advanced settings section. + var advancedOptionsSettingsButton = + $('advanced-options-settings'). + querySelector('.advanced-options-settings-button'); + checkElementDisplayed(advancedOptionsSettingsButton, true); + // Button is disabled during testing due to test version of + // testPluginCompatibility() being set to always return false. Enable button + // to send click event. + advancedOptionsSettingsButton.disabled = false; + advancedOptionsSettingsButton.click(); +} + +// Test advanced settings with 1 capability (should not display settings search +// box). +TEST_F('PrintPreviewWebUITest', 'TestAdvancedSettings1Option', function() { + var device = getCddTemplateWithAdvancedSettings("FooDevice"); + this.setupAdvancedSettingsTest(device); + + // Open the advanced settings overlay. + openAdvancedSettings(); + + // Check that advanced settings close button is now visible, + // but not the search box (only 1 capability). + var advancedSettingsCloseButton = $('advanced-settings'). + querySelector('.close-button'); + checkElementDisplayed(advancedSettingsCloseButton, true); + checkElementDisplayed($('advanced-settings'). + querySelector('.search-box-area'), false); + + this.waitForAnimationToEnd('more-settings'); +}); + + +// Test advanced settings with 2 capabilities (should have settings search box). +TEST_F('PrintPreviewWebUITest', 'TestAdvancedSettings2Options', function() { + var device = getCddTemplateWithAdvancedSettings("FooDevice"); + // Add new capability. + device.capabilities.printer.vendor_capability.push({ + display_name: 'Paper Type', + id: 'Paper Type', + type: 'SELECT', + select_cap: { + option: [ + {display_name: 'Standard', value: 0, is_default: true}, + {display_name: 'Recycled', value: 1}, + {display_name: 'Special', value: 2} + ] + } + }); + this.setupAdvancedSettingsTest(device); + + // Open the advanced settings overlay. + openAdvancedSettings(); + + // Check advanced settings is visible and that the search box now + // appears. + var advancedSettingsCloseButton = $('advanced-settings'). + querySelector('.close-button'); + checkElementDisplayed(advancedSettingsCloseButton, true); + checkElementDisplayed($('advanced-settings'). + querySelector('.search-box-area'), true); + + this.waitForAnimationToEnd('more-settings'); +}); +
diff --git a/chrome/test/data/webui/settings/people_page_test.js b/chrome/test/data/webui/settings/people_page_test.js index 51a85f6..e7088d6 100644 --- a/chrome/test/data/webui/settings/people_page_test.js +++ b/chrome/test/data/webui/settings/people_page_test.js
@@ -198,6 +198,22 @@ assertTrue(deleteProfile); }); }); + + test('ActivityControlsLink', function() { + return browserProxy.whenCalled('getSyncStatus').then(function() { + Polymer.dom.flush(); + + var activityControls = peoplePage.$$('#activity-controls'); + assertTrue(!!activityControls); + assertFalse(activityControls.hidden); + + cr.webUIListenerCallback('sync-status-changed', { + signedIn: false, + }); + + assertTrue(activityControls.hidden); + }); + }); }); }
diff --git a/chrome/test/data/webui/test_api.js b/chrome/test/data/webui/test_api.js index 41c2f597..a283c88 100644 --- a/chrome/test/data/webui/test_api.js +++ b/chrome/test/data/webui/test_api.js
@@ -891,6 +891,16 @@ } /** + * @param {*} expected + * @param {*} actual + * {string=} opt_message + * @throws {Error} + */ + function assertDeepEquals(expected, actual, opt_message) { + chai.assert.deepEqual(actual, expected, opt_message); + } + + /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. @@ -1667,6 +1677,7 @@ exports.assertGE = assertGE; exports.assertGT = assertGT; exports.assertEquals = assertEquals; + exports.assertDeepEquals = assertDeepEquals; exports.assertLE = assertLE; exports.assertLT = assertLT; exports.assertNotEquals = assertNotEquals; @@ -1683,6 +1694,7 @@ exports.expectGE = createExpect(assertGE); exports.expectGT = createExpect(assertGT); exports.expectEquals = createExpect(assertEquals); + exports.expectDeepEquals = createExpect(assertDeepEquals); exports.expectLE = createExpect(assertLE); exports.expectLT = createExpect(assertLT); exports.expectNotEquals = createExpect(assertNotEquals);
diff --git a/chrome_elf/blacklist/blacklist_interceptions.cc b/chrome_elf/blacklist/blacklist_interceptions.cc index e5e9e1112..f4c7344 100644 --- a/chrome_elf/blacklist/blacklist_interceptions.cc +++ b/chrome_elf/blacklist/blacklist_interceptions.cc
@@ -91,7 +91,7 @@ } bool IsModuleValidImageSection(HANDLE section, - PVOID *base, + PVOID* base, PLARGE_INTEGER offset, PSIZE_T view_size) { DCHECK_NT(g_nt_query_section_func); @@ -115,14 +115,13 @@ } base::string16 ExtractLoadedModuleName(const base::string16& module_path) { - if (module_path.empty() || module_path[module_path.size() - 1] == L'\\') + if (module_path.empty() || module_path.back() == L'\\') return base::string16(); size_t sep = module_path.find_last_of(L'\\'); if (sep == base::string16::npos) return module_path; - else - return module_path.substr(sep+1); + return module_path.substr(sep + 1); } // Fills |out_name| with the image name from the given |pe| image and |flags| @@ -178,7 +177,7 @@ NtMapViewOfSectionFunction orig_MapViewOfSection, HANDLE section, HANDLE process, - PVOID *base, + PVOID* base, ULONG_PTR zero_bits, SIZE_T commit_size, PLARGE_INTEGER offset, @@ -245,18 +244,18 @@ g_nt_unmap_view_of_section_func); } -SANDBOX_INTERCEPT NTSTATUS WINAPI BlNtMapViewOfSection( - NtMapViewOfSectionFunction orig_MapViewOfSection, - HANDLE section, - HANDLE process, - PVOID *base, - ULONG_PTR zero_bits, - SIZE_T commit_size, - PLARGE_INTEGER offset, - PSIZE_T view_size, - SECTION_INHERIT inherit, - ULONG allocation_type, - ULONG protect) { +SANDBOX_INTERCEPT NTSTATUS WINAPI +BlNtMapViewOfSection(NtMapViewOfSectionFunction orig_MapViewOfSection, + HANDLE section, + HANDLE process, + PVOID* base, + ULONG_PTR zero_bits, + SIZE_T commit_size, + PLARGE_INTEGER offset, + PSIZE_T view_size, + SECTION_INHERIT inherit, + ULONG allocation_type, + ULONG protect) { NTSTATUS ret = STATUS_UNSUCCESSFUL; __try {
diff --git a/chromecast/base/chromecast_switches.cc b/chromecast/base/chromecast_switches.cc index b4ffa87..0516c03 100644 --- a/chromecast/base/chromecast_switches.cc +++ b/chromecast/base/chromecast_switches.cc
@@ -78,6 +78,11 @@ // purely on free memory will be used. const char kMemPressureSystemReservedKb[] = "mem-pressure-system-reserved-kb"; +// Used to pass initial screen resolution to GPU process. This allows us to set +// screen size correctly (so no need to resize when first window is created). +const char kCastInitialScreenWidth[] = "cast-initial-screen-width"; +const char kCastInitialScreenHeight[] = "cast-initial-screen-height"; + } // namespace switches namespace chromecast {
diff --git a/chromecast/base/chromecast_switches.h b/chromecast/base/chromecast_switches.h index 9e0c253..c4cdd6f8 100644 --- a/chromecast/base/chromecast_switches.h +++ b/chromecast/base/chromecast_switches.h
@@ -50,6 +50,10 @@ // Memory pressure switches extern const char kMemPressureSystemReservedKb[]; +// GPU switches +extern const char kCastInitialScreenWidth[]; +extern const char kCastInitialScreenHeight[]; + } // namespace switches namespace chromecast {
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc index 4d003862..176e268f 100644 --- a/chromecast/browser/cast_browser_main_parts.cc +++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -404,10 +404,9 @@ memory_pressure_monitor_.reset(new CastMemoryPressureMonitor()); #endif // defined(OS_ANDROID) - cast_browser_process_->SetConnectivityChecker( - ConnectivityChecker::Create( - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::IO))); + cast_browser_process_->SetConnectivityChecker(ConnectivityChecker::Create( + content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::IO))); cast_browser_process_->SetNetLog(net_log_.get());
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc index ae26808..321755c 100644 --- a/chromecast/browser/cast_content_browser_client.cc +++ b/chromecast/browser/cast_content_browser_client.cc
@@ -16,6 +16,7 @@ #include "base/macros.h" #include "base/memory/ptr_util.h" #include "base/path_service.h" +#include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "chromecast/base/cast_constants.h" @@ -51,6 +52,8 @@ #include "content/public/common/web_preferences.h" #include "net/ssl/ssl_cert_request_info.h" #include "net/url_request/url_request_context_getter.h" +#include "ui/display/display.h" +#include "ui/display/screen.h" #include "ui/gl/gl_switches.h" #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) @@ -115,6 +118,20 @@ void CastContentBrowserClient::AppendExtraCommandLineSwitches( base::CommandLine* command_line) { + std::string process_type = + command_line->GetSwitchValueNative(switches::kProcessType); + if (process_type == switches::kGpuProcess) { + gfx::Size res = + display::Screen::GetScreen()->GetPrimaryDisplay().GetSizeInPixel(); + if (!command_line->HasSwitch(switches::kCastInitialScreenWidth)) { + command_line->AppendSwitchASCII(switches::kCastInitialScreenWidth, + base::IntToString(res.width())); + } + if (!command_line->HasSwitch(switches::kCastInitialScreenHeight)) { + command_line->AppendSwitchASCII(switches::kCastInitialScreenHeight, + base::IntToString(res.height())); + } + } } void CastContentBrowserClient::PreCreateThreads() {
diff --git a/chromecast/browser/media/cast_renderer.cc b/chromecast/browser/media/cast_renderer.cc index 0fd0e4f..12fc872 100644 --- a/chromecast/browser/media/cast_renderer.cc +++ b/chromecast/browser/media/cast_renderer.cc
@@ -17,7 +17,9 @@ #include "chromecast/public/media/media_pipeline_device_params.h" #include "media/base/audio_decoder_config.h" #include "media/base/demuxer_stream.h" +#include "media/base/demuxer_stream_provider.h" #include "media/base/media_log.h" +#include "media/base/renderer_client.h" namespace chromecast { namespace media {
diff --git a/chromecast/browser/url_request_context_factory.cc b/chromecast/browser/url_request_context_factory.cc index b7c118be..f0e7d7f 100644 --- a/chromecast/browser/url_request_context_factory.cc +++ b/chromecast/browser/url_request_context_factory.cc
@@ -80,7 +80,7 @@ scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() const override { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); } @@ -122,7 +122,7 @@ scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() const override { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); } @@ -159,9 +159,9 @@ // Proxy config service should be initialized in UI thread, since // ProxyConfigServiceDelegate on Android expects UI thread. proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE)); net_log_ = net_log;
diff --git a/chromecast/media/cma/base/buffering_frame_provider_unittest.cc b/chromecast/media/cma/base/buffering_frame_provider_unittest.cc index 7c0c5ba9..7ac7d4b 100644 --- a/chromecast/media/cma/base/buffering_frame_provider_unittest.cc +++ b/chromecast/media/cma/base/buffering_frame_provider_unittest.cc
@@ -73,7 +73,7 @@ frame_specs[k].size = 512; frame_specs[k].has_decrypt_config = ((k % 3) == 0); } - frame_specs[frame_specs.size() - 1].is_eos = true; + frame_specs.back().is_eos = true; std::unique_ptr<FrameGeneratorForTest> frame_generator_provider( new FrameGeneratorForTest(frame_specs)); @@ -131,7 +131,7 @@ FROM_HERE, base::Bind(&BufferingFrameProviderTest::Start, base::Unretained(this))); message_loop->Run(); -}; +} TEST_F(BufferingFrameProviderTest, SlowProviderFastConsumer) { bool provider_delayed_pattern[] = { true }; @@ -152,7 +152,7 @@ FROM_HERE, base::Bind(&BufferingFrameProviderTest::Start, base::Unretained(this))); message_loop->Run(); -}; +} TEST_F(BufferingFrameProviderTest, SlowFastProducerConsumer) { // Lengths are prime between each other so we can test a lot of combinations. @@ -180,7 +180,7 @@ FROM_HERE, base::Bind(&BufferingFrameProviderTest::Start, base::Unretained(this))); message_loop->Run(); -}; +} } // namespace media } // namespace chromecast
diff --git a/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc b/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc index 9b313c2..46ca5d0 100644 --- a/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc +++ b/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc
@@ -114,7 +114,7 @@ frame_specs[k].size = 512; frame_specs[k].has_decrypt_config = ((k % 3) == 0); } - frame_specs[frame_specs.size() - 1].is_eos = true; + frame_specs.back().is_eos = true; std::unique_ptr<FrameGeneratorForTest> frame_generator_provider( new FrameGeneratorForTest(frame_specs)); @@ -230,7 +230,7 @@ FROM_HERE, base::Bind(&AvStreamerTest::Start, base::Unretained(this))); message_loop->Run(); -}; +} TEST_F(AvStreamerTest, SlowProviderFastConsumer) { bool provider_delayed_pattern[] = { true }; @@ -251,7 +251,7 @@ FROM_HERE, base::Bind(&AvStreamerTest::Start, base::Unretained(this))); message_loop->Run(); -}; +} TEST_F(AvStreamerTest, SlowFastProducerConsumer) { // Pattern lengths are prime between each other @@ -280,7 +280,7 @@ FROM_HERE, base::Bind(&AvStreamerTest::Start, base::Unretained(this))); message_loop->Run(); -}; +} // Test case for when AvStreamerProxy::StopAndFlush is invoked while a previous // flush is pending. This can happen when pipeline is stopped while a seek/flush
diff --git a/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc b/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc index 2e186c9..074714e 100644 --- a/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc +++ b/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc
@@ -158,7 +158,7 @@ frame_specs[k].size = kFrameSize; frame_specs[k].has_decrypt_config = encrypted_; } - frame_specs[frame_specs.size() - 1].is_eos = true; + frame_specs.back().is_eos = true; std::unique_ptr<FrameGeneratorForTest> frame_generator( new FrameGeneratorForTest(frame_specs));
diff --git a/chromecast/media/cma/pipeline/media_pipeline_impl.cc b/chromecast/media/cma/pipeline/media_pipeline_impl.cc index b6fc997d..6474b4d 100644 --- a/chromecast/media/cma/pipeline/media_pipeline_impl.cc +++ b/chromecast/media/cma/pipeline/media_pipeline_impl.cc
@@ -232,6 +232,7 @@ "Cast.Platform.Playing"); // Enable time updates. + last_media_time_ = time; statistics_rolling_counter_ = 0; if (!pending_time_update_task_) { pending_time_update_task_ = true;
diff --git a/chromecast/renderer/cast_render_thread_observer.cc b/chromecast/renderer/cast_render_thread_observer.cc index 5c3d2bb..79ba5b6 100644 --- a/chromecast/renderer/cast_render_thread_observer.cc +++ b/chromecast/renderer/cast_render_thread_observer.cc
@@ -27,7 +27,7 @@ content::RenderThread* thread = content::RenderThread::Get(); #if !defined(OS_ANDROID) cma_message_filter_proxy_ = - new media::CmaMessageFilterProxy(thread->GetIOMessageLoopProxy()); + new media::CmaMessageFilterProxy(thread->GetIOTaskRunner()); thread->AddFilter(cma_message_filter_proxy_.get()); #endif // !defined(OS_ANDROID) capabilities_message_filter_ = new CapabilitiesMessageFilter;
diff --git a/chromecast/renderer/media/chromecast_media_renderer_factory.cc b/chromecast/renderer/media/chromecast_media_renderer_factory.cc index 817e9d5..4ac9da9 100644 --- a/chromecast/renderer/media/chromecast_media_renderer_factory.cc +++ b/chromecast/renderer/media/chromecast_media_renderer_factory.cc
@@ -32,7 +32,7 @@ // TODO(erickung): crbug.com/443956. Need to provide right LoadType. LoadType cma_load_type = kLoadTypeMediaSource; std::unique_ptr<MediaPipelineProxy> cma_media_pipeline(new MediaPipelineProxy( - render_frame_id_, content::RenderThread::Get()->GetIOMessageLoopProxy(), + render_frame_id_, content::RenderThread::Get()->GetIOTaskRunner(), cma_load_type)); std::unique_ptr<CmaRenderer> cma_renderer(new CmaRenderer( std::move(cma_media_pipeline), video_renderer_sink, gpu_factories_));
diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc index fef5c90..64e4271b 100644 --- a/chromeos/audio/cras_audio_handler.cc +++ b/chromeos/audio/cras_audio_handler.cc
@@ -611,6 +611,18 @@ // volume. output_volume_ = volume; audio_pref_handler_->SetVolumeGainValue(*device, volume); + + if (initializing_audio_state_) { + // Reset the flag after the first OutputNodeVolumeChanged, just in case + // cras didn't respond to the initial SetOutputNodeVolume request. + initializing_audio_state_ = false; + // Do not notify the observers for volume changed event if CrasAudioHandler + // is initializing its state, i.e., the volume change event is not from + // user action, no need to notify UI to pop uo the volume slider bar. + if (init_node_id_ == node_id && init_volume_ == volume) + return; + } + FOR_EACH_OBSERVER(AudioObserver, observers_, OnOutputNodeVolumeChanged(node_id, volume)); } @@ -716,6 +728,11 @@ output_volume_ = audio_pref_handler_->GetOutputVolumeValue(device); SetOutputMuteInternal(output_mute_on_); + + if (initializing_audio_state_) { + init_node_id_ = active_output_node_id_; + init_volume_ = output_volume_; + } SetOutputNodeVolume(active_output_node_id_, output_volume_); } @@ -743,6 +760,7 @@ } void CrasAudioHandler::InitializeAudioState() { + initializing_audio_state_ = true; ApplyAudioPolicy(); // Defer querying cras for GetNodes until cras service becomes available.
diff --git a/chromeos/audio/cras_audio_handler.h b/chromeos/audio/cras_audio_handler.h index 177e9e2..32ad3dc 100644 --- a/chromeos/audio/cras_audio_handler.h +++ b/chromeos/audio/cras_audio_handler.h
@@ -432,6 +432,10 @@ bool cras_service_available_ = false; + bool initializing_audio_state_ = false; + int init_volume_; + uint64_t init_node_id_; + base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler);
diff --git a/components/BUILD.gn b/components/BUILD.gn index 75b05aa7..73e906e2 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn
@@ -264,7 +264,6 @@ if (!is_android && !is_ios) { deps += [ "//components/audio_modem:unit_tests", - "//components/copresence:unit_tests", "//components/feedback:unit_tests", "//components/proximity_auth:unit_tests", "//components/storage_monitor:unit_tests",
diff --git a/components/OWNERS b/components/OWNERS index eb16485..14781583 100644 --- a/components/OWNERS +++ b/components/OWNERS
@@ -42,8 +42,6 @@ per-file content_settings.gypi=file://components/content_settings/OWNERS -per-file copresence.gypi=file://components/copresence/OWNERS - per-file crash.gypi=file://components/crash/OWNERS per-file crash_strings.grdp=file://components/crash/OWNERS
diff --git a/components/autofill.gypi b/components/autofill.gypi index 8c942d7..b0bc811 100644 --- a/components/autofill.gypi +++ b/components/autofill.gypi
@@ -106,6 +106,9 @@ 'autofill/core/browser/address_field.h', 'autofill/core/browser/address_i18n.cc', 'autofill/core/browser/address_i18n.h', + 'autofill/core/browser/address_rewriter.cc', + 'autofill/core/browser/address_rewriter.h', + 'autofill/core/browser/address_rewriter_rules.cc', 'autofill/core/browser/autocomplete_history_manager.cc', 'autofill/core/browser/autocomplete_history_manager.h', 'autofill/core/browser/autofill-inl.h',
diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn index 89bd384..b51755e6 100644 --- a/components/autofill/core/browser/BUILD.gn +++ b/components/autofill/core/browser/BUILD.gn
@@ -13,6 +13,9 @@ "address_field.h", "address_i18n.cc", "address_i18n.h", + "address_rewriter.cc", + "address_rewriter.h", + "address_rewriter_rules.cc", "autocomplete_history_manager.cc", "autocomplete_history_manager.h", "autofill-inl.h", @@ -279,6 +282,7 @@ sources = [ "address_field_unittest.cc", "address_i18n_unittest.cc", + "address_rewriter_unittest.cc", "address_unittest.cc", "autocomplete_history_manager_unittest.cc", "autofill_country_unittest.cc",
diff --git a/components/autofill/core/browser/address_rewriter.cc b/components/autofill/core/browser/address_rewriter.cc new file mode 100644 index 0000000..4cd255c --- /dev/null +++ b/components/autofill/core/browser/address_rewriter.cc
@@ -0,0 +1,129 @@ +// 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 "components/autofill/core/browser/address_rewriter.h" + +#include <memory> +#include <unordered_map> + +#include "base/i18n/case_conversion.h" +#include "base/memory/singleton.h" +#include "base/strings/utf_string_conversions.h" +#include "third_party/re2/src/re2/re2.h" + +namespace autofill { +namespace { + +// Import in the internal rule table symbols. The data is defined in +// components/autofill/core/browser/address_rewriter_rules.cc +using internal::Rule; +using internal::RegionInfo; +using internal::kRuleTable; +using internal::kRuleTableSize; + +// Aliases for the types used by the compiled rules cache. +using CompiledRule = std::pair<std::unique_ptr<re2::RE2>, re2::StringPiece>; +using CompiledRuleVector = std::vector<CompiledRule>; +using CompiledRuleCache = std::unordered_map<std::string, CompiledRuleVector>; + +// Helper function to find the rules associated with |region|. Note that this +// requires that kRuleTable be sorted by region. +static const RegionInfo* GetRegionInfo(const base::StringPiece& region) { + const RegionInfo* begin = kRuleTable; + const RegionInfo* end = kRuleTable + kRuleTableSize; + const RegionInfo* iter = std::lower_bound(begin, end, region); + if (iter != end && region == iter->region) + return iter; + return nullptr; +} + +// The cache of compiled string replacement rules, keyed by region. This class +// is a singleton that compiles the rules for a given region the first time +// they are requested. +class Cache { + public: + // Return the singleton instance of the cache. + static Cache* GetInstance() { return base::Singleton<Cache>::get(); } + + // If the rules for |region| have already been compiled and cached, return a + // pointer to them. Otherwise, find the rules for |region| (returning nullptr + // if there are no such rules exist), compile them, cache them, and return a + // pointer to the cached rules. + const CompiledRuleVector* GetRulesForRegion(const std::string& region) { + // Take the lock so that we don't update the data cache concurrently. Note + // that the returned data is const and can be concurrently accessed, just + // not the data cache. + base::AutoLock auto_lock(lock_); + + // If we find a cached set of rules, return a pointer to the data. + CompiledRuleCache::iterator cache_iter = data_.find(region); + if (cache_iter != data_.end()) + return &cache_iter->second; + + // Cache miss. Look for the raw rules. If none, then return nullptr. + const RegionInfo* region_info = GetRegionInfo(region); + if (region_info == nullptr) + return nullptr; + + // Add a new rule vector the the cache and populate it with compiled rules. + re2::RE2::Options options; + options.set_utf8(true); + options.set_word_boundary(true); + CompiledRuleVector& compiled_rules = data_[region]; + compiled_rules.reserve(region_info->num_rules); + for (size_t i = 0; i < region_info->num_rules; ++i) { + const Rule& rule = region_info->rules[i]; + std::unique_ptr<re2::RE2> pattern(new re2::RE2(rule.pattern, options)); + re2::StringPiece rewrite(rule.rewrite); + compiled_rules.emplace_back(std::move(pattern), std::move(rewrite)); + } + + // Return a pointer to the data. + return &compiled_rules; + } + + private: + Cache() {} + + // Synchronizes access to |data_|, ensuring that a given set of rules is + // only compiled once. + base::Lock lock_; + + // The cache of compiled rules, keyed by region. + CompiledRuleCache data_; + + friend struct base::DefaultSingletonTraits<Cache>; + DISALLOW_COPY_AND_ASSIGN(Cache); +}; + +} // namespace + +AddressRewriter AddressRewriter::ForCountryCode( + const base::string16& country_code) { + const std::string region = + base::UTF16ToUTF8(base::i18n::ToUpper(country_code)); + const CompiledRuleVector* rules = + Cache::GetInstance()->GetRulesForRegion(region); + AddressRewriter rewriter; + rewriter.impl_ = rules; + return rewriter; +} + +base::string16 AddressRewriter::Rewrite(const base::string16& text) const { + if (impl_ == nullptr) + return base::CollapseWhitespace(text, true); + + // Apply all of the string replacement rules. We don't have to worry about + // whitespace during these passes because the patterns are all whitespace + // tolerant regular expressions. + std::string utf8_text = base::UTF16ToUTF8(text); + for (const auto& rule : *static_cast<const CompiledRuleVector*>(impl_)) { + RE2::GlobalReplace(&utf8_text, *rule.first, rule.second); + } + + // Collapse whitespace before returning the final value. + return base::UTF8ToUTF16(base::CollapseWhitespaceASCII(utf8_text, true)); +} + +} // namespace autofill
diff --git a/components/autofill/core/browser/address_rewriter.h b/components/autofill/core/browser/address_rewriter.h new file mode 100644 index 0000000..bc44415 --- /dev/null +++ b/components/autofill/core/browser/address_rewriter.h
@@ -0,0 +1,64 @@ +// 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 COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_REWRITER_H_ +#define COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_REWRITER_H_ + +#include "base/strings/string16.h" +#include "base/strings/string_piece.h" +#include "base/strings/string_util.h" + +namespace autofill { + +// A class to apply address normalization rewriting rules to strings. This +// class is a wrapper to a handle for a set of cached rules. As such, it is +// copyable, movable, and passable by value. +class AddressRewriter { + public: + // Get an AddressRewrite instance which applies the rules for |country_code|. + static AddressRewriter ForCountryCode(const base::string16& country_code); + + // Apply the rewrite rules to |text| and return the result. + base::string16 Rewrite(const base::string16& text) const; + + private: + // A handle to the internal rewrite rules this instance is using. + const void* impl_ = nullptr; +}; + +// Implementation details follow. Not part of the public interface. +namespace internal { + +// The structure used to statically define a rule. +struct Rule { + const char* pattern; + const char* rewrite; +}; + +// The structure used to statically define a set of rules for a region. +struct RegionInfo { + const char* region; + const Rule* rules; + size_t num_rules; + + bool operator<(const base::StringPiece& region) const { + return base::CompareCaseInsensitiveASCII(this->region, region) < 0; + } + + bool operator==(const base::StringPiece& region) const { + return base::EqualsCaseInsensitiveASCII(this->region, region); + } +}; + +// The statically defined rule table, sorted by region. +extern const internal::RegionInfo kRuleTable[]; + +// The size (in records) of the statically defined rule table. +extern const size_t kRuleTableSize; + +} // namespace internal + +} // namespace autofill + +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_REWRITER_H_
diff --git a/components/autofill/core/browser/address_rewriter_rules.cc b/components/autofill/core/browser/address_rewriter_rules.cc new file mode 100644 index 0000000..214d2939 --- /dev/null +++ b/components/autofill/core/browser/address_rewriter_rules.cc
@@ -0,0 +1,3500 @@ +// 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. +// +// Generated 2016-07-06T19:18:28Z + +#include "components/autofill/core/browser/address_rewriter.h" + +namespace autofill { +namespace internal { +namespace { + +const Rule kRules_AD[] = { + {"\\bparroquia\\s+de\\s+andorra\\s+la\\s+vella\\b", "07"}, + {"\\bprincipat\\s+de\\s+andorra\\b", "07"}, + {"\\bprincipal\\s+de\\s+andorra\\b", "07"}, + {"\\bsant\\s+julia\\s+de\\s+loria\\b", "jl"}, + {"\\bescaldes\\s+engordany\\b", "08"}, + {"\\bandorra\\s+la\\s+vella\\b", "07"}, + {"\\bcarrer\\s+del\\b", ""}, + {"\\bla\\s+massana\\b", "04"}, + {"\\bsant\\s+julia\\b", "jl"}, + {"\\bcarrer\\s+de\\b", ""}, + {"\\bandorra\\b", "07"}, + {"\\bcanillo\\b", "02"}, + {"\\bmassana\\b", "04"}, + {"\\bencamp\\b", "03"}, + {"\\bordino\\b", "05"}, + {"\\bc\\s+del\\b", ""}, + {"\\bc\\s+de\\b", ""}, + {"\\ban\\b", "07"}, + {"\\bca\\b", "02"}, + {"\\ben\\b", "03"}, + {"\\bee\\b", "08"}, + {"\\bma\\b", "04"}, + {"\\bor\\b", "05"}, + {"\\b06\\b", "jl"}, + {"\\bad\\b", "07"}, +}; + +const Rule kRules_AR[] = { + {"\\btierra\\s+del\\s+fuego\\s+antartida\\s+e\\s+islas\\s+del\\s+" + "atlantico\\s+sur\\b", + "tierra del fuego"}, + {"\\bciudad\\s+autonoma\\s+de\\s+buenos\\s+aires\\b", "caba"}, + {"\\bla\\s+ciudad\\s+de\\s+buenos\\s+aires\\b", "caba"}, + {"\\bcapital\\s+federal\\b", "caba"}, + {"\\bdiecisiete\\b", "17"}, + {"\\bdiecinueve\\b", "19"}, + {"\\bdieciseis\\b", "16"}, + {"\\bdieciocho\\b", "18"}, + {"\\bboulevard\\b", "bv"}, + {"\\bargentina\\b", "ar"}, + {"\\bprimera\\b", "1a"}, + {"\\bsegunda\\b", "2a"}, + {"\\btercera\\b", "3a"}, + {"\\bseptima\\b", "7a"}, + {"\\bcatorce\\b", "14"}, + {"\\bavenida\\b", "av"}, + {"\\bcuarta\\b", "4a"}, + {"\\bquinta\\b", "5a"}, + {"\\boctava\\b", "8a"}, + {"\\bcuatro\\b", "4"}, + {"\\bquince\\b", "15"}, + {"\\bveinte\\b", "20"}, + {"\\bpasaje\\b", "pje"}, + {"\\bsexta\\b", "6a"}, + {"\\bcinco\\b", "5"}, + {"\\bsiete\\b", "7"}, + {"\\bnueve\\b", "9"}, + {"\\btrece\\b", "13"}, + {"\\btres\\b", "3"}, + {"\\bseis\\b", "6"}, + {"\\bocho\\b", "8"}, + {"\\bdiez\\b", "10"}, + {"\\bonce\\b", "11"}, + {"\\bdoce\\b", "12"}, + {"\\buno\\b", "1"}, + {"\\bdos\\b", "2"}, + {"\\blos\\b", ""}, + {"\\blas\\b", ""}, + {"\\bdel\\b", ""}, + {"\\ble\\b", ""}, + {"\\bel\\b", ""}, + {"\\bde\\b", ""}, +}; + +const Rule kRules_AU[] = { + {"\\baustralian\\s+capital\\s+territory\\b", "act"}, + {"\\bjervis\\s+bay\\s+territory\\b", "jbt"}, + {"\\bnorthern\\s+territory\\b", "nt"}, + {"\\bwestern\\s+australia\\b", "wa"}, + {"\\bnew\\s+south\\s+wales\\b", "nsw"}, + {"\\bsouth\\s+australia\\b", "sa"}, + {"\\bqueensland\\b", "qld"}, + {"\\bboulevard\\b", "blvd"}, + {"\\baustralia\\b", "au"}, + {"\\bcrescent\\b", "cres"}, + {"\\bvictoria\\b", "vic"}, + {"\\btasmania\\b", "tas"}, + {"\\bparkway\\b", "pkwy"}, + {"\\bhighway\\b", "hwy"}, + {"\\bavenue\\b", "ave"}, + {"\\bstreet\\b", "st"}, + {"\\bparade\\b", "pde"}, + {"\\bcommon\\b", "comm"}, + {"\\bau\\-vic\\b", "vic"}, + {"\\ba\\.c\\.t\\.\\b", "act"}, + {"\\bau\\-act\\b", "act"}, + {"\\bj\\.b\\.t\\.\\b", "jbt"}, + {"\\bau\\-jbt\\b", "jbt"}, + {"\\bn\\.s\\.w\\.\\b", "nsw"}, + {"\\bau\\-nsw\\b", "nsw"}, + {"\\bau\\-qld\\b", "qld"}, + {"\\bau\\-tas\\b", "tas"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bthree\\b", "3"}, + {"\\bseven\\b", "7"}, + {"\\beight\\b", "8"}, + {"\\bmount\\b", "mt"}, + {"\\bsaint\\b", "st"}, + {"\\bpoint\\b", "pt"}, + {"\\bcourt\\b", "ct"}, + {"\\bplace\\b", "pl"}, + {"\\bdrive\\b", "dr"}, + {"\\ba\\.c\\.t\\b", "act"}, + {"\\bj\\.b\\.t\\b", "jbt"}, + {"\\bn\\.s\\.w\\b", "nsw"}, + {"\\bau\\-nt\\b", "nt"}, + {"\\bau\\-wa\\b", "wa"}, + {"\\bau\\-sa\\b", "sa"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\bfour\\b", "4"}, + {"\\bfive\\b", "5"}, + {"\\bnine\\b", "9"}, + {"\\broad\\b", "rd"}, + {"\\blane\\b", "ln"}, + {"\\bn\\.t\\.\\b", "nt"}, + {"\\bw\\.a\\.\\b", "wa"}, + {"\\bs\\.a\\.\\b", "sa"}, + {"\\bnth\\b", "n"}, + {"\\bsth\\b", "s"}, + {"\\bone\\b", "1"}, + {"\\btwo\\b", "2"}, + {"\\bsix\\b", "6"}, + {"\\bten\\b", "10"}, + {"\\bmt\\.\\b", "mt"}, + {"\\bst\\.\\b", "st"}, + {"\\bpt\\.\\b", "pt"}, + {"\\bn\\.t\\b", "nt"}, + {"\\bw\\.a\\b", "wa"}, + {"\\bs\\.a\\b", "sa"}, + {"\\baus\\b", "au"}, + {"\\bn\\.\\b", "n"}, + {"\\bs\\.\\b", "s"}, + {"\\be\\.\\b", "e"}, + {"\\bw\\.\\b", "w"}, +}; + +const Rule kRules_BE[] = { + {"\\barrondissement\\s+administratif\\s+de\\b", ""}, + {"\\barrondissement\\s+administratif\\s+d\\b", ""}, + {"\\bbrussels\\s+hoofdstedelijk\\s+gewest\\b", "brussel"}, + {"\\bbrussel\\s+hoofdstedelijk\\s+gewest\\b", "brussel"}, + {"\\bregion\\s+de\\s+bruxelles\\s+capitale\\b", "brussel"}, + {"\\bseptieme\\s+division\\s+francaise\\b", "7eme division frcse"}, + {"\\bonze\\s+lieve\\s+heersebeestjes\\b", "onze lieve heersbeestjes"}, + {"\\bregion\\s+brussel\\s+hauptstadt\\b", "brussel"}, + {"\\balbert\\s+en\\s+marie\\s+louise\\b", "a & m l"}, + {"\\balbert\\s+et\\s+marie\\s+louise\\b", "a & m l"}, + {"\\bandree\\s+payfa\\s+fosseprez\\b", "a payfa fosseprez"}, + {"\\bseptieme\\s+d\\s+i\\s+francaise\\b", "7eme division frcse"}, + {"\\bwereldtentoonstellings\\b", "wereldtentoonstelings"}, + {"\\bberchem\\s+sainte\\s+agathe\\b", "st agatha berchem"}, + {"\\bsaint\\s+josse\\s+ten\\s+noode\\b", "saint josse"}, + {"\\bflandres\\s+occidentales\\b", "westflandern"}, + {"\\bhenri\\s+victor\\s+wolvens\\b", "h v wolvens"}, + {"\\bjoseph\\s+van\\s+boterdael\\b", "joseph van boterdae"}, + {"\\bmarilyn\\s+monroegaarde\\b", "marilyn monroe"}, + {"\\bflandre\\s+occidentales\\b", "westflandern"}, + {"\\bflandres\\s+occidentale\\b", "westflandern"}, + {"\\bwoluwe\\s+saint\\s+pierre\\b", "st pieters woluwe"}, + {"\\bflandres\\s+orientales\\b", "ostflandern"}, + {"\\bflandre\\s+occidentale\\b", "westflandern"}, + {"\\bhendrik\\s+conscience\\b", "henri conscience"}, + {"\\bleonoardo\\s+da\\s+vinci\\b", "leonard de vinci"}, + {"\\bbruxelles\\s+capitale\\b", "brussel"}, + {"\\bwallonische\\s+region\\b", "wallonie"}, + {"\\bflandre\\s+orientales\\b", "ostflandern"}, + {"\\bflandres\\s+orientale\\b", "ostflandern"}, + {"\\bwallonisch\\s+brabant\\b", "waals brabant"}, + {"\\bbischoffsheimlaan\\b", "bischoffsheim"}, + {"\\bbrouck\\s+du\\s+tilleul\\b", "brouck au tilleul"}, + {"\\bleonardo\\s+da\\s+vinci\\b", "leonard de vinci"}, + {"\\bflandre\\s+orientale\\b", "ostflandern"}, + {"\\barmand\\s+scheitler\\b", "armand scheiter"}, + {"\\bhenri\\s+wafelaerts\\b", "henri wafelaert"}, + {"\\bpierre\\s+hauwaerts\\b", "pieter hauwaerts"}, + {"\\brennequin\\s+sualem\\b", "renkin sualem"}, + {"\\bregion\\s+wallonien\\b", "wallonie"}, + {"\\bflamische\\s+region\\b", "vlaams gewest"}, + {"\\bflamisch\\s+brabant\\b", "vlaams brabant"}, + {"\\baugust\\s+de\\s+boeck\\b", "a de boeck"}, + {"\\bgodefroid\\s+kurth\\b", "godfroid kurth"}, + {"\\bbruxelles\\s+ville\\b", "brussel"}, + {"\\bregion\\s+wallonne\\b", "wallonie"}, + {"\\bregion\\s+flamande\\b", "vlaams gewest"}, + {"\\bflamisch\\s+region\\b", "vlaams gewest"}, + {"\\bbrabant\\s+flamand\\b", "vlaams brabant"}, + {"\\boost\\s+vlaanderen\\b", "ostflandern"}, + {"\\bwest\\s+vlaanderen\\b", "westflandern"}, + {"\\blimburg\\s+stirum\\b", "limburg strium"}, + {"\\barrondissement\\b", ""}, + {"\\bbrabant\\s+wallon\\b", "waals brabant"}, + {"\\bmichel\\s+angelo\\b", "michel ange"}, + {"\\bpater\\s+damiaan\\b", "pater damian"}, + {"\\bsualem\\s+renkin\\b", "renkin sualem"}, + {"\\bde\\s+ribaucourt\\b", "ribaucourt"}, + {"\\bprofondeville\\b", "profondville"}, + {"\\bsint\\s+lenaarts\\b", "sint lenaerts"}, + {"\\bdendermondse\\b", "dendermonde"}, + {"\\bminnezangers\\b", "menestrelen"}, + {"\\bvooruitgangs\\b", "vooruitgang"}, + {"\\bwaals\\s+gewest\\b", "wallonie"}, + {"\\bjette\\s+jetse\\b", "jette"}, + {"\\bi\\s+urbanisme\\b", "l urbanisme"}, + {"\\bpuits\\s+no\\s+iv\\b", "puits n4"}, + {"\\bterhulpense\\b", "terhulpse"}, + {"\\bcortenbergh\\b", "cortenberg"}, + {"\\bprovince\\s+de\\b", ""}, + {"\\bprovince\\s+du\\b", ""}, + {"\\blanguesdoc\\b", "languedoc"}, + {"\\bpuit\\s+no\\s+iv\\b", "puits n4"}, + {"\\bvan\\s+volxem\\b", "volxem"}, + {"\\bprovince\\s+d\\b", ""}, + {"\\bhenegouwen\\b", "hainaut"}, + {"\\bluxembourg\\b", "luxemburg"}, + {"\\bboulevard\\b", "bd"}, + {"\\bluitenant\\b", "liutenant"}, + {"\\bwestphael\\b", "wesphal"}, + {"\\bbruxelles\\b", "brussel"}, + {"\\bwallonien\\b", "wallonie"}, + {"\\bantwerpen\\b", "anvers"}, + {"\\bchaussee\\b", "chee"}, + {"\\bsteenweg\\b", "stwg"}, + {"\\bterrasse\\b", "tsse"}, + {"\\bwestphal\\b", "wesphal"}, + {"\\bbrussels\\b", "brussel"}, + {"\\blimbourg\\b", "limburg"}, + {"\\bhennegau\\b", "hainaut"}, + {"\\bbelgique\\b", "be"}, + {"\\bavenues\\b", "av"}, + {"\\bimpasse\\b", "imp"}, + {"\\bstrasse\\b", "str"}, + {"\\bjettese\\b", "jetse"}, + {"\\bde\\s+wand\\b", "wand"}, + {"\\bprovinz\\b", ""}, + {"\\bluttich\\b", "luik"}, + {"\\bbelgium\\b", "be"}, + {"\\bbelgien\\b", "be"}, + {"\\bsainte\\b", "st"}, + {"\\ballees\\b", "all"}, + {"\\bavenue\\b", "av"}, + {"\\bcentre\\b", "ctre"}, + {"\\bsquare\\b", "sq"}, + {"\\bstraat\\b", "str"}, + {"\\bbelgie\\b", "be"}, + {"\\bsaint\\b", "st"}, + {"\\bsankt\\b", "st"}, + {"\\ballee\\b", "all"}, + {"\\bplace\\b", "pl"}, + {"\\bplatz\\b", "pl"}, + {"\\bplein\\b", "pl"}, + {"\\bpiein\\b", "pl"}, + {"\\broute\\b", "rte"}, + {"\\bthier\\b", "their"}, + {"\\bnamur\\b", "namen"}, + {"\\bliege\\b", "luik"}, + {"\\bsint\\b", "st"}, + {"\\bste\\b", "st"}, + {"\\bdes\\b", "d"}, + {"\\brue\\b", "r"}, + {"\\bde\\b", "d"}, + {"\\bdu\\b", "d"}, +}; + +const Rule kRules_BR[] = { + {"\\brio\\s+grande\\s+do\\s+norte\\b", "rn"}, + {"\\bmato\\s+grosso\\s+do\\s+sul\\b", "ms"}, + {"\\brio\\s+grande\\s+do\\s+sul\\b", "rs"}, + {"\\bdistrito\\s+federal\\b", "df"}, + {"\\bdecimo\\s+primeiro\\b", "11"}, + {"\\bdecimo\\s+terceiro\\b", "13"}, + {"\\bvinte\\s+e\\s+quatro\\b", "24"}, + {"\\bespirito\\s+santo\\b", "es"}, + {"\\brio\\s+de\\s+janeiro\\b", "rj"}, + {"\\bsanta\\s+catarina\\b", "sc"}, + {"\\bdecimo\\s+quarto\\b", "14"}, + {"\\bdecimo\\s+quinto\\b", "15"}, + {"\\bdecimo\\s+setimo\\b", "17"}, + {"\\bdecimo\\s+oitavo\\b", "18"}, + {"\\bvinte\\s+e\\s+cinco\\b", "25"}, + {"\\bdecimo\\s+sexto\\b", "16"}, + {"\\bvinte\\s+e\\s+dois\\b", "22"}, + {"\\bvinte\\s+e\\s+tres\\b", "23"}, + {"\\bvinte\\s+e\\s+seis\\b", "26"}, + {"\\bvinte\\s+e\\s+sete\\b", "27"}, + {"\\bvinte\\s+e\\s+oito\\b", "28"}, + {"\\bvinte\\s+e\\s+nove\\b", "29"}, + {"\\bminas\\s+gerais\\b", "mg"}, + {"\\bdecimo\\s+nono\\b", "19"}, + {"\\bmato\\s+grosso\\b", "mt"}, + {"\\bvinte\\s+e\\s+um\\b", "21"}, + {"\\bgovernador\\b", "gov"}, + {"\\bpresidente\\b", "pres"}, + {"\\bcomandante\\b", "com"}, + {"\\bpernambuco\\b", "pe"}, + {"\\bduodecimo\\b", "12"}, + {"\\bdezesseis\\b", "16"}, + {"\\bdezessete\\b", "17"}, + {"\\bcinquenta\\b", "50"}, + {"\\brepublica\\b", "rep"}, + {"\\bprofessor\\b", "prof"}, + {"\\bsao\\s+paulo\\b", "sp"}, + {"\\btocantins\\b", "to"}, + {"\\bprimeiro\\b", "i"}, + {"\\bterceiro\\b", "3"}, + {"\\bdezenove\\b", "19"}, + {"\\bvigesimo\\b", "20"}, + {"\\bquarenta\\b", "40"}, + {"\\bsessenta\\b", "60"}, + {"\\bprincesa\\b", "prsa"}, + {"\\bsargento\\b", "sct"}, + {"\\bamazonas\\b", "am"}, + {"\\bmaranhao\\b", "ma"}, + {"\\brondonia\\b", "ro"}, + {"\\bsegundo\\b", "2"}, + {"\\bcatorze\\b", "14"}, + {"\\bdezoito\\b", "18"}, + {"\\bsetenta\\b", "70"}, + {"\\boitenta\\b", "80"}, + {"\\bnoventa\\b", "90"}, + {"\\bsenador\\b", "sen"}, + {"\\bcoronel\\b", "cel"}, + {"\\bavenida\\b", "av"}, + {"\\bestrada\\b", "estr"}, + {"\\balameda\\b", "al"}, + {"\\balagoas\\b", "al"}, + {"\\bparaiba\\b", "pb"}, + {"\\broraima\\b", "rr"}, + {"\\bsergipe\\b", "se"}, + {"\\bquarto\\b", "4"}, + {"\\bquatro\\b", "4"}, + {"\\bquinto\\b", "5"}, + {"\\bsetimo\\b", "7"}, + {"\\boitavo\\b", "8"}, + {"\\bdecimo\\b", "x"}, + {"\\bquinze\\b", "15"}, + {"\\btrinta\\b", "30"}, + {"\\bprincs\\b", "prsa"}, + {"\\bdoutor\\b", "dr"}, + {"\\bparana\\b", "pr"}, + {"\\bbrazil\\b", "b"}, + {"\\bbrasil\\b", "b"}, + {"\\bnorte\\b", "n"}, + {"\\boeste\\b", "w"}, + {"\\bcinco\\b", "5"}, + {"\\bsexto\\b", "6"}, + {"\\btreze\\b", "13"}, + {"\\bvinte\\b", "20"}, + {"\\bbarao\\b", "b"}, + {"\\bduque\\b", "dq"}, + {"\\bsanta\\b", "sta"}, + {"\\bconde\\b", "cde"}, + {"\\bpadre\\b", "pe"}, + {"\\bviela\\b", "vl"}, + {"\\bamapa\\b", "ap"}, + {"\\bbahia\\b", "ba"}, + {"\\bceara\\b", "ce"}, + {"\\bgoias\\b", "go"}, + {"\\bpiaui\\b", "pi"}, + {"\\beste\\b", "e"}, + {"\\bviii\\b", "8"}, + {"\\bdois\\b", "2"}, + {"\\btres\\b", "3"}, + {"\\bseis\\b", "6"}, + {"\\bsete\\b", "7"}, + {"\\boito\\b", "8"}, + {"\\bnono\\b", "9"}, + {"\\bnove\\b", "9"}, + {"\\bonze\\b", "11"}, + {"\\bdoze\\b", "12"}, + {"\\bacre\\b", "ac"}, + {"\\bbaia\\b", "ba"}, + {"\\bpara\\b", "pa"}, + {"\\bsala\\b", "s"}, + {"\\blote\\b", "lt"}, + {"\\bsul\\b", "s"}, + {"\\biii\\b", "3"}, + {"\\bvii\\b", "7"}, + {"\\bdez\\b", "x"}, + {"\\bcem\\b", "100"}, + {"\\bsan\\b", "s"}, + {"\\bsgt\\b", "sct"}, + {"\\bdos\\b", ""}, + {"\\bdas\\b", ""}, + {"\\brua\\b", "r"}, + {"\\bii\\b", "2"}, + {"\\biv\\b", "4"}, + {"\\bvi\\b", "6"}, + {"\\bix\\b", "9"}, + {"\\b10\\b", "x"}, + {"\\bum\\b", "i"}, + {"\\bbr\\b", "b"}, + {"\\bdo\\b", ""}, + {"\\bde\\b", ""}, + {"\\bda\\b", ""}, + {"\\bel\\b", ""}, + {"\\bve\\b", "vl"}, + {"\\bsl\\b", "s"}, + {"\\b1\\b", "i"}, + {"\\bv\\b", "5"}, +}; + +const Rule kRules_CA[] = { + {"\\bdsl\\s+de\\s+grand\\s+sault\\s+falls\\s+grand\\s+sault\\s+grand\\s+" + "falls\\b", + "grand falls"}, + {"\\bsainte\\s+catherine\\s+de\\s+la\\s+jacques\\s+cartier\\b", + "ste catherine de la j cartier"}, + {"\\bmadawaska\\s+maliseet\\s+frst\\s+nation\\b", "madawaska"}, + {"\\bregional\\s+county\\s+municipality\\b", ""}, + {"\\bshediac\\s+bridge\\s+shediac\\s+river\\b", "shediac bridge"}, + {"\\bnewfoundland\\s+and\\s+labrador\\b", "nl"}, + {"\\bterritoires\\s+du\\s+nord\\s+ouest\\b", "nt"}, + {"\\bregional\\s+municipality\\s+of\\b", ""}, + {"\\bdsl\\s+de\\s+grand\\s+sault\\s+falls\\b", "grand falls"}, + {"\\bgrand\\s+sault\\s+grand\\s+falls\\b", "grand falls"}, + {"\\bterre\\s+neuve\\s+et\\s+labrador\\b", "nl"}, + {"\\bbay\\s+de\\s+verde\\s+peninsula\\b", "bvd"}, + {"\\bregional\\s+municipality\\b", ""}, + {"\\bnorthwest\\s+territories\\b", "nt"}, + {"\\bile\\s+du\\s+prince\\s+edouard\\b", "pe"}, + {"\\bregional\\s+district\\s+of\\b", ""}, + {"\\bcolombie\\s+britannique\\b", "bc"}, + {"\\bprince\\s+edward\\s+island\\b", "pe"}, + {"\\bhead\\s+of\\s+bay\\s+despoir\\b", "head bay d\'espoir"}, + {"\\bfrench\\s+village\\s+york\\b", "french village"}, + {"\\bterritoire\\s+du\\s+yukon\\b", "yt"}, + {"\\bregional\\s+district\\b", ""}, + {"\\bnouveau\\s+brunswick\\b", "nb"}, + {"\\bcanton\\s+stanstead\\b", "stanstead"}, + {"\\bmd\\s+of\\s+bonnyville\\b", "bonnyville"}, + {"\\bbritish\\s+columbia\\b", "bc"}, + {"\\bst\\s+george\\s+brant\\b", "saint george"}, + {"\\bnouvelle\\s+ecosse\\b", "ns"}, + {"\\byukon\\s+territory\\b", "yt"}, + {"\\bsackville\\s+road\\b", "sackville"}, + {"\\bchisholm\\s+mills\\b", "chisholm"}, + {"\\bnational\\s+park\\b", ""}, + {"\\bplacentia\\s+bay\\b", "pb"}, + {"\\bnew\\s+brunswick\\b", "nb"}, + {"\\bmetropolitan\\b", ""}, + {"\\bbeaver\\s+brook\\b", "beaverbrook"}, + {"\\brichibouctou\\b", "richibucto"}, + {"\\bnewfoundland\\b", "nl"}, + {"\\bsaskatchewan\\b", "sk"}, + {"\\bsubdivision\\b", "subdiv"}, + {"\\btownship\\s+of\\b", ""}, + {"\\btrinity\\s+bay\\b", "tb"}, + {"\\bfortune\\s+bay\\b", "fb"}, + {"\\bsutton\\s+west\\b", "sutton"}, + {"\\bterre\\s+neuve\\b", "nl"}, + {"\\bnova\\s+scotia\\b", "ns"}, + {"\\bconcession\\b", "conc"}, + {"\\bcul\\-de\\-sac\\b", "cds"}, + {"\\bcul\\s+de\\s+sac\\b", "cds"}, + {"\\bexpressway\\b", "expy"}, + {"\\brond\\-point\\b", "rdpt"}, + {"\\brond\\s+point\\b", "rdpt"}, + {"\\bnorth\\s+side\\b", "northside"}, + {"\\bbelliveaus\\b", "belliveau"}, + {"\\bmackinnons\\b", "mckinnons"}, + {"\\bpine\\s+ridge\\b", "pineridge"}, + {"\\bde\\s+riviere\\b", "riviere"}, + {"\\balternate\\b", "alt"}, + {"\\bautoroute\\b", "aut"}, + {"\\bcarrefour\\b", "carref"}, + {"\\bcroissant\\b", "crois"}, + {"\\bdiversion\\b", "divers"}, + {"\\bechangeur\\b", "ech"}, + {"\\besplanade\\b", "espl"}, + {"\\bextension\\b", "exten"}, + {"\\bhighlands\\b", "hghlds"}, + {"\\bpromenade\\b", "prom"}, + {"\\bturnabout\\b", "trnabt"}, + {"\\bboulevard\\b", "blvd"}, + {"\\bcounty\\s+of\\b", ""}, + {"\\bhalf\\s+moon\\b", "halfmoon"}, + {"\\bkuskanook\\b", "kuskonook"}, + {"\\bbusiness\\b", "bus"}, + {"\\bcrescent\\b", "cres"}, + {"\\bcrossing\\b", "cross"}, + {"\\bmountain\\b", "mtn"}, + {"\\bterrasse\\b", "tsse"}, + {"\\btownline\\b", "tline"}, + {"\\bjunction\\b", ""}, + {"\\btownship\\b", ""}, + {"\\boak\\s+hill\\b", "oakhill"}, + {"\\bpleasent\\b", "pleasant"}, + {"\\bmanitoba\\b", "mb"}, + {"\\bhighway\\b", "hwy"}, + {"\\bby\\s+pass\\b", "bypass"}, + {"\\bcircuit\\b", "circt"}, + {"\\bcorners\\b", "crnrs"}, + {"\\bestates\\b", "estate"}, + {"\\bfreeway\\b", "fwy"}, + {"\\bgardens\\b", "gdns"}, + {"\\bgrounds\\b", "grnds"}, + {"\\bharbour\\b", "harbr"}, + {"\\bheights\\b", "hts"}, + {"\\bimpasse\\b", "imp"}, + {"\\blanding\\b", "landng"}, + {"\\blookout\\b", "lkout"}, + {"\\borchard\\b", "orch"}, + {"\\bparkway\\b", "pky"}, + {"\\bpassage\\b", "pass"}, + {"\\bpathway\\b", "ptway"}, + {"\\bplateau\\b", "plat"}, + {"\\bterrace\\b", "terr"}, + {"\\bthicket\\b", "thick"}, + {"\\bvillage\\b", ""}, + {"\\bsentier\\b", "sent"}, + {"\\bcity\\s+of\\b", ""}, + {"\\btown\\s+of\\b", ""}, + {"\\bstation\\b", ""}, + {"\\breserve\\b", ""}, + {"\\bnarrows\\b", ""}, + {"\\bl\'islet\\b", ""}, + {"\\bkeenans\\b", "keenan"}, + {"\\bla\\s+have\\b", "lahave"}, + {"\\bherbert\\b", "hebert"}, + {"\\balberta\\b", "ab"}, + {"\\bnunavut\\b", "nu"}, + {"\\bontario\\b", "on"}, + {"\\bsainte\\b", ""}, + {"\\bl\'isle\\b", "isle"}, + {"\\bavenue\\b", "av"}, + {"\\bcentre\\b", ""}, + {"\\bcenter\\b", ""}, + {"\\bcircle\\b", "cir"}, + {"\\bharbor\\b", "harbr"}, + {"\\bisland\\b", ""}, + {"\\blimits\\b", "lmts"}, + {"\\bpointe\\b", "pte"}, + {"\\bruelle\\b", "rle"}, + {"\\bsquare\\b", "sq"}, + {"\\bstreet\\b", ""}, + {"\\bchemin\\b", "ch"}, + {"\\bcanton\\b", ""}, + {"\\bsiding\\b", ""}, + {"\\bvalley\\b", ""}, + {"\\bcounty\\b", ""}, + {"\\bsmiths\\b", "smith"}, + {"\\bbakers\\b", "baker"}, + {"\\bmackay\\b", "mckay"}, + {"\\bmcgrey\\b", "mcgray"}, + {"\\bquebec\\b", "qc"}, + {"\\bcanada\\b", "ca"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bouest\\b", "o"}, + {"\\bsaint\\b", ""}, + {"\\bmount\\b", "mt"}, + {"\\bpoint\\b", "pt"}, + {"\\bcarre\\b", "car"}, + {"\\bclose\\b", "cl"}, + {"\\bcourt\\b", "crt"}, + {"\\bdrive\\b", "dr"}, + {"\\bgrove\\b", "grv"}, + {"\\bplace\\b", "pl"}, + {"\\brange\\b", "rg"}, + {"\\broute\\b", "rt"}, + {"\\btrail\\b", "trl"}, + {"\\bmetro\\b", ""}, + {"\\bforks\\b", ""}, + {"\\bmanns\\b", "mann"}, + {"\\bfirst\\b", "fst"}, + {"\\byukon\\b", "yt"}, + {"\\bnord\\b", "n"}, + {"\\beast\\b", ""}, + {"\\bwest\\b", "o"}, + {"\\bcove\\b", ""}, + {"\\blane\\b", "ln"}, + {"\\bpark\\b", ""}, + {"\\bpkwy\\b", "pky"}, + {"\\broad\\b", ""}, + {"\\bboul\\b", "blvd"}, + {"\\bcity\\b", ""}, + {"\\blake\\b", ""}, + {"\\bfrst\\b", "fst"}, + {"\\bnth\\b", "n"}, + {"\\bsth\\b", "s"}, + {"\\bsud\\b", "s"}, + {"\\best\\b", ""}, + {"\\bere\\b", ""}, + {"\\bste\\b", ""}, + {"\\bave\\b", "av"}, + {"\\bbay\\b", ""}, + {"\\bctr\\b", ""}, + {"\\bile\\b", ""}, + {"\\brte\\b", "rt"}, + {"\\bdes\\b", ""}, + {"\\bcbd\\b", ""}, + {"\\bsal\\b", ""}, + {"\\bblp\\b", ""}, + {"\\bbdv\\b", ""}, + {"\\blab\\b", ""}, + {"\\bndb\\b", ""}, + {"\\bsmb\\b", ""}, + {"\\bont\\b", "on"}, + {"\\bpei\\b", "pe"}, + {"\\bcan\\b", "ca"}, + {"\\bst\\b", ""}, + {"\\bnd\\b", ""}, + {"\\brd\\b", ""}, + {"\\bth\\b", ""}, + {"\\ber\\b", ""}, + {"\\bre\\b", ""}, + {"\\bpk\\b", ""}, + {"\\bd\'\\b", ""}, + {"\\bde\\b", ""}, + {"\\bdu\\b", ""}, + {"\\bcb\\b", ""}, + {"\\bbb\\b", ""}, + {"\\bco\\b", ""}, + {"\\bfn\\b", ""}, + {"\\bgb\\b", ""}, + {"\\bwb\\b", ""}, + {"\\be\\b", ""}, + {"\\bw\\b", "o"}, + {"\\bc\\b", ""}, + {"\\bd\\b", ""}, +}; + +const Rule kRules_CH[] = { + {"\\bappenzell\\s+rhodes\\s+exterieures\\b", "ar"}, + {"\\bappenzell\\s+ausserrhoden\\b", "ar"}, + {"\\bappenzell\\s+innerrhoden\\b", "ai"}, + {"\\bjura\\s+north\\s+vaudois\\b", "jura nord vaudois"}, + {"\\bprettigovia\\s+davos\\b", "davos"}, + {"\\bbasel\\s+landschaft\\b", "bl"}, + {"\\bsankt\\s+silvester\\b", "st silvester"}, + {"\\bprattigau\\s+davos\\b", "davos"}, + {"\\bsankt\\s+stephan\\b", "st stephan"}, + {"\\bbale\\s+campagne\\b", "bl"}, + {"\\bbasilea\\s+citta\\b", "bs"}, + {"\\bwallis\\s+valais\\b", "vs"}, + {"\\bdix\\s+septieme\\b", "17"}, + {"\\bdix\\s+huitieme\\b", "18"}, + {"\\bdix\\s+neuvieme\\b", "19"}, + {"\\bsankt\\s+gallen\\b", "sg"}, + {"\\bsaint\\s+gallen\\b", "sg"}, + {"\\bschaffhausen\\b", "sh"}, + {"\\bquatorzieme\\b", "14"}, + {"\\bwinterthour\\b", "winterthur"}, + {"\\bsan\\s+nazzaro\\b", "s nazzaro"}, + {"\\bsan\\s+vittore\\b", "s vittore"}, + {"\\bbelinzonese\\b", "bellinzone"}, + {"\\bsankt\\s+gallo\\b", "sg"}, + {"\\bsaint\\s+gallo\\b", "sg"}, + {"\\bbasel\\s+stadt\\b", "bs"}, + {"\\bschaffhouse\\b", "sh"}, + {"\\bswitzerland\\b", "ch"}, + {"\\benclave\\s+de\\b", ""}, + {"\\bbellinzona\\b", "bellinzone"}, + {"\\bsankt\\s+gall\\b", "sg"}, + {"\\bst\\.\\s+gallen\\b", "sg"}, + {"\\bsaint\\s+gall\\b", "sg"}, + {"\\bsan\\s+gallen\\b", "sg"}, + {"\\bbasel\\s+land\\b", "bl"}, + {"\\bbale\\s+ville\\b", "bs"}, + {"\\bbasel\\s+stad\\b", "bs"}, + {"\\bbasel\\s+city\\b", "bs"}, + {"\\bbazel\\s+stad\\b", "bs"}, + {"\\bgraubunden\\b", "gr"}, + {"\\bwaadt\\s+vaud\\b", "vd"}, + {"\\bvaud\\s+waadt\\b", "vd"}, + {"\\btroisieme\\b", "3"}, + {"\\bquatrieme\\b", "4"}, + {"\\bcinquieme\\b", "5"}, + {"\\btreizieme\\b", "13"}, + {"\\bquinzieme\\b", "xv"}, + {"\\bvingtieme\\b", "xx"}, + {"\\blaufental\\b", "laufon"}, + {"\\bst\\s+gallen\\b", "sg"}, + {"\\bst\\.\\s+gallo\\b", "sg"}, + {"\\bsan\\s+gallo\\b", "sg"}, + {"\\bneuenburg\\b", "ne"}, + {"\\bneuchatel\\b", "ne"}, + {"\\bnidwalden\\b", "nw"}, + {"\\bsciaffusa\\b", "sh"}, + {"\\bsolothurn\\b", "so"}, + {"\\bthurgovie\\b", "tg"}, + {"\\bthurgovia\\b", "tg"}, + {"\\bpremiere\\b", "i"}, + {"\\bdeuxieme\\b", "2"}, + {"\\bseptieme\\b", "7"}, + {"\\bhuitieme\\b", "8"}, + {"\\bneuvieme\\b", "9"}, + {"\\bdouzieme\\b", "12"}, + {"\\bseizieme\\b", "16"}, + {"\\bmaloggia\\b", "maloja"}, + {"\\bgessenay\\b", "saanen"}, + {"\\bst\\s+gallo\\b", "sg"}, + {"\\bst\\.\\s+gall\\b", "sg"}, + {"\\bsan\\s+gall\\b", "sg"}, + {"\\bd\\\\\'uster\\b", "uster"}, + {"\\bzofingen\\b", "zofingue"}, + {"\\bfreiburg\\b", "fr"}, + {"\\bfribourg\\b", "fr"}, + {"\\bfriburgo\\b", "fr"}, + {"\\bgrigioni\\b", "gr"}, + {"\\bnidvaldo\\b", "nw"}, + {"\\bobwalden\\b", "ow"}, + {"\\bturgovia\\b", "tg"}, + {"\\bsixieme\\b", "6"}, + {"\\bdixieme\\b", "x"}, + {"\\bonzieme\\b", "xi"}, + {"\\bzuerich\\b", "zh"}, + {"\\bturicum\\b", "zh"}, + {"\\blucerne\\b", "lu"}, + {"\\bst\\s+gall\\b", "sg"}, + {"\\bargovia\\b", "ag"}, + {"\\bargovie\\b", "ag"}, + {"\\bfriburg\\b", "fr"}, + {"\\bginevra\\b", "ge"}, + {"\\bglarona\\b", "gl"}, + {"\\bgrisons\\b", "gr"}, + {"\\blucerna\\b", "lu"}, + {"\\bnidwald\\b", "nw"}, + {"\\bobvaldo\\b", "ow"}, + {"\\bsoleure\\b", "so"}, + {"\\bsoletta\\b", "so"}, + {"\\bschwytz\\b", "sz"}, + {"\\bthurgau\\b", "tg"}, + {"\\bvallese\\b", "vs"}, + {"\\bvallais\\b", "vs"}, + {"\\bschweiz\\b", "ch"}, + {"\\bsainte\\b", ""}, + {"\\bregion\\b", ""}, + {"\\bzurich\\b", "zh"}, + {"\\bbienne\\b", "biel"}, + {"\\bbienna\\b", "biel"}, + {"\\bbrigue\\b", "brig"}, + {"\\blaufen\\b", "laufon"}, + {"\\bthoune\\b", "thun"}, + {"\\bzurigo\\b", "zh"}, + {"\\baargau\\b", "ag"}, + {"\\bgeneve\\b", "ge"}, + {"\\bgeneva\\b", "ge"}, + {"\\bglarus\\b", "gl"}, + {"\\bglaris\\b", "gl"}, + {"\\bluzern\\b", "lu"}, + {"\\bobwald\\b", "ow"}, + {"\\bschwyz\\b", "sz"}, + {"\\bsvitto\\b", "sz"}, + {"\\btessin\\b", "ti"}, + {"\\bticino\\b", "ti"}, + {"\\bwallis\\b", "vs"}, + {"\\bvalais\\b", "vs"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bouest\\b", "o"}, + {"\\bsaint\\b", ""}, + {"\\bmount\\b", "mt"}, + {"\\bxviii\\b", "18"}, + {"\\bde\\s+la\\b", ""}, + {"\\bde\\s+l\'\\b", ""}, + {"\\bet\\s+du\\b", ""}, + {"\\bstadt\\b", ""}, + {"\\baaray\\b", "aarau"}, + {"\\bberna\\b", "be"}, + {"\\bberne\\b", "be"}, + {"\\bbriga\\b", "brig"}, + {"\\bviege\\b", "visp"}, + {"\\bgiura\\b", "ju"}, + {"\\bwaadt\\b", "vd"}, + {"\\bnord\\b", "n"}, + {"\\bwest\\b", "o"}, + {"\\bieme\\b", ""}, + {"\\bviii\\b", "8"}, + {"\\bxiii\\b", "13"}, + {"\\bxvii\\b", "17"}, + {"\\bstad\\b", ""}, + {"\\bbern\\b", "be"}, + {"\\bgenf\\b", "ge"}, + {"\\bjura\\b", "ju"}, + {"\\bvaud\\b", "vd"}, + {"\\bzugo\\b", "zg"}, + {"\\bzoug\\b", "zg"}, + {"\\bsud\\b", "s"}, + {"\\best\\b", ""}, + {"\\bere\\b", ""}, + {"\\beme\\b", ""}, + {"\\bste\\b", ""}, + {"\\bmte\\b", "mt"}, + {"\\biii\\b", "3"}, + {"\\bvii\\b", "7"}, + {"\\bxii\\b", "12"}, + {"\\bxiv\\b", "14"}, + {"\\bxvi\\b", "16"}, + {"\\bxix\\b", "19"}, + {"\\bdes\\b", ""}, + {"\\bles\\b", ""}, + {"\\bsur\\b", ""}, + {"\\buri\\b", "ur"}, + {"\\bzug\\b", "zg"}, + {"\\bst\\b", ""}, + {"\\bnd\\b", ""}, + {"\\brd\\b", ""}, + {"\\bth\\b", ""}, + {"\\ber\\b", ""}, + {"\\bre\\b", ""}, + {"\\bii\\b", "2"}, + {"\\biv\\b", "4"}, + {"\\bvi\\b", "6"}, + {"\\bix\\b", "9"}, + {"\\b10\\b", "x"}, + {"\\b11\\b", "xi"}, + {"\\b15\\b", "xv"}, + {"\\b20\\b", "xx"}, + {"\\bdu\\b", ""}, + {"\\bde\\b", ""}, + {"\\bd\'\\b", ""}, + {"\\bla\\b", ""}, + {"\\ble\\b", ""}, + {"\\bl\'\\b", ""}, + {"\\bof\\b", ""}, + {"\\ben\\b", ""}, + {"\\bin\\b", ""}, + {"\\be\\b", ""}, + {"\\bw\\b", "o"}, + {"\\b1\\b", "i"}, + {"\\bv\\b", "5"}, +}; + +const Rule kRules_CL[] = { + {"\\baisen\\s+del\\s+general\\s+carlos\\s+ibanez\\s+del\\s+campo\\b", "11"}, + {"\\blibertador\\s+general\\s+bernardo\\s+o\'higgins\\b", "6"}, + {"\\bmetropolitana\\s+de\\s+santiago\\s+de\\s+chile\\b", "rm"}, + {"\\bmagallanes\\s+y\\s+la\\s+antartica\\s+chilena\\b", "12"}, + {"\\bmetropolitana\\s+de\\s+santiago\\b", "rm"}, + {"\\barica\\s+y\\s+parinacota\\b", "xv"}, + {"\\bmetropolitana\\b", "rm"}, + {"\\bla\\s+araucania\\b", "9"}, + {"\\bantofagasta\\b", "2"}, + {"\\bvalparaiso\\b", "v"}, + {"\\blos\\s+lagos\\b", "x"}, + {"\\btarapaca\\b", "i"}, + {"\\bcoquimbo\\b", "4"}, + {"\\blos\\s+rios\\b", "14"}, + {"\\batacama\\b", "3"}, + {"\\bbio\\s+bio\\b", "8"}, + {"\\bmaule\\b", "7"}, + {"\\bchile\\b", "cl"}, + {"\\bviii\\b", "8"}, + {"\\biii\\b", "3"}, + {"\\bvii\\b", "7"}, + {"\\bxii\\b", "12"}, + {"\\bxiv\\b", "14"}, + {"\\bii\\b", "2"}, + {"\\biv\\b", "4"}, + {"\\bvi\\b", "6"}, + {"\\bix\\b", "9"}, + {"\\b10\\b", "x"}, + {"\\bxi\\b", "11"}, + {"\\b15\\b", "xv"}, + {"\\b1\\b", "i"}, + {"\\b5\\b", "v"}, +}; + +const Rule kRules_CO[] = { + {"\\bcolombia\\b", "co"}, + {"\\bcolumbia\\b", "co"}, +}; + +const Rule kRules_DE[] = { + {"\\bfederal\\s+republic\\s+of\\s+germany\\b", "de"}, + {"\\bbundesrepublik\\s+deutschland\\b", "de"}, + {"\\bfreie\\s+hansestadt\\s+bremen\\b", "hb"}, + {"\\bmecklenburg\\s+vorpommern\\b", "mv"}, + {"\\bnorth\\s+rhine\\s+westphalia\\b", "nw"}, + {"\\brhineland\\s+palatinate\\b", "rp"}, + {"\\bnordrhein\\s+westfalen\\b", "nw"}, + {"\\bschleswig\\s+holstein\\b", "sh"}, + {"\\bbaden\\s+wurttemberg\\b", "bw"}, + {"\\bregionalverband\\b", ""}, + {"\\brheinland\\s+pfalz\\b", "rp"}, + {"\\bsachsen\\s+anhalt\\b", "st"}, + {"\\bniedersachsen\\b", "ni"}, + {"\\bsaxony\\s+anhalt\\b", "st"}, + {"\\bstadtverband\\b", ""}, + {"\\blower\\s+saxony\\b", "ni"}, + {"\\bbrandenburg\\b", "bb"}, + {"\\bdeutschland\\b", "de"}, + {"\\blandkreis\\b", ""}, + {"\\bthuringia\\b", "th"}, + {"\\bthuringen\\b", "th"}, + {"\\bsaarland\\b", "sl"}, + {"\\bstrasse\\b", "str"}, + {"\\bcologne\\b", "koln"}, + {"\\bbavaria\\b", "by"}, + {"\\bhamburg\\b", "hh"}, + {"\\bsachsen\\b", "sn"}, + {"\\bgermany\\b", "de"}, + {"\\bsudost\\b", "se"}, + {"\\bbayern\\b", "by"}, + {"\\bberlin\\b", "be"}, + {"\\bbremen\\b", "hb"}, + {"\\bhessen\\b", "he"}, + {"\\bsaxony\\b", "sn"}, + {"\\bsankt\\b", "st"}, + {"\\bstadt\\b", ""}, + {"\\bhesse\\b", "he"}, + {"\\bnord\\b", "n"}, + {"\\bwest\\b", "w"}, + {"\\bsud\\b", "s"}, + {"\\bost\\b", "o"}, +}; + +const Rule kRules_DK[] = { + {"\\bgrabrodrestraede\\b", "grabrodrestr"}, + {"\\barnold\\s+nielsens\\b", "arn nielsens"}, + {"\\bhaveforeningen\\b", "haveforening"}, + {"\\bmunicipality\\b", ""}, + {"\\btengslemark\\b", "tengslemrk"}, + {"\\bbispebjergs\\b", "bispebjerg"}, + {"\\bboulevard\\b", "boul"}, + {"\\blillerod\\b", "allerod"}, + {"\\bpladsen\\b", "plads"}, + {"\\bkvarter\\b", "kvater"}, + {"\\bkommune\\b", ""}, + {"\\bdenmark\\b", "dk"}, + {"\\bdanmark\\b", "dk"}, + {"\\bsondre\\b", "s"}, + {"\\bnummer\\b", "nr"}, + {"\\bgammel\\b", "gl"}, + {"\\blokken\\b", "lokke"}, + {"\\bboulev\\b", "boul"}, + {"\\bnorre\\b", "n"}, + {"\\bsankt\\b", "skt"}, + {"\\bgamle\\b", "gl"}, + {"\\bnord\\b", "n"}, + {"\\bvest\\b", "v"}, + {"\\bndr\\b", "n"}, + {"\\bsyd\\b", "s"}, + {"\\bsdr\\b", "s"}, + {"\\bost\\b", "o"}, + {"\\bsct\\b", "skt"}, +}; + +const Rule kRules_ES[] = { + {"\\bsanta\\s+cruz\\s+de\\s+tenerife\\b", "tf"}, + {"\\bbalearic\\s+islands\\b", "pm"}, + {"\\bislas\\s+baleares\\b", "pm"}, + {"\\billes\\s+balears\\b", "pm"}, + {"\\bciudad\\s+real\\b", "cr"}, + {"\\bguadalajara\\b", "gu"}, + {"\\bla\\s+corunna\\b", "c"}, + {"\\bla\\s+corunya\\b", "c"}, + {"\\blas\\s+palmas\\b", "gc"}, + {"\\bpontevedra\\b", "po"}, + {"\\bvalladolid\\b", "va"}, + {"\\besplugues\\b", "esplugas"}, + {"\\bla\\s+coruna\\b", "c"}, + {"\\bbarcelona\\b", "b"}, + {"\\bcantabria\\b", "s"}, + {"\\bcastellon\\b", "cs"}, + {"\\bguipuscoa\\b", "ss"}, + {"\\bguipuzcoa\\b", "ss"}, + {"\\bsalamanca\\b", "sa"}, + {"\\btarragona\\b", "t"}, + {"\\bsaragossa\\b", "z"}, + {"\\ba\\s+coruna\\b", "c"}, + {"\\balbacete\\b", "ab"}, + {"\\balicante\\b", ""}, + {"\\basturias\\b", "o"}, + {"\\bcastello\\b", "cs"}, + {"\\bgipuzkoa\\b", "ss"}, + {"\\bla\\s+rioja\\b", "lo"}, + {"\\bnafarroa\\b", "na"}, + {"\\bpalencia\\b", "p"}, + {"\\bvalencia\\b", "v"}, + {"\\bzaragoza\\b", "z"}, + {"\\bavenida\\b", "av"}, + {"\\balacant\\b", ""}, + {"\\balmeria\\b", ""}, + {"\\bbadajoz\\b", "ba"}, + {"\\bvizcaya\\b", "bi"}, + {"\\bbizkaia\\b", "bi"}, + {"\\bcaceres\\b", "cc"}, + {"\\bcordoba\\b", "co"}, + {"\\bcordova\\b", "co"}, + {"\\bgranada\\b", "gr"}, + {"\\bnavarre\\b", "na"}, + {"\\bnavarra\\b", "na"}, + {"\\bourense\\b", "or"}, + {"\\bsegovia\\b", "sg"}, + {"\\bseville\\b", "se"}, + {"\\bsevilla\\b", "se"}, + {"\\bmadrid\\b", "m"}, + {"\\bcoruna\\b", "c"}, + {"\\bbiscay\\b", "bi"}, + {"\\bburgos\\b", "bu"}, + {"\\bcuenca\\b", "cu"}, + {"\\bgerona\\b", "gi"}, + {"\\bgirona\\b", "gi"}, + {"\\bhuelva\\b", "h"}, + {"\\bhuesca\\b", "hu"}, + {"\\blerida\\b", ""}, + {"\\blleida\\b", ""}, + {"\\bmalaga\\b", "ma"}, + {"\\bmurcia\\b", "mu"}, + {"\\borense\\b", "or"}, + {"\\bteruel\\b", "te"}, + {"\\btoledo\\b", "to"}, + {"\\bzamora\\b", "za"}, + {"\\bespana\\b", "es"}, + {"\\bnorth\\b", "n"}, + {"\\bnorte\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\boeste\\b", "o"}, + {"\\balava\\b", "vi"}, + {"\\baraba\\b", "vi"}, + {"\\bavila\\b", "av"}, + {"\\bcadiz\\b", "ca"}, + {"\\bsoria\\b", "so"}, + {"\\bspain\\b", "es"}, + {"\\beast\\b", "e"}, + {"\\beste\\b", "e"}, + {"\\bwest\\b", "o"}, + {"\\bjaen\\b", "j"}, + {"\\bleon\\b", "le"}, + {"\\blugo\\b", "lu"}, + {"\\bsur\\b", "s"}, + {"\\bdel\\b", ""}, + {"\\bdal\\b", ""}, + {"\\blos\\b", ""}, + {"\\blas\\b", ""}, + {"\\bles\\b", ""}, + {"\\bc\\/\\.\\b", "c"}, + {"\\bc\\.\\/\\b", "c"}, + {"\\bde\\b", ""}, + {"\\ben\\b", ""}, + {"\\bof\\b", ""}, + {"\\bal\\b", ""}, + {"\\bel\\b", ""}, + {"\\bla\\b", ""}, + {"\\bc\\/\\b", "c"}, + {"\\ba\\b", ""}, + {"\\bd\\b", ""}, + {"\\bl\\b", ""}, +}; + +const Rule kRules_FR[] = { + {"\\bprovence\\s+alpes\\s+cote\\s+d\\s+azur\\b", "u"}, + {"\\balpes\\s+de\\s+haute\\s+provence\\b", "04"}, + {"\\barnouville\\s+les\\s+gonesse\\b", "arnouville"}, + {"\\bterritoire\\s+de\\s+belfort\\b", "90"}, + {"\\bpyrenees\\s+atlantiques\\b", "64"}, + {"\\blanguedoc\\s+roussillon\\b", "k"}, + {"\\bpyrenees\\s+orientales\\b", "66"}, + {"\\bmeurthe\\s+et\\s+moselle\\b", "54"}, + {"\\bnord\\s+pas\\s+de\\s+calais\\b", "o"}, + {"\\bcharente\\s+maritime\\b", "17"}, + {"\\bseine\\s+saint\\s+denis\\b", "93"}, + {"\\bchampagne\\s+ardenne\\b", "g"}, + {"\\bbouches\\s+du\\s+rhone\\b", "13"}, + {"\\bloire\\s+atlantique\\b", "44"}, + {"\\bpays\\s+de\\s+la\\s+loire\\b", "r"}, + {"\\bpoitou\\s+charentes\\b", "t"}, + {"\\balpes\\s+maritimes\\b", "06"}, + {"\\bille\\s+et\\s+vilaine\\b", "35"}, + {"\\btarn\\s+et\\s+garonne\\b", "82"}, + {"\\bbasse\\s+normandie\\b", "p"}, + {"\\bhaute\\s+normandie\\b", "q"}, + {"\\bdepartementale\\b", "d"}, + {"\\bindre\\s+et\\s+loire\\b", "37"}, + {"\\blot\\s+et\\s+garonne\\b", "47"}, + {"\\bmaine\\s+et\\s+loire\\b", "49"}, + {"\\bhaute\\s+pyrenees\\b", "65"}, + {"\\bsaone\\s+et\\s+loire\\b", "71"}, + {"\\bseine\\s+maritime\\b", "76"}, + {"\\bhauts\\s+de\\s+seine\\b", "92"}, + {"\\blower\\s+normandy\\b", "p"}, + {"\\bupper\\s+normandy\\b", "q"}, + {"\\bdepartemental\\b", "d"}, + {"\\bcotes\\s+d\\s+armor\\b", "22"}, + {"\\bhaute\\s+garonne\\b", "31"}, + {"\\bpas\\s+de\\s+calais\\b", "62"}, + {"\\bseine\\s+et\\s+mame\\b", "77"}, + {"\\bfranche\\s+comte\\b", "i"}, + {"\\bile\\s+de\\s+france\\b", "j"}, + {"\\bmidi\\s+pyrenees\\b", "n"}, + {"\\bdix\\s+septieme\\b", "17"}, + {"\\bdix\\s+huitieme\\b", "18"}, + {"\\bdix\\s+neuvieme\\b", "19"}, + {"\\bcorse\\s+du\\s+sud\\b", "2a"}, + {"\\beure\\s+et\\s+loir\\b", "28"}, + {"\\bloir\\s+et\\s+cher\\b", "41"}, + {"\\bhaute\\s+savoie\\b", "74"}, + {"\\bhaute\\s+vienne\\b", "87"}, + {"\\bval\\s+de\\s+marne\\b", "94"}, + {"\\bquatorzieme\\b", "14"}, + {"\\bcouffouleux\\b", "coufouleux"}, + {"\\bhaute\\s+alpes\\b", "05"}, + {"\\bhaute\\s+corse\\b", "2b"}, + {"\\bhaute\\s+loire\\b", "43"}, + {"\\bhaute\\s+marne\\b", "52"}, + {"\\bpuy\\s+de\\s+dome\\b", "63"}, + {"\\bhaute\\s+saone\\b", "70"}, + {"\\bdeux\\s+sevres\\b", "79"}, + {"\\brhone\\s+alpes\\b", "5"}, + {"\\benclave\\s+de\\b", ""}, + {"\\bval\\s+d\\s+oise\\b", "95"}, + {"\\bacquitaine\\b", "b"}, + {"\\btroisieme\\b", "3"}, + {"\\bquatrieme\\b", "4"}, + {"\\bcinquieme\\b", "5"}, + {"\\btreizieme\\b", "13"}, + {"\\bquinzieme\\b", "xv"}, + {"\\bvingtieme\\b", "20"}, + {"\\bboulevard\\b", "bd"}, + {"\\bnationale\\b", "n"}, + {"\\bcote\\s+d\\s+or\\b", "21"}, + {"\\bfinistere\\b", "29"}, + {"\\bmoribihan\\b", "56"}, + {"\\bhaut\\s+rhin\\b", "68"}, + {"\\baquitaine\\b", "b"}, + {"\\bbourgogne\\b", "d"}, + {"\\bpremiere\\b", "i"}, + {"\\bdeuxieme\\b", "2"}, + {"\\bseptieme\\b", "7"}, + {"\\bhuitieme\\b", "8"}, + {"\\bneuvieme\\b", "9"}, + {"\\bdouzieme\\b", "12"}, + {"\\bseizieme\\b", "16"}, + {"\\bla\\s+croix\\b", "lacroix"}, + {"\\ballemont\\b", "allemond"}, + {"\\bardennes\\b", "08"}, + {"\\baveryron\\b", "12"}, + {"\\bcalvados\\b", "14"}, + {"\\bcharente\\b", "16"}, + {"\\bdordogne\\b", "24"}, + {"\\bbas\\s+rhin\\b", "67"}, + {"\\byvelines\\b", "78"}, + {"\\bvaucluse\\b", "84"}, + {"\\bauvergne\\b", "c"}, + {"\\bburgundy\\b", "d"}, + {"\\bbretagne\\b", ""}, + {"\\bbrittany\\b", ""}, + {"\\blimousin\\b", "l"}, + {"\\blorraine\\b", "m"}, + {"\\bpicardie\\b", "s"}, + {"\\bsixieme\\b", "6"}, + {"\\bdixieme\\b", "x"}, + {"\\bonzieme\\b", "xi"}, + {"\\bpicardy\\b", "s"}, + {"\\bardeche\\b", "07"}, + {"\\bcorreze\\b", "19"}, + {"\\bgironde\\b", "33"}, + {"\\bherault\\b", "34"}, + {"\\bmayenne\\b", "53"}, + {"\\bmoselle\\b", "57"}, + {"\\bessonne\\b", "91"}, + {"\\bcorsica\\b", "h"}, + {"\\bsainte\\b", ""}, + {"\\bgrande\\b", "gr"}, + {"\\bavenue\\b", "ave"}, + {"\\bregion\\b", ""}, + {"\\ballier\\b", "03"}, + {"\\bariege\\b", "09"}, + {"\\bcreuse\\b", "23"}, + {"\\blandes\\b", "40"}, + {"\\bloiret\\b", "45"}, + {"\\blozere\\b", "48"}, + {"\\bmanche\\b", "50"}, + {"\\bnievre\\b", "58"}, + {"\\bsarthe\\b", "72"}, + {"\\bsavoie\\b", "73"}, + {"\\bvendee\\b", "85"}, + {"\\bvienne\\b", "86"}, + {"\\bvosges\\b", "88"}, + {"\\balsace\\b", "a"}, + {"\\bcentre\\b", "f"}, + {"\\bfrance\\b", "fr"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bouest\\b", "o"}, + {"\\bsaint\\b", ""}, + {"\\bmount\\b", "mt"}, + {"\\bxviii\\b", "18"}, + {"\\bde\\s+la\\b", ""}, + {"\\bde\\s+l\'\\b", ""}, + {"\\bet\\s+du\\b", ""}, + {"\\bgrand\\b", "gr"}, + {"\\bvilla\\b", "vil"}, + {"\\bparis\\b", ""}, + {"\\baisne\\b", "02"}, + {"\\bdoubs\\b", "25"}, + {"\\bdrome\\b", "26"}, + {"\\bindre\\b", "36"}, + {"\\bisere\\b", "38"}, + {"\\bloire\\b", "42"}, + {"\\bmarne\\b", "51"}, + {"\\bmeuse\\b", "55"}, + {"\\brhone\\b", "69"}, + {"\\bsomme\\b", "80"}, + {"\\byonne\\b", "89"}, + {"\\bcorse\\b", "h"}, + {"\\bnord\\b", "n"}, + {"\\bwest\\b", "o"}, + {"\\bieme\\b", ""}, + {"\\bviii\\b", "8"}, + {"\\bxiii\\b", "13"}, + {"\\bxvii\\b", "17"}, + {"\\bcher\\b", "18"}, + {"\\beure\\b", "27"}, + {"\\bgard\\b", "30"}, + {"\\bgers\\b", "32"}, + {"\\bjura\\b", "39"}, + {"\\boise\\b", "60"}, + {"\\borne\\b", "61"}, + {"\\btarn\\b", "81"}, + {"\\bsud\\b", "s"}, + {"\\best\\b", ""}, + {"\\bere\\b", ""}, + {"\\beme\\b", ""}, + {"\\bste\\b", ""}, + {"\\bmte\\b", "mt"}, + {"\\biii\\b", "3"}, + {"\\bvii\\b", "7"}, + {"\\bxii\\b", "12"}, + {"\\bxiv\\b", "14"}, + {"\\bxvi\\b", "16"}, + {"\\bxix\\b", "19"}, + {"\\bdes\\b", ""}, + {"\\bles\\b", ""}, + {"\\bsur\\b", ""}, + {"\\bgde\\b", "gr"}, + {"\\bain\\b", "01"}, + {"\\blot\\b", "46"}, + {"\\bvar\\b", "83"}, + {"\\bst\\b", ""}, + {"\\bnd\\b", ""}, + {"\\brd\\b", ""}, + {"\\bth\\b", ""}, + {"\\ber\\b", ""}, + {"\\bre\\b", ""}, + {"\\bii\\b", "2"}, + {"\\biv\\b", "4"}, + {"\\bvi\\b", "6"}, + {"\\bix\\b", "9"}, + {"\\b10\\b", "x"}, + {"\\b11\\b", "xi"}, + {"\\b15\\b", "xv"}, + {"\\bxx\\b", "20"}, + {"\\bdu\\b", ""}, + {"\\bde\\b", ""}, + {"\\bd\'\\b", ""}, + {"\\bla\\b", ""}, + {"\\ble\\b", ""}, + {"\\bl\'\\b", ""}, + {"\\bof\\b", ""}, + {"\\ben\\b", ""}, + {"\\bin\\b", ""}, + {"\\bgd\\b", "gr"}, + {"\\b59\\b", "n"}, + {"\\b75\\b", ""}, + {"\\be\\b", ""}, + {"\\bw\\b", "o"}, + {"\\b1\\b", "i"}, + {"\\bv\\b", "5"}, +}; + +const Rule kRules_GB[] = { + {"\\bbath\\s+and\\s+north\\s+east\\s+somerset\\b", "gb-bas"}, + {"\\bdungannon\\s+and\\s+south\\s+tyrone\\b", "gb-dgn"}, + {"\\bcheshire\\s+west\\s+and\\s+chester\\b", "gb-chw"}, + {"\\bnewry\\s+and\\s+mourne\\s+district\\b", "gb-nym"}, + {"\\beast\\s+riding\\s+of\\s+yorkshire\\b", "gb-ery"}, + {"\\bmetropolitan\\s+borough\\s+of\\b", ""}, + {"\\bnorth\\s+east\\s+lincolnshire\\b", "gb-nel"}, + {"\\bhammersmith\\s+and\\s+fulham\\b", "gb-hmf"}, + {"\\bkensington\\s+and\\s+chelsea\\b", "gb-kec"}, + {"\\bwindsor\\s+and\\s+maidenhead\\b", "gb-wnm"}, + {"\\bblackburn\\s+with\\s+darwen\\b", "gb-bbd"}, + {"\\bsouth\\s+gloucestershire\\b", "gb-sgc"}, + {"\\bdumfries\\s+and\\s+galloway\\b", "gb-dgy"}, + {"\\bthe\\s+vale\\s+of\\s+glamorgan\\b", "gb-vgl"}, + {"\\bbarking\\s+and\\s+dagenham\\b", "gb-bdg"}, + {"\\bkingston\\s+upon\\s+thames\\b", "gb-ktt"}, + {"\\brichmond\\s+upon\\s+thames\\b", "gb-ric"}, + {"\\bcentral\\s+bedfordshire\\b", "gb-cbf"}, + {"\\bredcar\\s+and\\s+cleveland\\b", "gb-rcc"}, + {"\\bthe\\s+scottish\\s+borders\\b", "gb-scb"}, + {"\\brhondda\\,\\s+cynon\\,\\s+taff\\b", "gb-rct"}, + {"\\bnewcastle\\s+upon\\s+tyne\\b", "gb-net"}, + {"\\beast\\s+dunbartonshire\\b", "gb-edu"}, + {"\\bwest\\s+dunbartonshire\\b", "gb-wdu"}, + {"\\bliverpool\\s+district\\b", "gb-liv"}, + {"\\bkingston\\s+upon\\s+hull\\b", "gb-khl"}, + {"\\bnorth\\s+lincolnshire\\b", "gb-nln"}, + {"\\btelford\\s+and\\s+wrekin\\b", "gb-tfw"}, + {"\\blondon\\s+borough\\s+of\\b", ""}, + {"\\bkirklees\\s+district\\b", "gb-kir"}, + {"\\bbrighton\\s+and\\s+hove\\b", "gb-bnh"}, + {"\\beast\\s+renfrewshire\\b", "gb-erw"}, + {"\\bcity\\s+of\\s+edinburgh\\b", "gb-edh"}, + {"\\bnorth\\s+lanarkshire\\b", "gb-nlk"}, + {"\\bperth\\s+and\\s+kinross\\b", "gb-pkn"}, + {"\\bsouth\\s+lanarkshire\\b", "gb-slk"}, + {"\\bneath\\s+port\\s+talbot\\b", "gb-ntl"}, + {"\\bnorthamptonshire\\b", "gb-nth"}, + {"\\bbracknell\\s+forest\\b", "gb-brc"}, + {"\\bstockton\\-on\\-tees\\b", "gb-stt"}, + {"\\bclackmannanshire\\b", "gb-clk"}, + {"\\bshetland\\s+islands\\b", "gb-zet"}, + {"\\bisle\\s+of\\s+anglesey\\b", "gb-agy"}, + {"\\bnorthern\\s+ireland\\b", "n.i."}, + {"\\bbuckinghamshire\\b", "gb-bkm"}, + {"\\bgloucestershire\\b", "gb-gls"}, + {"\\bnorth\\s+yorkshire\\b", "gb-nyk"}, + {"\\bnottinghamshire\\b", "gb-ntt"}, + {"\\bsefton\\s+district\\b", "gb-sft"}, + {"\\bcity\\s+of\\s+bristol\\b", "gb-bst"}, + {"\\bsouthend\\-on\\-sea\\b", "gb-sos"}, + {"\\bargyll\\s+and\\s+bute\\b", "gb-agb"}, + {"\\bcarmarthenshire\\b", "gb-cmn"}, + {"\\bcambridgeshire\\b", "gb-cam"}, + {"\\bleicestershire\\b", "gb-lec"}, + {"\\bworcestershire\\b", "gb-wor"}, + {"\\bwaltham\\s+forest\\b", "gb-wft"}, + {"\\bleeds\\s+district\\b", "gb-lds"}, + {"\\bnorth\\s+tyneside\\b", "gb-nty"}, + {"\\bsouth\\s+tyneside\\b", "gb-sty"}, + {"\\bnorth\\s+somerset\\b", "gb-nsm"}, + {"\\bnorthumberland\\b", "gb-nbl"}, + {"\\bstoke\\-on\\-trent\\b", "gb-ste"}, + {"\\bwest\\s+berkshire\\b", "gb-wbk"}, + {"\\bcity\\s+of\\s+london\\b", "gb-lnd"}, + {"\\bnorth\\s+ayrshire\\b", "gb-nay"}, + {"\\borkney\\s+islands\\b", "gb-ork"}, + {"\\bsouth\\s+ayrshire\\b", "gb-say"}, + {"\\bmerthyr\\s+tydfil\\b", "gb-mty"}, + {"\\bhertfordshire\\b", "gb-hrt"}, + {"\\bstaffordshire\\b", "gb-sts"}, + {"\\btower\\s+hamlets\\b", "gb-twh"}, + {"\\bwolverhampton\\b", "gb-wlv"}, + {"\\bcheshire\\s+east\\b", "gb-che"}, + {"\\bcounty\\s+durham\\b", "gb-dur"}, + {"\\bherefordshire\\b", "gb-hef"}, + {"\\bisle\\s+of\\s+wight\\b", "gb-iow"}, + {"\\bmiddlesbrough\\b", "gb-mdb"}, + {"\\bmilton\\s+keynes\\b", "gb-mik"}, + {"\\bcarrickfergus\\b", "gb-ckf"}, + {"\\baberdeen\\s+city\\b", "gb-abe"}, + {"\\baberdeenshire\\b", "gb-abd"}, + {"\\beast\\s+ayrshire\\b", "gb-eay"}, + {"\\bblaenau\\s+gwent\\b", "gb-bgw"}, + {"\\bmonmouthshire\\b", "gb-mon"}, + {"\\bpembrokeshire\\b", "gb-pem"}, + {"\\blincolnshire\\b", "gb-lin"}, + {"\\bwarwickshire\\b", "gb-war"}, + {"\\bpeterborough\\b", "gb-pte"}, + {"\\bnewtownabbey\\b", "gb-nta"}, + {"\\beast\\s+lothian\\b", "gb-eln"}, + {"\\bglasgow\\s+city\\b", "gb-glg"}, + {"\\brenfrewshire\\b", "gb-rfw"}, + {"\\bwest\\s+lothian\\b", "gb-wln"}, + {"\\bdenbighshire\\b", "gb-den"}, + {"\\bfulmodestone\\b", "fulmodeston"}, + {"\\beast\\s+sussex\\b", "gb-esx"}, + {"\\boxfordshire\\b", "gb-oxf"}, + {"\\bwest\\s+sussex\\b", "gb-wsx"}, + {"\\bwestminster\\b", "gb-wsm"}, + {"\\bbournemouth\\b", "gb-bmh"}, + {"\\bsouthampton\\b", "gb-sth"}, + {"\\bcastlereagh\\b", "gb-csr"}, + {"\\bmagherafelt\\b", "gb-mft"}, + {"\\bdundee\\s+city\\b", "gb-dnd"}, + {"\\beilean\\s+siar\\b", "gb-els"}, + {"\\bdunnamanagh\\b", "dunamanagh"}, + {"\\bking\'s\\s+stag\\b", "king stag"}, + {"\\bborough\\s+of\\b", ""}, + {"\\bderbyshire\\b", "gb-dby"}, + {"\\blancashire\\b", "gb-lan"}, + {"\\bhillingdon\\b", "gb-hil"}, + {"\\bwandsworth\\b", "gb-wnd"}, + {"\\bbirmingham\\b", "gb-bir"}, + {"\\bcalderdale\\b", "gb-cld"}, + {"\\bmanchester\\b", "gb-man"}, + {"\\bst\\.\\s+helens\\b", "gb-shn"}, + {"\\bsunderland\\b", "gb-snd"}, + {"\\bdarlington\\b", "gb-dal"}, + {"\\bhartlepool\\b", "gb-hpl"}, + {"\\bnottingham\\b", "gb-ngm"}, + {"\\bportsmouth\\b", "gb-por"}, + {"\\bshropshire\\b", "gb-shr"}, + {"\\bwarrington\\b", "gb-wrt"}, + {"\\bballymoney\\b", "gb-bly"}, + {"\\bnorth\\s+down\\b", "gb-ndn"}, + {"\\binverclyde\\b", "gb-ivc"}, + {"\\bmidlothian\\b", "gb-mln"}, + {"\\bcaerphilly\\b", "gb-cay"}, + {"\\bceredigion\\b", "gb-cgn"}, + {"\\bflintshire\\b", "gb-fln"}, + {"\\bgroes\\-lwyd\\b", "groesllwyd"}, + {"\\bculnacnock\\b", "culnacnoc"}, + {"\\bn\\.\\s+ireland\\b", "n.i."}, + {"\\bboulevard\\b", "blvd"}, + {"\\bhampshire\\b", "gb-ham"}, + {"\\bgreenwich\\b", "gb-gre"}, + {"\\bislington\\b", "gb-isl"}, + {"\\bredbridge\\b", "gb-rdb"}, + {"\\bsouthwark\\b", "gb-swk"}, + {"\\bdoncaster\\b", "gb-dnc"}, + {"\\bgateshead\\b", "gb-gat"}, + {"\\brotherham\\b", "gb-rot"}, + {"\\bsheffield\\b", "gb-shf"}, + {"\\bstockport\\b", "gb-skp"}, + {"\\bwakefield\\b", "gb-wkf"}, + {"\\bblackpool\\b", "gb-bpl"}, + {"\\bleicester\\b", "gb-lce"}, + {"\\bwiltshire\\b", "gb-wil"}, + {"\\bwokingham\\b", "gb-wok"}, + {"\\bballymena\\b", "gb-bla"}, + {"\\bbanbridge\\b", "gb-bnb"}, + {"\\bcoleraine\\b", "gb-clr"}, + {"\\bcookstown\\b", "gb-ckt"}, + {"\\bcraigavon\\b", "gb-cgv"}, + {"\\bfermanagh\\b", "gb-fer"}, + {"\\bn\\.ireland\\b", "n.i."}, + {"\\bn\\s+ireland\\b", "n.i."}, + {"\\bcrescent\\b", "cres"}, + {"\\bdistrict\\b", ""}, + {"\\bsomerset\\b", "gb-som"}, + {"\\bharingey\\b", "gb-hry"}, + {"\\bhavering\\b", "gb-hav"}, + {"\\bhounslow\\b", "gb-hns"}, + {"\\blewisham\\b", "gb-lew"}, + {"\\bbarnsley\\b", "gb-bns"}, + {"\\bbradford\\b", "gb-brd"}, + {"\\bcoventry\\b", "gb-cov"}, + {"\\bknowsley\\b", "gb-kwl"}, + {"\\brochdale\\b", "gb-rch"}, + {"\\bsandwell\\b", "gb-saw"}, + {"\\bsolihull\\b", "gb-sol"}, + {"\\btameside\\b", "gb-tam"}, + {"\\btrafford\\b", "gb-trf"}, + {"\\bcornwall\\b", "gb-con"}, + {"\\bplymouth\\b", "gb-ply"}, + {"\\bthurrock\\b", "gb-thr"}, + {"\\blimavady\\b", "gb-lmv"}, + {"\\bstrabane\\b", "gb-stb"}, + {"\\bhighland\\b", "gb-hld"}, + {"\\bstirling\\b", "gb-stg"}, + {"\\bbridgend\\b", "gb-bge"}, + {"\\bcheshire\\b", "gb-chs"}, + {"\\bhare\\s+law\\b", "harelaw"}, + {"\\bscotland\\b", "gb-sct"}, + {"\\bparkway\\b", "pkwy"}, + {"\\bhighway\\b", "hwy"}, + {"\\bcity\\s+of\\b", ""}, + {"\\bcumbria\\b", "gb-cma"}, + {"\\bnorfolk\\b", "gb-nfk"}, + {"\\bsuffolk\\b", "gb-sfk"}, + {"\\bbromley\\b", "gb-bry"}, + {"\\bcroydon\\b", "gb-cry"}, + {"\\benfield\\b", "gb-enf"}, + {"\\bhackney\\b", "gb-hck"}, + {"\\blambeth\\b", "gb-lbh"}, + {"\\bsalford\\b", "gb-slf"}, + {"\\bwalsall\\b", "gb-wll"}, + {"\\bbedford\\b", "gb-bdf"}, + {"\\breading\\b", "gb-rdg"}, + {"\\brutland\\b", "gb-rut"}, + {"\\bswindon\\b", "gb-swd"}, + {"\\bbelfast\\b", "gb-bfs"}, + {"\\blisburn\\b", "gb-lsb"}, + {"\\bfalkirk\\b", "gb-fal"}, + {"\\bcardiff\\b", "gb-crf"}, + {"\\bgwynedd\\b", "gb-gwn"}, + {"\\bnewport\\b", "gb-nwp"}, + {"\\bswansea\\b", "gb-swa"}, + {"\\btorfaen\\b", "gb-tof"}, + {"\\bwrexham\\b", "gb-wrx"}, + {"\\bengland\\b", "eng"}, + {"\\bavenue\\b", "ave"}, + {"\\bstreet\\b", "st"}, + {"\\bparade\\b", "pde"}, + {"\\bcommon\\b", "comm"}, + {"\\bgb\\-dev\\b", "devon"}, + {"\\bgb\\-dor\\b", "dorset"}, + {"\\bgb\\-ess\\b", "essex"}, + {"\\bgb\\-ken\\b", "kent"}, + {"\\bsurrey\\b", "gb-sry"}, + {"\\bbarnet\\b", "gb-bne"}, + {"\\bgb\\-bex\\b", "bexley"}, + {"\\bgb\\-ben\\b", "brent"}, + {"\\bcamden\\b", "gb-cmd"}, + {"\\bealing\\b", "gb-eal"}, + {"\\bgb\\-hrw\\b", "harrow"}, + {"\\bgb\\-mrt\\b", "merton"}, + {"\\bgb\\-nwm\\b", "newham"}, + {"\\bgb\\-stn\\b", "sutton"}, + {"\\bgb\\-bol\\b", "bolton"}, + {"\\bgb\\-bur\\b", "bury"}, + {"\\bdudley\\b", "gb-dud"}, + {"\\bgb\\-old\\b", "oldham"}, + {"\\bgb\\-wgn\\b", "wigan"}, + {"\\bwirral\\b", "gb-wrl"}, + {"\\bgb\\-der\\b", "derby"}, + {"\\bgb\\-hal\\b", "halton"}, + {"\\bgb\\-lut\\b", "luton"}, + {"\\bgb\\-mdw\\b", "medway"}, + {"\\bgb\\-pol\\b", "poole"}, + {"\\bslough\\b", "gb-slg"}, + {"\\bgb\\-tob\\b", "torbay"}, + {"\\bgb\\-yor\\b", "york"}, + {"\\bantrim\\b", "gb-ant"}, + {"\\bgb\\-ard\\b", "ards"}, + {"\\bgb\\-arm\\b", "armagh"}, + {"\\bgb\\-dry\\b", "derry"}, + {"\\bgb\\-dow\\b", "down"}, + {"\\bgb\\-lrn\\b", "larne"}, + {"\\bgb\\-myl\\b", "moyle"}, + {"\\bgb\\-omh\\b", "omagh"}, + {"\\bgb\\-ans\\b", "angus"}, + {"\\bgb\\-fif\\b", "fife"}, + {"\\bgb\\-mry\\b", "moray"}, + {"\\bgb\\-cwy\\b", "conwy"}, + {"\\bgb\\-pow\\b", "powys"}, + {"\\bgb\\-eng\\b", "eng"}, + {"\\bgb\\-wls\\b", "wales"}, + {"\\bgb\\-nir\\b", "n.i."}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bmount\\b", "mt"}, + {"\\bsaint\\b", "st"}, + {"\\bpoint\\b", "pt"}, + {"\\bcourt\\b", "ct"}, + {"\\bplace\\b", "pl"}, + {"\\bdrive\\b", "dr"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\broad\\b", "rd"}, + {"\\blane\\b", "ln"}, + {"\\bu\\.k\\.\\b", "gb"}, + {"\\bg\\.b\\.\\b", "gb"}, + {"\\bnth\\b", "n"}, + {"\\bsth\\b", "s"}, + {"\\bmt\\.\\b", "mt"}, + {"\\bst\\.\\b", "st"}, + {"\\bpt\\.\\b", "pt"}, + {"\\bu\\.k\\b", "gb"}, + {"\\bg\\.b\\b", "gb"}, + {"\\bn\\.\\b", "n"}, + {"\\bs\\.\\b", "s"}, + {"\\be\\.\\b", "e"}, + {"\\bw\\.\\b", "w"}, + {"\\buk\\b", "gb"}, +}; + +const Rule kRules_GR[] = { + {"\\banatoliki\\s+makedonia\\s+kai\\s+thraki\\b", "a"}, + {"\\baitolia\\s+kai\\s+akarnania\\b", "01"}, + {"\\bkentriki\\s+makedonia\\b", "b"}, + {"\\bdytiki\\s+makedonia\\b", "c"}, + {"\\baitoloakarnania\\b", "01"}, + {"\\bdytiki\\s+ellada\\b", "g"}, + {"\\bsterea\\s+ellada\\b", "h"}, + {"\\bvoreio\\s+aigaio\\b", "k"}, + {"\\bnotio\\s+aigaio\\b", "l"}, + {"\\bpeloponnisos\\b", "j"}, + {"\\bthessaloniki\\b", "54"}, + {"\\bmetamorfossi\\b", "metamorfosi"}, + {"\\bionia\\s+nisia\\b", "f"}, + {"\\bdodekanisos\\b", "81"}, + {"\\bkaissariani\\b", "kesariani"}, + {"\\banatolikos\\b", "e"}, + {"\\bperifereia\\b", "periphery"}, + {"\\bchalkidiki\\b", "64"}, + {"\\bkefallonia\\b", "23"}, + {"\\bthesprotia\\b", "32"}, + {"\\bnomarchia\\b", "nomo"}, + {"\\bthessalia\\b", "e"}, + {"\\bevrytania\\b", "05"}, + {"\\bfthiotida\\b", "06"}, + {"\\bkorinthia\\b", "15"}, + {"\\bzakynthos\\b", "21"}, + {"\\bagio\\s+oros\\b", "69"}, + {"\\bcholargos\\b", "holargos"}, + {"\\bargolida\\b", "11"}, + {"\\bioannina\\b", "33"}, + {"\\birakleio\\b", "91"}, + {"\\bkarditsa\\b", "41"}, + {"\\bkastoria\\b", "56"}, + {"\\bkyklades\\b", "82"}, + {"\\bmagnisia\\b", "43"}, + {"\\bmessinia\\b", "17"}, + {"\\brethymno\\b", "93"}, + {"\\brethymni\\b", "93"}, + {"\\bchaidari\\b", "haidari"}, + {"\\bmaroussi\\b", "marousi"}, + {"\\bkifissia\\b", "kifisia"}, + {"\\bchalkida\\b", "halkida"}, + {"\\bvoreioy\\b", "n"}, + {"\\banatoli\\b", "e"}, + {"\\bdytikos\\b", "w"}, + {"\\bipeiros\\b", "d"}, + {"\\barkadia\\b", "12"}, + {"\\bflorina\\b", "63"}, + {"\\bgrevena\\b", "51"}, + {"\\bimathia\\b", "53"}, + {"\\bkerkyra\\b", "22"}, + {"\\blakonia\\b", "16"}, + {"\\blasithi\\b", "92"}, + {"\\blefkada\\b", "24"}, + {"\\bpreveza\\b", "34"}, + {"\\btrikala\\b", "44"}, + {"\\bvoiotia\\b", "03"}, + {"\\bpiraeus\\b", "pireas"}, + {"\\bpapagos\\b", "papagou"}, + {"\\bvoreio\\b", "n"}, + {"\\bnotioy\\b", "s"}, + {"\\battiki\\b", "i"}, + {"\\bachaia\\b", "13"}, + {"\\bchania\\b", "94"}, + {"\\bevvoia\\b", "04"}, + {"\\bfokida\\b", "07"}, + {"\\bkavala\\b", "55"}, + {"\\bkilkis\\b", "57"}, + {"\\bkozani\\b", "58"}, + {"\\blarisa\\b", "42"}, + {"\\blesvos\\b", "83"}, + {"\\bpieria\\b", "61"}, + {"\\brodopi\\b", "73"}, + {"\\bserres\\b", "62"}, + {"\\bxanthi\\b", "72"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bnotio\\b", "s"}, + {"\\bkriti\\b", "m"}, + {"\\bchios\\b", "85"}, + {"\\bdrama\\b", "52"}, + {"\\bevros\\b", "71"}, + {"\\bileia\\b", "14"}, + {"\\bpella\\b", "59"}, + {"\\bsamos\\b", "84"}, + {"\\bhania\\b", "94"}, + {"\\bkato\\b", "s"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\bdysi\\b", "w"}, + {"\\barta\\b", "31"}, + {"\\bhios\\b", "85"}, + {"\\bano\\b", "n"}, + {"\\ba\\s+1\\b", "i"}, +}; + +const Rule kRules_HK[] = { + {"\\bboulevard\\b", "blvd"}, {"\\bhong\\s+kong\\b", "hk"}, + {"\\bjunction\\b", "jct"}, {"\\bcrescent\\b", "cres"}, + {"\\bdistrict\\b", ""}, {"\\bhongkong\\b", "hk"}, + {"\\bcentral\\b", "c"}, {"\\bseventh\\b", "7"}, + {"\\bparkway\\b", "pkwy"}, {"\\bhighway\\b", "hwy"}, + {"\\bsecond\\b", "2"}, {"\\bfourth\\b", "4"}, + {"\\beighth\\b", "8"}, {"\\bavenue\\b", "ave"}, + {"\\bstreet\\b", "st"}, {"\\bparade\\b", "pde"}, + {"\\bcommon\\b", "comm"}, {"\\bcenter\\b", "centre"}, + {"\\bnorth\\b", "n"}, {"\\bsouth\\b", "s"}, + {"\\bfirst\\b", "1"}, {"\\bthird\\b", "3"}, + {"\\bthree\\b", "3"}, {"\\bfifth\\b", "5"}, + {"\\bsixth\\b", "6"}, {"\\bseven\\b", "7"}, + {"\\beight\\b", "8"}, {"\\bninth\\b", "9"}, + {"\\btenth\\b", "10"}, {"\\bmount\\b", "mt"}, + {"\\bsaint\\b", "st"}, {"\\bpoint\\b", "pt"}, + {"\\bcourt\\b", "ct"}, {"\\bplace\\b", "pl"}, + {"\\bdrive\\b", "dr"}, {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, {"\\bfour\\b", "4"}, + {"\\bfive\\b", "5"}, {"\\bnine\\b", "9"}, + {"\\broad\\b", "rd"}, {"\\blane\\b", "ln"}, + {"\\bnth\\b", "n"}, {"\\bsth\\b", "s"}, + {"\\bone\\b", "1"}, {"\\btwo\\b", "2"}, + {"\\bsix\\b", "6"}, {"\\bten\\b", "10"}, + {"\\bh\\s+k\\b", "hk"}, +}; + +const Rule kRules_ID[] = { + {"\\bspecial\\s+region\\s+of\\s+yogyakarta\\b", "yo"}, + {"\\bnanggroe\\s+aceh\\s+darussalam\\b", "ac"}, + {"\\bnaggroe\\s+aceh\\s+darussalam\\b", "ac"}, + {"\\bbangka\\s+belitung\\s+islands\\b", "bb"}, + {"\\bspecial\\s+region\\s+of\\s+papua\\b", "pa"}, + {"\\bspecial\\s+region\\s+of\\s+aceh\\b", "ac"}, + {"\\bcentral\\s+kalimantan\\b", "kt"}, + {"\\bsoutheast\\s+sulawesi\\b", "sg"}, + {"\\bcentral\\s+sulawesi\\b", "st"}, + {"\\bbangka\\s+belitung\\b", "bb"}, + {"\\bjakarta\\s+pusat\\b", "jk"}, + {"\\bjakarta\\s+utara\\b", "jk"}, + {"\\bcentral\\s+java\\b", "jt"}, + {"\\briau\\s+islands\\b", "kr"}, + {"\\bjawa\\s+tengah\\b", "jt"}, + {"\\bdki\\s+jakarta\\b", "jk"}, + {"\\byogyakarta\\b", "yo"}, + {"\\bgorontalo\\b", "go"}, + {"\\bindonesia\\b", "id"}, + {"\\bnational\\b", "nasional"}, + {"\\bbengkulu\\b", "be"}, + {"\\bselatan\\b", "s"}, + {"\\bjakarta\\b", "jk"}, + {"\\blampung\\b", "la"}, + {"\\bbanten\\b", "bt"}, + {"\\bmaluku\\b", "ma"}, + {"\\bnumber\\b", "#"}, + {"\\bnorth\\b", "n"}, + {"\\butara\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\btimur\\b", "e"}, + {"\\bbarat\\b", "w"}, + {"\\bxviii\\b", "18"}, + {"\\bjalan\\b", "jl"}, + {"\\bjambi\\b", "ja"}, + {"\\bpapua\\b", "pa"}, + {"\\bblock\\b", "blk"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\bviii\\b", "8"}, + {"\\bxiii\\b", "13"}, + {"\\bxvii\\b", "17"}, + {"\\bjln\\.\\b", "jl"}, + {"\\broad\\b", "rd"}, + {"\\baceh\\b", "ac"}, + {"\\bbali\\b", "ba"}, + {"\\briau\\b", "ri"}, + {"\\bblok\\b", "blk"}, + {"\\bblk\\.\\b", "blk"}, + {"\\biii\\b", "3"}, + {"\\bvii\\b", "7"}, + {"\\bxii\\b", "12"}, + {"\\bxiv\\b", "14"}, + {"\\bxvi\\b", "16"}, + {"\\bxix\\b", "19"}, + {"\\bjl\\.\\b", "jl"}, + {"\\bjln\\b", "jl"}, + {"\\bnum\\b", "#"}, + {"\\bno\\.\\b", "#"}, + {"\\bii\\b", "2"}, + {"\\biv\\b", "4"}, + {"\\bvi\\b", "6"}, + {"\\bix\\b", "9"}, + {"\\b10\\b", "x"}, + {"\\b11\\b", "xi"}, + {"\\b15\\b", "xv"}, + {"\\b20\\b", "xx"}, + {"\\bno\\b", "#"}, + {"\\bi\\b", "1"}, + {"\\bv\\b", "5"}, +}; + +const Rule kRules_IE[] = { + {"\\broscommon\\b", "rn"}, {"\\btipperary\\b", "ty"}, + {"\\bwaterford\\b", "wd"}, {"\\bwestmeath\\b", "wh"}, + {"\\bkilkenny\\b", "kk"}, {"\\blimerick\\b", "lk"}, + {"\\blongford\\b", "ld"}, {"\\bmonaghan\\b", "mn"}, + {"\\bterrace\\b", "tce"}, {"\\bdonegal\\b", "dl"}, + {"\\bkildare\\b", "ke"}, {"\\bleitrim\\b", "lm"}, + {"\\bwexford\\b", "wx"}, {"\\bwicklow\\b", "ww"}, + {"\\bireland\\b", "ie"}, {"\\bavenue\\b", "ave"}, + {"\\bcenter\\b", "cntr"}, {"\\bstreet\\b", "st"}, + {"\\bcounty\\b", "co"}, {"\\bcarlow\\b", "cw"}, + {"\\bdublin\\b", "d"}, {"\\bgalway\\b", "g"}, + {"\\blaoise\\b", "ls"}, {"\\boffaly\\b", "oy"}, + {"\\bnorth\\b", "n"}, {"\\bsouth\\b", "s"}, + {"\\bsaint\\b", "st"}, {"\\bcourt\\b", "ct"}, + {"\\bdrive\\b", "dr"}, {"\\bplace\\b", "pl"}, + {"\\bcavan\\b", "cn"}, {"\\bclare\\b", "ce"}, + {"\\bkerry\\b", "ky"}, {"\\blaois\\b", "ls"}, + {"\\blouth\\b", "lh"}, {"\\bmeath\\b", "mh"}, + {"\\bsligo\\b", "so"}, {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, {"\\blane\\b", "ln"}, + {"\\broad\\b", "rd"}, {"\\bwalk\\b", "wk"}, + {"\\byard\\b", "yd"}, {"\\bcork\\b", "co"}, + {"\\bmayo\\b", "mo"}, {"\\bway\\b", "wy"}, + {"\\bdn\\b", "d"}, {"\\bta\\b", "ty"}, + {"\\bgy\\b", "g"}, {"\\bck\\b", "co"}, +}; + +const Rule kRules_IN[] = { + {"\\bthiruvananthapuram\\b", "tvpm"}, + {"\\bazimabad\\s+kusumpur\\b", "patna"}, + {"\\btiruvananthapuram\\b", "tvpm"}, + {"\\bjammu\\s+and\\s+kashmir\\b", "j&k"}, + {"\\bchandigarh\\s+city\\b", "ch"}, + {"\\bjammu\\s+\\&\\s+kashmir\\b", "j&k"}, + {"\\bgovt\\s+of\\s+india\\b", "goi"}, + {"\\binternational\\b", "intl"}, + {"\\bvisakhapatnam\\b", "vskp"}, + {"\\bchikmagaluru\\b", "chicmagalur"}, + {"\\bchickmagalur\\b", "chicmagalur"}, + {"\\bpataliputra\\b", "patna"}, + {"\\bchikmagalur\\b", "chicmagalur"}, + {"\\branga\\s+reddy\\b", "rangareddi"}, + {"\\bcross\\-roads\\b", "xrd"}, + {"\\bgovernment\\b", "goi"}, + {"\\buniversity\\b", "uni"}, + {"\\bpatliputra\\b", "patna"}, + {"\\bvijayawada\\b", "bza"}, + {"\\bchandigarh\\b", "ch"}, + {"\\bcross\\-road\\b", "xrd"}, + {"\\bcrossroads\\b", "xrd"}, + {"\\bcrossroad\\b", "xrd"}, + {"\\bbangalore\\b", "blr"}, + {"\\bbengaluru\\b", "blr"}, + {"\\bhyderabad\\b", "hyd"}, + {"\\bahmedabad\\b", "ahd"}, + {"\\bvijaywada\\b", "bza"}, + {"\\bchar\\-rast\\b", "chaurah"}, + {"\\bchaurasta\\b", "chaurah"}, + {"\\bchourasta\\b", "chaurah"}, + {"\\bi\\.n\\.d\\.i\\.a\\b", "in"}, + {"\\bcrossrds\\b", "xrd"}, + {"\\bcalcutta\\b", "kol"}, + {"\\bkolkatta\\b", "kol"}, + {"\\bvaranasi\\b", "benaras"}, + {"\\bjunction\\b", "jn."}, + {"\\bcrossing\\b", "xrd"}, + {"\\bchowrast\\b", "chaurah"}, + {"\\bchourast\\b", "chaurah"}, + {"\\bseventh\\b", "7"}, + {"\\bcollege\\b", "clg"}, + {"\\bgateway\\b", "gtwy"}, + {"\\bheights\\b", "hts"}, + {"\\bcrossrd\\b", "xrd"}, + {"\\bx\\s+roads\\b", "xrd"}, + {"\\bkolkata\\b", "kol"}, + {"\\bkolkota\\b", "kol"}, + {"\\bchennai\\b", "che"}, + {"\\bamdavad\\b", "ahd"}, + {"\\bbanaras\\b", "benaras"}, + {"\\bkeralam\\b", "kl"}, + {"\\bvruttha\\b", "cir."}, + {"\\bsecond\\b", "2"}, + {"\\bfourth\\b", "4"}, + {"\\beighth\\b", "8"}, + {"\\bcentre\\b", "ctr"}, + {"\\bcenter\\b", "ctr"}, + {"\\bforest\\b", "frst"}, + {"\\bgarden\\b", "gdn"}, + {"\\bgatway\\b", "gtwy"}, + {"\\bgatewy\\b", "gtwy"}, + {"\\bheight\\b", "hts"}, + {"\\bx\\s+road\\b", "xrd"}, + {"\\bxroads\\b", "xrd"}, + {"\\bstreet\\b", "st"}, + {"\\braasta\\b", "rasta"}, + {"\\bnumber\\b", "#"}, + {"\\bmumbai\\b", "bom"}, + {"\\bbombay\\b", "bom"}, + {"\\bmadras\\b", "che"}, + {"\\bkerala\\b", "kl"}, + {"\\bchowdi\\b", "chok"}, + {"\\bcircle\\b", "cir."}, + {"\\bkavala\\b", "jn."}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bfirst\\b", "1"}, + {"\\bthird\\b", "3"}, + {"\\bfifth\\b", "5"}, + {"\\bsixth\\b", "6"}, + {"\\bninth\\b", "9"}, + {"\\btenth\\b", "10"}, + {"\\bcnter\\b", "ctr"}, + {"\\bcentr\\b", "ctr"}, + {"\\bgardn\\b", "gdn"}, + {"\\bgrden\\b", "gdn"}, + {"\\bgtway\\b", "gtwy"}, + {"\\bxroad\\b", "xrd"}, + {"\\broute\\b", "rt"}, + {"\\bgalli\\b", "gali"}, + {"\\bpally\\b", "palli"}, + {"\\bdelhi\\b", "del"}, + {"\\bvizag\\b", "vskp"}, + {"\\bj\\s+\\&\\s+k\\b", "j&k"}, + {"\\bchowk\\b", "chok"}, + {"\\bchauk\\b", "chok"}, + {"\\bchouk\\b", "chok"}, + {"\\bround\\b", "cir."}, + {"\\bnaaka\\b", "jn."}, + {"\\bmukku\\b", "jn."}, + {"\\bindia\\b", "in"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\bcntr\\b", "ctr"}, + {"\\bcent\\b", "ctr"}, + {"\\bgrdn\\b", "gdn"}, + {"\\bhgts\\b", "hts"}, + {"\\bhght\\b", "hts"}, + {"\\buniv\\b", "uni"}, + {"\\bxrds\\b", "xrd"}, + {"\\broad\\b", "rd"}, + {"\\bstr\\.\\b", "st"}, + {"\\bgarh\\b", "gad"}, + {"\\bpeth\\b", "pet"}, + {"\\bj\\s+\\&k\\b", "j&k"}, + {"\\bjct\\.\\b", "jn."}, + {"\\bjnct\\b", "jn."}, + {"\\bx\\-rd\\b", "xrd"}, + {"\\brnd\\.\\b", "cir."}, + {"\\bcen\\b", "ctr"}, + {"\\bst\\.\\b", "st"}, + {"\\bstr\\b", "st"}, + {"\\brte\\b", "rt"}, + {"\\bnum\\b", "#"}, + {"\\bno\\.\\b", "#"}, + {"\\bmum\\b", "bom"}, + {"\\bcha\\b", "ch"}, + {"\\bno\\b", "#"}, +}; + +const Rule kRules_IT[] = { + {"\\bfriuli\\s+venezia\\s+giulia\\b", "36"}, + {"\\bbarletta\\s+andria\\s+trani\\b", "bt"}, + {"\\bverbano\\s+cusio\\s+ossola\\b", "vb"}, + {"\\btrentino\\s+alto\\s+adige\\b", "32"}, + {"\\bstrada\\s+provinciale\\b", "sp"}, + {"\\btrentino\\s+sudtirol\\b", "32"}, + {"\\bcarbonia\\s+iglesias\\b", "ci"}, + {"\\bventiquattresimo\\b", "24"}, + {"\\bstrada\\s+regionale\\b", "sr"}, + {"\\bquattordicesimo\\b", "14"}, + {"\\bdiciassettesimo\\b", "17"}, + {"\\bventicinquesimo\\b", "25"}, + {"\\bstrada\\s+comunale\\b", "sc"}, + {"\\bmedio\\s+campidano\\b", "vs"}, + {"\\bmonza\\s+e\\s+brianza\\b", "mb"}, + {"\\bpesaro\\s+e\\s+urbino\\b", "pu"}, + {"\\breggio\\s+calabria\\b", "rc"}, + {"\\bdiciannovesimo\\b", "19"}, + {"\\bventisettesimo\\b", "27"}, + {"\\bstrada\\s+statali\\b", "ss"}, + {"\\bemilia\\s+romagna\\b", "45"}, + {"\\bvallee\\s+d\\s+aoste\\b", "23"}, + {"\\bventitreesimo\\b", "23"}, + {"\\bventinovesimo\\b", "29"}, + {"\\bvalle\\s+d\\s+aosta\\b", "23"}, + {"\\bascoli\\s+piceno\\b", "ap"}, + {"\\bcaltanissetta\\b", "cl"}, + {"\\bmassa\\s+carrara\\b", "ms"}, + {"\\breggio\\s+emilia\\b", "re"}, + {"\\bvibo\\s+valentia\\b", "vv"}, + {"\\bventiquattro\\b", "24"}, + {"\\bquindicesimo\\b", "xv"}, + {"\\bdiciottesimo\\b", "18"}, + {"\\bventiduesimo\\b", "22"}, + {"\\bventottesimo\\b", "28"}, + {"\\bforli\\s+cesena\\b", "fc"}, + {"\\bolbia\\s+tempio\\b", "ot"}, + {"\\bquattordici\\b", "14"}, + {"\\bdiciassette\\b", "17"}, + {"\\bventicinque\\b", "25"}, + {"\\btredicesimo\\b", "13"}, + {"\\bventunesimo\\b", "21"}, + {"\\bventisesimo\\b", "26"}, + {"\\bvalle\\s+aosta\\b", "23"}, + {"\\balessandria\\b", ""}, + {"\\bdiciannove\\b", "19"}, + {"\\bventisette\\b", "27"}, + {"\\bundicesimo\\b", "xi"}, + {"\\bdodicesimo\\b", "12"}, + {"\\bsedicesimo\\b", "16"}, + {"\\btrentesimo\\b", "30"}, + {"\\breggimento\\b", "rgt"}, + {"\\bbasilicata\\b", "77"}, + {"\\bcampobasso\\b", "cb"}, + {"\\bventinove\\b", "29"}, + {"\\bventesimo\\b", "20"}, + {"\\blombardia\\b", "25"}, + {"\\bagrigento\\b", "ag"}, + {"\\bbenevento\\b", "bn"}, + {"\\bcatanzaro\\b", "cz"}, + {"\\bfrosinone\\b", "fr"}, + {"\\bla\\s+spezia\\b", "sp"}, + {"\\bogliastra\\b", "og"}, + {"\\bpordenone\\b", "pn"}, + {"\\bquindici\\b", "xv"}, + {"\\bdiciotto\\b", "18"}, + {"\\bventidue\\b", "22"}, + {"\\bventitre\\b", "23"}, + {"\\bventisei\\b", "26"}, + {"\\bventotto\\b", "28"}, + {"\\btraversa\\b", "trav"}, + {"\\bcalabria\\b", "78"}, + {"\\bcampania\\b", "72"}, + {"\\bpiemonte\\b", "21"}, + {"\\bsardegna\\b", "88"}, + {"\\bavellino\\b", "av"}, + {"\\bbrindisi\\b", "br"}, + {"\\bcagliari\\b", "ca"}, + {"\\bgrosseto\\b", "gr"}, + {"\\bl\\s+aquila\\b", "aq"}, + {"\\bmacerata\\b", "mc"}, + {"\\boristano\\b", "or"}, + {"\\bpiacenza\\b", "pc"}, + {"\\bsiracusa\\b", "sr"}, + {"\\bvercelli\\b", "vc"}, + {"\\bquattro\\b", "4"}, + {"\\btredici\\b", "13"}, + {"\\bventuno\\b", "21"}, + {"\\bsecondo\\b", "2"}, + {"\\bsettimo\\b", "7"}, + {"\\babruzzo\\b", "65"}, + {"\\bliguria\\b", "42"}, + {"\\bsicilia\\b", "82"}, + {"\\btoscana\\b", "52"}, + {"\\bbelluno\\b", "bl"}, + {"\\bbergamo\\b", "bg"}, + {"\\bbologna\\b", "bo"}, + {"\\bbolzano\\b", "bz"}, + {"\\bbrescia\\b", "bs"}, + {"\\bcaserta\\b", "ce"}, + {"\\bcatania\\b", "ct"}, + {"\\bcosenza\\b", "cs"}, + {"\\bcremona\\b", "cr"}, + {"\\bcrotone\\b", "kr"}, + {"\\bferrara\\b", "fe"}, + {"\\bfirenze\\b", "fi"}, + {"\\bgorizia\\b", "go"}, + {"\\bimperia\\b", "im"}, + {"\\bisernia\\b", "is"}, + {"\\blivorno\\b", "li"}, + {"\\bmantova\\b", "mn"}, + {"\\bmessina\\b", "me"}, + {"\\bpalermo\\b", "pa"}, + {"\\bperugia\\b", "pg"}, + {"\\bpescara\\b", "pe"}, + {"\\bpistoia\\b", "pt"}, + {"\\bpotenza\\b", "pz"}, + {"\\bravenna\\b", "ra"}, + {"\\bsalerno\\b", "sa"}, + {"\\bsassari\\b", "ss"}, + {"\\bsondrio\\b", "so"}, + {"\\btaranto\\b", "ta"}, + {"\\btrapani\\b", "tp"}, + {"\\btreviso\\b", "tv"}, + {"\\btrieste\\b", "ts"}, + {"\\bvenezia\\b", "ve"}, + {"\\bvicenza\\b", "6"}, + {"\\bviterbo\\b", "vt"}, + {"\\bxxviii\\b", "28"}, + {"\\bcinque\\b", "5"}, + {"\\bundici\\b", "xi"}, + {"\\bdodici\\b", "12"}, + {"\\bsedici\\b", "16"}, + {"\\btrenta\\b", "30"}, + {"\\bquarto\\b", "4"}, + {"\\bquinto\\b", "5"}, + {"\\bottavo\\b", "8"}, + {"\\bdecimo\\b", "x"}, + {"\\bmarche\\b", "57"}, + {"\\bmolise\\b", "67"}, + {"\\bpuglia\\b", "75"}, + {"\\bumbria\\b", "55"}, + {"\\bveneto\\b", "34"}, + {"\\bancona\\b", "an"}, + {"\\barezzo\\b", "ar"}, + {"\\bbiella\\b", "bi"}, + {"\\bchieti\\b", "ch"}, + {"\\bfoggia\\b", "fg"}, + {"\\bgenova\\b", "ge"}, + {"\\blatina\\b", "lt"}, + {"\\bmatera\\b", "mt"}, + {"\\bmilano\\b", "mi"}, + {"\\bmodena\\b", "mo"}, + {"\\bnapoli\\b", "na"}, + {"\\bnovara\\b", "no"}, + {"\\bpadova\\b", "pd"}, + {"\\bragusa\\b", "rg"}, + {"\\brimini\\b", "rn"}, + {"\\brovigo\\b", "ro"}, + {"\\bsavona\\b", "sv"}, + {"\\bteramo\\b", "te"}, + {"\\btorino\\b", "to"}, + {"\\btrento\\b", "tn"}, + {"\\bvarese\\b", "va"}, + {"\\bverona\\b", "vr"}, + {"\\bitalia\\b", "it"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bovest\\b", "o"}, + {"\\bxviii\\b", "18"}, + {"\\bxxiii\\b", "23"}, + {"\\bxxvii\\b", "27"}, + {"\\bsette\\b", "7"}, + {"\\bdieci\\b", "x"}, + {"\\bventi\\b", "20"}, + {"\\bprimo\\b", ""}, + {"\\bterzo\\b", "3"}, + {"\\bsesto\\b", "6"}, + {"\\bdallo\\b", ""}, + {"\\bdello\\b", ""}, + {"\\bnello\\b", ""}, + {"\\bsullo\\b", ""}, + {"\\bdagli\\b", ""}, + {"\\bdegli\\b", ""}, + {"\\bnegli\\b", ""}, + {"\\bsugli\\b", ""}, + {"\\bdalla\\b", ""}, + {"\\bdella\\b", ""}, + {"\\bnella\\b", ""}, + {"\\bsulla\\b", ""}, + {"\\bdalle\\b", ""}, + {"\\bdelle\\b", ""}, + {"\\bnelle\\b", ""}, + {"\\bsulle\\b", ""}, + {"\\blazio\\b", "62"}, + {"\\baosta\\b", "ao"}, + {"\\baoste\\b", "ao"}, + {"\\bbozen\\b", "bz"}, + {"\\bcuneo\\b", "cn"}, + {"\\bfermo\\b", "fm"}, + {"\\blecce\\b", ""}, + {"\\blecco\\b", "lc"}, + {"\\blucca\\b", "lu"}, + {"\\bnuoro\\b", "nu"}, + {"\\bparma\\b", "pr"}, + {"\\bpavia\\b", "pv"}, + {"\\bprato\\b", "po"}, + {"\\brieti\\b", "ri"}, + {"\\bsiena\\b", "si"}, + {"\\bterni\\b", "tr"}, + {"\\budine\\b", "ud"}, + {"\\bitaly\\b", "it"}, + {"\\bnord\\b", "n"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "o"}, + {"\\bviii\\b", "8"}, + {"\\bxiii\\b", "13"}, + {"\\bxvii\\b", "17"}, + {"\\bxxii\\b", "22"}, + {"\\bxxiv\\b", "24"}, + {"\\bxxvi\\b", "26"}, + {"\\bxxix\\b", "29"}, + {"\\botto\\b", "8"}, + {"\\bnove\\b", "9"}, + {"\\bnono\\b", "9"}, + {"\\ballo\\b", ""}, + {"\\bdall\\b", ""}, + {"\\bdell\\b", ""}, + {"\\bnell\\b", ""}, + {"\\bsull\\b", ""}, + {"\\bagli\\b", ""}, + {"\\balla\\b", ""}, + {"\\balle\\b", ""}, + {"\\basti\\b", "at"}, + {"\\bbari\\b", "ba"}, + {"\\bcomo\\b", "co"}, + {"\\benna\\b", ""}, + {"\\blodi\\b", ""}, + {"\\bpisa\\b", "pi"}, + {"\\broma\\b", "rm"}, + {"\\bsud\\b", "s"}, + {"\\best\\b", "e"}, + {"\\biii\\b", "3"}, + {"\\bvii\\b", "7"}, + {"\\bxii\\b", "12"}, + {"\\bxiv\\b", "14"}, + {"\\bxvi\\b", "16"}, + {"\\bxix\\b", "19"}, + {"\\bxxi\\b", "21"}, + {"\\bxxv\\b", "25"}, + {"\\bxxx\\b", "30"}, + {"\\buno\\b", ""}, + {"\\bdue\\b", "2"}, + {"\\btre\\b", "3"}, + {"\\bsei\\b", "6"}, + {"\\bdal\\b", ""}, + {"\\bdel\\b", ""}, + {"\\bnel\\b", ""}, + {"\\bsul\\b", ""}, + {"\\ball\\b", ""}, + {"\\bdai\\b", ""}, + {"\\bdei\\b", ""}, + {"\\bnei\\b", ""}, + {"\\bsui\\b", ""}, + {"\\bgli\\b", ""}, + {"\\bles\\b", ""}, + {"\\bii\\b", "2"}, + {"\\biv\\b", "4"}, + {"\\bvi\\b", "6"}, + {"\\bix\\b", "9"}, + {"\\b10\\b", "x"}, + {"\\b11\\b", "xi"}, + {"\\b15\\b", "xv"}, + {"\\bxx\\b", "20"}, + {"\\bda\\b", ""}, + {"\\bdi\\b", ""}, + {"\\bin\\b", ""}, + {"\\bsu\\b", ""}, + {"\\bal\\b", ""}, + {"\\bai\\b", ""}, + {"\\bil\\b", ""}, + {"\\blo\\b", ""}, + {"\\bla\\b", ""}, + {"\\ble\\b", ""}, + {"\\ben\\b", ""}, + {"\\bw\\b", "o"}, + {"\\bi\\b", ""}, + {"\\bv\\b", "5"}, + {"\\ba\\b", ""}, + {"\\bd\\b", ""}, + {"\\bl\\b", ""}, +}; + +const Rule kRules_LU[] = { + {"\\berpeldange\\s+\\-\\s+lez\\s+\\-\\s+bous\\b", "erpeldange"}, + {"\\bhostert\\s+niederanven\\b", "hostert"}, + {"\\bgoebelsmuehle\\b", "goebelsmuhle"}, + {"\\bbuederscheid\\b", "buderscheid"}, + {"\\bschwebsingen\\b", "schwebsange"}, + {"\\brammeldange\\b", "rameldange"}, + {"\\blexembourg\\b", "lu"}, + {"\\bcul\\-de\\-sac\\b", "cds"}, + {"\\bcul\\s+de\\s+sac\\b", "cds"}, + {"\\brond\\-point\\b", "rdpt"}, + {"\\bgeyershaff\\b", "geyershof"}, + {"\\bluxembourg\\b", "lu"}, + {"\\bluxemburg\\b", "lu"}, + {"\\bboulevard\\b", "boul"}, + {"\\bcarrefour\\b", "carref"}, + {"\\bcroissant\\b", "crois"}, + {"\\bdiversion\\b", "divers"}, + {"\\bechangeur\\b", "ech"}, + {"\\besplanade\\b", "esp"}, + {"\\bpromenade\\b", "prom"}, + {"\\bterrasse\\b", "tsse"}, + {"\\bcapellen\\b", "cap"}, + {"\\bstrasse\\b", "str"}, + {"\\bcircuit\\b", "circt"}, + {"\\bimpasse\\b", "imp"}, + {"\\bplateau\\b", "plat"}, + {"\\bsentier\\b", "sent"}, + {"\\bavenue\\b", "av"}, + {"\\bcentre\\b", "c"}, + {"\\bcenter\\b", "c"}, + {"\\bchemin\\b", "ch"}, + {"\\bpointe\\b", "pte"}, + {"\\bruelle\\b", "rle"}, + {"\\bcarre\\b", "car"}, + {"\\bcourt\\b", "crt"}, + {"\\bdrive\\b", "dr"}, + {"\\bpoint\\b", "pt"}, + {"\\broute\\b", "rte"}, + {"\\bespl\\b", "esp"}, + {"\\bave\\b", "av"}, + {"\\bctr\\b", "c"}, + {"\\brue\\b", "r"}, + {"\\bdes\\b", ""}, + {"\\blux\\b", "lu"}, + {"\\bde\\b", ""}, + {"\\bdu\\b", ""}, + {"\\bd\\b", ""}, +}; + +const Rule kRules_MX[] = { + {"\\bcoahuila\\s+de\\s+zaragoza\\b", "coahuila"}, + {"\\bbaja\\s+california\\s+sur\\b", "b c s"}, + {"\\bestado\\s+de\\s+mexico\\b", "me"}, + {"\\bbaja\\s+california\\b", "b c"}, + {"\\baguascalientes\\b", "ag"}, + {"\\bveracruz\\s+llave\\b", "veracruz"}, + {"\\bprolongacion\\b", "prol"}, + {"\\bquintana\\s+roo\\b", "qr"}, + {"\\bdiecisiete\\b", "17"}, + {"\\bdiecinueve\\b", "19"}, + {"\\bgobernador\\b", "gob"}, + {"\\blicenciado\\b", "lic"}, + {"\\bpresbitero\\b", "pbro"}, + {"\\bsan\\s+isidro\\b", "s isidro"}, + {"\\bseptiembre\\b", "sept"}, + {"\\bguanajuato\\b", "gt"}, + {"\\bdieciseis\\b", "16"}, + {"\\bdieciocho\\b", "18"}, + {"\\bfrancisco\\b", "fco"}, + {"\\bingeniero\\b", "ing"}, + {"\\brepublica\\b", "rep"}, + {"\\bponiente\\b", "pte"}, + {"\\bprofesor\\b", "prof"}, + {"\\barticulo\\b", "art"}, + {"\\bhacienda\\b", "hda"}, + {"\\bsan\\s+juan\\b", "s juan"}, + {"\\bguerrero\\b", "gr"}, + {"\\boriente\\b", "ote"}, + {"\\bprimera\\b", "1a"}, + {"\\bsegunda\\b", "2a"}, + {"\\btercera\\b", "3a"}, + {"\\bseptima\\b", "7a"}, + {"\\bcatorce\\b", "14"}, + {"\\bcaptain\\b", "cap"}, + {"\\bgeneral\\b", "gral"}, + {"\\bfebrero\\b", "feb"}, + {"\\bprivada\\b", "priv"}, + {"\\bavenida\\b", "av"}, + {"\\bhidalgo\\b", "hg"}, + {"\\bjalisco\\b", "ja"}, + {"\\bsinaloa\\b", "si"}, + {"\\bcuarta\\b", "4a"}, + {"\\bquinta\\b", "5a"}, + {"\\boctava\\b", "8a"}, + {"\\bcuatro\\b", "4"}, + {"\\bquince\\b", "15"}, + {"\\bveinte\\b", "20"}, + {"\\bdoctor\\b", "dr"}, + {"\\bciudad\\b", "cd"}, + {"\\bpuerto\\b", "pto"}, + {"\\bmexico\\b", "me"}, + {"\\bmx\\s+mex\\b", "me"}, + {"\\boaxaca\\b", "oa"}, + {"\\bpuebla\\b", "pu"}, + {"\\bnorte\\b", "nte"}, + {"\\boeste\\b", "pte"}, + {"\\bsexta\\b", "6a"}, + {"\\bcinco\\b", "5"}, + {"\\bsiete\\b", "7"}, + {"\\bnueve\\b", "9"}, + {"\\btrece\\b", "13"}, + {"\\bmaria\\b", "ma"}, + {"\\bsanta\\b", "sta"}, + {"\\bq\\s+roo\\b", "qr"}, + {"\\beste\\b", "ote"}, + {"\\btres\\b", "3"}, + {"\\bseis\\b", "6"}, + {"\\bocho\\b", "8"}, + {"\\bdiez\\b", "10"}, + {"\\bonce\\b", "11"}, + {"\\bdoce\\b", "12"}, + {"\\buno\\b", "1"}, + {"\\bdos\\b", "2"}, + {"\\blos\\b", ""}, + {"\\blas\\b", ""}, + {"\\bdel\\b", ""}, + {"\\bags\\b", "ag"}, + {"\\bq\\s+r\\b", "qr"}, + {"\\ble\\b", ""}, + {"\\bel\\b", ""}, + {"\\bde\\b", ""}, + {"\\bmx\\b", "me"}, +}; + +const Rule kRules_MY[] = { + {"\\bmalaysia\\b", "my"}, +}; + +const Rule kRules_NL[] = { + {"\\bwesterhaar\\s+vriezenveensewijk\\b", "westerhaar-vriezenv wijk"}, + {"\\bnoord\\-brabant\\b", "nb"}, + {"\\bnoord\\-holland\\b", "nh"}, + {"\\bnoord\\s+brabant\\b", "nb"}, + {"\\bnoord\\s+holland\\b", "nh"}, + {"\\bburgemeester\\b", "burg"}, + {"\\bs\\s+gravenhage\\b", "sgravenhage"}, + {"\\balphen\\s+chaam\\b", "ac"}, + {"\\bnoordbrabant\\b", "nb"}, + {"\\bzuid\\-holland\\b", "zh"}, + {"\\bzuid\\s+holland\\b", "zh"}, + {"\\bmonseigneur\\b", "mgr"}, + {"\\bnordholland\\b", "nh"}, + {"\\bzuidholland\\b", "zh"}, + {"\\bnetherlands\\b", "nl"}, + {"\\bnoordzijde\\b", "nz"}, + {"\\bgelderland\\b", "ge"}, + {"\\boverijssel\\b", "ov"}, + {"\\bprofessor\\b", "prof"}, + {"\\bzuidzijde\\b", "zz"}, + {"\\boostzijde\\b", "oz"}, + {"\\bwestzijde\\b", "wz"}, + {"\\brotterdam\\b", "rt"}, + {"\\bflevoland\\b", "fl"}, + {"\\bfriesland\\b", "fr"}, + {"\\bgroningen\\b", "gr"}, + {"\\bnederland\\b", "nl"}, + {"\\bdominee\\b", "ds"}, + {"\\bmeester\\b", "mr"}, + {"\\bzevende\\b", "7"}, + {"\\bachtste\\b", "8"}, + {"\\bnegende\\b", "9"}, + {"\\baan\\s+den\\b", "ad"}, + {"\\bdrenthe\\b", "dr"}, + {"\\blimburg\\b", "l"}, + {"\\butrecht\\b", "u"}, + {"\\bzeeland\\b", "z"}, + {"\\bdoctor\\b", "dr"}, + {"\\beerste\\b", "1"}, + {"\\btweede\\b", "2"}, + {"\\bvierde\\b", "4"}, + {"\\bvijfde\\b", "5"}, + {"\\bstraat\\b", "str"}, + {"\\baan\\s+de\\b", "ad"}, + {"\\bderde\\b", "3"}, + {"\\bzesde\\b", "6"}, + {"\\bnl\\-dr\\b", "dr"}, + {"\\bnl\\-fl\\b", "fl"}, + {"\\bnl\\-fr\\b", "fr"}, + {"\\bnl\\-ge\\b", "ge"}, + {"\\bnl\\-gr\\b", "gr"}, + {"\\bnl\\-li\\b", "l"}, + {"\\bnl\\-nb\\b", "nb"}, + {"\\bnl\\-nh\\b", "nh"}, + {"\\bnl\\-ov\\b", "ov"}, + {"\\bnl\\-zh\\b", "zh"}, + {"\\bnl\\-ut\\b", "u"}, + {"\\bnl\\-ze\\b", "z"}, + {"\\bsint\\b", "st"}, + {"\\bn\\s+z\\b", "nz"}, + {"\\bz\\s+z\\b", "zz"}, + {"\\bo\\s+z\\b", "oz"}, + {"\\bw\\s+z\\b", "wz"}, + {"\\ba\\s+d\\b", "ad"}, + {"\\bgld\\b", "ge"}, + {"\\bzld\\b", "z"}, + {"\\bgl\\b", "ge"}, + {"\\bgn\\b", "gr"}, + {"\\bli\\b", "l"}, + {"\\blb\\b", "l"}, + {"\\but\\b", "u"}, + {"\\bze\\b", "z"}, + {"\\bzl\\b", "z"}, + {"\\b\\#\\b", ""}, +}; + +const Rule kRules_NZ[] = { + {"\\brural\\s+delivery\\b", ""}, + {"\\bocean\\s+beach\\b", "oceanbeach"}, + {"\\blong\\s+beach\\b", "longbeach"}, + {"\\bboulevard\\b", "blvd"}, + {"\\bcrescent\\b", "cres"}, + {"\\bhighway\\b", "hwy"}, + {"\\bparkway\\b", "pkwy"}, + {"\\bheights\\b", "hts"}, + {"\\bavenue\\b", "ave"}, + {"\\bstreet\\b", "st"}, + {"\\bparade\\b", "pde"}, + {"\\bcommon\\b", "comm"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bmount\\b", "mt"}, + {"\\bsaint\\b", "st"}, + {"\\bpoint\\b", "pt"}, + {"\\bcourt\\b", "ct"}, + {"\\bplace\\b", "pl"}, + {"\\bdrive\\b", "dr"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\broad\\b", "rd"}, + {"\\blane\\b", "ln"}, + {"\\bn\\.z\\.\\b", "nz"}, + {"\\bnth\\b", "n"}, + {"\\bsth\\b", "s"}, + {"\\bmt\\.\\b", "mt"}, + {"\\bst\\.\\b", "st"}, + {"\\bpt\\.\\b", "pt"}, + {"\\bn\\.z\\b", "nz"}, + {"\\bn\\.\\b", "n"}, + {"\\bs\\.\\b", "s"}, + {"\\be\\.\\b", "e"}, + {"\\bw\\.\\b", "w"}, +}; + +const Rule kRules_PE[] = { + {"\\bavenida\\b", "av"}, {"\\bperu\\b", "pe"}, {"\\blos\\b", ""}, + {"\\blas\\b", ""}, {"\\bdel\\b", ""}, {"\\ble\\b", ""}, + {"\\bel\\b", ""}, {"\\bde\\b", ""}, +}; + +const Rule kRules_PH[] = { + {"\\bphilippines\\b", "ph"}, {"\\bboulevard\\b", "blvd"}, + {"\\bcaptain\\b", "cap"}, {"\\bgeneral\\b", "gen"}, + {"\\bstreet\\b", "st"}, {"\\bavenue\\b", "av"}, + {"\\bdoctor\\b", "dr"}, {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, {"\\broad\\b", "rd"}, + {"\\bave\\b", "av"}, +}; + +const Rule kRules_PL[] = { + {"\\bkuyavian\\s+pomeranian\\b", "kp"}, + {"\\bzachodniopomorskie\\b", "zp"}, + {"\\bwarmian\\s+masurian\\b", "wn"}, + {"\\bwest\\s+pomeranian\\b", "zp"}, + {"\\bgreater\\s+poland\\b", "wp"}, + {"\\blower\\s+silesian\\b", "ds"}, + {"\\bswietokrzyskie\\b", "sk"}, + {"\\blesser\\s+poland\\b", "mp"}, + {"\\bsubcarpathian\\b", "pk"}, + {"\\bwielkopolskie\\b", "wp"}, + {"\\bdolnoslaskie\\b", "ds"}, + {"\\bpodkarpackie\\b", "pk"}, + {"\\bmalopolskie\\b", "mp"}, + {"\\bmazowieckie\\b", "ma"}, + {"\\bpomeranian\\b", "pm"}, + {"\\bmarszalek\\b", "marsz"}, + {"\\bpodlaskie\\b", "pd"}, + {"\\blubelskie\\b", "lu"}, + {"\\bpomorskie\\b", "pm"}, + {"\\bwarminsko\\b", "wn"}, + {"\\bpoludnie\\b", "south"}, + {"\\bwschodni\\b", "w"}, + {"\\bzachodni\\b", "z"}, + {"\\bmasovian\\b", "ma"}, + {"\\bsilesian\\b", "sl"}, + {"\\bkujawsko\\b", "kp"}, + {"\\blubuskie\\b", "lb"}, + {"\\bopolskie\\b", "op"}, + {"\\bosiedle\\b", "os"}, + {"\\bsilesia\\b", "sl"}, + {"\\blodzkie\\b", "ld"}, + {"\\bslaskie\\b", "sl"}, + {"\\bpolnoc\\b", "north"}, + {"\\bwschod\\b", "w"}, + {"\\bzachod\\b", "z"}, + {"\\blublin\\b", "lu"}, + {"\\blubusz\\b", "lb"}, + {"\\bpoland\\b", "pl"}, + {"\\bopole\\b", "op"}, + {"\\beast\\b", "w"}, + {"\\bwest\\b", "z"}, + {"\\blodz\\b", "ld"}, + {"\\bwlkp\\b", "wp"}, +}; + +const Rule kRules_PR[] = { + {"\\bsan\\s+juan\\s+antiguo\\b", "old san juan"}, + {"\\bpuerto\\s+rico\\b", "pr"}, + {"\\bcarretera\\b", "carr"}, + {"\\bmal\\s+paso\\b", "malpaso"}, + {"\\bavenida\\b", "av"}, + {"\\bbulevar\\b", "blvd"}, + {"\\bcamino\\b", "cm"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bsaint\\b", "st"}, + {"\\bcalle\\b", "cll"}, + {"\\bplaza\\b", "plz"}, + {"\\bpaseo\\b", "pso"}, + {"\\bcourt\\b", "ct"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\bave\\.\\b", "av"}, + {"\\blane\\b", "ln"}, + {"\\broad\\b", "rd"}, + {"\\bp\\.r\\.\\b", "pr"}, + {"\\bnth\\b", "n"}, + {"\\bsth\\b", "s"}, + {"\\bst\\.\\b", "st"}, + {"\\bave\\b", "av"}, + {"\\bcam\\b", "cm"}, + {"\\bp\\.r\\b", "pr"}, + {"\\bn\\.\\b", "n"}, + {"\\bs\\.\\b", "s"}, + {"\\be\\.\\b", "e"}, + {"\\bw\\.\\b", "w"}, +}; + +const Rule kRules_PT[] = { + {"\\bestrada\\s+nacional\\b", "n"}, + {"\\bviana\\s+do\\s+castelo\\b", "18"}, + {"\\bcastelo\\s+branco\\b", "09"}, + {"\\bportalegre\\b", "08"}, + {"\\bvila\\s+real\\b", "15"}, + {"\\bbraganca\\b", "14"}, + {"\\bsantarem\\b", "03"}, + {"\\bportugal\\b", "pt"}, + {"\\bcoimbra\\b", "11"}, + {"\\bsetubal\\b", "04"}, + {"\\bdoctor\\b", "dr"}, + {"\\bdoutor\\b", "dr"}, + {"\\baveiro\\b", "12"}, + {"\\bguarda\\b", "10"}, + {"\\bleiria\\b", "02"}, + {"\\blisbon\\b", "01"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bbraga\\b", "17"}, + {"\\bevora\\b", "07"}, + {"\\bporto\\b", "16"}, + {"\\bviseu\\b", "13"}, + {"\\bwest\\b", "w"}, + {"\\bbeja\\b", "05"}, + {"\\bfaro\\b", "06"}, + {"\\bsao\\b", "s"}, + {"\\bdos\\b", ""}, + {"\\bdas\\b", ""}, + {"\\bdo\\b", ""}, + {"\\bde\\b", ""}, + {"\\bda\\b", ""}, + {"\\ben\\b", "n"}, + {"\\bem\\b", "m"}, + {"\\be\\b", ""}, +}; + +const Rule kRules_RO[] = { + {"\\bromania\\b", "ro"}, +}; + +const Rule kRules_RU[] = { + {"\\bнабережная\\b", "наб"}, {"\\bтерритория\\b", "тер"}, + {"\\bавтодорога\\b", "а/д"}, {"\\bпереулок\\b", "пер"}, + {"\\bпроспект\\b", "пр"}, {"\\bбульвар\\b", "б-р"}, + {"\\bквартал\\b", "кв-л"}, {"\\bплощадь\\b", "пл"}, + {"\\bроссия\\b", "ru"}, {"\\brussia\\b", "ru"}, + {"\\bпроезд\\b", "пр-д"}, {"\\bдорога\\b", "дор"}, + {"\\bшоссе\\b", "ш"}, {"\\bлиния\\b", "лин"}, + {"\\bулица\\b", "ул"}, {"\\bбульв\\b", "б-р"}, + {"\\bпросп\\b", "пр"}, {"\\bпр\\-кт\\b", "пр"}, + {"\\bтупик\\b", "туп"}, {"\\bпрот\\b", "пр"}, + {"\\bбул\\b", "б-р"}, +}; + +const Rule kRules_SE[] = { + {"\\bvastra\\s+goetalands\\b", "o"}, + {"\\bvastra\\s+goetaland\\b", "o"}, + {"\\bvasternorrlands\\b", "y"}, + {"\\boestergoetlands\\b", "e"}, + {"\\bvasternorrland\\b", "y"}, + {"\\boestergoetland\\b", "e"}, + {"\\bvastergoetland\\b", "e"}, + {"\\bsodermanlands\\b", "d"}, + {"\\bvasterbottens\\b", "ac"}, + {"\\bjoenkoepings\\b", "f"}, + {"\\bsodermanland\\b", "d"}, + {"\\bvasterbotten\\b", "ac"}, + {"\\bvastmanlands\\b", "u"}, + {"\\bjoenkoeping\\b", "f"}, + {"\\bnorrbottens\\b", "bd"}, + {"\\bvastmanland\\b", "u"}, + {"\\bgavleborgs\\b", "x"}, + {"\\bkronobergs\\b", "g"}, + {"\\bnorrbotten\\b", "bd"}, + {"\\bstockholms\\b", "ab"}, + {"\\bgavleborg\\b", "x"}, + {"\\bjamtlands\\b", "z"}, + {"\\bkronoberg\\b", "g"}, + {"\\bstockholm\\b", "ab"}, + {"\\bvarmlands\\b", "s"}, + {"\\bblekinge\\b", "k"}, + {"\\bdalarnas\\b", "w"}, + {"\\bgotlands\\b", "i"}, + {"\\bhallands\\b", "n"}, + {"\\bjamtland\\b", "z"}, + {"\\bvarmland\\b", "s"}, + {"\\boerebros\\b", "t"}, + {"\\bdalarna\\b", "w"}, + {"\\bgotland\\b", "i"}, + {"\\bhalland\\b", "n"}, + {"\\buppsala\\b", "c"}, + {"\\boerebro\\b", "t"}, + {"\\bsverige\\b", "se"}, + {"\\bsoeder\\b", "s"}, + {"\\bkalmar\\b", "h"}, + {"\\bsweden\\b", "se"}, + {"\\bskane\\b", "m"}, + {"\\bnorr\\b", "n"}, + {"\\boest\\b", "o"}, + {"\\bvast\\b", "v"}, +}; + +const Rule kRules_TH[] = { + {"\\bประเทศไทย\\b", "th"}, + {"\\bthailand\\b", "th"}, +}; + +const Rule kRules_TR[] = { + {"\\bturkiye\\b", "tr"}, + {"\\bturkey\\b", "tr"}, +}; + +const Rule kRules_US[] = { + {"\\bjoint\\s+base\\s+elmendorf\\s+richardson\\b", "jber"}, + {"\\bwashington\\s+district\\s+of\\s+columbia\\b", "dc"}, + {"\\bjoint\\s+base\\s+pearl\\s+harbor\\s+hickam\\b", "jbphh"}, + {"\\bfederated\\s+states\\s+of\\s+micronesia\\b", "fm"}, + {"\\bnational\\s+forest\\s+development\\b", "nat for dev"}, + {"\\bmartin\\s+luther\\s+king\\s+junior\\b", "mlk"}, + {"\\bnational\\s+for\\s+development\\b", "nat for dev"}, + {"\\bmarine\\s+corps\\s+base\\s+hawaii\\b", "mcbh kanehoe bay"}, + {"\\bnorthern\\s+mariana\\s+islands\\b", "mp"}, + {"\\barmed\\s+forces\\s+middle\\s+east\\b", "ae"}, + {"\\bunited\\s+states\\s+of\\s+america\\b", "us"}, + {"\\bnat\\s+forest\\s+development\\b", "nat for dev"}, + {"\\bmartin\\s+luther\\s+king\\s+jnr\\b", "mlk"}, + {"\\bmartin\\s+luther\\s+king\\s+jr\\b", "mlk"}, + {"\\barmed\\s+forces\\s+americas\\b", "aa"}, + {"\\bdistrict\\s+of\\s+columbia\\b", "dc"}, + {"\\barmed\\s+forces\\s+pacific\\b", "ap"}, + {"\\bnat\\s+for\\s+development\\b", "nat for dev"}, + {"\\bnational\\s+forest\\s+dev\\b", "nat for dev"}, + {"\\barmed\\s+forces\\s+africa\\b", "ae"}, + {"\\barmed\\s+forces\\s+canada\\b", "ae"}, + {"\\barmed\\s+forces\\s+europe\\b", "ae"}, + {"\\bmartin\\s+luther\\s+king\\b", "mlk"}, + {"\\bjoint\\s+reserve\\s+base\\b", "jrb"}, + {"\\blincolns\\s+new\\s+salem\\b", "lincoln nw sl"}, + {"\\bmetropolitan\\s+area\\b", ""}, + {"\\bnational\\s+monument\\b", "national mo"}, + {"\\bnational\\s+for\\s+dev\\b", "nat for dev"}, + {"\\bfrancis\\s+e\\s+warren\\b", "fe warren"}, + {"\\bcolorado\\s+springs\\b", "co spgs"}, + {"\\bdist\\s+of\\s+columbia\\b", "dc"}, + {"\\bwashington\\s+state\\b", "wa"}, + {"\\bmarshall\\s+islands\\b", "mh"}, + {"\\bcharlottesville\\b", "charlottesvle"}, + {"\\badministration\\b", "admn"}, + {"\\bfarm\\s+to\\s+market\\b", "fm"}, + {"\\bnat\\s+forest\\s+dev\\b", "nat for dev"}, + {"\\bforest\\s+service\\b", "frst srvc"}, + {"\\bjohn\\s+f\\s+kennedy\\b", "jfk"}, + {"\\bair\\s+force\\s+base\\b", "afb"}, + {"\\bbradford\\s+woods\\b", "bradfordwoods"}, + {"\\bcrawfordsville\\b", "crawfordsvlle"}, + {"\\bfredericksburg\\b", "fredericksbrg"}, + {"\\bhendersonville\\b", "hendersonvlle"}, + {"\\bjeffersonville\\b", "jeffersonvlle"}, + {"\\bmechanicsville\\b", "mechanicsvlle"}, + {"\\bnorthumberland\\b", "northumberlnd"}, + {"\\bsalt\\s+lake\\s+city\\b", "slc"}, + {"\\bchristiansberg\\b", "christiansbrg"}, + {"\\blittle\\s+diomede\\b", "diomede"}, + {"\\bwashington\\s+d\\s+c\\b", "dc"}, + {"\\bnew\\s+york\\s+state\\b", "ny"}, + {"\\bnorth\\s+carolina\\b", "nc"}, + {"\\bsouth\\s+carolina\\b", "sc"}, + {"\\bvirgin\\s+islands\\b", "vi"}, + {"\\bamerican\\s+samoa\\b", "as"}, + {"\\binternational\\b", "intl"}, + {"\\barmy\\s+airfield\\b", "army af"}, + {"\\bnew\\s+york\\s+city\\b", "ny"}, + {"\\bjf\\s+kennedy\\s+ap\\b", "jfk airport"}, + {"\\bnational\\s+park\\b", "ntpk"}, + {"\\bwashington\\s+dc\\b", "dc"}, + {"\\bnew\\s+hampshire\\b", "nh"}, + {"\\bwest\\s+virginia\\b", "wv"}, + {"\\bmassachusetts\\b", "ma"}, + {"\\bunited\\s+states\\b", "us"}, + {"\\bfrst\\s+service\\b", "frst srvc"}, + {"\\bservice\\s+road\\b", "service rd"}, + {"\\bbristle\\s+cone\\b", "bristlecone"}, + {"\\bswan\\s+quarter\\b", "swanquarter"}, + {"\\bminers\\s+mills\\b", "miners mill"}, + {"\\bnorth\\s+dakota\\b", "nd"}, + {"\\brhode\\s+island\\b", "ri"}, + {"\\bsouth\\s+dakota\\b", "sd"}, + {"\\bpennsylvania\\b", "pa"}, + {"\\brural\\s+route\\b", "rr"}, + {"\\bforest\\s+srvc\\b", "frst srvc"}, + {"\\bbloomington\\b", "blmngtn"}, + {"\\bfrenchville\\b", "frnchvl"}, + {"\\bgood\\s+fellow\\b", "goodfellow"}, + {"\\bclutch\\s+city\\b", "houston"}, + {"\\blos\\s+angeles\\b", "la"}, + {"\\bloxahatchee\\b", "lox"}, + {"\\bobservatory\\b", "obs"}, + {"\\bspringfield\\b", "spfld"}, + {"\\byellowstone\\b", "yelwstn"}, + {"\\bchevy\\s+chase\\b", "chevy chs"}, + {"\\bhigh\\s+bridge\\b", "highbridge"}, + {"\\bpuerto\\s+rico\\b", "pr"}, + {"\\bconnecticut\\b", "ct"}, + {"\\bmississippi\\b", "ms"}, + {"\\bcrossroads\\b", "xrds"}, + {"\\bextensions\\b", "exts"}, + {"\\bplantation\\b", "plt"}, + {"\\buniversity\\b", "univ"}, + {"\\bexpressway\\b", "exp"}, + {"\\bthroughway\\b", "trwy"}, + {"\\btrafficway\\b", "trfy"}, + {"\\balpen\\s+glow\\b", "alpenglow"}, + {"\\bambassador\\b", "amb"}, + {"\\bbernardino\\b", "bernrdno"}, + {"\\bbloomfield\\b", "bloomfld"}, + {"\\bcapistrano\\b", "capo"}, + {"\\bcincinnati\\b", "cin"}, + {"\\bcottonwood\\b", "ctwd"}, + {"\\bfarmington\\b", "farmingtn"}, + {"\\bpittsburgh\\b", "pgh"}, + {"\\bprovidence\\b", "providnce"}, + {"\\bsouth\\s+lake\\b", "southlake"}, + {"\\bwest\\s+point\\b", "westpoint"}, + {"\\bbrownstown\\b", "brownstwn"}, + {"\\bburlington\\b", "burlngtn"}, + {"\\bchristmass\\b", "chirstmas"}, + {"\\bnew\\s+jersey\\b", "nj"}, + {"\\bnew\\s+mexico\\b", "nm"}, + {"\\bcalifornia\\b", "ca"}, + {"\\bwashington\\b", "wa"}, + {"\\bcrossroad\\b", "xrd"}, + {"\\bhighlands\\b", "hlds"}, + {"\\bjunctions\\b", "jcts"}, + {"\\bmountains\\b", "mtns"}, + {"\\bboulevard\\b", "boul"}, + {"\\bextension\\b", "ext"}, + {"\\bstravenue\\b", "stra"}, + {"\\bunderpass\\b", "upas"}, + {"\\bchair\\s+bar\\b", "chairbar"}, + {"\\btown\\s+line\\b", "t l"}, + {"\\bterritory\\b", ""}, + {"\\bbellerose\\b", "bellrs"}, + {"\\bchicester\\b", "chicstr"}, + {"\\bcity\\s+base\\b", "cb"}, + {"\\bcleveland\\b", "cleve"}, + {"\\bcommunity\\b", "cmnty"}, + {"\\bfairmount\\b", "fairmt"}, + {"\\bfernandez\\b", "fdez"}, + {"\\bfrancisco\\b", "fran"}, + {"\\bho\'olehua\\b", "hoolehua"}, + {"\\blexington\\b", "lxngtn"}, + {"\\bmilwaukee\\b", "milw"}, + {"\\brichfield\\b", "richfld"}, + {"\\bwashingtn\\b", "wa"}, + {"\\bburlingtn\\b", "burlngtn"}, + {"\\bhomestead\\b", "hmstd"}, + {"\\blouisiana\\b", "la"}, + {"\\bminnesota\\b", "mn"}, + {"\\btennessee\\b", ""}, + {"\\bwisconsin\\b", "wi"}, + {"\\bcauseway\\b", "cswy"}, + {"\\bcrossrds\\b", "xrds"}, + {"\\bjunction\\b", "jt"}, + {"\\bmountain\\b", "mnt"}, + {"\\bnational\\b", "nl"}, + {"\\bparkways\\b", "pkwys"}, + {"\\bvilliage\\b", "vil"}, + {"\\bvillages\\b", "vlgs"}, + {"\\bcrescent\\b", "cres"}, + {"\\bmotorway\\b", "mtwy"}, + {"\\boverpass\\b", "opas"}, + {"\\bturnpike\\b", "tpk"}, + {"\\bcrossing\\b", "xing"}, + {"\\bbullrush\\b", "bulrush"}, + {"\\bmichelle\\b", "michele"}, + {"\\btownline\\b", "t l"}, + {"\\bdowntown\\b", ""}, + {"\\btownship\\b", "tw"}, + {"\\bcottonwd\\b", "ctwd"}, + {"\\bhartford\\b", "hartfrd"}, + {"\\bla\\s+salle\\b", "lasalle"}, + {"\\bnew\\s+york\\b", "ny"}, + {"\\brichland\\b", "richlnd"}, + {"\\bbig\\s+bend\\b", "bg bnd"}, + {"\\bblooming\\b", "blmng"}, + {"\\barkansas\\b", "ar"}, + {"\\bcolorado\\b", "co"}, + {"\\bdelaware\\b", "de"}, + {"\\billinois\\b", "il"}, + {"\\bkentucky\\b", "ky"}, + {"\\bmaryland\\b", "md"}, + {"\\bmichigan\\b", "mi"}, + {"\\bmissouri\\b", "mo"}, + {"\\bnebraska\\b", "ne"}, + {"\\boklahoma\\b", "ok"}, + {"\\bvirginia\\b", "va"}, + {"\\bseventh\\b", "7"}, + {"\\bcausway\\b", "cswy"}, + {"\\bcenters\\b", "ctrs"}, + {"\\bcircles\\b", "cirs"}, + {"\\bcollege\\b", "clg"}, + {"\\bcorners\\b", "cors"}, + {"\\bcountry\\b", "cntry"}, + {"\\bcrossrd\\b", "xrd"}, + {"\\bestates\\b", "ests"}, + {"\\bgardens\\b", "gdns"}, + {"\\bgateway\\b", "gtwy"}, + {"\\bharbors\\b", "hbrs"}, + {"\\bheights\\b", "ht"}, + {"\\bhollows\\b", "hllw"}, + {"\\bislands\\b", "is"}, + {"\\blanding\\b", "lndg"}, + {"\\bmeadows\\b", "mdws"}, + {"\\bmission\\b", "msn"}, + {"\\bmountin\\b", "mnt"}, + {"\\borchard\\b", "orch"}, + {"\\bplaines\\b", "plns"}, + {"\\bprairie\\b", "pr"}, + {"\\branches\\b", "rnchs"}, + {"\\branchos\\b", "rnchs"}, + {"\\bsprings\\b", "spg"}, + {"\\bsquares\\b", "sqs"}, + {"\\bstation\\b", "sta"}, + {"\\bstreets\\b", "sts"}, + {"\\bterrace\\b", "ter"}, + {"\\bvalleys\\b", "vlys"}, + {"\\bvillage\\b", "vil"}, + {"\\bhighway\\b", "hwy"}, + {"\\bexpress\\b", "exp"}, + {"\\bcrecent\\b", "cres"}, + {"\\bcresent\\b", "cres"}, + {"\\bfreeway\\b", "fwy"}, + {"\\bjuncton\\b", "jt"}, + {"\\bparkway\\b", "pky"}, + {"\\bpassage\\b", "psge"}, + {"\\bstraven\\b", "stra"}, + {"\\bstrvnue\\b", "stra"}, + {"\\btunnels\\b", "tunl"}, + {"\\bviaduct\\b", "via"}, + {"\\bcrssing\\b", "xing"}, + {"\\bavenida\\b", "av"}, + {"\\bcapital\\b", "capitol"}, + {"\\bcolonel\\b", "col"}, + {"\\bcentral\\b", ""}, + {"\\btownshp\\b", "tw"}, + {"\\bchicago\\b", "chgo"}, + {"\\bjohnson\\b", "jhnsn"}, + {"\\bphoenix\\b", "phx"}, + {"\\bwshngtn\\b", "wa"}, + {"\\bwilliam\\b", "wm"}, + {"\\bpotsdam\\b", "potsdm"}, + {"\\balabama\\b", "al"}, + {"\\barizona\\b", "az"}, + {"\\bflorida\\b", "fl"}, + {"\\bgeorgia\\b", "ga"}, + {"\\bindiana\\b", "in"}, + {"\\bmontana\\b", "mt"}, + {"\\bvermont\\b", "vt"}, + {"\\bwyoming\\b", "wy"}, + {"\\bamerica\\b", "us"}, + {"\\bsecond\\b", "2"}, + {"\\bfourth\\b", "4"}, + {"\\beighth\\b", "8"}, + {"\\bbarrio\\b", "bo"}, + {"\\bbluffs\\b", "blfs"}, + {"\\bbottom\\b", "bot"}, + {"\\bbranch\\b", "br"}, + {"\\bbridge\\b", "brg"}, + {"\\bbrooks\\b", "brks"}, + {"\\bcanyon\\b", "cyn"}, + {"\\bcentre\\b", "ctr"}, + {"\\bcenter\\b", "ctr"}, + {"\\bcliffs\\b", "clfs"}, + {"\\bcommon\\b", "cmn"}, + {"\\bcorner\\b", "cor"}, + {"\\bcourse\\b", "crse"}, + {"\\bcourts\\b", "cts"}, + {"\\bxroads\\b", "xrds"}, + {"\\bdivide\\b", "dv"}, + {"\\bdrives\\b", "drs"}, + {"\\bestate\\b", "est"}, + {"\\bfields\\b", "flds"}, + {"\\bforest\\b", "frst"}, + {"\\bforges\\b", "frgs"}, + {"\\bgarden\\b", "gdn"}, + {"\\bgatway\\b", "gtwy"}, + {"\\bgatewy\\b", "gtwy"}, + {"\\bgreens\\b", "grns"}, + {"\\bgroves\\b", "grvs"}, + {"\\bharbor\\b", "hbr"}, + {"\\bheight\\b", "ht"}, + {"\\bhollow\\b", "hllw"}, + {"\\bisland\\b", "is"}, + {"\\bislnds\\b", "is"}, + {"\\bknolls\\b", "knls"}, + {"\\blights\\b", "lgts"}, + {"\\blittle\\b", "ltl"}, + {"\\bmanors\\b", "mnrs"}, + {"\\bmeadow\\b", "mdw"}, + {"\\bmedows\\b", "mdws"}, + {"\\bmiddle\\b", "mid"}, + {"\\bmntain\\b", "mnt"}, + {"\\borchrd\\b", "orch"}, + {"\\bplains\\b", "plns"}, + {"\\bpoints\\b", "pts"}, + {"\\bpuerto\\b", "pto"}, + {"\\bquarry\\b", "qry"}, + {"\\branchs\\b", "rnchs"}, + {"\\brancho\\b", "rncho"}, + {"\\brapids\\b", "rpds"}, + {"\\bridges\\b", "rdgs"}, + {"\\bshoals\\b", "shls"}, + {"\\bshores\\b", "shrs"}, + {"\\bshoars\\b", "shrs"}, + {"\\bspring\\b", "spg"}, + {"\\bsprngs\\b", "spg"}, + {"\\bsquare\\b", "sq"}, + {"\\bstream\\b", "strm"}, + {"\\bstreme\\b", "strm"}, + {"\\bsumitt\\b", "smt"}, + {"\\bsummit\\b", "smt"}, + {"\\btrails\\b", "tr"}, + {"\\bunions\\b", "uns"}, + {"\\bvalley\\b", "vl"}, + {"\\bvillag\\b", "vil"}, + {"\\bwaters\\b", "wtr"}, + {"\\bschool\\b", "sch"}, + {"\\blagoon\\b", "lagn"}, + {"\\bavenue\\b", "av"}, + {"\\bhighwy\\b", "hwy"}, + {"\\bcircle\\b", "cir"}, + {"\\barcade\\b", "arc"}, + {"\\bbypass\\b", "byp"}, + {"\\bcrscnt\\b", "cres"}, + {"\\bcrsent\\b", "cres"}, + {"\\bextnsn\\b", "ext"}, + {"\\bfreewy\\b", "fwy"}, + {"\\bjunctn\\b", "jt"}, + {"\\bjction\\b", "jt"}, + {"\\bparkwy\\b", "pky"}, + {"\\bradial\\b", "rad"}, + {"\\bradiel\\b", "rad"}, + {"\\bskyway\\b", "skwy"}, + {"\\bstrave\\b", "stra"}, + {"\\bstravn\\b", "stra"}, + {"\\bstreet\\b", "st"}, + {"\\btraces\\b", "trce"}, + {"\\btracks\\b", "trk"}, + {"\\bturnpk\\b", "tpk"}, + {"\\btunnel\\b", "tunl"}, + {"\\bviadct\\b", "via"}, + {"\\bcrssng\\b", "xing"}, + {"\\bcamino\\b", "cm"}, + {"\\bcarlan\\b", "carlin"}, + {"\\bsenior\\b", "sr"}, + {"\\bsydney\\b", "sidney"}, + {"\\bcounty\\b", ""}, + {"\\bparish\\b", ""}, + {"\\btwnshp\\b", "tw"}, + {"\\bcorpus\\b", "crp"}, + {"\\bobispo\\b", "obisp"}, + {"\\bdesert\\b", "dsrt"}, + {"\\balaska\\b", "ak"}, + {"\\bhawaii\\b", "hi"}, + {"\\bkansas\\b", "ks"}, + {"\\bnevada\\b", "nv"}, + {"\\boregon\\b", "or"}, + {"\\bnorth\\b", "n"}, + {"\\bsouth\\b", "s"}, + {"\\bfirst\\b", "1"}, + {"\\bthird\\b", "3"}, + {"\\bthree\\b", "3"}, + {"\\bfifth\\b", "5"}, + {"\\bsixth\\b", "6"}, + {"\\bseven\\b", "7"}, + {"\\beight\\b", "8"}, + {"\\bninth\\b", "9"}, + {"\\btenth\\b", "10"}, + {"\\bmount\\b", "mt"}, + {"\\bsaint\\b", "st"}, + {"\\bannex\\b", "anx"}, + {"\\bbayoo\\b", "byu"}, + {"\\bbayou\\b", "byu"}, + {"\\bbeach\\b", "bch"}, + {"\\bblack\\b", "blk"}, + {"\\bbluff\\b", "blf"}, + {"\\bbottm\\b", "bot"}, + {"\\bbrnch\\b", "br"}, + {"\\bbrdge\\b", "brg"}, + {"\\bbrook\\b", "brk"}, + {"\\bburgs\\b", "bgs"}, + {"\\bcanyn\\b", "cyn"}, + {"\\bcnter\\b", "ctr"}, + {"\\bcentr\\b", "ctr"}, + {"\\bcliff\\b", "clf"}, + {"\\bcoves\\b", "cvs"}, + {"\\bcreek\\b", "ck"}, + {"\\bcrest\\b", "crst"}, + {"\\bxroad\\b", "xrd"}, + {"\\bcurve\\b", "curv"}, + {"\\bfalls\\b", "fls"}, + {"\\bfield\\b", "fld"}, + {"\\bflats\\b", "flts"}, + {"\\bfords\\b", "frds"}, + {"\\bforge\\b", "frg"}, + {"\\bforks\\b", "fks"}, + {"\\bgardn\\b", "gdn"}, + {"\\bgrden\\b", "gdn"}, + {"\\bgrdns\\b", "gdns"}, + {"\\bgtway\\b", "gtwy"}, + {"\\bglens\\b", "glns"}, + {"\\bgrand\\b", "grnd"}, + {"\\bgreen\\b", "grn"}, + {"\\bgrove\\b", "grv"}, + {"\\bharbr\\b", "hbr"}, + {"\\bhrbor\\b", "hbr"}, + {"\\bhaven\\b", "hvn"}, + {"\\bhills\\b", "hl"}, + {"\\bholws\\b", "hllw"}, + {"\\bhouse\\b", "hse"}, + {"\\binlet\\b", "inlt"}, + {"\\bislnd\\b", "is"}, + {"\\bisles\\b", "isle"}, + {"\\bjctns\\b", "jcts"}, + {"\\bknoll\\b", "knl"}, + {"\\blakes\\b", "lks"}, + {"\\blndng\\b", "lndg"}, + {"\\blight\\b", "lgt"}, + {"\\blocks\\b", "lcks"}, + {"\\blodge\\b", "ldg"}, + {"\\blower\\b", "lo"}, + {"\\bmanor\\b", "mnr"}, + {"\\bmills\\b", "mls"}, + {"\\bmissn\\b", "msn"}, + {"\\bmntns\\b", "mtns"}, + {"\\bplace\\b", "pl"}, + {"\\bpalms\\b", "plms"}, + {"\\bpines\\b", "pnes"}, + {"\\bplain\\b", "pln"}, + {"\\bpoint\\b", "pt"}, + {"\\bports\\b", "prts"}, + {"\\bponds\\b", "pnds"}, + {"\\branch\\b", "rch"}, + {"\\brapid\\b", "rpd"}, + {"\\bridge\\b", "rdg"}, + {"\\briver\\b", "rvr"}, + {"\\broads\\b", "rds"}, + {"\\bshoal\\b", "shl"}, + {"\\bshore\\b", "shr"}, + {"\\bshoar\\b", "shr"}, + {"\\bspace\\b", "sp"}, + {"\\bsprng\\b", "spg"}, + {"\\bspngs\\b", "spg"}, + {"\\bsprgs\\b", "spg"}, + {"\\bstatn\\b", "sta"}, + {"\\bsumit\\b", "smt"}, + {"\\btrail\\b", "tr"}, + {"\\bunion\\b", "un"}, + {"\\bvally\\b", "vl"}, + {"\\bviews\\b", "vws"}, + {"\\bvillg\\b", "vil"}, + {"\\bville\\b", "vl"}, + {"\\bvista\\b", "vis"}, + {"\\bwells\\b", "wls"}, + {"\\bwoods\\b", "wds"}, + {"\\bworks\\b", "wks"}, + {"\\broute\\b", "rt"}, + {"\\bavnue\\b", "av"}, + {"\\bavenu\\b", "av"}, + {"\\bhiway\\b", "hwy"}, + {"\\bcrcle\\b", "cir"}, + {"\\bcircl\\b", "cir"}, + {"\\balley\\b", "aly"}, + {"\\ballee\\b", "aly"}, + {"\\bboulv\\b", "boul"}, + {"\\bbypas\\b", "byp"}, + {"\\bcourt\\b", "ct"}, + {"\\bcrsnt\\b", "cres"}, + {"\\bdrive\\b", "dr"}, + {"\\bfrway\\b", "fwy"}, + {"\\bferry\\b", "fry"}, + {"\\blanes\\b", "la"}, + {"\\bloops\\b", "loop"}, + {"\\bpkway\\b", "pky"}, + {"\\bpaths\\b", "path"}, + {"\\bpikes\\b", "pike"}, + {"\\bplaza\\b", "plz"}, + {"\\bstrvn\\b", "stra"}, + {"\\bstrav\\b", "stra"}, + {"\\btrace\\b", "trce"}, + {"\\btrack\\b", "trk"}, + {"\\btrnpk\\b", "tpk"}, + {"\\btunls\\b", "tunl"}, + {"\\btunel\\b", "tunl"}, + {"\\btunnl\\b", "tunl"}, + {"\\bcalle\\b", "cll"}, + {"\\bpaseo\\b", "pso"}, + {"\\bm\\s+l\\s+k\\b", "mlk"}, + {"\\bverdi\\b", "verde"}, + {"\\ba\\s+f\\s+b\\b", "afb"}, + {"\\bcalif\\b", "ca"}, + {"\\bdepot\\b", "dep"}, + {"\\bn\\s+y\\s+c\\b", "ny"}, + {"\\bidaho\\b", "id"}, + {"\\bmaine\\b", "me"}, + {"\\btexas\\b", "tx"}, + {"\\bpalau\\b", "pw"}, + {"\\bu\\s+s\\s+a\\b", "us"}, + {"\\beast\\b", "e"}, + {"\\bwest\\b", "w"}, + {"\\bfour\\b", "4"}, + {"\\bfive\\b", "5"}, + {"\\bnine\\b", "9"}, + {"\\banex\\b", "anx"}, + {"\\bbend\\b", "bnd"}, + {"\\bbluf\\b", "blf"}, + {"\\bburg\\b", "bg"}, + {"\\bcamp\\b", "cp"}, + {"\\bcnyn\\b", "cyn"}, + {"\\bcape\\b", "cpe"}, + {"\\bcntr\\b", "ctr"}, + {"\\bcent\\b", "ctr"}, + {"\\bclub\\b", "clb"}, + {"\\bcove\\b", "cv"}, + {"\\bdale\\b", "dl"}, + {"\\bflat\\b", "flt"}, + {"\\bford\\b", "frd"}, + {"\\bfarm\\b", "frm"}, + {"\\bforg\\b", "frg"}, + {"\\bfork\\b", "frk"}, + {"\\bfrks\\b", "fks"}, + {"\\bfort\\b", "ft"}, + {"\\bgrdn\\b", "gdn"}, + {"\\bglen\\b", "gln"}, + {"\\bharb\\b", "hbr"}, + {"\\bhavn\\b", "hvn"}, + {"\\bhgts\\b", "ht"}, + {"\\bhght\\b", "ht"}, + {"\\bhill\\b", "hl"}, + {"\\bholw\\b", "hllw"}, + {"\\bjnct\\b", "jt"}, + {"\\bkeys\\b", "kys"}, + {"\\bknol\\b", "knl"}, + {"\\blake\\b", "lk"}, + {"\\blitl\\b", "ltl"}, + {"\\bloaf\\b", "lf"}, + {"\\block\\b", "lck"}, + {"\\bldge\\b", "ldg"}, + {"\\blodg\\b", "ldg"}, + {"\\bmile\\b", "mle"}, + {"\\bmill\\b", "ml"}, + {"\\bmssn\\b", "msn"}, + {"\\bmntn\\b", "mnt"}, + {"\\bmtin\\b", "mnt"}, + {"\\bneck\\b", "nck"}, + {"\\boval\\b", "ovl"}, + {"\\bpalm\\b", "plm"}, + {"\\bpark\\b", "pk"}, + {"\\bpass\\b", "ps"}, + {"\\bpine\\b", "pne"}, + {"\\bport\\b", "prt"}, + {"\\brnch\\b", "rch"}, + {"\\brest\\b", "rst"}, + {"\\brdge\\b", "rdg"}, + {"\\brivr\\b", "rvr"}, + {"\\bspng\\b", "spg"}, + {"\\bsprg\\b", "spg"}, + {"\\bspgs\\b", "spg"}, + {"\\bsqre\\b", "sq"}, + {"\\bsqrs\\b", "sqs"}, + {"\\btrls\\b", "tr"}, + {"\\bvlly\\b", "vl"}, + {"\\bview\\b", "vw"}, + {"\\bvill\\b", "vil"}, + {"\\bvist\\b", "vis"}, + {"\\bvsta\\b", "vis"}, + {"\\bwell\\b", "wl"}, + {"\\broad\\b", "rd"}, + {"\\baven\\b", "av"}, + {"\\bhiwy\\b", "hwy"}, + {"\\bhway\\b", "hwy"}, + {"\\bexpr\\b", "exp"}, + {"\\bexpw\\b", "exp"}, + {"\\bexpy\\b", "exp"}, + {"\\bcirc\\b", "cir"}, + {"\\bcrcl\\b", "cir"}, + {"\\bally\\b", "aly"}, + {"\\bblvd\\b", "boul"}, + {"\\bbypa\\b", "byp"}, + {"\\bbyps\\b", "byp"}, + {"\\bdriv\\b", "dr"}, + {"\\bextn\\b", "ext"}, + {"\\bfrwy\\b", "fwy"}, + {"\\bfrry\\b", "fry"}, + {"\\bgrov\\b", "grv"}, + {"\\bjctn\\b", "jt"}, + {"\\blane\\b", "la"}, + {"\\bpkwy\\b", "pky"}, + {"\\bplza\\b", "plz"}, + {"\\bradl\\b", "rad"}, + {"\\bstrt\\b", "st"}, + {"\\bterr\\b", "ter"}, + {"\\btrks\\b", "trk"}, + {"\\btrak\\b", "trk"}, + {"\\btrpk\\b", "tpk"}, + {"\\btpke\\b", "tpk"}, + {"\\bvdct\\b", "via"}, + {"\\bx\\s+rd\\b", "xrd"}, + {"\\btwln\\b", "t l"}, + {"\\btown\\b", ""}, + {"\\btwsp\\b", "tw"}, + {"\\bcity\\b", "cy"}, + {"\\bbing\\b", "byng"}, + {"\\bcolo\\b", "co"}, + {"\\bariz\\b", "az"}, + {"\\bconn\\b", "ct"}, + {"\\biowa\\b", "ia"}, + {"\\bkans\\b", "ks"}, + {"\\bmass\\b", "ma"}, + {"\\bmich\\b", "mi"}, + {"\\bminn\\b", "mn"}, + {"\\bmiss\\b", "ms"}, + {"\\bnebr\\b", "ne"}, + {"\\bohio\\b", "oh"}, + {"\\bokla\\b", "ok"}, + {"\\boreg\\b", "or"}, + {"\\btenn\\b", ""}, + {"\\butah\\b", "ut"}, + {"\\bwash\\b", "wa"}, + {"\\bguam\\b", "gu"}, + {"\\bnth\\b", "n"}, + {"\\bsth\\b", "s"}, + {"\\bone\\b", "1"}, + {"\\btwo\\b", "2"}, + {"\\bsix\\b", "6"}, + {"\\bten\\b", "10"}, + {"\\bbtm\\b", "bot"}, + {"\\bcmp\\b", "cp"}, + {"\\bcen\\b", "ctr"}, + {"\\bcrk\\b", "ck"}, + {"\\bdam\\b", "dm"}, + {"\\bdiv\\b", "dv"}, + {"\\bdvd\\b", "dv"}, + {"\\bfrt\\b", "ft"}, + {"\\bhei\\b", "ht"}, + {"\\bhts\\b", "ht"}, + {"\\bhls\\b", "hl"}, + {"\\bisl\\b", "is"}, + {"\\biss\\b", "is"}, + {"\\bjct\\b", "jt"}, + {"\\bkey\\b", "ky"}, + {"\\blke\\b", "lk"}, + {"\\blwr\\b", "lo"}, + {"\\bmtn\\b", "mnt"}, + {"\\bntl\\b", "nl"}, + {"\\bprk\\b", "pk"}, + {"\\bprr\\b", "pr"}, + {"\\briv\\b", "rvr"}, + {"\\bsan\\b", "sn"}, + {"\\bspr\\b", "spg"}, + {"\\bsqr\\b", "sq"}, + {"\\bsqu\\b", "sq"}, + {"\\bstn\\b", "sta"}, + {"\\btrl\\b", "tr"}, + {"\\bvly\\b", "vl"}, + {"\\bvlg\\b", "vil"}, + {"\\bvst\\b", "vis"}, + {"\\brte\\b", "rt"}, + {"\\bave\\b", "av"}, + {"\\bavn\\b", "av"}, + {"\\bcrt\\b", "ct"}, + {"\\bdrv\\b", "dr"}, + {"\\bstr\\b", "st"}, + {"\\bway\\b", "wy"}, + {"\\bcam\\b", "cm"}, + {"\\btwp\\b", "tw"}, + {"\\bcty\\b", "cy"}, + {"\\bdpt\\b", "dep"}, + {"\\bl\\s+a\\b", "la"}, + {"\\bnyc\\b", "ny"}, + {"\\bd\\s+c\\b", "dc"}, + {"\\bn\\s+h\\b", "nh"}, + {"\\bn\\s+j\\b", "nj"}, + {"\\bn\\s+m\\b", "nm"}, + {"\\bnys\\b", "ny"}, + {"\\bn\\s+y\\b", "ny"}, + {"\\bn\\s+c\\b", "nc"}, + {"\\bn\\s+d\\b", "nd"}, + {"\\bp\\s+r\\b", "pr"}, + {"\\br\\s+i\\b", "ri"}, + {"\\bs\\s+c\\b", "sc"}, + {"\\bs\\s+d\\b", "sd"}, + {"\\bv\\s+i\\b", "vi"}, + {"\\bw\\s+v\\b", "wv"}, + {"\\bala\\b", "al"}, + {"\\bfla\\b", "fl"}, + {"\\bill\\b", "il"}, + {"\\bind\\b", "in"}, + {"\\bkan\\b", "ks"}, + {"\\bneb\\b", "ne"}, + {"\\bnev\\b", "nv"}, + {"\\bore\\b", "or"}, + {"\\bwis\\b", "wi"}, + {"\\bwva\\b", "wv"}, + {"\\busa\\b", "us"}, + {"\\bu\\s+s\\b", "us"}, + {"\\bcr\\b", "ck"}, + {"\\bvy\\b", "vl"}, + {"\\bln\\b", "la"}, + {"\\btp\\b", "tw"}, + {"\\btn\\b", ""}, + {"\\b\\#\\b", ""}, +}; + +const Rule kRules_VN[] = { + {"\\bthi\\s+tran\\s+van\\s+dien\\b", "ttvan dien"}, + {"\\bho\\s+chi\\s+minh\\s+city\\b", "hcm"}, + {"\\bho\\s+chi\\s+minh\\b", "hcm"}, + {"\\bthanh\\s+pho\\b", "tp"}, + {"\\btpha\\s+noi\\b", "ha noi"}, + {"\\bthi\\s+tran\\b", "tt"}, + {"\\bviet\\s+nam\\b", "vn"}, + {"\\bvietnam\\b", "vn"}, + {"\\bphuong\\b", "p"}, + {"\\bthi\\s+xa\\b", "tx"}, + {"\\bhuyen\\b", "h"}, + {"\\bhcmc\\b", "hcm"}, + {"\\bquan\\b", "q"}, + {"\\bt\\.p\\.\\b", "tp"}, + {"\\btinh\\b", "t"}, + {"\\bph\\.\\b", "p"}, + {"\\btp\\.\\b", "tp"}, + {"\\btt\\.\\b", "tt"}, + {"\\btx\\.\\b", "tx"}, + {"\\bh\\.\\b", "h"}, + {"\\bp\\.\\b", "p"}, + {"\\bq\\.\\b", "q"}, + {"\\bt\\.\\b", "t"}, + {"\\bx\\.\\b", "x"}, + {"\\bxa\\b", "x"}, +}; + +const Rule kRules_ZA[] = { + {"\\brepublic\\s+of\\s+south\\s+africa\\b", "za"}, + {"\\bkwazulu\\s+natal\\b", "zn"}, + {"\\bnorthern\\s+cape\\b", "nc"}, + {"\\beastern\\s+cape\\b", "ec"}, + {"\\bkwazulunatal\\b", "zn"}, + {"\\bwestern\\s+cape\\b", "wc"}, + {"\\bsouth\\s+africa\\b", "za"}, + {"\\bfree\\s+state\\b", "fs"}, + {"\\bmpumalanga\\b", "mp"}, + {"\\bnorth\\s+west\\b", "nw"}, + {"\\bnoord\\s+kaap\\b", "nc"}, + {"\\bboulevard\\b", "blvd"}, + {"\\bfreestate\\b", "fs"}, + {"\\boos\\s+kaap\\b", "ec"}, + {"\\bvrystaat\\b", "fs"}, + {"\\bnoordwes\\b", "nw"}, + {"\\bwes\\s+kaap\\b", "wc"}, + {"\\bhighway\\b", "hwy"}, + {"\\bgauteng\\b", "gp"}, + {"\\blimpopo\\b", "lp"}, + {"\\bstreet\\b", "st"}, + {"\\bavenue\\b", "ave"}, + {"\\bsaint\\b", "st"}, + {"\\bdrive\\b", "dr"}, + {"\\bnatal\\b", "zn"}, + {"\\broad\\b", "rd"}, + {"\\bkzn\\b", "zn"}, + {"\\bgt\\b", "gp"}, + {"\\bnl\\b", "zn"}, + {"\\bsa\\b", "za"}, +}; + +} // namespace + +const RegionInfo kRuleTable[] = { + {"AD", kRules_AD, sizeof(kRules_AD) / sizeof(kRules_AD[0])}, + {"AR", kRules_AR, sizeof(kRules_AR) / sizeof(kRules_AR[0])}, + {"AU", kRules_AU, sizeof(kRules_AU) / sizeof(kRules_AU[0])}, + {"BE", kRules_BE, sizeof(kRules_BE) / sizeof(kRules_BE[0])}, + {"BR", kRules_BR, sizeof(kRules_BR) / sizeof(kRules_BR[0])}, + {"CA", kRules_CA, sizeof(kRules_CA) / sizeof(kRules_CA[0])}, + {"CH", kRules_CH, sizeof(kRules_CH) / sizeof(kRules_CH[0])}, + {"CL", kRules_CL, sizeof(kRules_CL) / sizeof(kRules_CL[0])}, + {"CO", kRules_CO, sizeof(kRules_CO) / sizeof(kRules_CO[0])}, + {"DE", kRules_DE, sizeof(kRules_DE) / sizeof(kRules_DE[0])}, + {"DK", kRules_DK, sizeof(kRules_DK) / sizeof(kRules_DK[0])}, + {"ES", kRules_ES, sizeof(kRules_ES) / sizeof(kRules_ES[0])}, + {"FR", kRules_FR, sizeof(kRules_FR) / sizeof(kRules_FR[0])}, + {"GB", kRules_GB, sizeof(kRules_GB) / sizeof(kRules_GB[0])}, + {"GR", kRules_GR, sizeof(kRules_GR) / sizeof(kRules_GR[0])}, + {"HK", kRules_HK, sizeof(kRules_HK) / sizeof(kRules_HK[0])}, + {"ID", kRules_ID, sizeof(kRules_ID) / sizeof(kRules_ID[0])}, + {"IE", kRules_IE, sizeof(kRules_IE) / sizeof(kRules_IE[0])}, + {"IN", kRules_IN, sizeof(kRules_IN) / sizeof(kRules_IN[0])}, + {"IT", kRules_IT, sizeof(kRules_IT) / sizeof(kRules_IT[0])}, + {"LU", kRules_LU, sizeof(kRules_LU) / sizeof(kRules_LU[0])}, + {"MX", kRules_MX, sizeof(kRules_MX) / sizeof(kRules_MX[0])}, + {"MY", kRules_MY, sizeof(kRules_MY) / sizeof(kRules_MY[0])}, + {"NL", kRules_NL, sizeof(kRules_NL) / sizeof(kRules_NL[0])}, + {"NZ", kRules_NZ, sizeof(kRules_NZ) / sizeof(kRules_NZ[0])}, + {"PE", kRules_PE, sizeof(kRules_PE) / sizeof(kRules_PE[0])}, + {"PH", kRules_PH, sizeof(kRules_PH) / sizeof(kRules_PH[0])}, + {"PL", kRules_PL, sizeof(kRules_PL) / sizeof(kRules_PL[0])}, + {"PR", kRules_PR, sizeof(kRules_PR) / sizeof(kRules_PR[0])}, + {"PT", kRules_PT, sizeof(kRules_PT) / sizeof(kRules_PT[0])}, + {"RO", kRules_RO, sizeof(kRules_RO) / sizeof(kRules_RO[0])}, + {"RU", kRules_RU, sizeof(kRules_RU) / sizeof(kRules_RU[0])}, + {"SE", kRules_SE, sizeof(kRules_SE) / sizeof(kRules_SE[0])}, + {"TH", kRules_TH, sizeof(kRules_TH) / sizeof(kRules_TH[0])}, + {"TR", kRules_TR, sizeof(kRules_TR) / sizeof(kRules_TR[0])}, + {"US", kRules_US, sizeof(kRules_US) / sizeof(kRules_US[0])}, + {"VN", kRules_VN, sizeof(kRules_VN) / sizeof(kRules_VN[0])}, + {"ZA", kRules_ZA, sizeof(kRules_ZA) / sizeof(kRules_ZA[0])}, +}; + +const size_t kRuleTableSize = sizeof(kRuleTable)/sizeof(kRuleTable[0]); +} // namespace internal +} // namespace autofill
diff --git a/components/autofill/core/browser/address_rewriter_unittest.cc b/components/autofill/core/browser/address_rewriter_unittest.cc new file mode 100644 index 0000000..67d97dc --- /dev/null +++ b/components/autofill/core/browser/address_rewriter_unittest.cc
@@ -0,0 +1,284 @@ +// 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 "components/autofill/core/browser/address_rewriter.h" + +#include "base/strings/utf_string_conversions.h" +#include "testing/gtest/include/gtest/gtest.h" + +using base::UTF8ToUTF16; +using autofill::AddressRewriter; + +TEST(AddressRewriterTest, InvalidCountryCode) { + AddressRewriter ad = AddressRewriter::ForCountryCode(UTF8ToUTF16("ZZZZ")); + const base::string16 kSomeRandomText = UTF8ToUTF16("some random text"); + const base::string16 kOtherRandomText = UTF8ToUTF16("other random text"); + + EXPECT_EQ(ad.Rewrite(kSomeRandomText), ad.Rewrite(kSomeRandomText)); + EXPECT_EQ(ad.Rewrite(kOtherRandomText), ad.Rewrite(kOtherRandomText)); + + EXPECT_NE(ad.Rewrite(kSomeRandomText), ad.Rewrite(kOtherRandomText)); +} + +TEST(AddressRewriterTest, AD) { + AddressRewriter ad = AddressRewriter::ForCountryCode(UTF8ToUTF16("ad")); + EXPECT_EQ(ad.Rewrite(UTF8ToUTF16("parroquia de andorra la vella")), + ad.Rewrite(UTF8ToUTF16("andorra la vella"))); + EXPECT_EQ(ad.Rewrite(UTF8ToUTF16("principal de andorra")), + ad.Rewrite(UTF8ToUTF16("an"))); +} + +TEST(AddressRewriterTest, AR) { + AddressRewriter ar = AddressRewriter::ForCountryCode(UTF8ToUTF16("ar")); + EXPECT_EQ(ar.Rewrite(UTF8ToUTF16( + "tierra del fuego antartida e islas del atlantico sur")), + ar.Rewrite(UTF8ToUTF16("tierra del fuego"))); + EXPECT_EQ(ar.Rewrite(UTF8ToUTF16("ciudad autonoma de buenos aires")), + ar.Rewrite(UTF8ToUTF16("capital federal"))); +} + +TEST(AddressRewriterTest, AU) { + AddressRewriter au = AddressRewriter::ForCountryCode(UTF8ToUTF16("au")); + EXPECT_EQ(au.Rewrite(UTF8ToUTF16("australian capital territory")), + au.Rewrite(UTF8ToUTF16("act"))); + EXPECT_EQ(au.Rewrite(UTF8ToUTF16("jervis bay territory")), + au.Rewrite(UTF8ToUTF16("jbt"))); +} + +TEST(AddressRewriterTest, BE) { + AddressRewriter be = AddressRewriter::ForCountryCode(UTF8ToUTF16("be")); + EXPECT_EQ(be.Rewrite(UTF8ToUTF16("brussels hoofdstedelijk gewest")), + be.Rewrite(UTF8ToUTF16("region de bruxelles capitale"))); + EXPECT_EQ(be.Rewrite(UTF8ToUTF16("arrondissement administratif de foo")), + be.Rewrite(UTF8ToUTF16("foo"))); +} + +TEST(AddressRewriterTest, BR) { + AddressRewriter br = AddressRewriter::ForCountryCode(UTF8ToUTF16("br")); + EXPECT_EQ(br.Rewrite(UTF8ToUTF16("rio grande do norte")), + br.Rewrite(UTF8ToUTF16("rn"))); +} + +TEST(AddressRewriterTest, CA) { + AddressRewriter ca = AddressRewriter::ForCountryCode(UTF8ToUTF16("ca")); + EXPECT_EQ(ca.Rewrite(UTF8ToUTF16("qc")), ca.Rewrite(UTF8ToUTF16("quebec"))); + EXPECT_EQ(ca.Rewrite(UTF8ToUTF16("prince edward island")), + ca.Rewrite(UTF8ToUTF16("pei"))); + EXPECT_EQ(ca.Rewrite(UTF8ToUTF16("prince edward island")), + ca.Rewrite(UTF8ToUTF16("ile du prince edouard"))); + EXPECT_EQ(ca.Rewrite(UTF8ToUTF16("st")), ca.Rewrite(UTF8ToUTF16("street"))); + EXPECT_EQ(ca.Rewrite(UTF8ToUTF16("sainte")), + ca.Rewrite(UTF8ToUTF16("saint"))); +} + +TEST(AddressRewriterTest, CH) { + AddressRewriter ch = AddressRewriter::ForCountryCode(UTF8ToUTF16("ch")); + EXPECT_EQ(ch.Rewrite(UTF8ToUTF16("appenzell rhodes exterieures")), + ch.Rewrite(UTF8ToUTF16("appenzell ausserrhoden"))); + EXPECT_EQ(ch.Rewrite(UTF8ToUTF16("prettigovia davos")), + ch.Rewrite(UTF8ToUTF16("prattigau davos"))); +} + +TEST(AddressRewriterTest, CL) { + AddressRewriter cl = AddressRewriter::ForCountryCode(UTF8ToUTF16("cl")); + EXPECT_EQ( + cl.Rewrite(UTF8ToUTF16("aisen del general carlos ibanez del campo")), + cl.Rewrite(UTF8ToUTF16("xi"))); + EXPECT_EQ(cl.Rewrite(UTF8ToUTF16("metropolitana de santiago de chile")), + cl.Rewrite(UTF8ToUTF16("metropolitana de santiago"))); +} + +TEST(AddressRewriterTest, CO) { + AddressRewriter co = AddressRewriter::ForCountryCode(UTF8ToUTF16("co")); + EXPECT_EQ(co.Rewrite(UTF8ToUTF16("columbia")), + co.Rewrite(UTF8ToUTF16("colombia"))); +} + +TEST(AddressRewriterTest, DE) { + AddressRewriter de = AddressRewriter::ForCountryCode(UTF8ToUTF16("de")); + EXPECT_EQ(de.Rewrite(UTF8ToUTF16("federal republic of germany")), + de.Rewrite(UTF8ToUTF16("deutschland"))); + EXPECT_EQ(de.Rewrite(UTF8ToUTF16("germany")), + de.Rewrite(UTF8ToUTF16("bundesrepublik deutschland"))); +} + +TEST(AddressRewriterTest, DK) { + AddressRewriter dk = AddressRewriter::ForCountryCode(UTF8ToUTF16("dk")); + EXPECT_EQ(dk.Rewrite(UTF8ToUTF16("denmark")), + dk.Rewrite(UTF8ToUTF16("danmark"))); +} + +TEST(AddressRewriterTest, ES) { + AddressRewriter es = AddressRewriter::ForCountryCode(UTF8ToUTF16("es")); + EXPECT_EQ(es.Rewrite(UTF8ToUTF16("balearic islands")), + es.Rewrite(UTF8ToUTF16("islas baleares"))); +} + +TEST(AddressRewriterTest, FR) { + AddressRewriter fr = AddressRewriter::ForCountryCode(UTF8ToUTF16("fr")); + EXPECT_EQ(fr.Rewrite(UTF8ToUTF16("quatorzieme")), + fr.Rewrite(UTF8ToUTF16("14"))); +} + +TEST(AddressRewriterTest, GB) { + AddressRewriter gb = AddressRewriter::ForCountryCode(UTF8ToUTF16("gb")); + EXPECT_EQ(gb.Rewrite(UTF8ToUTF16("north east lincolnshire")), + gb.Rewrite(UTF8ToUTF16("gb-nel"))); + + EXPECT_NE(gb.Rewrite(UTF8ToUTF16("norfolk")), + gb.Rewrite(UTF8ToUTF16("suffolk"))); +} + +TEST(AddressRewriterTest, GR) { + AddressRewriter gr = AddressRewriter::ForCountryCode(UTF8ToUTF16("gr")); + EXPECT_EQ(gr.Rewrite(UTF8ToUTF16("aitolia kai akarnania")), + gr.Rewrite(UTF8ToUTF16("aitoloakarnania"))); +} + +TEST(AddressRewriterTest, HK) { + AddressRewriter hk = AddressRewriter::ForCountryCode(UTF8ToUTF16("hk")); + EXPECT_EQ(hk.Rewrite(UTF8ToUTF16("hong kong")), + hk.Rewrite(UTF8ToUTF16("hk"))); +} + +TEST(AddressRewriterTest, ID) { + AddressRewriter id = AddressRewriter::ForCountryCode(UTF8ToUTF16("id")); + EXPECT_EQ(id.Rewrite(UTF8ToUTF16("nanggroe aceh darussalam")), + id.Rewrite(UTF8ToUTF16("aceh"))); +} + +TEST(AddressRewriterTest, IE) { + AddressRewriter ie = AddressRewriter::ForCountryCode(UTF8ToUTF16("ie")); + EXPECT_EQ(ie.Rewrite(UTF8ToUTF16("avenue")), ie.Rewrite(UTF8ToUTF16("ave"))); +} + +TEST(AddressRewriterTest, IN) { + AddressRewriter in = AddressRewriter::ForCountryCode(UTF8ToUTF16("in")); + EXPECT_EQ(in.Rewrite(UTF8ToUTF16("thiruvananthapuram")), + in.Rewrite(UTF8ToUTF16("tiruvananthapuram"))); +} + +TEST(AddressRewriterTest, IT) { + AddressRewriter it = AddressRewriter::ForCountryCode(UTF8ToUTF16("it")); + EXPECT_EQ(it.Rewrite(UTF8ToUTF16("trentino alto adige")), + it.Rewrite(UTF8ToUTF16("trentino sudtirol"))); +} + +TEST(AddressRewriterTest, LU) { + AddressRewriter lu = AddressRewriter::ForCountryCode(UTF8ToUTF16("lu")); + EXPECT_EQ(lu.Rewrite(UTF8ToUTF16("esplanade")), + lu.Rewrite(UTF8ToUTF16("espl"))); +} + +TEST(AddressRewriterTest, MX) { + AddressRewriter mx = AddressRewriter::ForCountryCode(UTF8ToUTF16("mx")); + EXPECT_EQ(mx.Rewrite(UTF8ToUTF16("estado de mexico")), + mx.Rewrite(UTF8ToUTF16("mexico"))); +} + +TEST(AddressRewriterTest, MY) { + AddressRewriter my = AddressRewriter::ForCountryCode(UTF8ToUTF16("my")); + EXPECT_EQ(my.Rewrite(UTF8ToUTF16("malaysia")), my.Rewrite(UTF8ToUTF16("my"))); +} + +TEST(AddressRewriterTest, NL) { + AddressRewriter nl = AddressRewriter::ForCountryCode(UTF8ToUTF16("nl")); + EXPECT_EQ(nl.Rewrite(UTF8ToUTF16("nordholland")), + nl.Rewrite(UTF8ToUTF16("noord holland"))); +} + +TEST(AddressRewriterTest, NZ) { + AddressRewriter nz = AddressRewriter::ForCountryCode(UTF8ToUTF16("nz")); + EXPECT_EQ(nz.Rewrite(UTF8ToUTF16("oceanbeach")), + nz.Rewrite(UTF8ToUTF16("ocean beach"))); +} + +TEST(AddressRewriterTest, PE) { + AddressRewriter pe = AddressRewriter::ForCountryCode(UTF8ToUTF16("pe")); + EXPECT_EQ(pe.Rewrite(UTF8ToUTF16("avenida")), pe.Rewrite(UTF8ToUTF16("av"))); +} + +TEST(AddressRewriterTest, PH) { + AddressRewriter ph = AddressRewriter::ForCountryCode(UTF8ToUTF16("ph")); + EXPECT_EQ(ph.Rewrite(UTF8ToUTF16("philippines")), + ph.Rewrite(UTF8ToUTF16("ph"))); +} + +TEST(AddressRewriterTest, PL) { + AddressRewriter pl = AddressRewriter::ForCountryCode(UTF8ToUTF16("pl")); + EXPECT_EQ(pl.Rewrite(UTF8ToUTF16("warmian masurian")), + pl.Rewrite(UTF8ToUTF16("warminsko"))); +} + +TEST(AddressRewriterTest, PR) { + AddressRewriter pr = AddressRewriter::ForCountryCode(UTF8ToUTF16("pr")); + EXPECT_EQ(pr.Rewrite(UTF8ToUTF16("san juan antiguo")), + pr.Rewrite(UTF8ToUTF16("old san juan"))); +} + +TEST(AddressRewriterTest, PT) { + AddressRewriter pt = AddressRewriter::ForCountryCode(UTF8ToUTF16("pt")); + EXPECT_EQ(pt.Rewrite(UTF8ToUTF16("doctor")), + pt.Rewrite(UTF8ToUTF16("doutor"))); +} + +TEST(AddressRewriterTest, RO) { + AddressRewriter ro = AddressRewriter::ForCountryCode(UTF8ToUTF16("ro")); + EXPECT_EQ(ro.Rewrite(UTF8ToUTF16("romania")), ro.Rewrite(UTF8ToUTF16("ro"))); +} + +TEST(AddressRewriterTest, RU) { + AddressRewriter ru = AddressRewriter::ForCountryCode(UTF8ToUTF16("ru")); + // TODO(rogerm): UTF8 matching isnt' working as expected. Fix it! + EXPECT_NE(ru.Rewrite(UTF8ToUTF16("россия")), + ru.Rewrite(UTF8ToUTF16("russia"))); +} + +TEST(AddressRewriterTest, SE) { + AddressRewriter se = AddressRewriter::ForCountryCode(UTF8ToUTF16("se")); + EXPECT_EQ(se.Rewrite(UTF8ToUTF16("oestergoetland")), + se.Rewrite(UTF8ToUTF16("vastergoetland"))); +} + +TEST(AddressRewriterTest, TH) { + AddressRewriter th = AddressRewriter::ForCountryCode(UTF8ToUTF16("th")); + // TODO(rogerm): UTF8 matching isnt' working as expected. Fix it! + EXPECT_NE(th.Rewrite(UTF8ToUTF16("ประเทศไทย")), + th.Rewrite(UTF8ToUTF16("thailand"))); +} + +TEST(AddressRewriterTest, TR) { + AddressRewriter tr = AddressRewriter::ForCountryCode(UTF8ToUTF16("tr")); + EXPECT_EQ(tr.Rewrite(UTF8ToUTF16("turkiye")), + tr.Rewrite(UTF8ToUTF16("turkey"))); +} + +TEST(AddressRewriterTest, US) { + AddressRewriter us = AddressRewriter::ForCountryCode(UTF8ToUTF16("us")); + EXPECT_EQ(us.Rewrite(UTF8ToUTF16("ca")), + us.Rewrite(UTF8ToUTF16("california"))); + EXPECT_EQ(us.Rewrite(UTF8ToUTF16("west virginia")), + us.Rewrite(UTF8ToUTF16("wv"))); + EXPECT_EQ(us.Rewrite(UTF8ToUTF16("virginia")), us.Rewrite(UTF8ToUTF16("va"))); + EXPECT_EQ(us.Rewrite(UTF8ToUTF16("washington d c")), + us.Rewrite(UTF8ToUTF16("washington dc"))); + + // Similar names, but not the same. + EXPECT_NE(us.Rewrite(UTF8ToUTF16("west virginia")), + us.Rewrite(UTF8ToUTF16("virginia"))); + EXPECT_NE(us.Rewrite(UTF8ToUTF16("washington")), + us.Rewrite(UTF8ToUTF16("washington dc"))); +} + +TEST(AddressRewriterTest, VN) { + AddressRewriter vn = AddressRewriter::ForCountryCode(UTF8ToUTF16("vn")); + EXPECT_EQ(vn.Rewrite(UTF8ToUTF16("viet nam")), + vn.Rewrite(UTF8ToUTF16("vietnam"))); +} + +TEST(AddressRewriterTest, ZA) { + AddressRewriter za = AddressRewriter::ForCountryCode(UTF8ToUTF16("za")); + EXPECT_EQ(za.Rewrite(UTF8ToUTF16("republic of south africa")), + za.Rewrite(UTF8ToUTF16("south africa"))); +}
diff --git a/components/autofill/core/browser/autofill_client.h b/components/autofill/core/browser/autofill_client.h index b83d6efb..354610b 100644 --- a/components/autofill/core/browser/autofill_client.h +++ b/components/autofill/core/browser/autofill_client.h
@@ -181,6 +181,13 @@ // If the context is secure. virtual bool IsContextSecure(const GURL& form_origin) = 0; + + // Whether it is appropriate to show a signin promo for this user. + virtual bool ShouldShowSigninPromo() = 0; + + // Starts the signin flow. Should not be called if ShouldShowSigninPromo() + // returns false. + virtual void StartSigninFlow() = 0; }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc index eaa1fd5..a81613d0 100644 --- a/components/autofill/core/browser/autofill_external_delegate.cc +++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -35,6 +35,7 @@ has_suggestion_(false), has_shown_popup_for_current_edit_(false), should_show_scan_credit_card_(false), + should_show_cc_signin_promo_(false), has_shown_address_book_prompt(false), weak_ptr_factory_(this) { DCHECK(manager); @@ -55,6 +56,8 @@ element_bounds_ = element_bounds; should_show_scan_credit_card_ = manager_->ShouldShowScanCreditCard(query_form_, query_field_); + should_show_cc_signin_promo_ = + manager_->ShouldShowCreditCardSigninPromo(query_form_, query_field_); } void AutofillExternalDelegate::OnSuggestionsReturned( @@ -100,6 +103,22 @@ if (has_suggestion_) ApplyAutofillOptions(&suggestions); + // Append the credit card signin promo, if appropriate. + if (has_suggestion_ && should_show_cc_signin_promo_) { +// No separator on Android. +#if !defined(OS_ANDROID) + Suggestion separator; + separator.frontend_id = POPUP_ITEM_ID_SEPARATOR; + suggestions.push_back(separator); +#endif + + Suggestion signin_promo_suggestion( + l10n_util::GetStringUTF16(IDS_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO)); + signin_promo_suggestion.frontend_id = + POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO; + suggestions.push_back(signin_promo_suggestion); + } + #if !defined(OS_ANDROID) // Remove the separator if it is the last element. DCHECK_GT(suggestions.size(), 0U); @@ -181,6 +200,8 @@ } else if (identifier == POPUP_ITEM_ID_SCAN_CREDIT_CARD) { manager_->client()->ScanCreditCard(base::Bind( &AutofillExternalDelegate::OnCreditCardScanned, GetWeakPtr())); + } else if (identifier == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) { + manager_->client()->StartSigninFlow(); } else { if (identifier > 0) // Denotes an Autofill suggestion. AutofillMetrics::LogAutofillSuggestionAcceptedIndex(position);
diff --git a/components/autofill/core/browser/autofill_external_delegate.h b/components/autofill/core/browser/autofill_external_delegate.h index f880c750..37925fb1 100644 --- a/components/autofill/core/browser/autofill_external_delegate.h +++ b/components/autofill/core/browser/autofill_external_delegate.h
@@ -142,6 +142,9 @@ // FIXME bool should_show_scan_credit_card_; + // Whether the credit card signin promo should be shown to the user. + bool should_show_cc_signin_promo_; + // Whether the access Address Book prompt has ever been shown for the current // |query_form_|. This variable is only used on OSX. bool has_shown_address_book_prompt;
diff --git a/components/autofill/core/browser/autofill_external_delegate_unittest.cc b/components/autofill/core/browser/autofill_external_delegate_unittest.cc index fab6c93..fb67541 100644 --- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc +++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
@@ -76,6 +76,8 @@ MOCK_METHOD0(HideAutofillPopup, void()); + MOCK_METHOD0(StartSigninFlow, void()); + private: DISALLOW_COPY_AND_ASSIGN(MockAutofillClient); }; @@ -91,6 +93,9 @@ MOCK_METHOD2(ShouldShowScanCreditCard, bool(const FormData& form, const FormFieldData& field)); + MOCK_METHOD2(ShouldShowCreditCardSigninPromo, + bool(const FormData& form, const FormFieldData& field)); + MOCK_METHOD5(FillOrPreviewForm, void(AutofillDriver::RendererFormDataAction action, int query_id, @@ -188,6 +193,46 @@ 0); } +// Test that our external delegate properly adds the signin promo and its +// separator in the popup items. +TEST_F(AutofillExternalDelegateUnitTest, TestSigninPromoIsAdded) { + EXPECT_CALL(*autofill_manager_, ShouldShowCreditCardSigninPromo(_, _)) + .WillOnce(testing::Return(true)); + + IssueOnQuery(kQueryId); + + // The enums must be cast to ints to prevent compile errors on linux_rel. + auto element_ids = testing::ElementsAre( + kAutofillProfileId, +#if !defined(OS_ANDROID) + static_cast<int>(POPUP_ITEM_ID_SEPARATOR), +#endif + static_cast<int>(POPUP_ITEM_ID_AUTOFILL_OPTIONS), +#if !defined(OS_ANDROID) + static_cast<int>(POPUP_ITEM_ID_SEPARATOR), +#endif + static_cast<int>(POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO)); + + EXPECT_CALL(autofill_client_, + ShowAutofillPopup(_, _, SuggestionVectorIdsAre(element_ids), _)); + + // This should call ShowAutofillPopup. + std::vector<Suggestion> autofill_item; + autofill_item.push_back(Suggestion()); + autofill_item[0].frontend_id = kAutofillProfileId; + external_delegate_->OnSuggestionsReturned(kQueryId, autofill_item); + + EXPECT_CALL( + *autofill_manager_, + FillOrPreviewForm(AutofillDriver::FORM_DATA_ACTION_FILL, _, _, _, _)); + EXPECT_CALL(autofill_client_, HideAutofillPopup()); + + // This should trigger a call to hide the popup since we've selected an + // option. + external_delegate_->DidAcceptSuggestion(autofill_item[0].value, + autofill_item[0].frontend_id, 0); +} + // Test that data list elements for a node will appear in the Autofill popup. TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateDataList) { IssueOnQuery(kQueryId); @@ -564,6 +609,15 @@ CreditCard(card_number, expiration_month, expiration_year)); } +// Test that autofill client will start the signin flow after the user accepted +// the suggestion to sign in. +TEST_F(AutofillExternalDelegateUnitTest, SigninPromoMenuItem) { + EXPECT_CALL(autofill_client_, StartSigninFlow()); + EXPECT_CALL(autofill_client_, HideAutofillPopup()); + external_delegate_->DidAcceptSuggestion( + base::string16(), POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO, 0); +} + // Test that autofill manager will fill the credit card form after user scans a // credit card. TEST_F(AutofillExternalDelegateUnitTest, FillCreditCardForm) {
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc index f06b605..e43e85b2 100644 --- a/components/autofill/core/browser/autofill_manager.cc +++ b/components/autofill/core/browser/autofill_manager.cc
@@ -272,6 +272,16 @@ base::ASCIIToUTF16("0123456789")); } +bool AutofillManager::ShouldShowCreditCardSigninPromo( + const FormData& form, + const FormFieldData& field) { + // Check whether we are dealing with a credit card field and whether it's + // appropriate to show the promo (e.g. the platform is supported). + AutofillField* autofill_field = GetAutofillField(form, field); + return autofill_field && autofill_field->Type().group() == CREDIT_CARD && + client_->ShouldShowSigninPromo(); +} + void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms, const TimeTicks& timestamp) { if (!IsValidFormDataVector(forms))
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h index 2a37e9a..4b906a5 100644 --- a/components/autofill/core/browser/autofill_manager.h +++ b/components/autofill/core/browser/autofill_manager.h
@@ -94,6 +94,11 @@ virtual bool ShouldShowScanCreditCard(const FormData& form, const FormFieldData& field); + // Whether we should show the signin promo, based on the triggered |field| + // inside the |form|. + virtual bool ShouldShowCreditCardSigninPromo(const FormData& form, + const FormFieldData& field); + // Called from our external delegate so they cannot be private. virtual void FillOrPreviewForm(AutofillDriver::RendererFormDataAction action, int query_id,
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc index 179985d3..5ebd620 100644 --- a/components/autofill/core/browser/autofill_manager_unittest.cc +++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -73,6 +73,8 @@ MOCK_METHOD2(ConfirmSaveCreditCardLocally, void(const CreditCard& card, const base::Closure& callback)); + MOCK_METHOD0(ShouldShowSigninPromo, bool()); + private: DISALLOW_COPY_AND_ASSIGN(MockAutofillClient); }; @@ -4907,6 +4909,44 @@ EXPECT_FALSE(external_delegate_->on_suggestions_returned_seen()); } +// Test that ShouldShowCreditCardSigninPromo behaves as expected for a credit +// card form. +TEST_F(AutofillManagerTest, ShouldShowCreditCardSigninPromo_CreditCardField) { + // Set up our form data. + FormData form; + CreateTestCreditCardFormData(&form, true, false); + std::vector<FormData> forms(1, form); + FormsSeen(forms); + + FormFieldData field; + test::CreateTestFormField("Name on Card", "nameoncard", "", "text", &field); + + EXPECT_CALL(autofill_client_, ShouldShowSigninPromo()) + .WillOnce(testing::Return(true)); + EXPECT_TRUE(autofill_manager_->ShouldShowCreditCardSigninPromo(form, field)); + + EXPECT_CALL(autofill_client_, ShouldShowSigninPromo()) + .WillOnce(testing::Return(false)); + EXPECT_FALSE(autofill_manager_->ShouldShowCreditCardSigninPromo(form, field)); +} + +// Test that ShouldShowCreditCardSigninPromo behaves as expected for an address +// form. +TEST_F(AutofillManagerTest, ShouldShowCreditCardSigninPromo_AddressField) { + // Set up our form data. + FormData form; + test::CreateTestAddressFormData(&form); + std::vector<FormData> forms(1, form); + FormsSeen(forms); + + FormFieldData field; + test::CreateTestFormField("First Name", "firstname", "", "text", &field); + + // Call will now return false, because it is initiated from an address field. + EXPECT_CALL(autofill_client_, ShouldShowSigninPromo()).Times(0); + EXPECT_FALSE(autofill_manager_->ShouldShowCreditCardSigninPromo(form, field)); +} + // Verify that typing "S" into the middle name field will match and order middle // names "Shawn Smith" followed by "Adam Smith" i.e. prefix matched followed by // substring matched.
diff --git a/components/autofill/core/browser/autofill_profile_comparator.cc b/components/autofill/core/browser/autofill_profile_comparator.cc index 2fd4209f..d4c5003 100644 --- a/components/autofill/core/browser/autofill_profile_comparator.cc +++ b/components/autofill/core/browser/autofill_profile_comparator.cc
@@ -14,6 +14,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" +#include "components/autofill/core/browser/address_rewriter.h" #include "components/autofill/core/browser/autofill_country.h" #include "components/autofill/core/browser/autofill_data_util.h" #include "components/autofill/core/browser/state_names.h" @@ -27,7 +28,6 @@ namespace { const base::char16 kSpace[] = {L' ', L'\0'}; -const base::char16 kUS[] = {L'U', L'S', L'\0'}; bool ContainsNewline(base::StringPiece16 text) { return text.find('\n') != base::StringPiece16::npos; @@ -364,6 +364,8 @@ app_locale_); } + AddressRewriter rewriter = AddressRewriter::ForCountryCode(country_code); + // One of the cities is empty or one of the cities has a subset of tokens from // the other. Pick the city name with more tokens; this is usually the most // explicit one. @@ -375,9 +377,11 @@ } else if (city2.empty()) { address->SetInfo(kCity, city1, app_locale_); } else { - // Prefer the one with more tokens. - CompareTokensResult result = CompareTokens(NormalizeForComparison(city1), - NormalizeForComparison(city2)); + // Prefer the one with more tokens, making sure to apply address + // normalization and rewriting before doing the comparison. + CompareTokensResult result = + CompareTokens(rewriter.Rewrite(NormalizeForComparison(city1)), + rewriter.Rewrite(NormalizeForComparison(city2))); switch (result) { case SAME_TOKENS: // They have the same set of unique tokens. Let's pick the more recently @@ -422,9 +426,11 @@ address->SetInfo(kStreetAddress, address2, app_locale_); } else { // Prefer the one with more tokens if they're both single-line or both - // multi-line addresses. - CompareTokensResult result = CompareTokens( - NormalizeForComparison(address1), NormalizeForComparison(address2)); + // multi-line addresses, making sure to apply address normalization and + // rewriting before doing the comparison. + CompareTokensResult result = + CompareTokens(rewriter.Rewrite(NormalizeForComparison(address1)), + rewriter.Rewrite(NormalizeForComparison(address2))); switch (result) { case SAME_TOKENS: // They have the same set of unique tokens. Let's pick the one that's @@ -689,6 +695,9 @@ return false; } + AddressRewriter rewriter = + AddressRewriter::ForCountryCode(country1.empty() ? country2 : country1); + // State // ------ // Heuristic: States are mergeable if one is a (possibly empty) bag of words @@ -700,11 +709,10 @@ // state values (like "Select one", or "CA - California"). const AutofillType kState(ADDRESS_HOME_STATE); const base::string16& state1 = - NormalizeForComparison(p1.GetInfo(kState, app_locale_)); + rewriter.Rewrite(NormalizeForComparison(p1.GetInfo(kState, app_locale_))); const base::string16& state2 = - NormalizeForComparison(p2.GetInfo(kState, app_locale_)); - if (!IsMatchingState(GetNonEmptyOf(p1, p2, kCountryCode), state1, state2) && - CompareTokens(state1, state2) == DIFFERENT_TOKENS) { + rewriter.Rewrite(NormalizeForComparison(p2.GetInfo(kState, app_locale_))); + if (CompareTokens(state1, state2) == DIFFERENT_TOKENS) { return false; } @@ -716,10 +724,10 @@ // TODO(rogerm): If the match is between non-empty zip codes then we can infer // that the two city strings are intended to have the same meaning. This // handles the cases where we have a city vs one of its suburbs. - const base::string16& city1 = NormalizeForComparison( - p1.GetInfo(AutofillType(ADDRESS_HOME_CITY), app_locale_)); - const base::string16& city2 = NormalizeForComparison( - p2.GetInfo(AutofillType(ADDRESS_HOME_CITY), app_locale_)); + const base::string16& city1 = rewriter.Rewrite(NormalizeForComparison( + p1.GetInfo(AutofillType(ADDRESS_HOME_CITY), app_locale_))); + const base::string16& city2 = rewriter.Rewrite(NormalizeForComparison( + p2.GetInfo(AutofillType(ADDRESS_HOME_CITY), app_locale_))); if (CompareTokens(city1, city2) == DIFFERENT_TOKENS) { return false; } @@ -728,10 +736,10 @@ // -------- // Heuristic: Street addresses are mergeable if one is a (possibly empty) bag // of words subset of the other. - const base::string16& address1 = NormalizeForComparison( - p1.GetInfo(AutofillType(ADDRESS_HOME_STREET_ADDRESS), app_locale_)); - const base::string16& address2 = NormalizeForComparison( - p2.GetInfo(AutofillType(ADDRESS_HOME_STREET_ADDRESS), app_locale_)); + const base::string16& address1 = rewriter.Rewrite(NormalizeForComparison( + p1.GetInfo(AutofillType(ADDRESS_HOME_STREET_ADDRESS), app_locale_))); + const base::string16& address2 = rewriter.Rewrite(NormalizeForComparison( + p2.GetInfo(AutofillType(ADDRESS_HOME_STREET_ADDRESS), app_locale_))); if (CompareTokens(address1, address2) == DIFFERENT_TOKENS) { return false; } @@ -739,25 +747,4 @@ return true; } -bool AutofillProfileComparator::IsMatchingState( - const base::string16& country_code, - const base::string16& state1, - const base::string16& state2) const { - if (state1 == state2) - return true; - - if (country_code != kUS) - return false; - - // TODO(rogerm): Generalize this to all locals using string equivalence rules. - base::string16 name, abbreviation; - autofill::state_names::GetNameAndAbbreviation(state1, &name, &abbreviation); - if (abbreviation.empty()) { - // state1 wasn't recognized. There's no need to compare it to state2 - return false; - } - - return state2 == name || state2 == abbreviation; -} - } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_profile_comparator.h b/components/autofill/core/browser/autofill_profile_comparator.h index 0821db8..d594dec 100644 --- a/components/autofill/core/browser/autofill_profile_comparator.h +++ b/components/autofill/core/browser/autofill_profile_comparator.h
@@ -200,12 +200,6 @@ bool HaveMergeableAddresses(const AutofillProfile& p1, const AutofillProfile& p2) const; - // Returns true if |state1| and |state2| both represent the same state in - // |country_code|. - bool IsMatchingState(const base::string16& country_code, - const base::string16& state1, - const base::string16& state2) const; - private: l10n::CaseInsensitiveCompare case_insensitive_compare_; std::unique_ptr<icu::Transliterator> transliterator_;
diff --git a/components/autofill/core/browser/autofill_profile_comparator_unittest.cc b/components/autofill/core/browser/autofill_profile_comparator_unittest.cc index a4473fb..ff4727f 100644 --- a/components/autofill/core/browser/autofill_profile_comparator_unittest.cc +++ b/components/autofill/core/browser/autofill_profile_comparator_unittest.cc
@@ -840,3 +840,22 @@ MergeAddressesAndExpect(p1, p2, expected); } + +TEST_F(AutofillProfileComparatorTest, MergeAddressesWithRewrite) { + AutofillProfile empty; + AutofillProfile p1 = CreateProfileWithAddress( + "6543 CH BACON", "APP 3", "MONTRÉAL", "QUÉBEC", "HHH999", "ca"); + AutofillProfile p2 = CreateProfileWithAddress( + "6543, Bacon Rd", "", "Montreal", "QC", "hhh 999", "CA"); + p2.set_use_date(p1.use_date() + base::TimeDelta::FromMinutes(1)); + + Address expected; + expected.SetRawInfo(ADDRESS_HOME_LINE1, UTF8ToUTF16("6543 CH BACON")); + expected.SetRawInfo(ADDRESS_HOME_LINE2, UTF8ToUTF16("APP 3")); + expected.SetRawInfo(ADDRESS_HOME_CITY, UTF8ToUTF16("Montreal")); + expected.SetRawInfo(ADDRESS_HOME_STATE, UTF8ToUTF16("QC")); + expected.SetRawInfo(ADDRESS_HOME_ZIP, UTF8ToUTF16("hhh 999")); + expected.SetRawInfo(ADDRESS_HOME_COUNTRY, UTF8ToUTF16("CA")); + + MergeAddressesAndExpect(p1, p2, expected); +}
diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc index 77800cac..a37f16f 100644 --- a/components/autofill/core/browser/credit_card.cc +++ b/components/autofill/core/browser/credit_card.cc
@@ -35,6 +35,8 @@ #include "third_party/icu/source/i18n/unicode/dtfmtsym.h" #include "ui/base/l10n/l10n_util.h" +using base::ASCIIToUTF16; + namespace autofill { const base::char16 kMidlineEllipsis[] = { 0x22ef, 0 }; @@ -118,7 +120,7 @@ // static const base::string16 CreditCard::StripSeparators(const base::string16& number) { base::string16 stripped; - base::RemoveChars(number, base::ASCIIToUTF16("- "), &stripped); + base::RemoveChars(number, ASCIIToUTF16("- "), &stripped); return stripped; } @@ -290,7 +292,7 @@ base::string16 month = ExpirationMonthAsString(); base::string16 year = Expiration2DigitYearAsString(); if (!month.empty() && !year.empty()) - return month + base::ASCIIToUTF16("/") + year; + return month + ASCIIToUTF16("/") + year; return base::string16(); } @@ -298,7 +300,7 @@ base::string16 month = ExpirationMonthAsString(); base::string16 year = Expiration4DigitYearAsString(); if (!month.empty() && !year.empty()) - return month + base::ASCIIToUTF16("/") + year; + return month + ASCIIToUTF16("/") + year; return base::string16(); } @@ -331,7 +333,7 @@ break; case CREDIT_CARD_EXP_2_DIGIT_YEAR: - // This is a read-only attribute. + SetExpirationYearFromString(value); break; case CREDIT_CARD_EXP_4_DIGIT_YEAR: @@ -339,11 +341,11 @@ break; case CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR: - // This is a read-only attribute. + SetExpirationDateFromString(value); break; case CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR: - // This is a read-only attribute. + SetExpirationDateFromString(value); break; case CREDIT_CARD_TYPE: @@ -431,7 +433,7 @@ return std::make_pair(obfuscated_cc_number, base::string16()); base::string16 formatted_date(ExpirationMonthAsString()); - formatted_date.append(base::ASCIIToUTF16("/")); + formatted_date.append(ASCIIToUTF16("/")); formatted_date.append(Expiration4DigitYearAsString()); base::string16 separator = @@ -445,8 +447,7 @@ return; std::vector<base::StringPiece16> year_month = base::SplitStringPiece( - value, base::ASCIIToUTF16("-"), - base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); + value, ASCIIToUTF16("-"), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); DCHECK_EQ(2u, year_month.size()); int num = 0; bool converted = false; @@ -465,9 +466,20 @@ } void CreditCard::SetExpirationYear(int expiration_year) { - if (expiration_year != 0 && - (expiration_year < 2006 || expiration_year > 10000)) + // If |expiration_year| is beyond this millenium, or more than 2 digits but + // before the current millenium (e.g. "545", "1995"), return. What is left are + // values like "45" or "2018". + if (expiration_year > 2999 || + (expiration_year > 99 && expiration_year < 2000)) return; + + // Will normalize 2-digit years to the 4-digit version. + if (expiration_year > 0 && expiration_year < 100) { + base::Time::Exploded now_exploded; + base::Time::Now().LocalExplode(&now_exploded); + expiration_year += (now_exploded.year / 100) * 100; + } + expiration_year_ = expiration_year; } @@ -677,7 +689,7 @@ if (expiration_month_ >= 10) return month; - base::string16 zero = base::ASCIIToUTF16("0"); + base::string16 zero = ASCIIToUTF16("0"); zero.append(month); return zero; } @@ -721,6 +733,52 @@ SetExpirationYear(year); } +void CreditCard::SetExpirationDateFromString(const base::string16& text) { + // Check that |text| fits the supported patterns: mmyy, mmyyyy, m-yy, + // mm-yy, m-yyyy and mm-yyyy. Note that myy and myyyy matched by this pattern + // but are not supported (ambiguous). Separators: -, / and |. + if (!MatchesPattern(text, base::UTF8ToUTF16("^[0-9]{1,2}[-/|]?[0-9]{2,4}$"))) + return; + + base::string16 month; + base::string16 year; + + // Check for a separator. + base::string16 found_separator; + const std::vector<base::string16> kSeparators{ + ASCIIToUTF16("-"), ASCIIToUTF16("/"), ASCIIToUTF16("|")}; + for (const base::string16& separator : kSeparators) { + if (text.find(separator) != base::string16::npos) { + found_separator = separator; + break; + } + } + + if (!found_separator.empty()) { + std::vector<base::string16> month_year = base::SplitString( + text, found_separator, base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); + DCHECK_EQ(2u, month_year.size()); + month = month_year[0]; + year = month_year[1]; + } else if (text.size() % 2 == 0) { + // If there are no separators, the supported formats are mmyy and mmyyyy. + month = text.substr(0, 2); + year = text.substr(2); + } else { + // Odd number of digits with no separator is too ambiguous. + return; + } + + int num = 0; + bool converted = false; + converted = base::StringToInt(month, &num); + DCHECK(converted); + SetExpirationMonth(num); + converted = base::StringToInt(year, &num); + DCHECK(converted); + SetExpirationYear(num); +} + void CreditCard::SetNumber(const base::string16& number) { number_ = number; @@ -773,10 +831,10 @@ // Some abbreviations have . at the end (e.g., "janv." in French). We don't // care about matching that. base::string16 trimmed_month; - base::TrimString(month, base::ASCIIToUTF16("."), &trimmed_month); + base::TrimString(month, ASCIIToUTF16("."), &trimmed_month); for (int32_t i = 0; i < num_months; ++i) { base::string16 icu_month(months[i].getBuffer(), months[i].length()); - base::TrimString(icu_month, base::ASCIIToUTF16("."), &icu_month); + base::TrimString(icu_month, ASCIIToUTF16("."), &icu_month); if (compare.StringsEqual(icu_month, trimmed_month)) { *num = i + 1; // Adjust from 0-indexed to 1-indexed. return true;
diff --git a/components/autofill/core/browser/credit_card.h b/components/autofill/core/browser/credit_card.h index f516e98..0a636a6 100644 --- a/components/autofill/core/browser/credit_card.h +++ b/components/autofill/core/browser/credit_card.h
@@ -11,6 +11,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/gtest_prod_util.h" #include "base/strings/string16.h" #include "build/build_config.h" #include "components/autofill/core/browser/autofill_data_model.h" @@ -204,6 +205,9 @@ } private: + FRIEND_TEST_ALL_PREFIXES(CreditCardTest, SetExpirationDateFromString); + FRIEND_TEST_ALL_PREFIXES(CreditCardTest, SetExpirationYearFromString); + // FormGroup: void GetSupportedTypes(ServerFieldTypeSet* supported_types) const override; @@ -222,9 +226,15 @@ bool SetExpirationMonthFromString(const base::string16& text, const std::string& app_locale); - // Sets |expiration_year_| to the integer conversion of |text|. + // Sets |expiration_year_| to the integer conversion of |text|. Will handle + // 4-digit year or 2-digit year (eventually converted to 4-digit year). void SetExpirationYearFromString(const base::string16& text); + // Sets |expiration_year_| and |expiration_month_| to the integer conversion + // of |text|. Will handle mmyy, mmyyyy, mm-yyyy and mm-yy as well as single + // digit months, with various separators. + void SetExpirationDateFromString(const base::string16& text); + // See enum definition above. RecordType record_type_;
diff --git a/components/autofill/core/browser/credit_card_unittest.cc b/components/autofill/core/browser/credit_card_unittest.cc index 2f282578..52a23ba 100644 --- a/components/autofill/core/browser/credit_card_unittest.cc +++ b/components/autofill/core/browser/credit_card_unittest.cc
@@ -167,6 +167,79 @@ EXPECT_TRUE(a == b); } +TEST(CreditCardTest, SetExpirationYearFromString) { + static const struct { + std::string expiration_year; + int expected_year; + } kTestCases[] = { + // Valid values. + {"2040", 2040}, + {"45", 2045}, + {"045", 2045}, + {"9", 2009}, + + // Unrecognized year values. + {"052045", 0}, + {"123", 0}, + {"y2045", 0}, + }; + + for (size_t i = 0; i < arraysize(kTestCases); ++i) { + CreditCard card(base::GenerateGUID(), "some origin"); + card.SetExpirationYearFromString( + ASCIIToUTF16(kTestCases[i].expiration_year)); + + EXPECT_EQ(kTestCases[i].expected_year, card.expiration_year()) + << kTestCases[i].expiration_year << " " << kTestCases[i].expected_year; + } +} + +TEST(CreditCardTest, SetExpirationDateFromString) { + static const struct { + std::string expiration_date; + int expected_month; + int expected_year; + } kTestCases[] = {{"10", 0, 0}, // Too small. + {"1020451", 0, 0}, // Too long. + + // No separators. + {"105", 0, 0}, // Too ambiguous. + {"0545", 5, 2045}, + {"52045", 0, 0}, // Too ambiguous. + {"052045", 5, 2045}, + + // "/" separator. + {"05/45", 5, 2045}, + {"5/2045", 5, 2045}, + {"05/2045", 5, 2045}, + + // "-" separator. + {"05-45", 5, 2045}, + {"5-2045", 5, 2045}, + {"05-2045", 5, 2045}, + + // "|" separator. + {"05|45", 5, 2045}, + {"5|2045", 5, 2045}, + {"05|2045", 5, 2045}, + + // Invalid values. + {"13/2016", 0, 2016}, + {"16/13", 0, 2013}, + {"May-2015", 0, 0}, + {"05-/2045", 0, 0}, + {"05_2045", 0, 0}}; + + for (size_t i = 0; i < arraysize(kTestCases); ++i) { + CreditCard card(base::GenerateGUID(), "some origin"); + card.SetExpirationDateFromString( + ASCIIToUTF16(kTestCases[i].expiration_date)); + + EXPECT_EQ(kTestCases[i].expected_month, card.expiration_month()); + EXPECT_EQ(kTestCases[i].expected_year, card.expiration_year()); + } +} + TEST(CreditCardTest, Copy) { CreditCard a(base::GenerateGUID(), "https://www.example.com"); test::SetCreditCardInfo(&a, "John Dillinger", "123456789012", "01", "2010"); @@ -465,7 +538,7 @@ // Invalid because card number is not complete card.SetRawInfo(CREDIT_CARD_EXP_MONTH, ASCIIToUTF16("12")); - card.SetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, ASCIIToUTF16("9999")); + card.SetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, ASCIIToUTF16("2999")); card.SetRawInfo(CREDIT_CARD_NUMBER, ASCIIToUTF16("41111")); EXPECT_FALSE(card.IsValid()); @@ -727,7 +800,7 @@ TEST(CreditCardTest, CanBuildFromCardNumberAndExpirationDate) { base::string16 card_number = base::ASCIIToUTF16("test"); int month = 1; - int year = 3000; + int year = 2999; CreditCard card(card_number, month, year); EXPECT_EQ(card_number, card.number()); EXPECT_EQ(month, card.expiration_month());
diff --git a/components/autofill/core/browser/personal_data_manager_unittest.cc b/components/autofill/core/browser/personal_data_manager_unittest.cc index 803dbad6..231da52 100644 --- a/components/autofill/core/browser/personal_data_manager_unittest.cc +++ b/components/autofill/core/browser/personal_data_manager_unittest.cc
@@ -260,7 +260,7 @@ "https://www.example.com"); test::SetCreditCardInfo(&credit_card0, "Clyde Barrow", "347666888555" /* American Express */, "04", - "3999"); + "2999"); credit_card0.set_use_count(3); credit_card0.set_use_date(base::Time::Now() - base::TimeDelta::FromDays(1)); personal_data_->AddCreditCard(credit_card0); @@ -279,7 +279,7 @@ credit_card2.set_use_count(1); credit_card2.set_use_date(base::Time::Now() - base::TimeDelta::FromDays(1)); test::SetCreditCardInfo(&credit_card2, "Bonnie Parker", - "518765432109" /* Mastercard */, "12", "3999"); + "518765432109" /* Mastercard */, "12", "2999"); personal_data_->AddCreditCard(credit_card2); EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()) @@ -323,6 +323,31 @@ field_trial_->group(); } + void SubmitFormAndExpectImportedCardWithData(const FormData& form, + const char* exp_name, + const char* exp_cc_num, + const char* exp_cc_month, + const char* exp_cc_year) { + FormStructure form_structure(form); + form_structure.DetermineHeuristicTypes(); + std::unique_ptr<CreditCard> imported_credit_card; + EXPECT_TRUE(ImportCreditCard(form_structure, false, &imported_credit_card)); + ASSERT_TRUE(imported_credit_card); + personal_data_->SaveImportedCreditCard(*imported_credit_card); + + // Verify that the web database has been updated and the notification sent. + EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()) + .WillOnce(QuitMainMessageLoop()); + base::MessageLoop::current()->Run(); + + CreditCard expected(base::GenerateGUID(), "https://www.example.com"); + test::SetCreditCardInfo(&expected, exp_name, exp_cc_num, exp_cc_month, + exp_cc_year); + const std::vector<CreditCard*>& results = personal_data_->GetCreditCards(); + ASSERT_EQ(1U, results.size()); + EXPECT_EQ(0, expected.Compare(*results[0])); + } + // The temporary directory should be deleted at the end to ensure that // files are not used anymore and deletion succeeds. base::ScopedTempDir temp_dir_; @@ -529,12 +554,12 @@ "John Dillinger", "423456789012" /* Visa */, "01", "2999"); CreditCard credit_card1(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&credit_card1, - "Bonnie Parker", "518765432109" /* Mastercard */, "12", "3999"); + test::SetCreditCardInfo(&credit_card1, "Bonnie Parker", + "518765432109" /* Mastercard */, "12", "2999"); CreditCard credit_card2(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&credit_card2, - "Clyde Barrow", "347666888555" /* American Express */, "04", "3999"); + test::SetCreditCardInfo(&credit_card2, "Clyde Barrow", + "347666888555" /* American Express */, "04", "2999"); // Add two test credit cards to the database. personal_data_->AddCreditCard(credit_card0); @@ -693,7 +718,7 @@ std::vector<CreditCard> server_cards; server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "c789")); test::SetCreditCardInfo(&server_cards.back(), "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); test::SetServerCreditCards(autofill_table_, server_cards); personal_data_->Refresh(); @@ -728,12 +753,12 @@ server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "b456")); test::SetCreditCardInfo(&server_cards.back(), "Bonnie Parker", - "2109" /* Mastercard */, "12", "3999"); + "2109" /* Mastercard */, "12", "2999"); server_cards.back().SetTypeForMaskedCard(kMasterCard); server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "c789")); test::SetCreditCardInfo(&server_cards.back(), "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); test::SetServerCreditCards(autofill_table_, server_cards); personal_data_->Refresh(); @@ -804,8 +829,8 @@ "John Dillinger", "423456789012" /* Visa */, "01", "2999"); CreditCard credit_card1(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&credit_card1, - "Bonnie Parker", "518765432109" /* Mastercard */, "12", "3999"); + test::SetCreditCardInfo(&credit_card1, "Bonnie Parker", + "518765432109" /* Mastercard */, "12", "2999"); // Add two test profiles to the database. personal_data_->AddProfile(profile0); @@ -2056,7 +2081,7 @@ TEST_F(PersonalDataManagerTest, ImportCreditCard_Invalid) { FormData form; AddFullCreditCardForm(&form, "Jim Johansen", "1000000000000000", "02", - "3999"); + "2999"); FormStructure form_structure(form); form_structure.DetermineHeuristicTypes(); @@ -2140,7 +2165,7 @@ // Add a second different valid credit card. FormData form2; - AddFullCreditCardForm(&form2, "", "5500 0000 0000 0004", "02", "3999"); + AddFullCreditCardForm(&form2, "", "5500 0000 0000 0004", "02", "2999"); FormStructure form_structure2(form2); form_structure2.DetermineHeuristicTypes(); @@ -2155,13 +2180,89 @@ base::RunLoop().Run(); CreditCard expected2(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&expected2, "", "5500000000000004", "02", "3999"); + test::SetCreditCardInfo(&expected2, "", "5500000000000004", "02", "2999"); std::vector<CreditCard*> cards; cards.push_back(&expected); cards.push_back(&expected2); ExpectSameElements(cards, personal_data_->GetCreditCards()); } +// This form has the expiration year as one field with MM/YY. +TEST_F(PersonalDataManagerTest, ImportCreditCard_Month2DigitYearCombination) { + FormData form; + FormFieldData field; + test::CreateTestFormField("Name on card:", "name_on_card", "John MMYY", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Card Number:", "card_number", "4111111111111111", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Exp Date:", "exp_date", "05/45", "text", &field); + field.autocomplete_attribute = "cc-exp"; + field.max_length = 5; + form.fields.push_back(field); + + SubmitFormAndExpectImportedCardWithData(form, "John MMYY", "4111111111111111", + "05", "2045"); +} + +// This form has the expiration year as one field with MM/YYYY. +TEST_F(PersonalDataManagerTest, ImportCreditCard_Month4DigitYearCombination) { + FormData form; + FormFieldData field; + test::CreateTestFormField("Name on card:", "name_on_card", "John MMYYYY", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Card Number:", "card_number", "4111111111111111", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Exp Date:", "exp_date", "05/2045", "text", &field); + field.autocomplete_attribute = "cc-exp"; + field.max_length = 7; + form.fields.push_back(field); + + SubmitFormAndExpectImportedCardWithData(form, "John MMYYYY", + "4111111111111111", "05", "2045"); +} + +// This form has the expiration year as one field with M/YYYY. +TEST_F(PersonalDataManagerTest, ImportCreditCard_1DigitMonth4DigitYear) { + FormData form; + FormFieldData field; + test::CreateTestFormField("Name on card:", "name_on_card", "John MYYYY", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Card Number:", "card_number", "4111111111111111", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Exp Date:", "exp_date", "5/2045", "text", &field); + field.autocomplete_attribute = "cc-exp"; + form.fields.push_back(field); + + SubmitFormAndExpectImportedCardWithData(form, "John MYYYY", + "4111111111111111", "05", "2045"); +} + +// This form has the expiration year as a 2-digit field. +TEST_F(PersonalDataManagerTest, ImportCreditCard_2DigitYear) { + FormData form; + FormFieldData field; + test::CreateTestFormField("Name on card:", "name_on_card", "John Smith", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Card Number:", "card_number", "4111111111111111", + "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Exp Month:", "exp_month", "05", "text", &field); + form.fields.push_back(field); + test::CreateTestFormField("Exp Year:", "exp_year", "45", "text", &field); + field.max_length = 2; + form.fields.push_back(field); + + SubmitFormAndExpectImportedCardWithData(form, "John Smith", + "4111111111111111", "05", "2045"); +} + // Tests that a credit card is extracted because it only matches a masked server // card. TEST_F(PersonalDataManagerTest, @@ -2202,12 +2303,12 @@ std::vector<CreditCard> server_cards; server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "c789")); test::SetCreditCardInfo(&server_cards.back(), "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); test::SetServerCreditCards(autofill_table_, server_cards); // Type the same data as the unmasked card into a form. FormData form; - AddFullCreditCardForm(&form, "Clyde Barrow", "347666888555", "04", "3999"); + AddFullCreditCardForm(&form, "Clyde Barrow", "347666888555", "04", "2999"); // The card should not be offered to be saved locally because it only matches // the full server card. @@ -2222,7 +2323,7 @@ // Start with a single valid credit card form. FormData form1; AddFullCreditCardForm(&form1, "Biggie Smalls", "4111-1111-1111-1111", "01", - "2999"); + "2998"); FormStructure form_structure1(form1); form_structure1.DetermineHeuristicTypes(); @@ -2237,8 +2338,8 @@ base::RunLoop().Run(); CreditCard expected(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&expected, - "Biggie Smalls", "4111111111111111", "01", "2999"); + test::SetCreditCardInfo(&expected, "Biggie Smalls", "4111111111111111", "01", + "2998"); const std::vector<CreditCard*>& results = personal_data_->GetCreditCards(); ASSERT_EQ(1U, results.size()); EXPECT_EQ(0, expected.Compare(*results[0])); @@ -2247,7 +2348,7 @@ // the credit card number matches. FormData form2; AddFullCreditCardForm(&form2, "Biggie Smalls", "4111 1111 1111 1111", "01", - /* different year */ "3999"); + /* different year */ "2999"); FormStructure form_structure2(form2); form_structure2.DetermineHeuristicTypes(); @@ -2261,10 +2362,10 @@ base::RunLoop().Run(); // Expect that the newer information is saved. In this case the year is - // updated to "3999". + // updated to "2999". CreditCard expected2(base::GenerateGUID(), "https://www.example.com"); test::SetCreditCardInfo(&expected2, "Biggie Smalls", "4111111111111111", "01", - "3999"); + "2999"); const std::vector<CreditCard*>& results2 = personal_data_->GetCreditCards(); ASSERT_EQ(1U, results2.size()); EXPECT_EQ(0, expected2.Compare(*results2[0])); @@ -2274,7 +2375,7 @@ // Start with a single valid credit card form. FormData form1; AddFullCreditCardForm(&form1, "Biggie Smalls", "4111-1111-1111-1111", "01", - "2999"); + "2998"); FormStructure form_structure1(form1); form_structure1.DetermineHeuristicTypes(); @@ -2289,8 +2390,8 @@ base::RunLoop().Run(); CreditCard expected(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&expected, - "Biggie Smalls", "4111111111111111", "01", "2999"); + test::SetCreditCardInfo(&expected, "Biggie Smalls", "4111111111111111", "01", + "2998"); const std::vector<CreditCard*>& results = personal_data_->GetCreditCards(); ASSERT_EQ(1U, results.size()); EXPECT_EQ(0, expected.Compare(*results[0])); @@ -2299,7 +2400,7 @@ // the credit card number matches. FormData form2; AddFullCreditCardForm(&form2, "Biggie Smalls", "4111 1111 1111 1111", "01", - /* different year */ "3999"); + /* different year */ "2999"); FormStructure form_structure2(form2); form_structure2.DetermineHeuristicTypes(); @@ -2316,10 +2417,10 @@ base::RunLoop().Run(); // Expect that the newer information is saved. In this case the year is - // updated to "3999". + // updated to "2999". CreditCard expected2(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&expected2, - "Biggie Smalls", "4111111111111111", "01", "3999"); + test::SetCreditCardInfo(&expected2, "Biggie Smalls", "4111111111111111", "01", + "2999"); const std::vector<CreditCard*>& results2 = personal_data_->GetCreditCards(); ASSERT_EQ(1U, results2.size()); EXPECT_EQ(0, expected2.Compare(*results2[0])); @@ -2329,7 +2430,7 @@ // Start with a single valid credit card form. FormData form1; AddFullCreditCardForm(&form1, "Biggie Smalls", "4111-1111-1111-1111", "01", - "2999"); + "2998"); FormStructure form_structure1(form1); form_structure1.DetermineHeuristicTypes(); @@ -2344,8 +2445,8 @@ base::RunLoop().Run(); CreditCard expected(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&expected, - "Biggie Smalls", "4111111111111111", "01", "2999"); + test::SetCreditCardInfo(&expected, "Biggie Smalls", "4111111111111111", "01", + "2998"); const std::vector<CreditCard*>& results = personal_data_->GetCreditCards(); ASSERT_EQ(1U, results.size()); EXPECT_EQ(0, expected.Compare(*results[0])); @@ -2353,7 +2454,7 @@ // Add a second credit card with no number. FormData form2; AddFullCreditCardForm(&form2, "Biggie Smalls", /* no number */ nullptr, "01", - "3999"); + "2999"); FormStructure form_structure2(form2); form_structure2.DetermineHeuristicTypes(); @@ -2368,8 +2469,8 @@ // No change is expected. CreditCard expected2(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&expected2, - "Biggie Smalls", "4111111111111111", "01", "2999"); + test::SetCreditCardInfo(&expected2, "Biggie Smalls", "4111111111111111", "01", + "2998"); const std::vector<CreditCard*>& results2 = personal_data_->GetCreditCards(); ASSERT_EQ(1U, results2.size()); EXPECT_EQ(0, expected2.Compare(*results2[0])); @@ -2454,8 +2555,8 @@ // Start with a single valid credit card stored via the preferences. // Note the empty name. CreditCard saved_credit_card(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&saved_credit_card, - "", "4111111111111111" /* Visa */, "01", "2999"); + test::SetCreditCardInfo(&saved_credit_card, "", "4111111111111111" /* Visa */, + "01", "2998"); personal_data_->AddCreditCard(saved_credit_card); // Verify that the web database has been updated and the notification sent. @@ -2471,7 +2572,7 @@ // the credit card number matches. FormData form; AddFullCreditCardForm(&form, "Biggie Smalls", "4111-1111-1111-1111", "01", - /* different year */ "3999"); + /* different year */ "2999"); FormStructure form_structure(form); form_structure.DetermineHeuristicTypes(); @@ -2487,8 +2588,8 @@ // Expect that the newer information is saved. In this case the year is // added to the existing credit card. CreditCard expected2(base::GenerateGUID(), "https://www.example.com"); - test::SetCreditCardInfo(&expected2, - "Biggie Smalls", "4111111111111111", "01", "3999"); + test::SetCreditCardInfo(&expected2, "Biggie Smalls", "4111111111111111", "01", + "2999"); const std::vector<CreditCard*>& results2 = personal_data_->GetCreditCards(); ASSERT_EQ(1U, results2.size()); EXPECT_EQ(0, expected2.Compare(*results2[0])); @@ -2541,7 +2642,7 @@ // Start with a verified credit card. CreditCard credit_card(base::GenerateGUID(), kSettingsOrigin); test::SetCreditCardInfo(&credit_card, "Biggie Smalls", - "4111 1111 1111 1111" /* Visa */, "01", "2999"); + "4111 1111 1111 1111" /* Visa */, "01", "2998"); EXPECT_TRUE(credit_card.IsVerified()); // Add the credit card to the database. @@ -2555,7 +2656,7 @@ // Simulate a form submission with conflicting expiration year. FormData form; AddFullCreditCardForm(&form, "Biggie Smalls", "4111 1111 1111 1111", "01", - /* different year */ "3999"); + /* different year */ "2999"); FormStructure form_structure(form); form_structure.DetermineHeuristicTypes(); @@ -3297,7 +3398,7 @@ std::vector<CreditCard> server_cards; server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "b459")); test::SetCreditCardInfo(&server_cards.back(), "Emmet Dalton", "2110", "12", - "3999"); + "2999"); server_cards.back().SetTypeForMaskedCard(kVisaCard); test::SetServerCreditCards(autofill_table_, server_cards); @@ -3348,7 +3449,7 @@ std::vector<CreditCard> server_cards; server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "b459")); test::SetCreditCardInfo(&server_cards.back(), "Emmet Dalton", "2110", "12", - "3999"); + "2999"); server_cards.back().set_use_count(2); server_cards.back().set_use_date(base::Time::Now() - base::TimeDelta::FromDays(1)); @@ -3356,7 +3457,7 @@ server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "b460")); test::SetCreditCardInfo(&server_cards.back(), "Jesse James", "2109", "12", - "3999"); + "2999"); server_cards.back().set_use_count(6); server_cards.back().set_use_date(base::Time::Now() - base::TimeDelta::FromDays(1)); @@ -3440,7 +3541,7 @@ CreditCard credit_card0("287151C8-6AB1-487C-9095-28E80BE5DA15", "https://www.example.com"); test::SetCreditCardInfo(&credit_card0, "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); credit_card0.set_use_count(3); credit_card0.set_use_date(base::Time::Now() - base::TimeDelta::FromDays(1)); personal_data_->AddCreditCard(credit_card0); @@ -3494,7 +3595,7 @@ // card type. Not a dupe and therefore both should appear in the suggestions. server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "b456")); test::SetCreditCardInfo(&server_cards.back(), "Bonnie Parker", "2109", "12", - "3999"); + "2999"); server_cards.back().set_use_count(3); server_cards.back().set_use_date(base::Time::Now() - base::TimeDelta::FromDays(15)); @@ -3505,7 +3606,7 @@ // precedence over local cards. server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "c789")); test::SetCreditCardInfo(&server_cards.back(), "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); server_cards.back().set_use_count(1); server_cards.back().set_use_date(base::Time::Now() - base::TimeDelta::FromDays(15)); @@ -3555,7 +3656,7 @@ // the local card should appear in the suggestions. server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "c789")); test::SetCreditCardInfo(&server_cards.back(), "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); test::SetServerCreditCards(autofill_table_, server_cards); personal_data_->Refresh(); @@ -3687,7 +3788,7 @@ // Create a masked server card that is slightly different of the local card. CreditCard credit_card4(CreditCard::MASKED_SERVER_CARD, "b456"); - test::SetCreditCardInfo(&credit_card4, "Homer Simpson", "2109", "12", "3999"); + test::SetCreditCardInfo(&credit_card4, "Homer Simpson", "2109", "12", "2999"); credit_card4.set_use_count(3); credit_card4.set_use_date(base::Time::Now() - base::TimeDelta::FromDays(15)); credit_card4.SetTypeForMaskedCard(kVisaCard); @@ -3697,7 +3798,7 @@ // cards. CreditCard credit_card5(CreditCard::FULL_SERVER_CARD, "c789"); test::SetCreditCardInfo(&credit_card5, "Homer Simpson", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); credit_card5.set_use_count(1); credit_card5.set_use_date(base::Time::Now() - base::TimeDelta::FromDays(15)); credit_cards.push_back(&credit_card5); @@ -3779,12 +3880,12 @@ server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "b456")); test::SetCreditCardInfo(&server_cards.back(), "Bonnie Parker", - "4444" /* Mastercard */, "12", "3999"); + "4444" /* Mastercard */, "12", "2999"); server_cards.back().SetTypeForMaskedCard(kMasterCard); server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "c789")); test::SetCreditCardInfo(&server_cards.back(), "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); test::SetServerCreditCards(autofill_table_, server_cards); personal_data_->Refresh(); @@ -3921,12 +4022,12 @@ std::vector<CreditCard> server_cards; server_cards.push_back(CreditCard(CreditCard::MASKED_SERVER_CARD, "a123")); test::SetCreditCardInfo(&server_cards.back(), "John Dillinger", - "1881" /* Visa */, "01", "4999"); + "1881" /* Visa */, "01", "2999"); server_cards.back().SetTypeForMaskedCard(kVisaCard); server_cards.push_back(CreditCard(CreditCard::FULL_SERVER_CARD, "c789")); test::SetCreditCardInfo(&server_cards.back(), "Clyde Barrow", - "347666888555" /* American Express */, "04", "3999"); + "347666888555" /* American Express */, "04", "2999"); test::SetServerCreditCards(autofill_table_, server_cards); personal_data_->Refresh(); @@ -3948,7 +4049,7 @@ form1.fields.push_back(field); test::CreateTestFormField("Exp Month:", "exp_month", "01", "text", &field); form1.fields.push_back(field); - test::CreateTestFormField("Exp Year:", "exp_year", "4999", "text", &field); + test::CreateTestFormField("Exp Year:", "exp_year", "2999", "text", &field); form1.fields.push_back(field); FormStructure form_structure1(form1); @@ -3970,7 +4071,7 @@ form2.fields.push_back(field); test::CreateTestFormField("Exp Month:", "exp_month", "04", "text", &field); form2.fields.push_back(field); - test::CreateTestFormField("Exp Year:", "exp_year", "3999", "text", &field); + test::CreateTestFormField("Exp Year:", "exp_year", "2999", "text", &field); form2.fields.push_back(field); FormStructure form_structure2(form2);
diff --git a/components/autofill/core/browser/popup_item_ids.h b/components/autofill/core/browser/popup_item_ids.h index e22ec5f..29be19c 100644 --- a/components/autofill/core/browser/popup_item_ids.h +++ b/components/autofill/core/browser/popup_item_ids.h
@@ -19,6 +19,7 @@ POPUP_ITEM_ID_DATALIST_ENTRY = -6, POPUP_ITEM_ID_SCAN_CREDIT_CARD = -7, POPUP_ITEM_ID_TITLE = -8, + POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO = -9, }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_autofill_client.cc b/components/autofill/core/browser/test_autofill_client.cc index 0063e00..647696c 100644 --- a/components/autofill/core/browser/test_autofill_client.cc +++ b/components/autofill/core/browser/test_autofill_client.cc
@@ -115,4 +115,10 @@ return is_context_secure_; } +bool TestAutofillClient::ShouldShowSigninPromo() { + return false; +} + +void TestAutofillClient::StartSigninFlow() {} + } // namespace autofill
diff --git a/components/autofill/core/browser/test_autofill_client.h b/components/autofill/core/browser/test_autofill_client.h index 0cca2ef..ea36a9c 100644 --- a/components/autofill/core/browser/test_autofill_client.h +++ b/components/autofill/core/browser/test_autofill_client.h
@@ -64,6 +64,8 @@ const base::string16& profile_full_name) override; void OnFirstUserGestureObserved() override; bool IsContextSecure(const GURL& form_origin) override; + bool ShouldShowSigninPromo() override; + void StartSigninFlow() override; void set_is_context_secure(bool is_context_secure) { is_context_secure_ = is_context_secure;
diff --git a/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc b/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc index bca4af7..a7fdb32 100644 --- a/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc +++ b/components/autofill/core/browser/ui/card_unmask_prompt_controller_impl.cc
@@ -220,46 +220,37 @@ return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE); #else int ids; - if (reason_ == AutofillClient::UNMASK_FOR_PAYMENT_REQUEST) - ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_TITLE; - else if (ShouldRequestExpirationDate()) + if (reason_ == AutofillClient::UNMASK_FOR_AUTOFILL && + ShouldRequestExpirationDate()) { ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_UPDATE_TITLE; - else + } + else { ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE; + } return l10n_util::GetStringFUTF16(ids, card_.TypeAndLastFourDigits()); #endif } base::string16 CardUnmaskPromptControllerImpl::GetInstructionsMessage() const { - int ids; - if (reason_ == AutofillClient::UNMASK_FOR_PAYMENT_REQUEST) { - ids = card_.type() == kAmericanExpressCard - ? IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS_AMEX - : IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS; - } else if (ShouldRequestExpirationDate()) { - ids = card_.type() == kAmericanExpressCard - ? IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED_AMEX - : IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED; - } else { - ids = card_.type() == kAmericanExpressCard - ? IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_AMEX - : IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS; - } - #if defined(OS_IOS) + int ids; + if (reason_ == AutofillClient::UNMASK_FOR_AUTOFILL && + ShouldRequestExpirationDate()) { + ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED; + } else { + ids = IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS; + } // The iOS UI shows the card details in the instructions text since they // don't fit in the title. return l10n_util::GetStringFUTF16(ids, card_.TypeAndLastFourDigits()); #else - return l10n_util::GetStringUTF16(ids); + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS); #endif } base::string16 CardUnmaskPromptControllerImpl::GetOkButtonLabel() const { - return l10n_util::GetStringUTF16( - reason_ == AutofillClient::UNMASK_FOR_PAYMENT_REQUEST - ? IDS_AUTOFILL_CARD_UNMASK_CONTINUE_BUTTON - : IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON); + return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON); } int CardUnmaskPromptControllerImpl::GetCvcImageRid() const {
diff --git a/components/autofill/core/browser/validation.cc b/components/autofill/core/browser/validation.cc index 22a3c91..a063ab2f 100644 --- a/components/autofill/core/browser/validation.cc +++ b/components/autofill/core/browser/validation.cc
@@ -17,26 +17,6 @@ namespace autofill { -bool IsValidCreditCardExpirationDate(const base::string16& year, - const base::string16& month, - const base::Time& now) { - base::string16 year_cleaned, month_cleaned; - base::TrimWhitespace(year, base::TRIM_ALL, &year_cleaned); - base::TrimWhitespace(month, base::TRIM_ALL, &month_cleaned); - if (year_cleaned.length() != 4) - return false; - - int cc_year; - if (!base::StringToInt(year_cleaned, &cc_year)) - return false; - - int cc_month; - if (!base::StringToInt(month_cleaned, &cc_month)) - return false; - - return IsValidCreditCardExpirationDate(cc_year, cc_month, now); -} - bool IsValidCreditCardExpirationDate(int year, int month, const base::Time& now) {
diff --git a/components/autofill/core/browser/validation.h b/components/autofill/core/browser/validation.h index e9388fd..aaaedcd2 100644 --- a/components/autofill/core/browser/validation.h +++ b/components/autofill/core/browser/validation.h
@@ -15,9 +15,6 @@ // Returns true if |year| and |month| describe a date later than |now|. // |year| must have 4 digits. -bool IsValidCreditCardExpirationDate(const base::string16& year, - const base::string16& month, - const base::Time& now); bool IsValidCreditCardExpirationDate(int year, int month, const base::Time& now);
diff --git a/components/autofill/core/browser/validation_unittest.cc b/components/autofill/core/browser/validation_unittest.cc index 0312a7d7..11dc379 100644 --- a/components/autofill/core/browser/validation_unittest.cc +++ b/components/autofill/core/browser/validation_unittest.cc
@@ -55,24 +55,11 @@ "3056 9309 0259 04aa", /* non-digit characters */ }; const char kCurrentDate[]="1 May 2013"; -const ExpirationDate kValidCreditCardExpirationDate[] = { - { "2013", "5" }, // Valid month in current year. - { "2014", "1" }, // Any month in next year. - { "2014", "12" }, // Edge condition. - { "2014", " 1" }, // Whitespace in month. - { " 2014", "1" }, // Whitespace in year. -}; const IntExpirationDate kValidCreditCardIntExpirationDate[] = { { 2013, 5 }, // Valid month in current year. { 2014, 1 }, // Any month in next year. { 2014, 12 }, // Edge condition. }; -const ExpirationDate kInvalidCreditCardExpirationDate[] = { - { "2013", "04" }, // Previous month in current year. - { "2012", "12" }, // Any month in previous year. - { "2015", "13" }, // Not a real month. - { "2015", "00" }, // Zero is legal in the CC class but is not a valid date. -}; const IntExpirationDate kInvalidCreditCardIntExpirationDate[] = { { 2013, 4 }, // Previous month in current year. { 2012, 12 }, // Any month in previous year. @@ -118,28 +105,6 @@ } } -TEST(AutofillValidation, IsValidCreditCardExpirationDate) { - base::Time now; - ASSERT_TRUE(base::Time::FromString(kCurrentDate, &now)); - - for (size_t i = 0; i < arraysize(kValidCreditCardExpirationDate); ++i) { - const ExpirationDate& data = kValidCreditCardExpirationDate[i]; - SCOPED_TRACE(data.year); - SCOPED_TRACE(data.month); - EXPECT_TRUE(IsValidCreditCardExpirationDate(ASCIIToUTF16(data.year), - ASCIIToUTF16(data.month), - now)); - } - for (size_t i = 0; i < arraysize(kInvalidCreditCardExpirationDate); ++i) { - const ExpirationDate& data = kInvalidCreditCardExpirationDate[i]; - SCOPED_TRACE(data.year); - SCOPED_TRACE(data.month); - EXPECT_TRUE(!IsValidCreditCardExpirationDate(ASCIIToUTF16(data.year), - ASCIIToUTF16(data.month), - now)); - } -} - TEST(AutofillValidation, IsValidCreditCardIntExpirationDate) { base::Time now; ASSERT_TRUE(base::Time::FromString(kCurrentDate, &now));
diff --git a/components/autofill_strings.grdp b/components/autofill_strings.grdp index 68f033b..c90af58 100644 --- a/components/autofill_strings.grdp +++ b/components/autofill_strings.grdp
@@ -20,6 +20,9 @@ <message name="IDS_AUTOFILL_WARNING_INSECURE_CONNECTION" desc="Warning text to show when credit card autofill is disabled because the website is not using a secure connection."> Automatic credit card filling is disabled because this form does not use a secure connection. </message> + <message name="IDS_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO" desc="Promo text shown alongside credit card suggestions to get people to sign in."> + Sign in to Chrome to use cards you saved to your Google Account. + </message> <if expr="_google_chrome"> <message name="IDS_AUTOFILL_DELETE_AUTOCOMPLETE_SUGGESTION_CONFIRMATION_BODY" desc="Text in a dialog to confirm that the user wants to delete an autocomplete form history suggestion."> Remove form suggestion from Chrome? @@ -208,67 +211,37 @@ </message> <if expr="_google_chrome"> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_PERMANENT" desc="Error message to show when a credit card cannot be verified and the user isn't allowed to retry."> - Chrome was unable to verify your card at this time. Please try again later. + Chrome was unable to confirm your card at this time. Please try again later. </message> </if> <if expr="not _google_chrome"> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_PERMANENT" desc="Error message to show when a credit card cannot be verified and the user isn't allowed to retry."> - Chromium was unable to verify your card at this time. Please try again later. + Chromium was unable to confirm your card at this time. Please try again later. </message> </if> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_NETWORK" desc="Error message to show when a credit card cannot be verified because Wallet servers can't be reached."> - There was a problem verifying your card. Check your internet connection and try again. + There was a problem confirming your card. Check your internet connection and try again. </message> <if expr="not is_ios"> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE" desc="Title for the credit card unmasking dialog."> - Verify your <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> + Enter the CVC for <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> </message> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_UPDATE_TITLE" desc="Title for the credit card unmasking dialog when the credit card is expired."> - Update and verify your <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_TITLE" desc="Title for the dialog for unmasking a credit card and using this card to pay."> - Pay with <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> + Enter the expiration date and CVC for <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> to update your card details </message> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS" desc="Text explaining what the user should do in the card unmasking dialog."> - Enter the 3-digit CVC from the back of your card - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_AMEX" desc="Text explaining what the user should do in the card unmasking dialog for amex cards."> - Enter the 4-digit CVC from the front of your card - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS" desc="Text explaining what the user should do in the dialog for unmasking a credit card and paying with this card."> - Enter the 3-digit CVC from the back of your card for verification - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS_AMEX" desc="Text explaining what the user should do in the dialog for unmasking an amex card and paying with this card."> - Enter the 4-digit CVC from the front of your card for verification - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED" desc="Text explaining what the user should do in the card unmasking dialog to update an expired card."> - Enter the expiration date and 3-digit CVC from the back of your card - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED_AMEX" desc="Text explaining what the user should do in the card unmasking dialog to update an expired amex card."> - Enter the expiration date and 4-digit CVC from the front of your card + Once you confirm, your card details will be shared with this site </message> </if> <if expr="is_ios"> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE" desc="Title for the credit card unmasking dialog."> - Verify Card + Confirm Card </message> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS" desc="Text explaining what the user should do in the card unmasking dialog."> - Enter the 3-digit CVC from the back of your <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_AMEX" desc="Text explaining what the user should do in the card unmasking dialog for amex cards."> - Enter the 4-digit CVC from the front of your <ph name="CREDIT_CARD">$1<ex>Amex - 5679</ex></ph> - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS" desc="Text explaining what the user should do in the dialog for unmasking a credit card and paying with this card."> - Enter the 3-digit CVC from the back of your <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> for verification - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_PAY_INSTRUCTIONS_AMEX" desc="Text explaining what the user should do in the dialog for unmasking an amex card and paying with this card."> - Enter the 4-digit CVC from the front of your <ph name="CREDIT_CARD">$1<ex>Amex - 5679</ex></ph> for verification + Enter the CVC for <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph>. Once you confirm, your card details will be shared with this site. </message> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED" desc="Text explaining what the user should do in the card unmasking dialog to update an expired card."> - Enter the expiration date and 3-digit CVC from the back of your <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_INSTRUCTIONS_EXPIRED_AMEX" desc="Text explaining what the user should do in the card unmasking dialog to update an expired amex card."> - Enter the expiration date and 4-digit CVC from the front of your <ph name="CREDIT_CARD">$1<ex>Amex - 5679</ex></ph> + Enter the expiration date and CVC for <ph name="CREDIT_CARD">$1<ex>Visa - 5679</ex></ph> to update your card details. Once you confirm, your card details will be shared with this site. </message> </if> <message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_CHECKBOX" desc="Text for checkbox in card unmasking dialog that allows user to store a Wallet card on their local device. If checked, the dialog won't show up again for the given credit card." formatter_data="android_java"> @@ -299,16 +272,13 @@ </if> </if> <message name="IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON" desc="Text for button that confirms the credit card CVC entry dialog."> - Verify - </message> - <message name="IDS_AUTOFILL_CARD_UNMASK_CONTINUE_BUTTON" desc="Text for button that confirms the credit card CVC entry dialog and initiates payment."> - Continue + Confirm </message> <message name="IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_IN_PROGRESS" desc="Message displayed while credit card is being verified." formatter_data="android_java"> - Verifying card + Confirming card </message> <message name="IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS" desc="Message displayed after successful verification of credit card CVC." formatter_data="android_java"> - Your card is verified + Your card is confirmed </message> <message name="IDS_AUTOFILL_CARD_UNMASK_INVALID_EXPIRATION_DATE" desc="Error message to show when a user has input an invalid or old expiration date."> The card is expired
diff --git a/components/components.gyp b/components/components.gyp index ccbf920..3fe453d 100644 --- a/components/components.gyp +++ b/components/components.gyp
@@ -153,7 +153,6 @@ 'includes': [ 'audio_modem.gypi', 'chooser_controller.gypi', - 'copresence.gypi', 'feedback.gypi', 'proximity_auth.gypi', 'storage_monitor.gypi',
diff --git a/components/components_tests.gyp b/components/components_tests.gyp index 50759fe..0316c64 100644 --- a/components/components_tests.gyp +++ b/components/components_tests.gyp
@@ -23,6 +23,7 @@ 'autofill/core/browser/address_field_unittest.cc', 'autofill/core/browser/address_i18n_unittest.cc', 'autofill/core/browser/address_unittest.cc', + 'autofill/core/browser/address_rewriter_unittest.cc', 'autofill/core/browser/autocomplete_history_manager_unittest.cc', 'autofill/core/browser/autofill_country_unittest.cc', 'autofill/core/browser/autofill_data_model_unittest.cc', @@ -250,16 +251,6 @@ 'audio_modem/audio_recorder_unittest.cc', 'audio_modem/modem_unittest.cc', ], - 'copresence_unittest_sources': [ - 'copresence/copresence_state_unittest.cc', - 'copresence/handlers/audio/audio_directive_handler_unittest.cc', - 'copresence/handlers/audio/audio_directive_list_unittest.cc', - 'copresence/handlers/directive_handler_unittest.cc', - 'copresence/handlers/gcm_handler_unittest.cc', - 'copresence/rpc/http_post_unittest.cc', - 'copresence/rpc/rpc_handler_unittest.cc', - 'copresence/timed_map_unittest.cc', - ], 'data_use_measurement_unittest_sources': [ 'data_use_measurement/content/data_use_measurement_unittest.cc', ], @@ -631,6 +622,7 @@ 'proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc', 'proximity_auth/ble/bluetooth_low_energy_device_whitelist_unittest.cc', 'proximity_auth/ble/bluetooth_low_energy_weave_packet_generator_unittest.cc', + 'proximity_auth/ble/bluetooth_low_energy_weave_packet_receiver_unittest.cc', 'proximity_auth/bluetooth_connection_finder_unittest.cc', 'proximity_auth/bluetooth_connection_unittest.cc', 'proximity_auth/bluetooth_throttler_impl_unittest.cc', @@ -708,6 +700,7 @@ 'safe_browsing_db/v4_database_unittest.cc', 'safe_browsing_db/v4_get_hash_protocol_manager_unittest.cc', 'safe_browsing_db/v4_protocol_manager_util_unittest.cc', + 'safe_browsing_db/v4_store_unittest.cc', 'safe_browsing_db/v4_update_protocol_manager_unittest.cc', ], 'safe_json_unittest_sources': [ @@ -884,6 +877,8 @@ 'tracing/browser/trace_config_file_unittest.cc', 'tracing/common/graphics_memory_dump_provider_android_unittest.cc', 'tracing/common/process_metrics_memory_dump_provider_unittest.cc', + 'tracing/core/trace_ring_buffer_unittest.cc', + 'tracing/core/scattered_stream_writer_unittest.cc', ], 'translate_unittest_sources': [ 'translate/core/browser/language_state_unittest.cc', @@ -1527,7 +1522,6 @@ ['OS != "ios" and OS != "android"', { 'sources': [ '<@(audio_modem_unittest_sources)', - '<@(copresence_unittest_sources)', '<@(feedback_unittest_sources)', '<@(proximity_auth_unittest_sources)', '<@(webusb_detector_unittest_sources)', @@ -1547,8 +1541,6 @@ '../third_party/protobuf/protobuf.gyp:protobuf_lite', 'components.gyp:audio_modem', 'components.gyp:audio_modem_test_support', - 'components.gyp:copresence', - 'components.gyp:copresence_test_support', 'components.gyp:cryptauth', 'components.gyp:cryptauth_proto', 'components.gyp:cryptauth_test_support',
diff --git a/components/copresence.gypi b/components/copresence.gypi deleted file mode 100644 index 2aaf6f72..0000000 --- a/components/copresence.gypi +++ /dev/null
@@ -1,98 +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. - -{ - 'targets': [ - { - 'target_name': 'copresence', - 'type': 'static_library', - 'dependencies': [ - '../base/base.gyp:base', - '../net/net.gyp:net', - '../third_party/webrtc/common_audio/common_audio.gyp:common_audio', - 'audio_modem', - 'copresence_proto', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - # Note: sources list duplicated in GN build. - 'copresence/copresence_manager_impl.cc', - 'copresence/copresence_state_impl.cc', - 'copresence/copresence_state_impl.h', - 'copresence/copresence_switches.cc', - 'copresence/copresence_switches.h', - 'copresence/handlers/audio/audio_directive_handler.h', - 'copresence/handlers/audio/audio_directive_handler_impl.cc', - 'copresence/handlers/audio/audio_directive_handler_impl.h', - 'copresence/handlers/audio/audio_directive_list.cc', - 'copresence/handlers/audio/audio_directive_list.h', - 'copresence/handlers/audio/tick_clock_ref_counted.cc', - 'copresence/handlers/audio/tick_clock_ref_counted.h', - 'copresence/handlers/directive_handler.h', - 'copresence/handlers/directive_handler_impl.cc', - 'copresence/handlers/directive_handler_impl.h', - 'copresence/handlers/gcm_handler.h', - 'copresence/handlers/gcm_handler_impl.cc', - 'copresence/handlers/gcm_handler_impl.h', - 'copresence/public/copresence_constants.h', - 'copresence/public/copresence_delegate.h', - 'copresence/public/copresence_manager.h', - 'copresence/public/copresence_observer.h', - 'copresence/public/copresence_state.h', - 'copresence/rpc/http_post.cc', - 'copresence/rpc/http_post.h', - 'copresence/rpc/rpc_handler.cc', - 'copresence/rpc/rpc_handler.h', - 'copresence/timed_map.h', - 'copresence/tokens.cc', - 'copresence/tokens.h', - ], - 'export_dependent_settings': [ - 'copresence_proto', - ], - }, - { - 'target_name': 'copresence_test_support', - 'type': 'static_library', - 'dependencies': [ - 'copresence_proto', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'copresence/test/fake_directive_handler.cc', - 'copresence/test/fake_directive_handler.h', - ], - 'export_dependent_settings': [ - 'copresence_proto', - ], - }, - { - # Protobuf compiler / generate rule for copresence. - # GN version: //components/copresence/proto - # Note: These protos are auto-generated from the protos of the - # Copresence server. Currently this strips all formatting and comments - # but makes sure that we are always using up to date protos. - 'target_name': 'copresence_proto', - 'type': 'static_library', - 'sources': [ - 'copresence/proto/codes.proto', - 'copresence/proto/config_data.proto', - 'copresence/proto/data.proto', - 'copresence/proto/enums.proto', - 'copresence/proto/identity.proto', - 'copresence/proto/push_message.proto', - 'copresence/proto/rpcs.proto', - ], - 'variables': { - 'proto_in_dir': 'copresence/proto', - 'proto_out_dir': 'components/copresence/proto', - }, - 'includes': [ '../build/protoc.gypi' ] - }, - ], -}
diff --git a/components/copresence/BUILD.gn b/components/copresence/BUILD.gn deleted file mode 100644 index 4f697fc..0000000 --- a/components/copresence/BUILD.gn +++ /dev/null
@@ -1,87 +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. - -source_set("copresence") { - sources = [ - "copresence_manager_impl.cc", - "copresence_state_impl.cc", - "copresence_state_impl.h", - "copresence_switches.cc", - "copresence_switches.h", - "handlers/audio/audio_directive_handler.h", - "handlers/audio/audio_directive_handler_impl.cc", - "handlers/audio/audio_directive_handler_impl.h", - "handlers/audio/audio_directive_list.cc", - "handlers/audio/audio_directive_list.h", - "handlers/audio/tick_clock_ref_counted.cc", - "handlers/audio/tick_clock_ref_counted.h", - "handlers/directive_handler.h", - "handlers/directive_handler_impl.cc", - "handlers/directive_handler_impl.h", - "handlers/gcm_handler.h", - "handlers/gcm_handler_impl.cc", - "handlers/gcm_handler_impl.h", - "public/copresence_constants.h", - "public/copresence_delegate.h", - "public/copresence_manager.h", - "public/copresence_observer.h", - "public/copresence_state.h", - "rpc/http_post.cc", - "rpc/http_post.h", - "rpc/rpc_handler.cc", - "rpc/rpc_handler.h", - "timed_map.h", - "tokens.cc", - "tokens.h", - ] - - deps = [ - "//base", - "//components/audio_modem", - "//components/copresence/proto", - "//components/gcm_driver", - "//google_apis", - "//media", - "//media:shared_memory_support", - "//net", - ] -} - -source_set("test_support") { - testonly = true - sources = [ - "test/fake_directive_handler.cc", - "test/fake_directive_handler.h", - ] - public_deps = [ - ":copresence", - "//base", - "//components/copresence/proto", - ] -} - -source_set("unit_tests") { - testonly = true - sources = [ - "copresence_state_unittest.cc", - "handlers/audio/audio_directive_handler_unittest.cc", - "handlers/audio/audio_directive_list_unittest.cc", - "handlers/directive_handler_unittest.cc", - "handlers/gcm_handler_unittest.cc", - "rpc/http_post_unittest.cc", - "rpc/rpc_handler_unittest.cc", - "timed_map_unittest.cc", - ] - deps = [ - ":test_support", - "//base", - "//base/test:test_support", - "//components/audio_modem:test_support", - "//components/copresence/proto", - "//components/gcm_driver:test_support", - "//net:test_support", - "//testing/gmock", - "//testing/gtest", - ] -}
diff --git a/components/copresence/DEPS b/components/copresence/DEPS deleted file mode 100644 index 9a1a6d0..0000000 --- a/components/copresence/DEPS +++ /dev/null
@@ -1,8 +0,0 @@ -include_rules = [ - "+components/audio_modem/public", - "+components/audio_modem/test", - "+components/gcm_driver", - "+google_apis", - "+media/base", - "+net", -]
diff --git a/components/copresence/OWNERS b/components/copresence/OWNERS deleted file mode 100644 index 38d2b19b..0000000 --- a/components/copresence/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -rkc@chromium.org -ckehoe@chromium.org -xiyuan@chromium.org -derat@chromium.org
diff --git a/components/copresence/copresence_manager_impl.cc b/components/copresence/copresence_manager_impl.cc deleted file mode 100644 index 956391f..0000000 --- a/components/copresence/copresence_manager_impl.cc +++ /dev/null
@@ -1,270 +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 "components/copresence/copresence_manager_impl.h" - -#include <map> -#include <utility> -#include <vector> - -#include "base/bind.h" -#include "base/strings/stringprintf.h" -#include "base/time/time.h" -#include "base/timer/timer.h" -#include "components/audio_modem/public/whispernet_client.h" -#include "components/copresence/copresence_state_impl.h" -#include "components/copresence/handlers/directive_handler_impl.h" -#include "components/copresence/handlers/gcm_handler_impl.h" -#include "components/copresence/proto/rpcs.pb.h" -#include "components/copresence/rpc/rpc_handler.h" - -using google::protobuf::RepeatedPtrField; - -using audio_modem::AUDIBLE; -using audio_modem::AudioToken; -using audio_modem::INAUDIBLE; - -namespace { - -const int kPollTimerIntervalMs = 3000; // milliseconds. -const int kAudioCheckIntervalMs = 1000; // milliseconds. - -const int kQueuedMessageTimeout = 10; // seconds. -const int kMaxQueuedMessages = 1000; - -} // namespace - -namespace copresence { - -bool SupportedTokenMedium(const TokenObservation& token) { - for (const TokenSignals& signals : token.signals()) { - if (signals.medium() == AUDIO_ULTRASOUND_PASSBAND || - signals.medium() == AUDIO_AUDIBLE_DTMF) - return true; - } - return false; -} - - -// Public functions. - -CopresenceManagerImpl::CopresenceManagerImpl(CopresenceDelegate* delegate) - : delegate_(delegate), - whispernet_init_callback_( - base::Bind(&CopresenceManagerImpl::WhispernetInitComplete, - // This callback gets cancelled when we are destroyed. - base::Unretained(this))), - init_failed_(false), - state_(new CopresenceStateImpl), - directive_handler_(new DirectiveHandlerImpl( - // The directive handler and its descendants - // will be destructed before the CopresenceState instance. - base::Bind(&CopresenceStateImpl::UpdateDirectives, - base::Unretained(state_.get())))), - poll_timer_(new base::RepeatingTimer), - audio_check_timer_(new base::RepeatingTimer), - queued_messages_by_token_( - base::TimeDelta::FromSeconds(kQueuedMessageTimeout), - kMaxQueuedMessages) { - DCHECK(delegate_); - DCHECK(delegate_->GetWhispernetClient()); - // TODO(ckehoe): Handle whispernet initialization in the whispernet component. - delegate_->GetWhispernetClient()->Initialize( - whispernet_init_callback_.callback()); - - MessagesCallback messages_callback = base::Bind( - &CopresenceManagerImpl::DispatchMessages, - // This will only be passed to objects that we own. - base::Unretained(this)); - - if (delegate->GetGCMDriver()) - gcm_handler_.reset(new GCMHandlerImpl(delegate->GetGCMDriver(), - directive_handler_.get(), - messages_callback)); - - rpc_handler_.reset(new RpcHandler(delegate, - directive_handler_.get(), - state_.get(), - gcm_handler_.get(), - messages_callback)); - - directive_handler_->Start(delegate_->GetWhispernetClient(), - base::Bind(&CopresenceManagerImpl::ReceivedTokens, - base::Unretained(this))); -} - -CopresenceManagerImpl::~CopresenceManagerImpl() { - whispernet_init_callback_.Cancel(); -} - -CopresenceState* CopresenceManagerImpl::state() { - return state_.get(); -} - -// Returns false if any operations were malformed. -void CopresenceManagerImpl::ExecuteReportRequest( - const ReportRequest& request, - const std::string& app_id, - const std::string& auth_token, - const StatusCallback& callback) { - // If initialization has failed, reject all requests. - if (init_failed_) { - callback.Run(FAIL); - return; - } - - // We'll need to modify the ReportRequest, so we make our own copy to send. - std::unique_ptr<ReportRequest> request_copy(new ReportRequest(request)); - rpc_handler_->SendReportRequest(std::move(request_copy), app_id, auth_token, - callback); -} - - -// Private functions. - -void CopresenceManagerImpl::WhispernetInitComplete(bool success) { - if (success) { - DVLOG(3) << "Whispernet initialized successfully."; - poll_timer_->Start(FROM_HERE, - base::TimeDelta::FromMilliseconds(kPollTimerIntervalMs), - base::Bind(&CopresenceManagerImpl::PollForMessages, - base::Unretained(this))); - audio_check_timer_->Start( - FROM_HERE, base::TimeDelta::FromMilliseconds(kAudioCheckIntervalMs), - base::Bind(&CopresenceManagerImpl::AudioCheck, base::Unretained(this))); - } else { - LOG(ERROR) << "Whispernet initialization failed!"; - init_failed_ = true; - } -} - -void CopresenceManagerImpl::ReceivedTokens( - const std::vector<AudioToken>& tokens) { - rpc_handler_->ReportTokens(tokens); - - for (const AudioToken audio_token : tokens) { - const std::string& token_id = audio_token.token; - DVLOG(3) << "Heard token: " << token_id; - - // Update the CopresenceState. - ReceivedToken token( - token_id, - audio_token.audible ? AUDIO_AUDIBLE_DTMF : AUDIO_ULTRASOUND_PASSBAND, - base::Time::Now()); - state_->UpdateReceivedToken(token); - - // Deliver messages that were pre-sent on this token. - if (queued_messages_by_token_.HasKey(token_id)) { - // Not const because we have to remove the required tokens for delivery. - // We're going to delete this whole vector at the end anyway. - RepeatedPtrField<SubscribedMessage>* messages = - queued_messages_by_token_.GetMutableValue(token_id); - DCHECK_GT(messages->size(), 0) - << "Empty entry in queued_messages_by_token_"; - - // These messages still have their required tokens stored, and - // DispatchMessages() will still check for them. If we don't remove - // the tokens before delivery, we'll just end up re-queuing the message. - for (SubscribedMessage& message : *messages) - message.mutable_required_token()->Clear(); - - DVLOG(3) << "Delivering " << messages->size() - << " message(s) pre-sent on token " << token_id; - DispatchMessages(*messages); - - // The messages have been delivered, so we don't need to keep them - // in the queue. Note that the token will still be reported - // to the server (above), so we'll keep getting the message. - // But we can now drop our local copy of it. - int erase_count = queued_messages_by_token_.Erase(token_id); - DCHECK_GT(erase_count, 0); - } - } -} - -void CopresenceManagerImpl::AudioCheck() { - if (!directive_handler_->GetCurrentAudioToken(AUDIBLE).empty() && - !directive_handler_->IsAudioTokenHeard(AUDIBLE)) { - delegate_->HandleStatusUpdate(AUDIO_FAIL); - } else if (!directive_handler_->GetCurrentAudioToken(INAUDIBLE).empty() && - !directive_handler_->IsAudioTokenHeard(INAUDIBLE)) { - delegate_->HandleStatusUpdate(AUDIO_FAIL); - } -} - -// Report our currently playing tokens to the server. -void CopresenceManagerImpl::PollForMessages() { - const std::string& audible_token = - directive_handler_->GetCurrentAudioToken(AUDIBLE); - const std::string& inaudible_token = - directive_handler_->GetCurrentAudioToken(INAUDIBLE); - - std::vector<AudioToken> tokens; - if (!audible_token.empty()) - tokens.push_back(AudioToken(audible_token, true)); - if (!inaudible_token.empty()) - tokens.push_back(AudioToken(inaudible_token, false)); - - if (!tokens.empty()) - rpc_handler_->ReportTokens(tokens); -} - -void CopresenceManagerImpl::DispatchMessages( - const RepeatedPtrField<SubscribedMessage>& messages) { - if (messages.size() == 0) - return; - - // Index the messages by subscription id. - std::map<std::string, std::vector<Message>> messages_by_subscription; - DVLOG(3) << "Processing " << messages.size() << " received message(s)."; - int immediate_message_count = 0; - for (const SubscribedMessage& message : messages) { - // If tokens are required for this message, queue it. - // Otherwise stage it for delivery. - if (message.required_token_size() > 0) { - int supported_token_count = 0; - for (const TokenObservation& token : message.required_token()) { - if (SupportedTokenMedium(token)) { - if (!queued_messages_by_token_.HasKey(token.token_id())) { - queued_messages_by_token_.Add( - token.token_id(), RepeatedPtrField<SubscribedMessage>()); - } - RepeatedPtrField<SubscribedMessage>* queued_messages = - queued_messages_by_token_.GetMutableValue(token.token_id()); - DCHECK(queued_messages); - queued_messages->Add()->CopyFrom(message); - supported_token_count++; - } - } - - if (supported_token_count > 0) { - DVLOG(3) << "Queued message under " << supported_token_count - << "token(s)."; - } else { - VLOG(2) << "Discarded message that requires one of " - << message.required_token_size() - << " token(s), all on unsupported mediums."; - } - } else { - immediate_message_count++; - for (const std::string& subscription_id : message.subscription_id()) { - messages_by_subscription[subscription_id].push_back( - message.published_message()); - } - } - } - - // Send the messages for each subscription. - DVLOG(3) << "Dispatching " << immediate_message_count << "message(s) for " - << messages_by_subscription.size() << " subscription(s)."; - for (const auto& map_entry : messages_by_subscription) { - // TODO(ckehoe): Once we have the app ID from the server, we need to pass - // it in here and get rid of the app id registry from the main API class. - const std::string& subscription = map_entry.first; - const std::vector<Message>& messages = map_entry.second; - delegate_->HandleMessages(std::string(), subscription, messages); - } -} - -} // namespace copresence
diff --git a/components/copresence/copresence_manager_impl.h b/components/copresence/copresence_manager_impl.h deleted file mode 100644 index 63cac4b..0000000 --- a/components/copresence/copresence_manager_impl.h +++ /dev/null
@@ -1,105 +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 COMPONENTS_COPRESENCE_COPRESENCE_MANAGER_IMPL_H_ -#define COMPONENTS_COPRESENCE_COPRESENCE_MANAGER_IMPL_H_ - -#include <google/protobuf/repeated_field.h> - -#include <memory> -#include <string> -#include <vector> - -#include "base/cancelable_callback.h" -#include "base/macros.h" -#include "components/copresence/copresence_state_impl.h" -#include "components/copresence/public/copresence_manager.h" -#include "components/copresence/timed_map.h" - -namespace audio_modem { -struct AudioToken; -} - -namespace base { -class Timer; -} - -namespace net { -class URLContextGetter; -} - -namespace copresence { - -class DirectiveHandler; -class GCMHandler; -class ReportRequest; -class RpcHandler; -class SubscribedMessage; - -// The implementation for CopresenceManager. Responsible primarily for -// client-side initialization. The RpcHandler handles all the details -// of interacting with the server. -// TODO(ckehoe, rkc): Add tests for this class. -class CopresenceManagerImpl : public CopresenceManager { - public: - // The delegate is owned by the caller, and must outlive the manager. - explicit CopresenceManagerImpl(CopresenceDelegate* delegate); - - ~CopresenceManagerImpl() override; - - // CopresenceManager overrides. - CopresenceState* state() override; - void ExecuteReportRequest(const ReportRequest& request, - const std::string& app_id, - const std::string& auth_token, - const StatusCallback& callback) override; - - private: - // Complete initialization when Whispernet is available. - void WhispernetInitComplete(bool success); - - // Handle tokens decoded by Whispernet. - // TODO(ckehoe): Replace AudioToken with ReceivedToken. - void ReceivedTokens(const std::vector<audio_modem::AudioToken>& tokens); - - // Verifies that we can hear the audio we're playing. - // This gets called every kAudioCheckIntervalMs milliseconds. - void AudioCheck(); - - // This gets called every kPollTimerIntervalMs milliseconds - // to poll the server for new messages. - void PollForMessages(); - - // Send SubscribedMessages to the appropriate clients. - void DispatchMessages( - const google::protobuf::RepeatedPtrField<SubscribedMessage>& - subscribed_messages); - - // Belongs to the caller. - CopresenceDelegate* const delegate_; - - // We use a CancelableCallback here because Whispernet - // does not provide a way to unregister its init callback. - base::CancelableCallback<void(bool)> whispernet_init_callback_; - - bool init_failed_; - - // The RpcHandler makes calls to the other objects here, so it must come last. - std::unique_ptr<CopresenceStateImpl> state_; - std::unique_ptr<DirectiveHandler> directive_handler_; - std::unique_ptr<GCMHandler> gcm_handler_; - std::unique_ptr<RpcHandler> rpc_handler_; - - std::unique_ptr<base::Timer> poll_timer_; - std::unique_ptr<base::Timer> audio_check_timer_; - - TimedMap<std::string, google::protobuf::RepeatedPtrField<SubscribedMessage>> - queued_messages_by_token_; - - DISALLOW_COPY_AND_ASSIGN(CopresenceManagerImpl); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_COPRESENCE_MANAGER_IMPL_H_
diff --git a/components/copresence/copresence_state_impl.cc b/components/copresence/copresence_state_impl.cc deleted file mode 100644 index 9a873d32..0000000 --- a/components/copresence/copresence_state_impl.cc +++ /dev/null
@@ -1,179 +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 <set> - -#include "base/logging.h" -#include "base/time/time.h" -#include "components/copresence/copresence_state_impl.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/public/copresence_constants.h" -#include "components/copresence/public/copresence_observer.h" - -namespace copresence { - -namespace { - -template<typename TokenType> -void HandleCommonFields(const TokenType& new_token, TokenType* current_token) { - if (current_token->id.empty()) { - current_token->id = new_token.id; - current_token->medium = new_token.medium; - current_token->start_time = new_token.start_time; - } else { - DCHECK_EQ(new_token.id, current_token->id); - DCHECK_EQ(new_token.medium, current_token->medium); - DCHECK(new_token.start_time.is_null() || - new_token.start_time == current_token->start_time); - } -} - -void UpdateToken(const TransmittedToken& new_token, - TransmittedToken* current_token) { - HandleCommonFields(new_token, current_token); - - current_token->stop_time = new_token.stop_time; - current_token->broadcast_confirmed = new_token.broadcast_confirmed; -} - -void UpdateToken(const ReceivedToken& new_token, - ReceivedToken* current_token) { - HandleCommonFields(new_token, current_token); - - current_token->last_time = new_token.last_time; - if (new_token.valid != ReceivedToken::UNKNOWN) - current_token->valid = new_token.valid; -} - -} // namespace - - -// Public functions. - -CopresenceStateImpl::CopresenceStateImpl() {} - -CopresenceStateImpl::~CopresenceStateImpl() {} - -void CopresenceStateImpl::AddObserver(CopresenceObserver* observer) { - DCHECK(observer); - observers_.AddObserver(observer); -} - -void CopresenceStateImpl::RemoveObserver(CopresenceObserver* observer) { - DCHECK(observer); - observers_.RemoveObserver(observer); -} - -const std::vector<Directive>& CopresenceStateImpl::active_directives() const { - return active_directives_; -} - -const std::map<std::string, TransmittedToken>& -CopresenceStateImpl::transmitted_tokens() const { - return transmitted_tokens_; -} - -const std::map<std::string, ReceivedToken>& -CopresenceStateImpl::received_tokens() const { - return received_tokens_; -} - -// TODO(ckehoe): Only send updates if the directives have really changed. -void CopresenceStateImpl::UpdateDirectives( - const std::vector<Directive>& directives) { - active_directives_ = directives; - UpdateTransmittingTokens(); - FOR_EACH_OBSERVER(CopresenceObserver, observers_, DirectivesUpdated()); -} - -void CopresenceStateImpl::UpdateTransmittedToken( - const TransmittedToken& token) { - UpdateToken(token, &transmitted_tokens_[token.id]); - FOR_EACH_OBSERVER(CopresenceObserver, - observers_, - TokenTransmitted(transmitted_tokens_[token.id])); -} - -// TODO(ckehoe): Check which tokens are no longer heard and report them lost. -void CopresenceStateImpl::UpdateReceivedToken(const ReceivedToken& token) { - DCHECK(!token.id.empty()); - - // TODO(ckehoe): Have CopresenceManagerImpl::AudioCheck() use this to check - // if we can hear our token, and delete the logic from the AudioManager. - if (transmitted_tokens_.count(token.id) > 0) { - transmitted_tokens_[token.id].broadcast_confirmed = true; - FOR_EACH_OBSERVER(CopresenceObserver, - observers_, - TokenTransmitted(transmitted_tokens_[token.id])); - } else { - ReceivedToken& stored_token = received_tokens_[token.id]; - UpdateToken(token, &stored_token); - - // The decoder doesn't track when this token was heard before, - // so it should just fill in the last_time. - // If we've never seen this token, we populate the start time too. - if (stored_token.start_time.is_null()) - stored_token.start_time = token.last_time; - - FOR_EACH_OBSERVER(CopresenceObserver, - observers_, - TokenReceived(stored_token)); - } -} - -void CopresenceStateImpl::UpdateTokenStatus(const std::string& token_id, - TokenStatus status) { - if (transmitted_tokens_.count(token_id) > 0) { - LOG_IF(ERROR, status != VALID) - << "Broadcast token " << token_id << " is invalid"; - } else if (received_tokens_.count(token_id) > 0) { - received_tokens_[token_id].valid = status == VALID ? - ReceivedToken::VALID : ReceivedToken::INVALID; - FOR_EACH_OBSERVER(CopresenceObserver, - observers_, - TokenReceived(received_tokens_[token_id])); - } else { - LOG(ERROR) << "Got status update for unrecognized token " << token_id; - } -} - - -// Private functions. - -void CopresenceStateImpl::UpdateTransmittingTokens() { - std::set<std::string> tokens_to_update; - for (const auto& token_entry : transmitted_tokens_) - tokens_to_update.insert(token_entry.first); - - for (const Directive& directive : active_directives_) { - const TokenInstruction& instruction = directive.token_instruction(); - if (instruction.token_instruction_type() == TRANSMIT) { - tokens_to_update.erase(instruction.token_id()); - - TransmittedToken& token = transmitted_tokens_[instruction.token_id()]; - token.id = instruction.token_id(); - token.medium = instruction.medium(); - token.start_time = base::Time::Now(); - token.stop_time = base::Time::Now() + - base::TimeDelta::FromMilliseconds(directive.ttl_millis()); - - FOR_EACH_OBSERVER(CopresenceObserver, - observers_, - TokenTransmitted(token)); - } - } - - // Tokens not updated above are no longer transmitting. - base::Time now = base::Time::Now(); - for (const std::string& token : tokens_to_update) { - if (transmitted_tokens_[token].stop_time > now) - transmitted_tokens_[token].stop_time = now; - - FOR_EACH_OBSERVER(CopresenceObserver, - observers_, - TokenTransmitted(transmitted_tokens_[token])); - } -} - -} // namespace copresence
diff --git a/components/copresence/copresence_state_impl.h b/components/copresence/copresence_state_impl.h deleted file mode 100644 index 4b9bf768..0000000 --- a/components/copresence/copresence_state_impl.h +++ /dev/null
@@ -1,71 +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 COMPONENTS_COPRESENCE_COPRESENCE_STATE_IMPL_H_ -#define COMPONENTS_COPRESENCE_COPRESENCE_STATE_IMPL_H_ - -#include <map> -#include <string> -#include <vector> - -#include "base/macros.h" -#include "base/observer_list.h" -#include "components/copresence/proto/enums.pb.h" -#include "components/copresence/public/copresence_state.h" - -namespace copresence { - -class Directive; -struct ReceivedToken; -struct TransmittedToken; - -// This class tracks the internal state of the copresence component -// for debugging purposes. CopresenceState only allows observation, -// but this class accepts updates from elsewhere in the component. -class CopresenceStateImpl final : public CopresenceState { - public: - CopresenceStateImpl(); - ~CopresenceStateImpl() override; - - // CopresenceState overrides. - void AddObserver(CopresenceObserver* observer) override; - void RemoveObserver(CopresenceObserver* observer) override; - const std::vector<Directive>& active_directives() const override; - const std::map<std::string, TransmittedToken>& - transmitted_tokens() const override; - const std::map<std::string, ReceivedToken>& - received_tokens() const override; - - // Update the current active directives. - void UpdateDirectives(const std::vector<Directive>& directives); - - // Report transmitting a token. - void UpdateTransmittedToken(const TransmittedToken& token); - - // Report receiving a token. - void UpdateReceivedToken(const ReceivedToken& token); - - // Report the token state from the server. - void UpdateTokenStatus(const std::string& token_id, TokenStatus status); - - private: - // Reconcile the |active_directives_| against |transmitted_tokens_|. - void UpdateTransmittingTokens(); - - std::vector<Directive> active_directives_; - - // TODO(ckehoe): When we support more mediums, separate tokens by medium. - // Otherwise tokens from different mediums could overwrite each other. - // TODO(ckehoe): Limit the number of tokens stored. - std::map<std::string, TransmittedToken> transmitted_tokens_; - std::map<std::string, ReceivedToken> received_tokens_; - - base::ObserverList<CopresenceObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(CopresenceStateImpl); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_COPRESENCE_STATE_IMPL_H_
diff --git a/components/copresence/copresence_state_unittest.cc b/components/copresence/copresence_state_unittest.cc deleted file mode 100644 index 4817e7e..0000000 --- a/components/copresence/copresence_state_unittest.cc +++ /dev/null
@@ -1,149 +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 <string> -#include <vector> - -#include "base/time/time.h" -#include "components/copresence/copresence_state_impl.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/public/copresence_observer.h" -#include "components/copresence/tokens.h" -#include "testing/gmock/include/gmock/gmock.h" - -using testing::ElementsAre; -using testing::Key; -using testing::SizeIs; -using testing::UnorderedElementsAre; - -// TODO(ckehoe): Test start and end time tracking. - -namespace google { -namespace protobuf { - -bool operator==(const MessageLite& A, const MessageLite& B) { - std::string serializedA; - CHECK(A.SerializeToString(&serializedA)); - - std::string serializedB; - CHECK(B.SerializeToString(&serializedB)); - - return serializedA == serializedB; -} - -} // namespace protobuf -} // namespace google - -namespace copresence { - -namespace { - -const base::Time kStartTime = base::Time::FromDoubleT(10); -const base::Time kStopTime = base::Time::FromDoubleT(20); - -Directive CreateDirective(const std::string& token, bool transmit) { - Directive directive; - TokenInstruction* instruction = directive.mutable_token_instruction(); - instruction->set_token_id(token); - instruction->set_medium(AUDIO_ULTRASOUND_PASSBAND); - if (transmit) - instruction->set_token_instruction_type(TRANSMIT); - return directive; -} - -template<typename TokenType> -TokenType CreateToken(const std::string& id) { - TokenType token; - token.id = id; - token.medium = AUDIO_ULTRASOUND_PASSBAND; - token.start_time = kStartTime; - return token; -} - -} // namespace - -class CopresenceStateTest : public CopresenceObserver, - public testing::Test { - public: - CopresenceStateTest() : directive_notifications_(0) { - state_.AddObserver(this); - } - - protected: - CopresenceStateImpl state_; - - int directive_notifications_; - std::vector<std::string> transmitted_updates_; - std::vector<std::string> received_updates_; - - private: - // CopresenceObserver implementation. - void DirectivesUpdated() override { - directive_notifications_++; - } - void TokenTransmitted(const TransmittedToken& token) override { - transmitted_updates_.push_back(token.id); - } - void TokenReceived(const ReceivedToken& token) override { - received_updates_.push_back(token.id); - } -}; - -TEST_F(CopresenceStateTest, Directives) { - std::vector<Directive> directives; - directives.push_back(CreateDirective("transmit 1", true)); - directives.push_back(CreateDirective("transmit 2", true)); - directives.push_back(CreateDirective("receive", false)); - state_.UpdateDirectives(directives); - - EXPECT_EQ(1, directive_notifications_); - EXPECT_EQ(directives, state_.active_directives()); - EXPECT_THAT(transmitted_updates_, ElementsAre("transmit 1", "transmit 2")); - EXPECT_THAT(state_.transmitted_tokens(), - UnorderedElementsAre(Key("transmit 1"), Key("transmit 2"))); - - directives.clear(); - directives.push_back(CreateDirective("transmit 1", true)); - state_.UpdateDirectives(directives); - EXPECT_EQ(2, directive_notifications_); - EXPECT_EQ(directives, state_.active_directives()); - EXPECT_THAT(state_.transmitted_tokens(), SizeIs(2)); -} - -TEST_F(CopresenceStateTest, TransmittedTokens) { - state_.UpdateTransmittedToken(CreateToken<TransmittedToken>("A")); - state_.UpdateTransmittedToken(CreateToken<TransmittedToken>("B")); - - EXPECT_THAT(transmitted_updates_, ElementsAre("A", "B")); - EXPECT_THAT(state_.transmitted_tokens(), - UnorderedElementsAre(Key("A"), Key("B"))); - - TransmittedToken tokenA = CreateToken<TransmittedToken>("A"); - tokenA.stop_time = kStopTime; - state_.UpdateTransmittedToken(tokenA); - - EXPECT_THAT(transmitted_updates_, ElementsAre("A", "B", "A")); - EXPECT_EQ(kStopTime, state_.transmitted_tokens().find("A")->second.stop_time); - - state_.UpdateReceivedToken(CreateToken<ReceivedToken>("B")); - EXPECT_THAT(transmitted_updates_, ElementsAre("A", "B", "A", "B")); - EXPECT_TRUE(state_.transmitted_tokens().find("B") - ->second.broadcast_confirmed); -} - -TEST_F(CopresenceStateTest, ReceivedTokens) { - state_.UpdateReceivedToken(CreateToken<ReceivedToken>("A")); - state_.UpdateReceivedToken(CreateToken<ReceivedToken>("B")); - - EXPECT_THAT(received_updates_, ElementsAre("A", "B")); - EXPECT_THAT(state_.received_tokens(), - UnorderedElementsAre(Key("A"), Key("B"))); - - state_.UpdateTokenStatus("A", copresence::VALID); - EXPECT_THAT(received_updates_, ElementsAre("A", "B", "A")); - EXPECT_EQ(ReceivedToken::VALID, - state_.received_tokens().find("A")->second.valid); -} - -} // namespace copresence
diff --git a/components/copresence/copresence_switches.cc b/components/copresence/copresence_switches.cc deleted file mode 100644 index 026e7a2..0000000 --- a/components/copresence/copresence_switches.cc +++ /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. - -#include "components/copresence/copresence_switches.h" - -// TODO(ckehoe): Move these flags to the chrome://copresence page. - -namespace switches { - -// Address for calls to the Copresence server (via Apiary). -// Defaults to https://www.googleapis.com/copresence/v2/copresence. -const char kCopresenceServer[] = "copresence-server"; - -// Apiary tracing token for calls to the Copresence server. -const char kCopresenceTracingToken[] = "copresence-tracing-token"; - -} // namespace switches
diff --git a/components/copresence/copresence_switches.h b/components/copresence/copresence_switches.h deleted file mode 100644 index d60a589f..0000000 --- a/components/copresence/copresence_switches.h +++ /dev/null
@@ -1,17 +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 COMPONENTS_COPRESENCE_COPRESENCE_SWITCHES_H_ -#define COMPONENTS_COPRESENCE_COPRESENCE_SWITCHES_H_ - -namespace switches { - -// All switches in alphabetical order. The switches should be documented -// alongside the definition of their values in the .cc file. -extern const char kCopresenceServer[]; -extern const char kCopresenceTracingToken[]; - -} // namespace switches - -#endif // COMPONENTS_COPRESENCE_COPRESENCE_SWITCHES_H_
diff --git a/components/copresence/handlers/audio/audio_directive_handler.h b/components/copresence/handlers/audio/audio_directive_handler.h deleted file mode 100644 index 91213c9..0000000 --- a/components/copresence/handlers/audio/audio_directive_handler.h +++ /dev/null
@@ -1,42 +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 COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_H_ - -#include <string> - -#include "components/audio_modem/public/whispernet_client.h" - -namespace copresence { - -class Directive; - -// The AudioDirectiveHandler handles audio transmit and receive instructions. -class AudioDirectiveHandler { - public: - virtual ~AudioDirectiveHandler() {} - - // Do not use this class before calling this. - virtual void Initialize(audio_modem::WhispernetClient* whispernet_client, - const audio_modem::TokensCallback& tokens_cb) = 0; - - // Adds an instruction to our handler. The instruction will execute and be - // removed after the ttl expires. - virtual void AddInstruction(const Directive& directive, - const std::string& op_id) = 0; - - // Removes all instructions associated with this operation id. - virtual void RemoveInstructions(const std::string& op_id) = 0; - - // Returns the currently playing token. - virtual const std::string PlayingToken(audio_modem::AudioType type) const = 0; - - // Returns if we have heard the currently playing audio token. - virtual bool IsPlayingTokenHeard(audio_modem::AudioType type) const = 0; -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_H_
diff --git a/components/copresence/handlers/audio/audio_directive_handler_impl.cc b/components/copresence/handlers/audio/audio_directive_handler_impl.cc deleted file mode 100644 index 5e73009..0000000 --- a/components/copresence/handlers/audio/audio_directive_handler_impl.cc +++ /dev/null
@@ -1,241 +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 "components/copresence/handlers/audio/audio_directive_handler_impl.h" - -#include <stddef.h> - -#include <algorithm> -#include <memory> -#include <utility> -#include <vector> - -#include "base/bind.h" -#include "base/logging.h" -#include "base/time/default_tick_clock.h" -#include "base/time/time.h" -#include "base/timer/timer.h" -#include "components/audio_modem/public/modem.h" -#include "components/copresence/handlers/audio/audio_directive_list.h" -#include "components/copresence/handlers/audio/tick_clock_ref_counted.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/public/copresence_constants.h" -#include "media/base/audio_bus.h" - -using audio_modem::AUDIBLE; -using audio_modem::INAUDIBLE; -using audio_modem::TokenParameters; - -namespace copresence { - -namespace { - -base::TimeTicks GetEarliestEventTime(AudioDirectiveList* list, - base::TimeTicks event_time) { - std::unique_ptr<AudioDirective> active_directive = list->GetActiveDirective(); - - if (!active_directive) - return event_time; - if (event_time.is_null()) - return active_directive->end_time; - - return std::min(active_directive->end_time, event_time); -} - -void ConvertDirectives(const std::vector<AudioDirective>& in_directives, - std::vector<Directive>* out_directives) { - for (const AudioDirective& in_directive : in_directives) - out_directives->push_back(in_directive.server_directive); -} - -} // namespace - - -// Public functions. - -AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl( - const DirectivesCallback& update_directives_callback) - : update_directives_callback_(update_directives_callback), - audio_modem_(audio_modem::Modem::Create()), - audio_event_timer_(new base::OneShotTimer), - clock_(new TickClockRefCounted(new base::DefaultTickClock)) {} - -AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl( - const DirectivesCallback& update_directives_callback, - std::unique_ptr<audio_modem::Modem> audio_modem, - std::unique_ptr<base::Timer> timer, - const scoped_refptr<TickClockRefCounted>& clock) - : update_directives_callback_(update_directives_callback), - audio_modem_(std::move(audio_modem)), - audio_event_timer_(std::move(timer)), - clock_(clock) {} - -AudioDirectiveHandlerImpl::~AudioDirectiveHandlerImpl() {} - -void AudioDirectiveHandlerImpl::Initialize( - audio_modem::WhispernetClient* whispernet_client, - const audio_modem::TokensCallback& tokens_cb) { - DCHECK(audio_modem_); - audio_modem_->Initialize(whispernet_client, tokens_cb); - - DCHECK(transmits_lists_.empty()); - transmits_lists_.push_back(new AudioDirectiveList(clock_)); - transmits_lists_.push_back(new AudioDirectiveList(clock_)); - - DCHECK(receives_lists_.empty()); - receives_lists_.push_back(new AudioDirectiveList(clock_)); - receives_lists_.push_back(new AudioDirectiveList(clock_)); -} - -void AudioDirectiveHandlerImpl::AddInstruction( - const Directive& directive, - const std::string& op_id) { - DCHECK(transmits_lists_.size() == 2u && receives_lists_.size() == 2u) - << "Call Initialize() before other AudioDirectiveHandler methods"; - - const TokenInstruction& instruction = directive.token_instruction(); - base::TimeDelta ttl = - base::TimeDelta::FromMilliseconds(directive.ttl_millis()); - const size_t token_length = directive.configuration().token_params().length(); - - switch (instruction.token_instruction_type()) { - case TRANSMIT: - DVLOG(2) << "Audio Transmit Directive received. Token: " - << instruction.token_id() - << " with medium=" << instruction.medium() - << " with TTL=" << ttl.InMilliseconds(); - DCHECK_GT(token_length, 0u); - switch (instruction.medium()) { - case AUDIO_ULTRASOUND_PASSBAND: - audio_modem_->SetTokenParams(INAUDIBLE, - TokenParameters(token_length)); - transmits_lists_[INAUDIBLE]->AddDirective(op_id, directive); - audio_modem_->SetToken(INAUDIBLE, instruction.token_id()); - break; - case AUDIO_AUDIBLE_DTMF: - audio_modem_->SetTokenParams(AUDIBLE, TokenParameters(token_length)); - transmits_lists_[AUDIBLE]->AddDirective(op_id, directive); - audio_modem_->SetToken(AUDIBLE, instruction.token_id()); - break; - default: - NOTREACHED(); - } - break; - - case RECEIVE: - DVLOG(2) << "Audio Receive Directive received." - << " with medium=" << instruction.medium() - << " with TTL=" << ttl.InMilliseconds(); - DCHECK_GT(token_length, 0u); - switch (instruction.medium()) { - case AUDIO_ULTRASOUND_PASSBAND: - audio_modem_->SetTokenParams(INAUDIBLE, - TokenParameters(token_length)); - receives_lists_[INAUDIBLE]->AddDirective(op_id, directive); - break; - case AUDIO_AUDIBLE_DTMF: - audio_modem_->SetTokenParams(AUDIBLE, TokenParameters(token_length)); - receives_lists_[AUDIBLE]->AddDirective(op_id, directive); - break; - default: - NOTREACHED(); - } - break; - - case UNKNOWN_TOKEN_INSTRUCTION_TYPE: - default: - LOG(WARNING) << "Unknown Audio Transmit Directive received. type = " - << instruction.token_instruction_type(); - } - - ProcessNextInstruction(); -} - -void AudioDirectiveHandlerImpl::RemoveInstructions(const std::string& op_id) { - DCHECK(transmits_lists_.size() == 2u && receives_lists_.size() == 2u) - << "Call Initialize() before other AudioDirectiveHandler methods"; - - transmits_lists_[AUDIBLE]->RemoveDirective(op_id); - transmits_lists_[INAUDIBLE]->RemoveDirective(op_id); - receives_lists_[AUDIBLE]->RemoveDirective(op_id); - receives_lists_[INAUDIBLE]->RemoveDirective(op_id); - - ProcessNextInstruction(); -} - -const std::string AudioDirectiveHandlerImpl::PlayingToken( - audio_modem::AudioType type) const { - return audio_modem_->GetToken(type); -} - -bool AudioDirectiveHandlerImpl::IsPlayingTokenHeard( - audio_modem::AudioType type) const { - return audio_modem_->IsPlayingTokenHeard(type); -} - - -// Private functions. - -void AudioDirectiveHandlerImpl::ProcessNextInstruction() { - DCHECK(audio_event_timer_); - audio_event_timer_->Stop(); - - // Change |audio_modem_| state for audible transmits. - if (transmits_lists_[AUDIBLE]->GetActiveDirective()) - audio_modem_->StartPlaying(AUDIBLE); - else - audio_modem_->StopPlaying(AUDIBLE); - - // Change audio_modem_ state for inaudible transmits. - if (transmits_lists_[INAUDIBLE]->GetActiveDirective()) - audio_modem_->StartPlaying(INAUDIBLE); - else - audio_modem_->StopPlaying(INAUDIBLE); - - // Change audio_modem_ state for audible receives. - if (receives_lists_[AUDIBLE]->GetActiveDirective()) - audio_modem_->StartRecording(AUDIBLE); - else - audio_modem_->StopRecording(AUDIBLE); - - // Change audio_modem_ state for inaudible receives. - if (receives_lists_[INAUDIBLE]->GetActiveDirective()) - audio_modem_->StartRecording(INAUDIBLE); - else - audio_modem_->StopRecording(INAUDIBLE); - - base::TimeTicks next_event_time; - if (GetNextInstructionExpiry(&next_event_time)) { - audio_event_timer_->Start( - FROM_HERE, - next_event_time - clock_->NowTicks(), - base::Bind(&AudioDirectiveHandlerImpl::ProcessNextInstruction, - base::Unretained(this))); - } - - // TODO(crbug.com/436584): Instead of this, store the directives - // in a single list, and prune them when expired. - if (!update_directives_callback_.is_null()) { - std::vector<Directive> directives; - ConvertDirectives(transmits_lists_[AUDIBLE]->directives(), &directives); - ConvertDirectives(transmits_lists_[INAUDIBLE]->directives(), &directives); - ConvertDirectives(receives_lists_[AUDIBLE]->directives(), &directives); - ConvertDirectives(receives_lists_[INAUDIBLE]->directives(), &directives); - update_directives_callback_.Run(directives); - } -} - -bool AudioDirectiveHandlerImpl::GetNextInstructionExpiry( - base::TimeTicks* expiry) { - DCHECK(expiry); - - *expiry = GetEarliestEventTime(transmits_lists_[AUDIBLE], base::TimeTicks()); - *expiry = GetEarliestEventTime(transmits_lists_[INAUDIBLE], *expiry); - *expiry = GetEarliestEventTime(receives_lists_[AUDIBLE], *expiry); - *expiry = GetEarliestEventTime(receives_lists_[INAUDIBLE], *expiry); - - return !expiry->is_null(); -} - -} // namespace copresence
diff --git a/components/copresence/handlers/audio/audio_directive_handler_impl.h b/components/copresence/handlers/audio/audio_directive_handler_impl.h deleted file mode 100644 index 875f994..0000000 --- a/components/copresence/handlers/audio/audio_directive_handler_impl.h +++ /dev/null
@@ -1,86 +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 COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ - -#include <memory> -#include <string> - -#include "base/callback.h" -#include "base/macros.h" -#include "base/memory/ref_counted.h" -#include "base/memory/scoped_vector.h" -#include "components/audio_modem/public/modem.h" -#include "components/copresence/handlers/audio/audio_directive_handler.h" -#include "components/copresence/public/copresence_constants.h" - -namespace base { -class TimeTicks; -class Timer; -} - -namespace media { -class AudioBusRefCounted; -} - -namespace copresence { - -class AudioDirectiveList; -class TickClockRefCounted; - -// The AudioDirectiveHandler handles audio transmit and receive instructions. -// TODO(rkc): Currently since WhispernetClient can only have one token encoded -// callback at a time, we need to have both the audible and inaudible in this -// class. Investigate a better way to do this; a few options are abstracting -// out token encoding to a separate class, or allowing whispernet to have -// multiple callbacks for encoded tokens being sent back and have two versions -// of this class. -class AudioDirectiveHandlerImpl final : public AudioDirectiveHandler { - public: - explicit AudioDirectiveHandlerImpl( - const DirectivesCallback& update_directives_callback); - AudioDirectiveHandlerImpl( - const DirectivesCallback& update_directives_callback, - std::unique_ptr<audio_modem::Modem> audio_modem, - std::unique_ptr<base::Timer> timer, - const scoped_refptr<TickClockRefCounted>& clock); - - ~AudioDirectiveHandlerImpl() override; - - // AudioDirectiveHandler overrides: - void Initialize(audio_modem::WhispernetClient* whispernet_client, - const audio_modem::TokensCallback& tokens_cb) override; - void AddInstruction(const Directive& directive, - const std::string& op_id) override; - void RemoveInstructions(const std::string& op_id) override; - const std::string PlayingToken(audio_modem::AudioType type) const override; - bool IsPlayingTokenHeard(audio_modem::AudioType type) const override; - - private: - // Processes the next active instruction, - // updating our audio manager state accordingly. - void ProcessNextInstruction(); - - // Returns the time that an instruction expires at. This will always return - // the earliest expiry time among all the active receive and transmit - // instructions. If we don't have any active instructions, returns false. - bool GetNextInstructionExpiry(base::TimeTicks* next_event); - - DirectivesCallback update_directives_callback_; - std::unique_ptr<audio_modem::Modem> audio_modem_; - std::unique_ptr<base::Timer> audio_event_timer_; - scoped_refptr<TickClockRefCounted> clock_; - - // Lists of transmits and receives, for both audible and inaudible tokens. - // AUDIBLE = element 0, INAUDIBLE = element 1 (see copresence_constants.h). - ScopedVector<AudioDirectiveList> transmits_lists_; - ScopedVector<AudioDirectiveList> receives_lists_; - - DISALLOW_COPY_AND_ASSIGN(AudioDirectiveHandlerImpl); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_
diff --git a/components/copresence/handlers/audio/audio_directive_handler_unittest.cc b/components/copresence/handlers/audio/audio_directive_handler_unittest.cc deleted file mode 100644 index d0de08a..0000000 --- a/components/copresence/handlers/audio/audio_directive_handler_unittest.cc +++ /dev/null
@@ -1,179 +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 <stdint.h> - -#include <memory> -#include <string> -#include <vector> - -#include "base/bind.h" -#include "base/macros.h" -#include "base/memory/ptr_util.h" -#include "base/message_loop/message_loop.h" -#include "base/test/simple_test_tick_clock.h" -#include "base/timer/mock_timer.h" -#include "components/audio_modem/public/modem.h" -#include "components/audio_modem/test/random_samples.h" -#include "components/audio_modem/test/stub_modem.h" -#include "components/copresence/handlers/audio/audio_directive_handler_impl.h" -#include "components/copresence/handlers/audio/tick_clock_ref_counted.h" -#include "components/copresence/proto/data.pb.h" -#include "testing/gtest/include/gtest/gtest.h" - -using audio_modem::AUDIBLE; -using audio_modem::AudioType; -using audio_modem::INAUDIBLE; -using audio_modem::StubModem; - -namespace copresence { - -namespace { - -const Directive CreateDirective(TokenInstructionType type, - bool audible, - int64_t ttl) { - Directive directive; - directive.mutable_token_instruction()->set_token_instruction_type(type); - directive.mutable_token_instruction()->set_token_id("token"); - directive.mutable_token_instruction()->set_medium(audible ? - AUDIO_AUDIBLE_DTMF : AUDIO_ULTRASOUND_PASSBAND); - directive.set_ttl_millis(ttl); - return directive; -} - -} // namespace - -class AudioDirectiveHandlerTest : public testing::Test { - public: - AudioDirectiveHandlerTest() { - modem_ptr_ = new StubModem; - timer_ptr_ = new base::MockTimer(false, false); - clock_ptr_ = new base::SimpleTestTickClock; - - directive_handler_.reset(new AudioDirectiveHandlerImpl( - base::Bind(&AudioDirectiveHandlerTest::GetDirectiveUpdates, - base::Unretained(this)), - base::WrapUnique<audio_modem::Modem>(modem_ptr_), - base::WrapUnique<base::Timer>(timer_ptr_), - make_scoped_refptr(new TickClockRefCounted(clock_ptr_)))); - directive_handler_->Initialize(nullptr, audio_modem::TokensCallback()); - } - ~AudioDirectiveHandlerTest() override {} - - protected: - const std::vector<Directive>& current_directives() { - return current_directives_; - } - - bool IsPlaying(AudioType type) { return modem_ptr_->IsPlaying(type); } - - bool IsRecording(AudioType type) { return modem_ptr_->IsRecording(type); } - - // This order is important. We want the message loop to get created before - // our the audio directive handler since the directive list ctor (invoked - // from the directive handler ctor) will post tasks. - base::MessageLoop message_loop_; - std::unique_ptr<AudioDirectiveHandler> directive_handler_; - - std::vector<Directive> current_directives_; - - // Unowned. - StubModem* modem_ptr_; - base::MockTimer* timer_ptr_; - base::SimpleTestTickClock* clock_ptr_; - - private: - void GetDirectiveUpdates(const std::vector<Directive>& current_directives) { - current_directives_ = current_directives; - } - - DISALLOW_COPY_AND_ASSIGN(AudioDirectiveHandlerTest); -}; - -TEST_F(AudioDirectiveHandlerTest, Basic) { - const int64_t kTtl = 10; - directive_handler_->AddInstruction(CreateDirective(TRANSMIT, true, kTtl), - "op_id1"); - directive_handler_->AddInstruction(CreateDirective(TRANSMIT, false, kTtl), - "op_id1"); - directive_handler_->AddInstruction(CreateDirective(TRANSMIT, false, kTtl), - "op_id2"); - directive_handler_->AddInstruction(CreateDirective(RECEIVE, false, kTtl), - "op_id1"); - directive_handler_->AddInstruction(CreateDirective(RECEIVE, true, kTtl), - "op_id2"); - directive_handler_->AddInstruction(CreateDirective(RECEIVE, false, kTtl), - "op_id3"); - - EXPECT_TRUE(IsPlaying(AUDIBLE)); - EXPECT_TRUE(IsPlaying(INAUDIBLE)); - EXPECT_TRUE(IsRecording(AUDIBLE)); - EXPECT_TRUE(IsRecording(INAUDIBLE)); - - directive_handler_->RemoveInstructions("op_id1"); - EXPECT_FALSE(IsPlaying(AUDIBLE)); - EXPECT_TRUE(IsPlaying(INAUDIBLE)); - EXPECT_TRUE(IsRecording(AUDIBLE)); - EXPECT_TRUE(IsRecording(INAUDIBLE)); - - directive_handler_->RemoveInstructions("op_id2"); - EXPECT_FALSE(IsPlaying(INAUDIBLE)); - EXPECT_FALSE(IsRecording(AUDIBLE)); - EXPECT_TRUE(IsRecording(INAUDIBLE)); - - directive_handler_->RemoveInstructions("op_id3"); - EXPECT_FALSE(IsRecording(INAUDIBLE)); -} - -TEST_F(AudioDirectiveHandlerTest, Timed) { - directive_handler_->AddInstruction(CreateDirective(TRANSMIT, true, 6), - "op_id1"); - directive_handler_->AddInstruction(CreateDirective(TRANSMIT, false, 8), - "op_id1"); - directive_handler_->AddInstruction(CreateDirective(RECEIVE, false, 4), - "op_id3"); - - EXPECT_TRUE(IsPlaying(AUDIBLE)); - EXPECT_TRUE(IsPlaying(INAUDIBLE)); - EXPECT_FALSE(IsRecording(AUDIBLE)); - EXPECT_TRUE(IsRecording(INAUDIBLE)); - - // Every time we advance and a directive expires, the timer should fire also. - clock_ptr_->Advance(base::TimeDelta::FromMilliseconds(5)); - timer_ptr_->Fire(); - - // We are now at +5ms. This instruction expires at +10ms. - directive_handler_->AddInstruction(CreateDirective(RECEIVE, true, 5), - "op_id4"); - EXPECT_TRUE(IsPlaying(AUDIBLE)); - EXPECT_TRUE(IsPlaying(INAUDIBLE)); - EXPECT_TRUE(IsRecording(AUDIBLE)); - EXPECT_FALSE(IsRecording(INAUDIBLE)); - - // Advance to +7ms. - const base::TimeDelta twoMs = base::TimeDelta::FromMilliseconds(2); - clock_ptr_->Advance(twoMs); - timer_ptr_->Fire(); - - EXPECT_FALSE(IsPlaying(AUDIBLE)); - EXPECT_TRUE(IsPlaying(INAUDIBLE)); - EXPECT_TRUE(IsRecording(AUDIBLE)); - - // Advance to +9ms. - clock_ptr_->Advance(twoMs); - timer_ptr_->Fire(); - EXPECT_FALSE(IsPlaying(INAUDIBLE)); - EXPECT_TRUE(IsRecording(AUDIBLE)); - - // Advance to +11ms. - clock_ptr_->Advance(twoMs); - timer_ptr_->Fire(); - EXPECT_FALSE(IsRecording(AUDIBLE)); -} - -// TODO(rkc): Write more tests that check more convoluted sequences of -// transmits/receives. - -} // namespace copresence
diff --git a/components/copresence/handlers/audio/audio_directive_list.cc b/components/copresence/handlers/audio/audio_directive_list.cc deleted file mode 100644 index c66b068..0000000 --- a/components/copresence/handlers/audio/audio_directive_list.cc +++ /dev/null
@@ -1,93 +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 "components/copresence/handlers/audio/audio_directive_list.h" - -#include <algorithm> - -#include "base/memory/ptr_util.h" - -namespace copresence { - -// Public functions. - -AudioDirective::AudioDirective() {} - -AudioDirective::AudioDirective(const std::string& op_id, - base::TimeTicks end_time, - const Directive& server_directive) - : op_id(op_id), - end_time(end_time), - server_directive(server_directive) {} - -AudioDirectiveList::AudioDirectiveList( - const scoped_refptr<TickClockRefCounted>& clock) - : clock_(clock) {} - -AudioDirectiveList::~AudioDirectiveList() {} - -void AudioDirectiveList::AddDirective(const std::string& op_id, - const Directive& server_directive) { - base::TimeTicks end_time = clock_->NowTicks() + - base::TimeDelta::FromMilliseconds(server_directive.ttl_millis()); - - // If this op is already in the list, update it instead of adding it again. - auto it = FindDirectiveByOpId(op_id); - if (it != active_directives_.end()) { - it->end_time = end_time; - std::make_heap(active_directives_.begin(), - active_directives_.end(), - LatestFirstComparator()); - return; - } - - active_directives_.push_back( - AudioDirective(op_id, end_time, server_directive)); - std::push_heap(active_directives_.begin(), - active_directives_.end(), - LatestFirstComparator()); -} - -void AudioDirectiveList::RemoveDirective(const std::string& op_id) { - auto it = FindDirectiveByOpId(op_id); - if (it != active_directives_.end()) - active_directives_.erase(it); - - std::make_heap(active_directives_.begin(), - active_directives_.end(), - LatestFirstComparator()); -} - -std::unique_ptr<AudioDirective> AudioDirectiveList::GetActiveDirective() { - // The top is always the instruction that is ending the latest. - // If that time has passed, all our previous instructions have expired too. - // So we clear the list. - if (active_directives_.empty() || - active_directives_.front().end_time < clock_->NowTicks()) { - active_directives_.clear(); - return std::unique_ptr<AudioDirective>(); - } - - return base::WrapUnique(new AudioDirective(active_directives_.front())); -} - -const std::vector<AudioDirective>& AudioDirectiveList::directives() const { - return active_directives_; -} - - -// Private functions. - -std::vector<AudioDirective>::iterator AudioDirectiveList::FindDirectiveByOpId( - const std::string& op_id) { - for (auto it = active_directives_.begin(); - it != active_directives_.end(); - ++it) { - if (it->op_id == op_id) - return it; - } - return active_directives_.end(); -} - -} // namespace copresence
diff --git a/components/copresence/handlers/audio/audio_directive_list.h b/components/copresence/handlers/audio/audio_directive_list.h deleted file mode 100644 index b643852238..0000000 --- a/components/copresence/handlers/audio/audio_directive_list.h +++ /dev/null
@@ -1,88 +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 COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_LIST_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_LIST_H_ - -#include <memory> -#include <string> -#include <vector> - -#include "base/callback_forward.h" -#include "base/macros.h" -#include "base/memory/ref_counted.h" -#include "base/time/default_tick_clock.h" -#include "base/time/time.h" -#include "components/copresence/handlers/audio/tick_clock_ref_counted.h" -#include "components/copresence/proto/data.pb.h" - -namespace media { -class AudioBusRefCounted; -} - -namespace copresence { - -class TickClockRefCounted; - -struct AudioDirective final { - // Default ctor, required by the priority queue. - AudioDirective(); - AudioDirective(const std::string& op_id, - base::TimeTicks end_time, - const Directive& server_directive); - - std::string op_id; - - // We're currently using TimeTicks to track time. This may not work for cases - // where your machine suspends. See crbug.com/426136 - base::TimeTicks end_time; - - Directive server_directive; -}; - -// This class maintains a list of active audio directives. It fetches the audio -// samples associated with a audio transmit directives and expires directives -// that have outlived their TTL. -// TODO(rkc): Once we implement more token technologies, move reusable code -// from here to a base class and inherit various XxxxDirectiveList -// classes from it. -class AudioDirectiveList final { - public: - explicit AudioDirectiveList(const scoped_refptr<TickClockRefCounted>& clock = - make_scoped_refptr(new TickClockRefCounted(new base::DefaultTickClock))); - ~AudioDirectiveList(); - - void AddDirective(const std::string& op_id, const Directive& directive); - void RemoveDirective(const std::string& op_id); - - std::unique_ptr<AudioDirective> GetActiveDirective(); - - const std::vector<AudioDirective>& directives() const; - - private: - // Comparator for comparing end_times on audio tokens. - class LatestFirstComparator { - public: - // This will sort our queue with the 'latest' time being the top. - bool operator()(const AudioDirective& left, - const AudioDirective& right) const { - return left.end_time < right.end_time; - } - }; - - std::vector<AudioDirective>::iterator FindDirectiveByOpId( - const std::string& op_id); - - // This vector will be organized as a heap with the latest time as the first - // element. Only currently active directives will exist in this list. - std::vector<AudioDirective> active_directives_; - - scoped_refptr<TickClockRefCounted> clock_; - - DISALLOW_COPY_AND_ASSIGN(AudioDirectiveList); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_LIST_H_
diff --git a/components/copresence/handlers/audio/audio_directive_list_unittest.cc b/components/copresence/handlers/audio/audio_directive_list_unittest.cc deleted file mode 100644 index e0da7554..0000000 --- a/components/copresence/handlers/audio/audio_directive_list_unittest.cc +++ /dev/null
@@ -1,84 +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 "components/copresence/handlers/audio/audio_directive_list.h" - -#include <stdint.h> - -#include "base/bind.h" -#include "base/bind_helpers.h" -#include "base/message_loop/message_loop.h" -#include "testing/gmock/include/gmock/gmock.h" - -using testing::IsNull; - -namespace copresence { - -static const int64_t kTtl = 10; - -const Directive CreateDirective(int64_t ttl) { - Directive directive; - directive.set_ttl_millis(ttl); - return directive; -} - -class AudioDirectiveListTest : public testing::Test { - public: - AudioDirectiveListTest() : directive_list_(new AudioDirectiveList) {} - - protected: - base::MessageLoop message_loop_; - std::unique_ptr<AudioDirectiveList> directive_list_; -}; - -TEST_F(AudioDirectiveListTest, Basic) { - EXPECT_THAT(directive_list_->GetActiveDirective(), IsNull()); - - directive_list_->AddDirective("op_id1", CreateDirective(kTtl)); - directive_list_->AddDirective("op_id2", CreateDirective(kTtl * 3)); - directive_list_->AddDirective("op_id3", CreateDirective(kTtl * 2)); - EXPECT_EQ("op_id2", directive_list_->GetActiveDirective()->op_id); - - directive_list_->RemoveDirective("op_id2"); - EXPECT_EQ("op_id3", directive_list_->GetActiveDirective()->op_id); -} - -TEST_F(AudioDirectiveListTest, AddDirectiveMultiple) { - directive_list_->AddDirective("op_id1", CreateDirective(kTtl)); - directive_list_->AddDirective("op_id2", CreateDirective(kTtl * 2)); - directive_list_->AddDirective("op_id3", CreateDirective(kTtl * 3 * 2)); - directive_list_->AddDirective("op_id3", CreateDirective(kTtl * 3 * 3)); - directive_list_->AddDirective("op_id4", CreateDirective(kTtl * 4)); - - EXPECT_EQ("op_id3", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id3"); - EXPECT_EQ("op_id4", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id4"); - EXPECT_EQ("op_id2", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id2"); - EXPECT_EQ("op_id1", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id1"); - EXPECT_THAT(directive_list_->GetActiveDirective(), IsNull()); -} - -TEST_F(AudioDirectiveListTest, RemoveDirectiveMultiple) { - directive_list_->AddDirective("op_id1", CreateDirective(kTtl)); - directive_list_->AddDirective("op_id2", CreateDirective(kTtl * 2)); - directive_list_->AddDirective("op_id3", CreateDirective(kTtl * 3)); - directive_list_->AddDirective("op_id4", CreateDirective(kTtl * 4)); - - EXPECT_EQ("op_id4", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id4"); - EXPECT_EQ("op_id3", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id3"); - directive_list_->RemoveDirective("op_id3"); - directive_list_->RemoveDirective("op_id3"); - EXPECT_EQ("op_id2", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id2"); - EXPECT_EQ("op_id1", directive_list_->GetActiveDirective()->op_id); - directive_list_->RemoveDirective("op_id1"); - EXPECT_THAT(directive_list_->GetActiveDirective(), IsNull()); -} - -} // namespace copresence
diff --git a/components/copresence/handlers/audio/tick_clock_ref_counted.cc b/components/copresence/handlers/audio/tick_clock_ref_counted.cc deleted file mode 100644 index 1d052eb..0000000 --- a/components/copresence/handlers/audio/tick_clock_ref_counted.cc +++ /dev/null
@@ -1,26 +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 "components/copresence/handlers/audio/tick_clock_ref_counted.h" - -#include <utility> - -#include "base/memory/ptr_util.h" -#include "base/time/tick_clock.h" - -namespace copresence { - -TickClockRefCounted::TickClockRefCounted(std::unique_ptr<base::TickClock> clock) - : clock_(std::move(clock)) {} - -TickClockRefCounted::TickClockRefCounted(base::TickClock* clock) - : clock_(base::WrapUnique(clock)) {} - -base::TimeTicks TickClockRefCounted::NowTicks() const { - return clock_->NowTicks(); -} - -TickClockRefCounted::~TickClockRefCounted() {} - -} // namespace copresence
diff --git a/components/copresence/handlers/audio/tick_clock_ref_counted.h b/components/copresence/handlers/audio/tick_clock_ref_counted.h deleted file mode 100644 index 45f8bcfe..0000000 --- a/components/copresence/handlers/audio/tick_clock_ref_counted.h +++ /dev/null
@@ -1,41 +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 COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ - -#include <memory> - -#include "base/macros.h" -#include "base/memory/ref_counted.h" - -namespace base { -class TickClock; -class TimeTicks; -} - -namespace copresence { - -class TickClockRefCounted - : public base::RefCountedThreadSafe<TickClockRefCounted> { - public: - explicit TickClockRefCounted(std::unique_ptr<base::TickClock> clock); - - // Takes ownership of the clock. - explicit TickClockRefCounted(base::TickClock* clock); - - base::TimeTicks NowTicks() const; - - private: - friend class base::RefCountedThreadSafe<TickClockRefCounted>; - virtual ~TickClockRefCounted(); - - std::unique_ptr<base::TickClock> clock_; - - DISALLOW_COPY_AND_ASSIGN(TickClockRefCounted); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_
diff --git a/components/copresence/handlers/directive_handler.h b/components/copresence/handlers/directive_handler.h deleted file mode 100644 index 6221a35..0000000 --- a/components/copresence/handlers/directive_handler.h +++ /dev/null
@@ -1,50 +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 COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_H_ - -#include <string> - -#include "base/macros.h" -#include "components/audio_modem/public/whispernet_client.h" - -namespace copresence { - -class Directive; - -// The directive handler manages transmit and receive directives. -class DirectiveHandler { - public: - DirectiveHandler() {} - virtual ~DirectiveHandler() {} - - // Starts processing directives with the provided Whispernet delegate. - // Directives will be queued until this function is called. - // |whispernet_client| is owned by the caller and must outlive the - // DirectiveHandler. - // |tokens_cb| is called for all audio tokens found in recorded audio. - // TODO(ckehoe): This is no longer needed. Merge into the constructor. - virtual void Start(audio_modem::WhispernetClient* whispernet_client, - const audio_modem::TokensCallback& tokens_cb) = 0; - - // Adds a directive to handle. - virtual void AddDirective(const Directive& directive) = 0; - - // Removes any directives associated with the given operation id. - virtual void RemoveDirectives(const std::string& op_id) = 0; - - // TODO(ckehoe): Move the Modem to be owned by CopresenceManager. - // Then this will not need to be passed all the way down the tree. - virtual const std::string - GetCurrentAudioToken(audio_modem::AudioType type) const = 0; - virtual bool IsAudioTokenHeard(audio_modem::AudioType type) const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(DirectiveHandler); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_H_
diff --git a/components/copresence/handlers/directive_handler_impl.cc b/components/copresence/handlers/directive_handler_impl.cc deleted file mode 100644 index 62b4f619..0000000 --- a/components/copresence/handlers/directive_handler_impl.cc +++ /dev/null
@@ -1,126 +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 "components/copresence/handlers/directive_handler_impl.h" - -#include <utility> - -#include "base/bind.h" -#include "base/guid.h" -#include "base/logging.h" -#include "base/memory/ptr_util.h" -#include "base/time/time.h" -#include "components/copresence/handlers/audio/audio_directive_handler_impl.h" -#include "components/copresence/proto/data.pb.h" - -namespace { - -const int kMaxUnlabeledDirectiveTtl = 60000; // 1 minute - -} // namespace - -namespace copresence { - -// Public functions. - -DirectiveHandlerImpl::DirectiveHandlerImpl() - : DirectiveHandlerImpl(base::WrapUnique( - new AudioDirectiveHandlerImpl(DirectivesCallback()))) {} - -DirectiveHandlerImpl::DirectiveHandlerImpl( - const DirectivesCallback& update_directives_callback) - : DirectiveHandlerImpl(base::WrapUnique( - new AudioDirectiveHandlerImpl(update_directives_callback))) {} - -DirectiveHandlerImpl::DirectiveHandlerImpl( - std::unique_ptr<AudioDirectiveHandler> audio_handler) - : audio_handler_(std::move(audio_handler)), is_started_(false) {} - -DirectiveHandlerImpl::~DirectiveHandlerImpl() {} - -void DirectiveHandlerImpl::Start( - audio_modem::WhispernetClient* whispernet_client, - const audio_modem::TokensCallback& tokens_cb) { - audio_handler_->Initialize(whispernet_client, tokens_cb); - DVLOG(2) << "Directive handler starting"; - - is_started_ = true; - - // Run all the queued directives. - for (const auto& op_id : pending_directives_) { - for (const Directive& directive : op_id.second) - StartDirective(op_id.first, directive); - } - pending_directives_.clear(); -} - -void DirectiveHandlerImpl::AddDirective(const Directive& original_directive) { - // We may need to modify the directive's TTL. - Directive directive(original_directive); - - // We only handle transmit and receive directives. - // WiFi and BLE scans aren't implemented. - DCHECK_EQ(directive.instruction_type(), TOKEN); - - std::string op_id = directive.published_message_id(); - if (op_id.empty()) - op_id = directive.subscription_id(); - - // GCM directives will not have a publish or subscribe ID populated. - if (op_id.empty()) { - op_id = base::GenerateGUID(); - DVLOG(3) << "No operation associated with directive. Setting op id to " - << op_id; - - // The app can't cancel these directives, so make sure they're not too long. - if (directive.ttl_millis() > kMaxUnlabeledDirectiveTtl) { - DVLOG(2) << "Cutting TTL of unlabeled directive from " - << directive.ttl_millis() << " down to " - << kMaxUnlabeledDirectiveTtl << " milliseconds"; - directive.set_ttl_millis(kMaxUnlabeledDirectiveTtl); - } - } - - if (!is_started_) { - pending_directives_[op_id].push_back(directive); - } else { - StartDirective(op_id, directive); - } -} - -void DirectiveHandlerImpl::RemoveDirectives(const std::string& op_id) { - // If whispernet_client_ is null, audio_handler_ hasn't been Initialized. - if (is_started_) { - audio_handler_->RemoveInstructions(op_id); - } else { - pending_directives_.erase(op_id); - } -} - -const std::string DirectiveHandlerImpl::GetCurrentAudioToken( - audio_modem::AudioType type) const { - // If whispernet_client_ is null, audio_handler_ hasn't been Initialized. - return is_started_ ? audio_handler_->PlayingToken(type) : ""; -} - -bool DirectiveHandlerImpl::IsAudioTokenHeard( - audio_modem::AudioType type) const { - return is_started_ ? audio_handler_->IsPlayingTokenHeard(type) : false; -} - - -// Private functions. - -void DirectiveHandlerImpl::StartDirective(const std::string& op_id, - const Directive& directive) { - DCHECK(is_started_); - DLOG_IF(WARNING, directive.delay_millis() > 0) - << "Ignoring " << directive.delay_millis() << " delay for directive"; - const TokenMedium& medium = directive.token_instruction().medium(); - DCHECK(medium == AUDIO_ULTRASOUND_PASSBAND || medium == AUDIO_AUDIBLE_DTMF) - << "Received directive for unimplemented medium " << medium; - audio_handler_->AddInstruction(directive, op_id); -} - -} // namespace copresence
diff --git a/components/copresence/handlers/directive_handler_impl.h b/components/copresence/handlers/directive_handler_impl.h deleted file mode 100644 index cfee1c7..0000000 --- a/components/copresence/handlers/directive_handler_impl.h +++ /dev/null
@@ -1,52 +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 COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_IMPL_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_IMPL_H_ - -#include <map> -#include <memory> -#include <string> -#include <vector> - -#include "base/macros.h" -#include "components/copresence/handlers/audio/audio_directive_handler_impl.h" -#include "components/copresence/handlers/directive_handler.h" -#include "components/copresence/public/copresence_constants.h" - -namespace copresence { - -// The directive handler manages transmit and receive directives. -class DirectiveHandlerImpl final : public DirectiveHandler { - public: - DirectiveHandlerImpl(); - explicit DirectiveHandlerImpl( - const DirectivesCallback& update_directives_callback); - DirectiveHandlerImpl(std::unique_ptr<AudioDirectiveHandler> audio_handler); - ~DirectiveHandlerImpl() override; - - // DirectiveHandler overrides. - void Start(audio_modem::WhispernetClient* whispernet_client, - const audio_modem::TokensCallback& tokens_cb) override; - void AddDirective(const Directive& directive) override; - void RemoveDirectives(const std::string& op_id) override; - const std::string - GetCurrentAudioToken(audio_modem::AudioType type) const override; - bool IsAudioTokenHeard(audio_modem::AudioType type) const override; - - private: - // Starts actually running a directive. - void StartDirective(const std::string& op_id, const Directive& directive); - - std::unique_ptr<AudioDirectiveHandler> audio_handler_; - std::map<std::string, std::vector<Directive>> pending_directives_; - - bool is_started_; - - DISALLOW_COPY_AND_ASSIGN(DirectiveHandlerImpl); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_DIRECTIVE_HANDLER_IMPL_H_
diff --git a/components/copresence/handlers/directive_handler_unittest.cc b/components/copresence/handlers/directive_handler_unittest.cc deleted file mode 100644 index 5eae861..0000000 --- a/components/copresence/handlers/directive_handler_unittest.cc +++ /dev/null
@@ -1,147 +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 <stdint.h> - -#include <string> -#include <vector> - -#include "base/bind.h" -#include "base/memory/ptr_util.h" -#include "base/time/time.h" -#include "components/audio_modem/test/stub_whispernet_client.h" -#include "components/copresence/handlers/audio/audio_directive_handler.h" -#include "components/copresence/handlers/directive_handler_impl.h" -#include "components/copresence/proto/data.pb.h" -#include "testing/gmock/include/gmock/gmock.h" - -using testing::ElementsAre; -using testing::IsEmpty; - -namespace { - -const int64_t kMaxUnlabeledTtl = 60000; // 1 minute -const int64_t kExcessiveUnlabeledTtl = 120000; // 2 minutes -const int64_t kDefaultTtl = 600000; // 10 minutes - -} // namespace - -namespace copresence { - -const Directive CreateDirective(const std::string& publish_id, - const std::string& subscribe_id, - const std::string& token, - int64_t ttl_ms) { - Directive directive; - directive.set_instruction_type(TOKEN); - directive.set_published_message_id(publish_id); - directive.set_subscription_id(subscribe_id); - directive.set_ttl_millis(ttl_ms); - - TokenInstruction* instruction = new TokenInstruction; - instruction->set_token_id(token); - instruction->set_medium(AUDIO_ULTRASOUND_PASSBAND); - directive.set_allocated_token_instruction(instruction); - - return directive; -} - -const Directive CreateDirective(const std::string& publish_id, - const std::string& subscribe_id, - const std::string& token) { - return CreateDirective(publish_id, subscribe_id, token, kDefaultTtl); -} - -class FakeAudioDirectiveHandler final : public AudioDirectiveHandler { - public: - FakeAudioDirectiveHandler() {} - - void Initialize( - audio_modem::WhispernetClient* /* whispernet_client */, - const audio_modem::TokensCallback& /* tokens_cb */) override {} - - void AddInstruction(const Directive& directive, - const std::string& /* op_id */) override { - added_tokens_.push_back(directive.token_instruction().token_id()); - added_ttls_.push_back(directive.ttl_millis()); - } - - void RemoveInstructions(const std::string& op_id) override { - removed_operations_.push_back(op_id); - } - - const std::string - PlayingToken(audio_modem::AudioType /* type */) const override { - NOTREACHED(); - return ""; - } - - bool IsPlayingTokenHeard(audio_modem::AudioType /* type */) const override { - NOTREACHED(); - return false; - } - - const std::vector<std::string>& added_tokens() const { - return added_tokens_; - } - - const std::vector<int64_t>& added_ttls() const { return added_ttls_; } - - const std::vector<std::string>& removed_operations() const { - return removed_operations_; - } - - private: - std::vector<std::string> added_tokens_; - std::vector<int64_t> added_ttls_; - std::vector<std::string> removed_operations_; -}; - -class DirectiveHandlerTest : public testing::Test { - public: - DirectiveHandlerTest() - : whispernet_client_(new audio_modem::StubWhispernetClient), - audio_handler_(new FakeAudioDirectiveHandler), - directive_handler_( - base::WrapUnique<AudioDirectiveHandler>(audio_handler_)) {} - - protected: - void StartDirectiveHandler() { - directive_handler_.Start(whispernet_client_.get(), - audio_modem::TokensCallback()); - } - - std::unique_ptr<audio_modem::WhispernetClient> whispernet_client_; - FakeAudioDirectiveHandler* audio_handler_; - DirectiveHandlerImpl directive_handler_; -}; - -TEST_F(DirectiveHandlerTest, DirectiveTtl) { - StartDirectiveHandler(); - directive_handler_.AddDirective( - CreateDirective("", "", "token 1", kMaxUnlabeledTtl)); - directive_handler_.AddDirective( - CreateDirective("", "", "token 2", kExcessiveUnlabeledTtl)); - EXPECT_THAT(audio_handler_->added_ttls(), - ElementsAre(kMaxUnlabeledTtl, kMaxUnlabeledTtl)); -} - -TEST_F(DirectiveHandlerTest, Queuing) { - directive_handler_.AddDirective(CreateDirective("id 1", "", "token 1")); - directive_handler_.AddDirective(CreateDirective("", "id 1", "token 2")); - directive_handler_.AddDirective(CreateDirective("id 2", "", "token 3")); - directive_handler_.RemoveDirectives("id 1"); - - EXPECT_THAT(audio_handler_->added_tokens(), IsEmpty()); - EXPECT_THAT(audio_handler_->removed_operations(), IsEmpty()); - - StartDirectiveHandler(); - directive_handler_.RemoveDirectives("id 3"); - - EXPECT_THAT(audio_handler_->added_tokens(), ElementsAre("token 3")); - EXPECT_THAT(audio_handler_->added_ttls(), ElementsAre(kDefaultTtl)); - EXPECT_THAT(audio_handler_->removed_operations(), ElementsAre("id 3")); -} - -} // namespace copresence
diff --git a/components/copresence/handlers/gcm_handler.h b/components/copresence/handlers/gcm_handler.h deleted file mode 100644 index 341a7d8ca..0000000 --- a/components/copresence/handlers/gcm_handler.h +++ /dev/null
@@ -1,40 +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 COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_ - -#include <string> - -#include "base/callback_forward.h" -#include "base/macros.h" - -namespace gcm { -class GCMDriver; -} - -namespace copresence { - -// A class to handle GCM messages from the Copresence server. As far as the -// rest of the system is concerned, it simply provides the registered GCM ID. -// The implementation will call other classes to enact the message contents. -class GCMHandler { - public: - // Callback to report that registration has completed. - // Returns an empty ID if registration failed. - using RegistrationCallback = base::Callback<void(const std::string&)>; - - GCMHandler() {} - virtual ~GCMHandler() {} - - // Request the GCM ID. It may be returned now or later, via the callback. - virtual void GetGcmId(const RegistrationCallback& callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(GCMHandler); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_
diff --git a/components/copresence/handlers/gcm_handler_impl.cc b/components/copresence/handlers/gcm_handler_impl.cc deleted file mode 100644 index 362b535..0000000 --- a/components/copresence/handlers/gcm_handler_impl.cc +++ /dev/null
@@ -1,158 +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 "components/copresence/handlers/gcm_handler_impl.h" - -#include "base/base64.h" -#include "base/bind.h" -#include "base/logging.h" -#include "base/strings/string_util.h" -#include "components/copresence/handlers/directive_handler.h" -#include "components/copresence/proto/push_message.pb.h" -#include "components/gcm_driver/gcm_driver.h" - -using gcm::GCMClient; - -namespace { - -// TODO(ckehoe): Move this to a common library. -bool Base64Decode(std::string data, std::string* out) { - // Convert from URL-safe. - base::ReplaceChars(data, "-", "+", &data); - base::ReplaceChars(data, "_", "/", &data); - - // Add padding if needed. - while (data.size() % 4) - data.push_back('='); - - // Decode. - return base::Base64Decode(data, out); -} - -} // namespace - -namespace copresence { - -const char GCMHandlerImpl::kCopresenceAppId[] = - "com.google.android.gms.location.copresence"; -const char GCMHandlerImpl::kCopresenceSenderId[] = "745476177629"; -const char GCMHandlerImpl::kGcmMessageKey[] = "PUSH_MESSAGE"; - - -// Public functions. - -GCMHandlerImpl::GCMHandlerImpl(gcm::GCMDriver* gcm_driver, - DirectiveHandler* directive_handler, - const MessagesCallback& new_messages_callback) - : driver_(gcm_driver), - directive_handler_(directive_handler), - new_messages_callback_(new_messages_callback), - registration_callback_(base::Bind(&GCMHandlerImpl::RegistrationComplete, - base::Unretained(this))) { - DCHECK(driver_); - DCHECK(directive_handler_); - - driver_->AddAppHandler(kCopresenceAppId, this); - driver_->Register(kCopresenceAppId, - std::vector<std::string>(1, kCopresenceSenderId), - registration_callback_.callback()); -} - -GCMHandlerImpl::~GCMHandlerImpl() { - if (driver_) - driver_->RemoveAppHandler(kCopresenceAppId); -} - -void GCMHandlerImpl::GetGcmId(const RegistrationCallback& callback) { - if (gcm_id_.empty()) { - pending_id_requests_.push_back(callback); - } else { - callback.Run(gcm_id_); - } -} - -void GCMHandlerImpl::ShutdownHandler() { - // The GCMDriver is going away. Make sure we don't try to contact it. - driver_ = nullptr; -} - -void GCMHandlerImpl::OnMessage(const std::string& app_id, - const gcm::IncomingMessage& message) { - DCHECK_EQ(kCopresenceAppId, app_id); - DVLOG(2) << "Incoming GCM message"; - - const auto& content = message.data.find(kGcmMessageKey); - if (content == message.data.end()) { - LOG(ERROR) << "GCM message missing data key"; - return; - } - - std::string serialized_message; - if (!Base64Decode(content->second, &serialized_message)) { - LOG(ERROR) << "Couldn't decode GCM message"; - return; - } - - PushMessage push_message; - if (!push_message.ParseFromString(serialized_message)) { - LOG(ERROR) << "GCM message contained invalid proto"; - return; - } - - if (push_message.type() != PushMessage::REPORT) { - DVLOG(2) << "Discarding non-report GCM message"; - return; - } - - DVLOG(3) << "Processing " << push_message.report().directive_size() - << " directive(s) from GCM message"; - for (const Directive& directive : push_message.report().directive()) { - // TODO(ckehoe): Use a callback here so GCMHandler - // is decoupled from DirectiveHandler. - directive_handler_->AddDirective(directive); - } - - new_messages_callback_.Run(push_message.report().subscribed_message()); -} - -void GCMHandlerImpl::OnMessagesDeleted(const std::string& app_id) { - DCHECK_EQ(kCopresenceAppId, app_id); - DVLOG(2) << "GCM message overflow reported"; -} - -void GCMHandlerImpl::OnSendError( - const std::string& /* app_id */, - const GCMClient::SendErrorDetails& /* send_error_details */) { - NOTREACHED() << "Copresence clients should not be sending GCM messages"; -} - -void GCMHandlerImpl::OnSendAcknowledged(const std::string& /* app_id */, - const std::string& /* message_id */) { - NOTREACHED() << "Copresence clients should not be sending GCM messages"; -} - -bool GCMHandlerImpl::CanHandle(const std::string& app_id) const { - return app_id == kCopresenceAppId; -} - - -// Private functions. - -void GCMHandlerImpl::RegistrationComplete(const std::string& registration_id, - GCMClient::Result result) { - if (result == GCMClient::SUCCESS) { - DVLOG(2) << "GCM registration successful. ID: " << registration_id; - gcm_id_ = registration_id; - } else { - LOG(ERROR) << "GCM registration failed with error " << result; - } - - for (const RegistrationCallback& callback : pending_id_requests_) { - callback.Run(result == GCMClient::SUCCESS ? - registration_id : std::string()); - } - pending_id_requests_.clear(); -} - -} // namespace copresence
diff --git a/components/copresence/handlers/gcm_handler_impl.h b/components/copresence/handlers/gcm_handler_impl.h deleted file mode 100644 index 69cd085..0000000 --- a/components/copresence/handlers/gcm_handler_impl.h +++ /dev/null
@@ -1,84 +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 COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_IMPL_H_ -#define COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_IMPL_H_ - -#include <string> -#include <vector> - -#include "base/callback_forward.h" -#include "base/cancelable_callback.h" -#include "base/macros.h" -#include "components/copresence/handlers/gcm_handler.h" -#include "components/copresence/public/copresence_constants.h" -#include "components/gcm_driver/gcm_app_handler.h" -#include "components/gcm_driver/gcm_client.h" - -namespace gcm { -class GCMDriver; -} - -namespace copresence { - -class DirectiveHandler; - -// This class handles GCM messages from the Copresence server. -class GCMHandlerImpl final : public GCMHandler, - public gcm::GCMAppHandler { - public: - // Callback to report that registration has completed. - // Returns an empty ID if registration failed. - using RegistrationCallback = base::Callback<void(const std::string&)>; - - static const char kCopresenceAppId[]; - static const char kCopresenceSenderId[]; - static const char kGcmMessageKey[]; - - // |gcm_driver| is required, but may disappear if we get a ShutdownHandler() - // call first. |directive_handler| must outlive us. The caller owns both. - GCMHandlerImpl(gcm::GCMDriver* gcm_driver, - DirectiveHandler* directive_handler, - const MessagesCallback& new_messages_callback); - ~GCMHandlerImpl() override; - - // GCMHandler override. - void GetGcmId(const RegistrationCallback& callback) override; - - private: - friend class GCMHandlerTest; - - // GCMAppHandler overrides - void ShutdownHandler() override; - void OnMessage(const std::string& app_id, - const gcm::IncomingMessage& message) override; - void OnMessagesDeleted(const std::string& app_id) override; - void OnSendError( - const std::string& /* app_id */, - const gcm::GCMClient::SendErrorDetails& /* send_error_details */) - override; - void OnSendAcknowledged(const std::string& /* app_id */, - const std::string& /* message_id */) override; - bool CanHandle(const std::string& app_id) const override; - - // GCM Registration has finished. Notify clients as appropriate. - void RegistrationComplete(const std::string& registration_id, - gcm::GCMClient::Result result); - - gcm::GCMDriver* driver_; - DirectiveHandler* const directive_handler_; - MessagesCallback new_messages_callback_; - - std::string gcm_id_; - std::vector<RegistrationCallback> pending_id_requests_; - - base::CancelableCallback<void(const std::string&, - gcm::GCMClient::Result)> registration_callback_; - - DISALLOW_COPY_AND_ASSIGN(GCMHandlerImpl); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_IMPL_H_
diff --git a/components/copresence/handlers/gcm_handler_unittest.cc b/components/copresence/handlers/gcm_handler_unittest.cc deleted file mode 100644 index 2e45ff13..0000000 --- a/components/copresence/handlers/gcm_handler_unittest.cc +++ /dev/null
@@ -1,72 +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 <memory> - -#include "base/base64url.h" -#include "components/copresence/handlers/gcm_handler_impl.h" -#include "components/copresence/proto/push_message.pb.h" -#include "components/copresence/test/fake_directive_handler.h" -#include "components/gcm_driver/fake_gcm_driver.h" -#include "components/gcm_driver/gcm_client.h" -#include "testing/gmock/include/gmock/gmock.h" - -namespace copresence { - -namespace { - -using google::protobuf::RepeatedPtrField; -void IgnoreMessages( - const RepeatedPtrField<SubscribedMessage>& /* messages */) {} - -} // namespace - - -class GCMHandlerTest : public testing::Test { - public: - GCMHandlerTest() - : driver_(new gcm::FakeGCMDriver), - directive_handler_(new FakeDirectiveHandler), - gcm_handler_(driver_.get(), - directive_handler_.get(), - base::Bind(&IgnoreMessages)) { - } - - protected: - void ProcessMessage(const gcm::IncomingMessage& message) { - gcm_handler_.OnMessage(GCMHandlerImpl::kCopresenceAppId, message); - } - - std::unique_ptr<gcm::GCMDriver> driver_; - std::unique_ptr<FakeDirectiveHandler> directive_handler_; - GCMHandlerImpl gcm_handler_; -}; - -TEST_F(GCMHandlerTest, OnMessage) { - // Create a PushMessage. - PushMessage push_message; - push_message.set_type(PushMessage::REPORT); - Report* report = push_message.mutable_report(); - report->add_directive()->set_subscription_id("subscription 1"); - report->add_directive()->set_subscription_id("subscription 2"); - - // Encode it. - std::string serialized_proto; - std::string encoded_proto; - push_message.SerializeToString(&serialized_proto); - base::Base64UrlEncode(serialized_proto, - base::Base64UrlEncodePolicy::INCLUDE_PADDING, - &encoded_proto); - - // Send it in a GCM message. - gcm::IncomingMessage gcm_message; - gcm_message.data[GCMHandlerImpl::kGcmMessageKey] = encoded_proto; - ProcessMessage(gcm_message); - - // Check that the correct directives were passed along. - EXPECT_THAT(directive_handler_->added_directives(), - testing::ElementsAre("subscription 1", "subscription 2")); -} - -} // namespace copresence
diff --git a/components/copresence/proto/BUILD.gn b/components/copresence/proto/BUILD.gn deleted file mode 100644 index cdffe4bb..0000000 --- a/components/copresence/proto/BUILD.gn +++ /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. - -import("//third_party/protobuf/proto_library.gni") - -# GYP version: components/copresence.gypi:copresence_proto -proto_library("proto") { - sources = [ - "codes.proto", - "config_data.proto", - "data.proto", - "enums.proto", - "identity.proto", - "push_message.proto", - "rpcs.proto", - ] -}
diff --git a/components/copresence/proto/codes.proto b/components/copresence/proto/codes.proto deleted file mode 100644 index 3459f26..0000000 --- a/components/copresence/proto/codes.proto +++ /dev/null
@@ -1,23 +0,0 @@ -syntax = "proto2"; -package util.error; -option optimize_for = LITE_RUNTIME; -enum Code { - OK = 0; - CANCELLED = 1; - UNKNOWN = 2; - INVALID_ARGUMENT = 3; - DEADLINE_EXCEEDED = 4; - NOT_FOUND = 5; - ALREADY_EXISTS = 6; - PERMISSION_DENIED = 7; - UNAUTHENTICATED = 16; - RESOURCE_EXHAUSTED = 8; - FAILED_PRECONDITION = 9; - ABORTED = 10; - OUT_OF_RANGE = 11; - UNIMPLEMENTED = 12; - INTERNAL = 13; - UNAVAILABLE = 14; - DATA_LOSS = 15; - DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_ = 20; -}
diff --git a/components/copresence/proto/config_data.proto b/components/copresence/proto/config_data.proto deleted file mode 100644 index a59a8d0..0000000 --- a/components/copresence/proto/config_data.proto +++ /dev/null
@@ -1,91 +0,0 @@ -syntax = "proto2"; -package copresence; -option optimize_for = LITE_RUNTIME; -message Configuration { - optional string etag = 3 [default = ""]; - optional SystemParams system = 5; - optional CarrierSenseParams carrier_sense = 6; - optional AudioDsssParams audio_dsss = 7; - optional LoggerParam logger = 13; - optional ClientDirectiveParams client_directive = 14; - optional AudioDtmfParams audio_dtmf = 15; -} -message DirectiveConfiguration { - optional TokenParams token_params = 1; -} -message TokenParams { - optional int32 length = 1 [default = 6]; - optional string prefix = 2 [default = "GCS"]; -} -message ClientDirectiveParams { - optional TokenParams audio_ultrasound_passband = 1; - optional TokenParams audio_audible_dtmf = 7; -} -message SystemParams { - optional bool enable_copresence_support = 1 [default = true]; - optional bool enable_listen_ultrasound_audio = 2 [default = true]; - optional bool enable_advertise_ultrasound_audio = 3 [default = true]; - optional int64 kick_scheduler_timeout_millis = 16 [default = 30000]; - optional int64 copresence_state_pruning_millis = 17 [default = 604800000]; - optional int32 num_oauth_retries = 18 [default = 3]; - optional int64 default_state_transition_timeout_millis = 19 [default = 1000]; - optional int64 sync_adapter_period_seconds = 20 [default = 86400]; // 1 day - optional int64 heartbeat_interval_millis = 21 [default = 5000]; - optional int64 transmit_directive_max_ttl_millis = 22 [default = 600000]; - optional string experiment_override = 23 [default = ""]; - optional int64 poll_delay_on_token_heard_in_millis = 24 [default = 2000]; - optional bool enable_listen_audible_audio = 27 [default = true]; - optional bool enable_advertise_audible_audio = 28 [default = true]; - optional int64 duty_cycler_notify_timeout_millis = 30 [default = 5000]; - optional bool enable_client_message_etag = 31 [default=false]; - optional int64 max_duration_to_reserve_tokens_millis = 32 [default = 3600000]; - optional int64 max_unauth_ttl_millis = 33 [default = 86400000]; - optional bool enable_preseeded_tokens = 34 [default = false]; -} -message CarrierSenseParams { - optional int64 max_additional_broadcast_time_millis = 1 [default = 0]; - optional int64 max_additional_pause_broadcast_time_millis = 2 [default = 300]; - optional int64 min_pause_broadcast_time_millis = 4 [default = 500]; - optional int64 min_wait_time_when_broadcasting_millis = 5 [default = 1100]; - optional int64 max_additional_wait_time_when_broadcasting_millis = 6 - [default = 1500]; - optional int64 min_wait_time_when_listening_millis = 7 [default = 4000]; - optional int64 step_size_millis = 8 [default = 300]; - optional int64 estimated_stop_playback_latency_millis = 9 [default = 150]; - optional int64 min_broadcast_time_per_byte_millis = 10 [default = 400]; -} -message AudioDsssParams { - optional int32 broadcaster_volume = 1 [default = 5]; - optional bool include_parity_symbol = 2 [default = true]; - optional bool use_single_sideband = 3 [default = true]; - optional double desired_carrier_frequency = 4 [default = 18500.0]; - optional bool use_crc_16 = 5 [default = false]; - optional int32 number_of_taps_lfsr = 6 [default = 7]; - optional int32 code_number = 7 [default = 0]; - optional double coder_sample_rate = 8 [default = 48000.0]; - optional int32 bits_per_symbol = 9 [default = 4]; - optional int32 min_cycles_per_frame = 10 [default = 4]; - optional int32 baseband_decimation_factor = 11 [default = 4]; - optional int32 upsampling_factor = 12 [default = 16]; -} -message AudioDtmfParams { - optional bool include_parity_symbol = 1 [default = true]; - optional bool use_crc_16 = 2 [default = false]; - optional double coder_sample_rate = 3 [default = 44100.0]; - optional int32 baseband_decimation_factor = 4 [default = 16]; - optional int32 frequencies_per_symbol = 5 [default = 2]; - optional int32 window_duration_millis = 6 [default = 125]; - optional AdsrParams adsr_params = 7; - optional double num_repetitions_to_play = 8 [default = 1]; -} -message AdsrParams { - optional int64 attack_time_millis = 1 [default = 8]; - optional int64 decay_time_millis = 2 [default = 0]; - optional int64 sustain_time_millis = 3 [default = 0]; - optional int64 release_time_millis = 4 [default = 40]; - optional double sustain_amplitude = 5 [default = 1.0]; -} -message LoggerParam { - optional int64 clear_cached_request_duration_millis = 1 [default = 172800000]; - optional int32 request_buffer_limit = 3 [default = 200]; -}
diff --git a/components/copresence/proto/data.proto b/components/copresence/proto/data.proto deleted file mode 100644 index f862e9b..0000000 --- a/components/copresence/proto/data.proto +++ /dev/null
@@ -1,138 +0,0 @@ -syntax = "proto2"; -package copresence; -option optimize_for = LITE_RUNTIME; -import "config_data.proto"; -import "enums.proto"; -import "identity.proto"; -message ClientVersion { - optional string client = 1; - optional string version_name = 2; - optional int64 version_code = 3; - optional string certificate_fingerprint = 4; -} -message Status { - optional StatusCode code = 1; - optional string message = 2; -} -message PushServiceRegistration { - optional PushService service = 1; - optional GcmRegistration gcm_registration = 2; -} -message GcmRegistration { - optional string device_token = 1; -} -message DeviceIdentifiers { - optional int32 ulr_device_id = 1; - optional DeviceIdentity device_identity = 2; - optional Identity registrant = 3; -} -message Token { - message Debug { - repeated string email = 2; - } - optional string id = 1; - optional TokenStatus status = 3; - optional Debug debug = 4; -} -message DeviceFingerprint { - optional string manufacturer = 1; - optional string model = 2; - optional PlatformType type = 3; - optional string platform_version = 4; -} -message TokenTechnology { - optional TokenMedium medium = 1; - repeated TokenInstructionType instruction_type = 2; -} -message DeviceCapabilities { - repeated TokenTechnology token_technology = 2; -} -message TokenInstruction { - optional TokenInstructionType token_instruction_type = 1; - optional TokenMedium medium = 2; - optional string token_id = 4; -} -message Directive { - optional InstructionType instruction_type = 1; - optional TokenInstruction token_instruction = 2; - optional int64 delay_millis = 3; - optional int64 ttl_millis = 4; - optional string published_message_id = 5; - optional string subscription_id = 6; - optional DirectiveConfiguration configuration = 7; -} -message DeviceState { - optional DeviceCapabilities capabilities = 1; - repeated Directive active_directive = 2; -} -message DebugInfo { - optional string served_by_task = 1; - repeated string token_id = 3; - optional int64 request_time_millis = 4; -} -message TokenObservation { - optional string token_id = 1; - repeated TokenSignals signals = 2; -} -message TokenSignals { - optional TokenMedium medium = 1; - optional int32 rssi = 2; - optional int64 observed_time_millis = 3; -} -message AccessPolicy { - optional int64 ttl_millis = 1; - optional Acl acl = 2; -} -message Acl { - optional AclType acl_type = 1; - optional string named_acl_name = 2; - optional bytes referenced_acl_consistency_token = 5; -} -message PublishedMessage { - optional string id = 1; - optional AccessPolicy access_policy = 2; - optional Message message = 3; - optional TokenExchangeStrategy token_exchange_strategy = 5; - optional OptInStateFilter opt_in_state_filter = 6; -} -message TokenExchangeStrategy { - optional AudioConfiguration audio_configuration = 1; - optional BroadcastScanConfiguration broadcast_scan_configuration = 2; -} -message SubscribedMessage { - message Debug { - optional string published_message_id = 1; - optional string publisher_identity_id = 2; - optional string publisher_device_id = 3; - optional int64 creation_timestamp_millis = 4; - optional int64 ttl_millis = 5; - optional TokenExchangeStrategy token_exchange_strategy = 7; - } - repeated string subscription_id = 1; - optional Message published_message = 2; - optional Debug debug = 3; - repeated TokenObservation required_token = 5; -} -message Message { - optional MessageType type = 2; - optional bytes payload = 3; -} -message MessageType { - optional string type = 2; -} -message Subscription { - optional string id = 1; - optional int64 ttl_millis = 3; - optional MessageType message_type = 4; - optional TokenExchangeStrategy token_exchange_strategy = 7; - optional OptInStateFilter opt_in_state_filter = 8; -} -message MessageResult { - optional string published_message_id = 1; -} -message SubscriptionResult { - optional string subscription_id = 1; -} -message OptInStateFilter { - repeated OptInState allowed_opt_in_state = 1; -}
diff --git a/components/copresence/proto/enums.proto b/components/copresence/proto/enums.proto deleted file mode 100644 index 6570e4b..0000000 --- a/components/copresence/proto/enums.proto +++ /dev/null
@@ -1,91 +0,0 @@ -syntax = "proto2"; -package copresence; -option optimize_for = LITE_RUNTIME; -enum IdentityType { - IDENTITY_TYPE_UNKNOWN = 0; - GAIA_USER = 1; - CHROMECAST = 2; - ANDROIDOS = 3; - CHROME = 4; - UNREGISTERED = 5; -} -enum PushService { - PUSH_SERVICE_UNKNOWN = 0; - GCM = 1; - APNS = 2; - PUSH_SERVICE_NONE = 3; -} -enum ErrorType { - ERROR_TYPE_UNKNOWN = 0; - TOKEN_EXPIRED = 1; - MAC_ADDRESS_UNAVAILABLE = 2; - MAC_ADDRESS_NEEDS_PERMISSION = 3; -} -enum TokenStatus { - TOKEN_STATUS_UNKNOWN = 0; - VALID = 1; - INVALID = 2; - TRANSITIVE = 3; -} -enum TokenMedium { - TOKEN_MEDIUM_UNKNOWN = 0; - AUDIO_ULTRASOUND_PASSBAND = 1; - BLUETOOTH_CLASSIC_NAME = 2; - BLE_ADVERTISING_PACKET = 3; - WIFI_DIRECT_SSID = 4; - LOCAL_DEVICE = 5; - BLE_GATT_SERVICE = 6; - WIFI_AP_SSID = 7; - AUDIO_AUDIBLE_DTMF = 8; -} -enum AclType { - UNKNOWN_ACL_TYPE = 0; - NO_ACL_CHECK = 1; - OWNER_ONLY = 2; - NAMED_ACL = 4; - MESSAGE_ACL = 5; - REFERENCED_ACL = 6; - OPTED_OUT_MESSAGE_ACL = 7; -} -enum TokenInstructionType { - UNKNOWN_TOKEN_INSTRUCTION_TYPE = 0; - TRANSMIT = 1; - RECEIVE = 2; -} -enum PlatformType { - UNKNOWN_PLATFORM_TYPE = 0; - CHROMECAST_PLATFORM_TYPE = 5; - ANDROID_PLATFORM_TYPE = 6; - IOS_PLATFORM_TYPE = 7; - CHROME_PLATFORM_TYPE = 8; -} -enum InstructionType { - UNKNOWN_INSTRUCTION_TYPE = 0; - TOKEN = 1; - SCAN_WIFI = 2; - SCAN_BLE = 3; -} -enum StatusCode { - STATUS_CODE_UNKNOWN = -1; - OK = 0; - COPRESENCE_DISABLED = 201; - LOCATION_HISTORY_DISABLED = 202; - UNDERAGED = 203; - DEVICE_RE_REGISTRATION_REQUIRED = 204; - RATE_LIMITED = 301; -} -enum OptInState { - UNKNOWN_OPT_IN_STATE = 0; - OPTED_IN = 1; - OPTED_OUT = 2; -} -enum AudioConfiguration { - AUDIO_CONFIGURATION_UNKNOWN = 0; - AUDIO_CONFIGURATION_AUDIBLE = 1; -} -enum BroadcastScanConfiguration { - BROADCAST_SCAN_CONFIGURATION_UNKNOWN = 0; - BROADCAST_AND_SCAN = 1; - BROADCAST_ONLY = 2; - SCAN_ONLY = 3; -}
diff --git a/components/copresence/proto/identity.proto b/components/copresence/proto/identity.proto deleted file mode 100644 index 6c104ed..0000000 --- a/components/copresence/proto/identity.proto +++ /dev/null
@@ -1,20 +0,0 @@ -syntax = "proto2"; -package copresence; -option optimize_for = LITE_RUNTIME; -import "enums.proto"; -message Identity { - optional IdentityType type = 1; - optional string chromecast_id = 3; - optional string android_id = 4; - optional string chrome_id = 5; - optional int64 gaia_id = 6; -} -message DeviceIdentity { - optional Identity identity = 1; - optional DeviceVersion version = 2; -} -message DeviceVersion { - optional string brand = 1; - optional string product = 2; - optional string version = 3; -}
diff --git a/components/copresence/proto/push_message.proto b/components/copresence/proto/push_message.proto deleted file mode 100644 index 239e885..0000000 --- a/components/copresence/proto/push_message.proto +++ /dev/null
@@ -1,20 +0,0 @@ -syntax = "proto2"; -package copresence; -option optimize_for = LITE_RUNTIME; -import "data.proto"; -message PushMessage { - enum Type { - TYPE_UNKNOWN = 0; - SYNC_SETTINGS = 3; - OBTAIN_MAC = 5; - NOTIFY_MAC = 6; - TEST = 7; - REPORT = 8; - }; - optional Type type = 1; - optional Report report = 9; -} -message Report { - repeated Directive directive = 1; - repeated SubscribedMessage subscribed_message = 2; -}
diff --git a/components/copresence/proto/rpcs.proto b/components/copresence/proto/rpcs.proto deleted file mode 100644 index 0d090e59..0000000 --- a/components/copresence/proto/rpcs.proto +++ /dev/null
@@ -1,67 +0,0 @@ -syntax = "proto2"; -package copresence; -option optimize_for = LITE_RUNTIME; -import "codes.proto"; -import "config_data.proto"; -import "data.proto"; -message RequestHeader { - optional ClientVersion client_version = 4; - optional ClientVersion framework_version = 5; - optional int64 current_time_millis = 6; - optional string registered_device_id = 7; - repeated string experiment_override = 8; - optional DeviceFingerprint device_fingerprint = 10; - optional string configuration_etag = 11; -} -message ResponseHeader { - optional DebugInfo debug_info = 2; - optional Status status = 3; - optional Configuration configuration = 4; -} -message RegisterDeviceRequest { - optional RequestHeader header = 1; - optional PushServiceRegistration push_service = 5; - optional DeviceIdentifiers device_identifiers = 6; -} -message RegisterDeviceResponse { - optional ResponseHeader header = 1; - optional string registered_device_id = 2; -} -message ReportRequest { - optional RequestHeader header = 1; - optional ManageMessagesRequest manage_messages_request = 2; - optional ManageSubscriptionsRequest manage_subscriptions_request = 3; - optional UpdateSignalsRequest update_signals_request = 4; -} -message UpdateSignalsRequest { - repeated TokenObservation token_observation = 1; - optional DeviceState state = 3; -} -message ManageMessagesRequest { - repeated PublishedMessage message_to_publish = 1; - repeated string id_to_unpublish = 2; -} -message ManageSubscriptionsRequest { - repeated Subscription subscription = 1; - repeated string id_to_unsubscribe = 2; -} -message ReportResponse { - optional ResponseHeader header = 1; - optional ManageMessagesResponse manage_messages_response = 2; - optional ManageSubscriptionsResponse manage_subscriptions_response = 3; - optional UpdateSignalsResponse update_signals_response = 4; -} -message UpdateSignalsResponse { - optional util.error.Code status = 1; - repeated Token token = 2; - repeated SubscribedMessage message = 3; - repeated Directive directive = 4; -} -message ManageMessagesResponse { - optional util.error.Code status = 1; - repeated MessageResult published_message_result = 3; -} -message ManageSubscriptionsResponse { - optional util.error.Code status = 1; - repeated SubscriptionResult subscription_result = 3; -}
diff --git a/components/copresence/public/copresence_constants.h b/components/copresence/public/copresence_constants.h deleted file mode 100644 index e4c43907..0000000 --- a/components/copresence/public/copresence_constants.h +++ /dev/null
@@ -1,36 +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 COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_CONSTANTS_H_ -#define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_CONSTANTS_H_ - -#include <google/protobuf/repeated_field.h> - -#include <string> -#include <vector> - -#include "base/callback_forward.h" -#include "base/memory/ref_counted.h" -#include "components/copresence/tokens.h" -#include "media/base/channel_layout.h" - -namespace media { -class AudioBusRefCounted; -} - -namespace copresence { - -class Directive; -class SubscribedMessage; - -// Callback to pass a list of directives back to CopresenceState. -using DirectivesCallback = base::Callback<void(const std::vector<Directive>&)>; - -// Callback to pass around a list of SubscribedMessages. -using MessagesCallback = base::Callback<void( - const google::protobuf::RepeatedPtrField<SubscribedMessage>&)>; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_CONSTANTS_H_
diff --git a/components/copresence/public/copresence_delegate.h b/components/copresence/public/copresence_delegate.h deleted file mode 100644 index 8f83bdb..0000000 --- a/components/copresence/public/copresence_delegate.h +++ /dev/null
@@ -1,77 +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 COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ -#define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ - -#include <string> -#include <vector> - -#include "base/callback_forward.h" - -namespace gcm { -class GCMDriver; -} - -namespace net { -class URLRequestContextGetter; -} - -namespace audio_modem { -class WhispernetClient; -} - -namespace copresence { - -class Message; - -// AUDIO_FAIL indicates that we weren't able to hear the audio token that -// we were playing. -enum CopresenceStatus { SUCCESS, FAIL, AUDIO_FAIL }; - -// Callback type to send a status. -using StatusCallback = base::Callback<void(CopresenceStatus)>; - -// A delegate interface for users of Copresence. -class CopresenceDelegate { - public: - // This method will be called when we have subscribed messages - // that need to be sent to their respective apps. - virtual void HandleMessages( - const std::string& app_id, - const std::string& subscription_id, - const std::vector<Message>& messages) = 0; - - virtual void HandleStatusUpdate(CopresenceStatus status) = 0; - - // Thw URLRequestContextGetter must outlive the CopresenceManager. - virtual net::URLRequestContextGetter* GetRequestContext() const = 0; - - virtual std::string GetPlatformVersionString() const = 0; - - virtual std::string GetAPIKey(const std::string& app_id) const = 0; - - // The WhispernetClient must outlive the CopresenceManager. - virtual audio_modem::WhispernetClient* GetWhispernetClient() = 0; - - // Clients may optionally provide a GCMDriver to receive messages from. - // If no driver is available, this can return null. - virtual gcm::GCMDriver* GetGCMDriver() = 0; - - // Get the copresence device ID for authenticated or anonymous calls, - // as specified. If none exists, return the empty string. - virtual std::string GetDeviceId(bool authenticated) = 0; - - // Save a copresence device ID for authenticated or anonymous calls. - // If the device ID is empty, any stored ID should be deleted. - virtual void SaveDeviceId(bool authenticated, - const std::string& device_id) = 0; - - protected: - virtual ~CopresenceDelegate() {} -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_
diff --git a/components/copresence/public/copresence_manager.h b/components/copresence/public/copresence_manager.h deleted file mode 100644 index 0807f22c..0000000 --- a/components/copresence/public/copresence_manager.h +++ /dev/null
@@ -1,46 +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 COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_ -#define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_ - -#include <string> - -#include "base/macros.h" -#include "components/copresence/public/copresence_delegate.h" - -namespace copresence { - -class CopresenceState; -class ReportRequest; - -// The CopresenceManager class is the central interface for Copresence -// functionality. This class handles all the initialization and delegation -// of copresence tasks. Any user of copresence only needs to interact -// with this class. -class CopresenceManager { - public: - CopresenceManager() {} - virtual ~CopresenceManager() {} - - // Accessor for the CopresenceState instance that tracks debug info. - virtual CopresenceState* state() = 0; - - // This method will execute a report request. Each report request can have - // multiple (un)publishes, (un)subscribes. This will ensure that once the - // manager is initialized, it sends all request to the server and handles - // the response. If an error is encountered, the status callback is used - // to relay it to the requester. - virtual void ExecuteReportRequest(const ReportRequest& request, - const std::string& app_id, - const std::string& auth_token, - const StatusCallback& callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CopresenceManager); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_
diff --git a/components/copresence/public/copresence_observer.h b/components/copresence/public/copresence_observer.h deleted file mode 100644 index 1e28726..0000000 --- a/components/copresence/public/copresence_observer.h +++ /dev/null
@@ -1,35 +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 COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_ -#define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_ - -namespace copresence { - -class Directive; -struct TransmittedToken; -struct ReceivedToken; - -// Implement this interface to be notified of changes -// to the state of the copresence component. -// TODO(ckehoe): Create a LoggingObserver based on this that replaces -// equivalent logging elsewhere. Then we know what state is being recorded. -class CopresenceObserver { - public: - // Called when the list of active directives has changed. - virtual void DirectivesUpdated() = 0; - - // Called when a token is transmitted. - virtual void TokenTransmitted(const TransmittedToken& token) = 0; - - // Called when a token is received. - virtual void TokenReceived(const ReceivedToken& token) = 0; - - protected: - virtual ~CopresenceObserver() {} -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_OBSERVER_H_
diff --git a/components/copresence/public/copresence_state.h b/components/copresence/public/copresence_state.h deleted file mode 100644 index f922007..0000000 --- a/components/copresence/public/copresence_state.h +++ /dev/null
@@ -1,47 +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 COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_STATE_H_ -#define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_STATE_H_ - -#include <map> -#include <string> -#include <vector> - -namespace copresence { - -class CopresenceObserver; -class Directive; -struct TransmittedToken; -struct ReceivedToken; - -// This class tracks the state of the copresence component and can notify -// interested parties when it changes. This is useful for debugging purposes. -class CopresenceState { - public: - // Add a listener for future state changes. |observer| is owned by the caller, - // and must be valid until removed (or the CopresenceState is destroyed). - virtual void AddObserver(CopresenceObserver* observer) = 0; - - // Remove a state change listener. - virtual void RemoveObserver(CopresenceObserver* observer) = 0; - - // Accessor for the currently active directives. - virtual const std::vector<Directive>& active_directives() const = 0; - - // Accessor for recently transmitted tokens. - virtual const std::map<std::string, TransmittedToken>& - transmitted_tokens() const = 0; - - // Accessor for recently received tokens. - virtual const std::map<std::string, ReceivedToken>& - received_tokens() const = 0; - - protected: - virtual ~CopresenceState() {} -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_STATE_H_
diff --git a/components/copresence/rpc/http_post.cc b/components/copresence/rpc/http_post.cc deleted file mode 100644 index 63ea7e74..0000000 --- a/components/copresence/rpc/http_post.cc +++ /dev/null
@@ -1,110 +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 "components/copresence/rpc/http_post.h" - -// TODO(ckehoe): Support third-party protobufs too. -#include <google/protobuf/message_lite.h> - -#include "base/bind.h" -#include "google_apis/google_api_keys.h" -#include "net/base/load_flags.h" -#include "net/base/net_errors.h" -#include "net/base/url_util.h" -#include "net/http/http_status_code.h" -#include "net/url_request/url_fetcher.h" -#include "net/url_request/url_request_context_getter.h" -#include "url/gurl.h" - -namespace copresence { - -const char HttpPost::kApiKeyField[] = "key"; -const char HttpPost::kTracingField[] = "trace"; - -HttpPost::HttpPost(net::URLRequestContextGetter* url_context_getter, - const std::string& server_host, - const std::string& rpc_name, - std::string api_key, - const std::string& auth_token, - const std::string& tracing_token, - const google::protobuf::MessageLite& request_proto) { - // Create the base URL to call. - GURL url(server_host + "/" + rpc_name); - - // Add the tracing token, if specified. - if (!tracing_token.empty()) { - url = net::AppendQueryParameter( - url, kTracingField, "token:" + tracing_token); - } - - // If we have no auth token, authenticate using the API key. - // If no API key is specified, use the Chrome API key. - if (auth_token.empty()) { - if (api_key.empty()) { -#ifdef GOOGLE_CHROME_BUILD - DCHECK(google_apis::HasKeysConfigured()); - api_key = google_apis::GetAPIKey(); -#else - LOG(ERROR) << "No Copresence API key provided"; -#endif - } - url = net::AppendQueryParameter(url, kApiKeyField, api_key); - } - - // Serialize the proto for transmission. - std::string request_data; - bool serialize_success = request_proto.SerializeToString(&request_data); - DCHECK(serialize_success); - - // Configure and send the request. - url_fetcher_ = - net::URLFetcher::Create(kUrlFetcherId, url, net::URLFetcher::POST, this); - url_fetcher_->SetRequestContext(url_context_getter); - url_fetcher_->SetLoadFlags(net::LOAD_BYPASS_CACHE | - net::LOAD_DISABLE_CACHE | - net::LOAD_DO_NOT_SAVE_COOKIES | - net::LOAD_DO_NOT_SEND_COOKIES | - net::LOAD_DO_NOT_SEND_AUTH_DATA); - url_fetcher_->SetUploadData("application/x-protobuf", request_data); - if (!auth_token.empty()) { - url_fetcher_->AddExtraRequestHeader("Authorization: Bearer " + auth_token); - } -} - -HttpPost::~HttpPost() {} - -void HttpPost::Start(const ResponseCallback& response_callback) { - response_callback_ = response_callback; - DVLOG(3) << "Sending Copresence request to " - << url_fetcher_->GetOriginalURL().spec(); - url_fetcher_->Start(); -} - -void HttpPost::OnURLFetchComplete(const net::URLFetcher* source) { - DCHECK_EQ(url_fetcher_.get(), source); - - // Gather response info. - std::string response; - source->GetResponseAsString(&response); - int response_code = source->GetResponseCode(); - - // Log any errors. - if (response_code < 0) { - net::URLRequestStatus status = source->GetStatus(); - LOG(WARNING) << "Couldn't contact the Copresence server at " - << source->GetURL() << ". Status code " << status.status(); - LOG_IF(WARNING, status.error()) - << "Network error: " << net::ErrorToString(status.error()); - LOG_IF(WARNING, !response.empty()) << "HTTP response: " << response; - } else if (response_code != net::HTTP_OK) { - LOG(WARNING) << "Copresence request got HTTP response code " - << response_code << ". Response:\n" << response; - } - - // Return the response. - response_callback_.Run(response_code, response); - delete this; -} - -} // namespace copresence
diff --git a/components/copresence/rpc/http_post.h b/components/copresence/rpc/http_post.h deleted file mode 100644 index 911bc5f..0000000 --- a/components/copresence/rpc/http_post.h +++ /dev/null
@@ -1,75 +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 COMPONENTS_COPRESENCE_RPC_HTTP_POST_H_ -#define COMPONENTS_COPRESENCE_RPC_HTTP_POST_H_ - -#include <memory> -#include <string> - -#include "base/callback.h" -#include "base/macros.h" -#include "net/url_request/url_fetcher_delegate.h" - -namespace google { -namespace protobuf { -class MessageLite; -} -} - -namespace net { -class URLRequestContextGetter; -} - -namespace copresence { - -// This class handles all Apiary calls to the Copresence server. -// It configures the HTTP request appropriately and reports any errors. -// If deleted, the HTTP request is cancelled. -// -// TODO(ckehoe): Add retry logic. -class HttpPost : public net::URLFetcherDelegate { - public: - // Callback to receive the HTTP status code and body of the response - // (if any). A pointer to this HttpPost object is also passed along. - using ResponseCallback = base::Callback<void(int, const std::string&)>; - - // Create a request to the Copresence server. - // |url_context_getter| is owned by the caller, - // and the context it provides must be available until the request completes. - HttpPost(net::URLRequestContextGetter* url_context_getter, - const std::string& server_host, - // TODO(ckehoe): Condense some of these into a struct. - const std::string& rpc_name, - std::string api_key, // If blank, we overwrite with a default. - const std::string& auth_token, - const std::string& tracing_token, - const google::protobuf::MessageLite& request_proto); - - // HTTP requests are cancelled on delete. - ~HttpPost() override; - - // Send an HttpPost request. - void Start(const ResponseCallback& response_callback); - - private: - static const int kUrlFetcherId = 1; - static const char kApiKeyField[]; - static const char kTracingField[]; - - friend class HttpPostTest; - - // Overridden from net::URLFetcherDelegate. - void OnURLFetchComplete(const net::URLFetcher* source) override; - - ResponseCallback response_callback_; - - std::unique_ptr<net::URLFetcher> url_fetcher_; - - DISALLOW_COPY_AND_ASSIGN(HttpPost); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_RPC_HTTP_POST_H_
diff --git a/components/copresence/rpc/http_post_unittest.cc b/components/copresence/rpc/http_post_unittest.cc deleted file mode 100644 index 92bc5808..0000000 --- a/components/copresence/rpc/http_post_unittest.cc +++ /dev/null
@@ -1,143 +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 "components/copresence/rpc/http_post.h" - -#include "base/test/test_simple_task_runner.h" -#include "components/copresence/proto/data.pb.h" -#include "net/base/url_util.h" -#include "net/http/http_status_code.h" -#include "net/url_request/test_url_fetcher_factory.h" -#include "net/url_request/url_request_test_util.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "url/gurl.h" - -namespace { - -const char kFakeServerHost[] = "test.server.google.com"; -const char kRPCName[] = "testRpc"; -const char kTracingToken[] = "trace me!"; -const char kApiKey[] = "unlock ALL the APIz"; -const char kAuthToken[] = "oogabooga"; - -} // namespace - -using google::protobuf::MessageLite; - -namespace copresence { - -class HttpPostTest : public testing::Test { - public: - HttpPostTest() { - context_getter_ = new net::TestURLRequestContextGetter( - make_scoped_refptr(new base::TestSimpleTaskRunner)); - proto_.set_client("test_client"); - proto_.set_version_code(123); - } - ~HttpPostTest() override {} - - // Check that the correct response was sent. - void TestResponseCallback(int expected_response_code, - const std::string& expected_response, - int actual_response_code, - const std::string& actual_response) { - CHECK_EQ(expected_response_code, actual_response_code); - CHECK_EQ(expected_response, actual_response); - } - - protected: - void CheckPassthrough(int response_code, const std::string& response) { - HttpPost* post = new HttpPost( - context_getter_.get(), std::string("http://") + kFakeServerHost, - kRPCName, kApiKey, - "", // auth token - "", // tracing token - proto_); - post->Start(base::Bind(&HttpPostTest::TestResponseCallback, - base::Unretained(this), - response_code, - response)); - - net::TestURLFetcher* fetcher = fetcher_factory_.GetFetcherByID( - HttpPost::kUrlFetcherId); - fetcher->set_response_code(response_code); - fetcher->SetResponseString(response); - fetcher->delegate()->OnURLFetchComplete(fetcher); - } - - net::TestURLFetcher* GetFetcher() { - return fetcher_factory_.GetFetcherByID(HttpPost::kUrlFetcherId); - } - - const std::string GetApiKeySent() { - std::string api_key_sent; - net::GetValueForKeyInQuery(GetFetcher()->GetOriginalURL(), - HttpPost::kApiKeyField, - &api_key_sent); - return api_key_sent; - } - - const std::string GetAuthHeaderSent() { - net::HttpRequestHeaders headers; - std::string header; - GetFetcher()->GetExtraRequestHeaders(&headers); - return headers.GetHeader("Authorization", &header) ? header : ""; - } - - const std::string GetTracingTokenSent() { - std::string tracing_token_sent; - net::GetValueForKeyInQuery(GetFetcher()->GetOriginalURL(), - HttpPost::kTracingField, - &tracing_token_sent); - return tracing_token_sent; - } - - net::TestURLFetcherFactory fetcher_factory_; - scoped_refptr<net::TestURLRequestContextGetter> context_getter_; - - ClientVersion proto_; -}; - -TEST_F(HttpPostTest, OKResponse) { - // "Send" the proto to the "server". - HttpPost* post = new HttpPost(context_getter_.get(), - std::string("http://") + kFakeServerHost, - kRPCName, - kApiKey, - kAuthToken, - kTracingToken, - proto_); - post->Start(base::Bind(&HttpPostTest::TestResponseCallback, - base::Unretained(this), - net::HTTP_OK, - "Hello World!")); - - // Verify that the data was sent to the right place. - GURL requested_url = GetFetcher()->GetOriginalURL(); - EXPECT_EQ(kFakeServerHost, requested_url.host()); - EXPECT_EQ(std::string("/") + kRPCName, requested_url.path()); - - // Check parameters. - EXPECT_EQ("", GetApiKeySent()); // No API key when using an auth token. - EXPECT_EQ(std::string("Bearer ") + kAuthToken, GetAuthHeaderSent()); - EXPECT_EQ(std::string("token:") + kTracingToken, GetTracingTokenSent()); - - // Verify that the right data was sent. - std::string upload_data; - ASSERT_TRUE(proto_.SerializeToString(&upload_data)); - EXPECT_EQ(upload_data, GetFetcher()->upload_data()); - - // Send a response and check that it's passed along correctly. - GetFetcher()->set_response_code(net::HTTP_OK); - GetFetcher()->SetResponseString("Hello World!"); - GetFetcher()->delegate()->OnURLFetchComplete(GetFetcher()); -} - -TEST_F(HttpPostTest, ErrorResponse) { - CheckPassthrough(net::HTTP_BAD_REQUEST, "Bad client. Shame on you."); - CheckPassthrough(net::HTTP_INTERNAL_SERVER_ERROR, "I'm dying. Forgive me."); - CheckPassthrough(-1, ""); -} - -} // namespace copresence
diff --git a/components/copresence/rpc/rpc_handler.cc b/components/copresence/rpc/rpc_handler.cc deleted file mode 100644 index 58eec73..0000000 --- a/components/copresence/rpc/rpc_handler.cc +++ /dev/null
@@ -1,620 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/copresence/rpc/rpc_handler.h" - -#include <stddef.h> -#include <stdint.h> - -#include <utility> - -#include "base/bind.h" -#include "base/command_line.h" -#include "base/logging.h" -#include "base/memory/ptr_util.h" -#include "base/strings/string_util.h" -#include "base/strings/stringprintf.h" -// TODO(ckehoe): time.h includes windows.h, which #defines DeviceCapabilities -// to DeviceCapabilitiesW. This breaks the pb.h headers below. For now, -// we fix this with an #undef. -#include "base/time/time.h" -#include "build/build_config.h" -#if defined(OS_WIN) -#undef DeviceCapabilities -#endif - -#include "components/audio_modem/public/audio_modem_types.h" -#include "components/copresence/copresence_state_impl.h" -#include "components/copresence/copresence_switches.h" -#include "components/copresence/handlers/directive_handler.h" -#include "components/copresence/handlers/gcm_handler.h" -#include "components/copresence/proto/codes.pb.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/proto/rpcs.pb.h" -#include "components/copresence/public/copresence_constants.h" -#include "components/copresence/public/copresence_delegate.h" -#include "components/copresence/rpc/http_post.h" -#include "net/http/http_status_code.h" - -using google::protobuf::MessageLite; - -using audio_modem::AUDIBLE; -using audio_modem::AudioToken; -using audio_modem::INAUDIBLE; - -// TODO(ckehoe): Return error messages for bad requests. - -namespace copresence { - -const char RpcHandler::kReportRequestRpcName[] = "report"; - -namespace { - -const int kTokenLoggingSuffix = 5; -const int kInvalidTokenExpiryTimeMinutes = 10; -const int kMaxInvalidTokens = 10000; -const char kRegisterDeviceRpcName[] = "registerdevice"; -const char kDefaultCopresenceServer[] = - "https://www.googleapis.com/copresence/v2/copresence"; - -// UrlSafe is defined as: -// '/' represented by a '_' and '+' represented by a '-' -// TODO(rkc): Move this to the wrapper. -std::string ToUrlSafe(std::string token) { - base::ReplaceChars(token, "+", "-", &token); - base::ReplaceChars(token, "/", "_", &token); - return token; -} - -// Logging - -// Checks for a copresence error. If there is one, logs it and returns true. -bool IsErrorStatus(const Status& status) { - if (status.code() != OK) { - LOG(ERROR) << "Copresence error code " << status.code() - << (status.message().empty() ? "" : ": " + status.message()); - } - return status.code() != OK; -} - -void LogIfErrorStatus(const util::error::Code& code, - const std::string& context) { - LOG_IF(ERROR, code != util::error::OK) - << context << " error " << code << ". See " - << "cs/google3/util/task/codes.proto for more info."; -} - -// If any errors occurred, logs them and returns true. -bool ReportErrorLogged(const ReportResponse& response) { - bool result = IsErrorStatus(response.header().status()); - - // The Report fails or succeeds as a unit. If any responses had errors, - // the header will too. Thus we don't need to propagate individual errors. - if (response.has_update_signals_response()) - LogIfErrorStatus(response.update_signals_response().status(), "Update"); - if (response.has_manage_messages_response()) - LogIfErrorStatus(response.manage_messages_response().status(), "Publish"); - if (response.has_manage_subscriptions_response()) { - LogIfErrorStatus(response.manage_subscriptions_response().status(), - "Subscribe"); - } - - return result; -} - -const std::string LoggingStrForToken(const std::string& auth_token) { - if (auth_token.empty()) - return "anonymous"; - - std::string token_suffix = auth_token.substr( - auth_token.length() - kTokenLoggingSuffix, kTokenLoggingSuffix); - return "token ..." + token_suffix; -} - - -// Request construction - -template <typename T> -BroadcastScanConfiguration GetBroadcastScanConfig(const T& msg) { - if (msg.has_token_exchange_strategy() && - msg.token_exchange_strategy().has_broadcast_scan_configuration()) { - return msg.token_exchange_strategy().broadcast_scan_configuration(); - } - return BROADCAST_SCAN_CONFIGURATION_UNKNOWN; -} - -std::unique_ptr<DeviceState> GetDeviceCapabilities( - const ReportRequest& request) { - std::unique_ptr<DeviceState> state(new DeviceState); - - TokenTechnology* ultrasound = - state->mutable_capabilities()->add_token_technology(); - ultrasound->set_medium(AUDIO_ULTRASOUND_PASSBAND); - ultrasound->add_instruction_type(TRANSMIT); - ultrasound->add_instruction_type(RECEIVE); - - TokenTechnology* audible = - state->mutable_capabilities()->add_token_technology(); - audible->set_medium(AUDIO_AUDIBLE_DTMF); - audible->add_instruction_type(TRANSMIT); - audible->add_instruction_type(RECEIVE); - - return state; -} - -// TODO(ckehoe): We're keeping this code in a separate function for now -// because we get a version string from Chrome, but the proto expects -// an int64_t version. We should probably change the version proto -// to handle a more detailed version. -ClientVersion* CreateVersion(const std::string& client, - const std::string& version_name) { - ClientVersion* version = new ClientVersion; - version->set_client(client); - version->set_version_name(version_name); - return version; -} - -void AddTokenToRequest(const AudioToken& token, ReportRequest* request) { - TokenObservation* token_observation = - request->mutable_update_signals_request()->add_token_observation(); - token_observation->set_token_id(ToUrlSafe(token.token)); - - TokenSignals* signals = token_observation->add_signals(); - signals->set_medium(token.audible ? AUDIO_AUDIBLE_DTMF - : AUDIO_ULTRASOUND_PASSBAND); - signals->set_observed_time_millis(base::Time::Now().ToJsTime()); -} - -} // namespace - - -// Public functions. - -RpcHandler::RpcHandler(CopresenceDelegate* delegate, - DirectiveHandler* directive_handler, - CopresenceStateImpl* state, - GCMHandler* gcm_handler, - const MessagesCallback& new_messages_callback, - const PostCallback& server_post_callback) - : delegate_(delegate), - directive_handler_(directive_handler), - state_(state), - gcm_handler_(gcm_handler), - new_messages_callback_(new_messages_callback), - server_post_callback_(server_post_callback), - invalid_audio_token_cache_( - base::TimeDelta::FromMinutes(kInvalidTokenExpiryTimeMinutes), - kMaxInvalidTokens) { - DCHECK(delegate_); - DCHECK(directive_handler_); - // |gcm_handler_| is optional. - - if (server_post_callback_.is_null()) { - server_post_callback_ = - base::Bind(&RpcHandler::SendHttpPost, base::Unretained(this)); - } - - if (gcm_handler_) { - gcm_handler_->GetGcmId( - base::Bind(&RpcHandler::RegisterGcmId, base::Unretained(this))); - } - } - -RpcHandler::~RpcHandler() { - // TODO(ckehoe): Cancel the GCM callback? - for (HttpPost* post : pending_posts_) - delete post; -} - -void RpcHandler::SendReportRequest(std::unique_ptr<ReportRequest> request, - const std::string& app_id, - const std::string& auth_token, - const StatusCallback& status_callback) { - DCHECK(request.get()); - - // Check that the app, if any, has some kind of authentication token. - // Don't allow it to piggyback on Chrome's credentials. - if (!app_id.empty() && delegate_->GetAPIKey(app_id).empty() && - auth_token.empty()) { - LOG(ERROR) << "App " << app_id << " has no API key or auth token"; - status_callback.Run(FAIL); - return; - } - - // Store just one auth token since we should have only one account - // per instance of the copresence component. - // TODO(ckehoe): We may eventually need to support multiple auth tokens. - const bool authenticated = !auth_token.empty(); - if (authenticated && auth_token != auth_token_) { - LOG_IF(ERROR, !auth_token_.empty()) - << "Overwriting old auth token: " << LoggingStrForToken(auth_token); - auth_token_ = auth_token; - } - - // Check that we have a "device" registered for this authentication state. - bool queue_request; - const std::string device_id = delegate_->GetDeviceId(authenticated); - if (device_id.empty()) { - queue_request = true; - if (pending_registrations_.count(authenticated) == 0) - RegisterDevice(authenticated); - // else, registration is already in progress. - } else { - queue_request = false; - } - - // We're not registered, or registration is in progress. - if (queue_request) { - pending_requests_queue_.push_back(new PendingRequest( - std::move(request), app_id, authenticated, status_callback)); - return; - } - - DVLOG(3) << "Sending ReportRequest to server."; - - // If we are unpublishing or unsubscribing, we need to stop those publish or - // subscribes right away, we don't need to wait for the server to tell us. - ProcessRemovedOperations(*request); - - request->mutable_update_signals_request()->set_allocated_state( - GetDeviceCapabilities(*request).release()); - - AddPlayingTokens(request.get()); - - request->set_allocated_header(CreateRequestHeader(app_id, device_id)); - server_post_callback_.Run( - delegate_->GetRequestContext(), kReportRequestRpcName, - delegate_->GetAPIKey(app_id), auth_token, - base::WrapUnique<MessageLite>(request.release()), - // On destruction, this request will be cancelled. - base::Bind(&RpcHandler::ReportResponseHandler, base::Unretained(this), - status_callback)); -} - -void RpcHandler::ReportTokens(const std::vector<AudioToken>& tokens) { - DCHECK(!tokens.empty()); - - std::unique_ptr<ReportRequest> request(new ReportRequest); - for (const AudioToken& token : tokens) { - if (invalid_audio_token_cache_.HasKey(ToUrlSafe(token.token))) - continue; - DVLOG(3) << "Sending token " << token.token << " to server"; - AddTokenToRequest(token, request.get()); - } - - ReportOnAllDevices(std::move(request)); -} - - -// Private functions. - -RpcHandler::PendingRequest::PendingRequest( - std::unique_ptr<ReportRequest> report, - const std::string& app_id, - bool authenticated, - const StatusCallback& callback) - : report(std::move(report)), - app_id(app_id), - authenticated(authenticated), - callback(callback) {} - -RpcHandler::PendingRequest::~PendingRequest() {} - -void RpcHandler::RegisterDevice(const bool authenticated) { - DVLOG(2) << "Sending " << (authenticated ? "authenticated" : "anonymous") - << " registration to server."; - - std::unique_ptr<RegisterDeviceRequest> request(new RegisterDeviceRequest); - - // Add a GCM ID for authenticated registration, if we have one. - if (!authenticated || gcm_id_.empty()) { - request->mutable_push_service()->set_service(PUSH_SERVICE_NONE); - } else { - DVLOG(2) << "Registering GCM ID with " << LoggingStrForToken(auth_token_); - request->mutable_push_service()->set_service(GCM); - request->mutable_push_service()->mutable_gcm_registration() - ->set_device_token(gcm_id_); - } - - // Only identify as a Chrome device if we're in anonymous mode. - // Authenticated calls come from a "GAIA device". - if (!authenticated) { - // Make sure this isn't a duplicate anonymous registration. - // Duplicate authenticated registrations are allowed, to update the GCM ID. - DCHECK(delegate_->GetDeviceId(false).empty()) - << "Attempted anonymous re-registration"; - - Identity* identity = - request->mutable_device_identifiers()->mutable_registrant(); - identity->set_type(CHROME); - } - - bool gcm_pending = authenticated && gcm_handler_ && gcm_id_.empty(); - pending_registrations_.insert(authenticated); - request->set_allocated_header(CreateRequestHeader( - // The device is empty on first registration. - // When re-registering to pass on the GCM ID, it will be present. - std::string(), delegate_->GetDeviceId(authenticated))); - if (authenticated) - DCHECK(!auth_token_.empty()); - server_post_callback_.Run( - delegate_->GetRequestContext(), kRegisterDeviceRpcName, std::string(), - authenticated ? auth_token_ : std::string(), - base::WrapUnique<MessageLite>(request.release()), - // On destruction, this request will be cancelled. - base::Bind(&RpcHandler::RegisterResponseHandler, base::Unretained(this), - authenticated, gcm_pending)); -} - -void RpcHandler::ProcessQueuedRequests(const bool authenticated) { - // If there is no device ID for this auth state, registration failed. - bool registration_failed = delegate_->GetDeviceId(authenticated).empty(); - - // We momentarily take ownership of all the pointers in the queue. - // They are either deleted here or passed on to a new queue. - ScopedVector<PendingRequest> requests_being_processed; - std::swap(requests_being_processed, pending_requests_queue_); - for (PendingRequest* request : requests_being_processed) { - if (request->authenticated == authenticated) { - if (registration_failed) { - request->callback.Run(FAIL); - } else { - if (request->authenticated) - DCHECK(!auth_token_.empty()); - SendReportRequest(std::move(request->report), request->app_id, - request->authenticated ? auth_token_ : std::string(), - request->callback); - } - delete request; - } else { - // The request is in a different auth state. - pending_requests_queue_.push_back(request); - } - } - - // Only keep the requests that weren't processed. - // All the pointers in the queue are now spoken for. - requests_being_processed.weak_clear(); -} - -void RpcHandler::ReportOnAllDevices(std::unique_ptr<ReportRequest> request) { - std::vector<bool> auth_states; - if (!auth_token_.empty() && !delegate_->GetDeviceId(true).empty()) - auth_states.push_back(true); - if (!delegate_->GetDeviceId(false).empty()) - auth_states.push_back(false); - if (auth_states.empty()) { - VLOG(2) << "Skipping reporting because no device IDs are registered"; - return; - } - - for (bool authenticated : auth_states) { - SendReportRequest( - base::WrapUnique(new ReportRequest(*request)), std::string(), - authenticated ? auth_token_ : std::string(), StatusCallback()); - } -} - -// Store a GCM ID and send it to the server if needed. The constructor passes -// this callback to the GCMHandler to receive the ID whenever it's ready. -// It may be returned immediately, if the ID is cached, or require a server -// round-trip. This ID must then be passed along to the copresence server. -// There are a few ways this can happen: -// -// 1. The GCM ID is available when we first register, and is passed along -// with the RegisterDeviceRequest. -// -// 2. The GCM ID becomes available after the RegisterDeviceRequest has -// completed. Then this function will invoke RegisterDevice() -// again to pass on the ID. -// -// 3. The GCM ID becomes available after the RegisterDeviceRequest is sent, -// but before it completes. In this case, the gcm_pending flag is passed -// through to the RegisterResponseHandler, which invokes RegisterDevice() -// again to pass on the ID. This function must skip pending registrations, -// as the device ID will be empty. -// -// TODO(ckehoe): Add tests for these scenarios. -void RpcHandler::RegisterGcmId(const std::string& gcm_id) { - gcm_id_ = gcm_id; - if (!gcm_id.empty()) { - const std::string& device_id = delegate_->GetDeviceId(true); - if (!auth_token_.empty() && !device_id.empty()) - RegisterDevice(true); - } -} - -void RpcHandler::RegisterResponseHandler( - bool authenticated, - bool gcm_pending, - HttpPost* completed_post, - int http_status_code, - const std::string& response_data) { - if (completed_post) { - size_t elements_erased = pending_posts_.erase(completed_post); - DCHECK_GT(elements_erased, 0u); - } - - size_t registrations_completed = pending_registrations_.erase(authenticated); - DCHECK_GT(registrations_completed, 0u); - - RegisterDeviceResponse response; - const std::string token_str = - LoggingStrForToken(authenticated ? auth_token_ : std::string()); - if (http_status_code != net::HTTP_OK) { - // TODO(ckehoe): Retry registration if appropriate. - LOG(ERROR) << token_str << " device registration failed"; - } else if (!response.ParseFromString(response_data)) { - LOG(ERROR) << "Invalid RegisterDeviceResponse:\n" << response_data; - } else if (!IsErrorStatus(response.header().status())) { - const std::string& device_id = response.registered_device_id(); - DCHECK(!device_id.empty()); - delegate_->SaveDeviceId(authenticated, device_id); - DVLOG(2) << token_str << " device registration successful. Id: " - << device_id; - - // If we have a GCM ID now, and didn't before, pass it on to the server. - if (gcm_pending && !gcm_id_.empty()) - RegisterDevice(authenticated); - } - - // Send or fail requests on this auth token. - ProcessQueuedRequests(authenticated); -} - -void RpcHandler::ReportResponseHandler(const StatusCallback& status_callback, - HttpPost* completed_post, - int http_status_code, - const std::string& response_data) { - if (completed_post) { - size_t elements_erased = pending_posts_.erase(completed_post); - DCHECK_GT(elements_erased, 0u); - } - - if (http_status_code != net::HTTP_OK) { - if (!status_callback.is_null()) - status_callback.Run(FAIL); - return; - } - - DVLOG(3) << "Received ReportResponse."; - ReportResponse response; - if (!response.ParseFromString(response_data)) { - LOG(ERROR) << "Invalid ReportResponse"; - if (!status_callback.is_null()) - status_callback.Run(FAIL); - return; - } - - if (ReportErrorLogged(response)) { - if (!status_callback.is_null()) - status_callback.Run(FAIL); - return; - } - - for (const MessageResult& result : - response.manage_messages_response().published_message_result()) { - DVLOG(2) << "Published message with id " << result.published_message_id(); - } - - for (const SubscriptionResult& result : - response.manage_subscriptions_response().subscription_result()) { - DVLOG(2) << "Created subscription with id " << result.subscription_id(); - } - - if (response.has_update_signals_response()) { - const UpdateSignalsResponse& update_response = - response.update_signals_response(); - new_messages_callback_.Run(update_response.message()); - - for (const Directive& directive : update_response.directive()) - directive_handler_->AddDirective(directive); - - for (const Token& token : update_response.token()) { - if (state_) - state_->UpdateTokenStatus(token.id(), token.status()); - switch (token.status()) { - case VALID: - // TODO(rkc/ckehoe): Store the token in a |valid_token_cache_| with a - // short TTL (like 10s) and send it up with every report request. - // Then we'll still get messages while we're waiting to hear it again. - VLOG(1) << "Got valid token " << token.id(); - break; - case INVALID: - DVLOG(3) << "Discarding invalid token " << token.id(); - invalid_audio_token_cache_.Add(token.id(), true); - break; - default: - DVLOG(2) << "Token " << token.id() << " has status code " - << token.status(); - } - } - } - - // TODO(ckehoe): Return a more detailed status response. - if (!status_callback.is_null()) - status_callback.Run(SUCCESS); -} - -void RpcHandler::ProcessRemovedOperations(const ReportRequest& request) { - // Remove unpublishes. - if (request.has_manage_messages_request()) { - for (const std::string& unpublish : - request.manage_messages_request().id_to_unpublish()) { - directive_handler_->RemoveDirectives(unpublish); - } - } - - // Remove unsubscribes. - if (request.has_manage_subscriptions_request()) { - for (const std::string& unsubscribe : - request.manage_subscriptions_request().id_to_unsubscribe()) { - directive_handler_->RemoveDirectives(unsubscribe); - } - } -} - -void RpcHandler::AddPlayingTokens(ReportRequest* request) { - const std::string& audible_token = - directive_handler_->GetCurrentAudioToken(AUDIBLE); - const std::string& inaudible_token = - directive_handler_->GetCurrentAudioToken(INAUDIBLE); - - if (!audible_token.empty()) - AddTokenToRequest(AudioToken(audible_token, true), request); - if (!inaudible_token.empty()) - AddTokenToRequest(AudioToken(inaudible_token, false), request); -} - -// TODO(ckehoe): Pass in the version string and -// group this with the local functions up top. -RequestHeader* RpcHandler::CreateRequestHeader( - const std::string& app_id, - const std::string& device_id) const { - RequestHeader* header = new RequestHeader; - - header->set_allocated_framework_version(CreateVersion( - "Chrome", delegate_->GetPlatformVersionString())); - if (!app_id.empty()) - header->set_allocated_client_version(CreateVersion(app_id, std::string())); - header->set_current_time_millis(base::Time::Now().ToJsTime()); - if (!device_id.empty()) - header->set_registered_device_id(device_id); - - DeviceFingerprint* fingerprint = new DeviceFingerprint; - fingerprint->set_platform_version(delegate_->GetPlatformVersionString()); - fingerprint->set_type(CHROME_PLATFORM_TYPE); - header->set_allocated_device_fingerprint(fingerprint); - - return header; -} - -void RpcHandler::SendHttpPost(net::URLRequestContextGetter* url_context_getter, - const std::string& rpc_name, - const std::string& api_key, - const std::string& auth_token, - std::unique_ptr<MessageLite> request_proto, - const PostCleanupCallback& callback) { - // Create the base URL to call. - base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - const std::string copresence_server_host = - command_line->HasSwitch(switches::kCopresenceServer) ? - command_line->GetSwitchValueASCII(switches::kCopresenceServer) : - kDefaultCopresenceServer; - - // Create the request and keep a pointer until it completes. - HttpPost* http_post = new HttpPost( - url_context_getter, - copresence_server_host, - rpc_name, - api_key, - auth_token, - command_line->GetSwitchValueASCII(switches::kCopresenceTracingToken), - *request_proto); - - http_post->Start(base::Bind(callback, http_post)); - pending_posts_.insert(http_post); -} - -} // namespace copresence
diff --git a/components/copresence/rpc/rpc_handler.h b/components/copresence/rpc/rpc_handler.h deleted file mode 100644 index 16fd118..0000000 --- a/components/copresence/rpc/rpc_handler.h +++ /dev/null
@@ -1,213 +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. - -#ifndef COMPONENTS_COPRESENCE_RPC_RPC_HANDLER_H_ -#define COMPONENTS_COPRESENCE_RPC_RPC_HANDLER_H_ - -#include <map> -#include <memory> -#include <set> -#include <string> -#include <vector> - -#include "base/callback_forward.h" -#include "base/memory/scoped_vector.h" -#include "components/audio_modem/public/audio_modem_types.h" -#include "components/copresence/proto/enums.pb.h" -#include "components/copresence/public/copresence_constants.h" -#include "components/copresence/public/copresence_delegate.h" -#include "components/copresence/timed_map.h" - -namespace copresence { - -class CopresenceDelegate; -class CopresenceStateImpl; -class DirectiveHandler; -class GCMHandler; -class HttpPost; -class ReportRequest; -class RequestHeader; -class SubscribedMessage; - -// This class handles all communication with the copresence server. -// Clients provide a ReportRequest proto containing publishes, subscribes, -// and token observations they want to send to the server. The RpcHandler -// will fill in details like the RequestHeader and DeviceCapabilities, -// and dispatch the results of the server call to the appropriate parts -// of the system. -// -// To create an RpcHandler, clients will need to provide a few other classes -// that support its functionality. Notable among them is the CopresenceDelegate, -// an interface clients must implement to provide settings and functionality -// that may depend on the environment. See the definition in -// //components/copresence/public/copresence_delegate.h. -// -// Here is an example of creating and using an RpcHandler. -// The GCMHandler and CopresenceStateImpl are optional. -// -// MyDelegate delegate(...); -// copresence::DirectiveHandlerImpl directive_handler; -// -// RpcHandler handler(&delegate, -// &directive_handler, -// nullptr, -// nullptr, -// base::Bind(&HandleMessages)); -// -// std::unique_ptr<ReportRequest> request(new ReportRequest); -// (Fill in ReportRequest.) -// -// handler.SendReportRequest(std::move(request), -// "my_app_id", -// "", -// base::Bind(&HandleStatus)); -// -// The server will respond with directives, which get passed to the -// DirectiveHandlerImpl. -// -// Tokens from the audio modem should also be forwarded -// via ReportTokens() so that messages get delivered properly. -class RpcHandler final { - public: - // An HttpPost::ResponseCallback along with an HttpPost object to be deleted. - // Arguments: - // HttpPost*: The handler should take ownership of (i.e. delete) this object. - // int: The HTTP status code of the response. - // string: The contents of the response. - using PostCleanupCallback = base::Callback<void(HttpPost*, - int, - const std::string&)>; - - // Callback to allow tests to stub out HTTP POST behavior. - // Arguments: - // URLRequestContextGetter: Context for the HTTP POST request. - // string: Name of the rpc to invoke. URL format: server.google.com/rpc_name - // string: The API key to pass in the request. - // string: The auth token to pass with the request. - // MessageLite: Contents of POST request to be sent. This needs to be - // a (scoped) pointer to ease handling of the abstract MessageLite class. - // PostCleanupCallback: Receives the response to the request. - using PostCallback = - base::Callback<void(net::URLRequestContextGetter*, - const std::string&, - const std::string&, - const std::string&, - std::unique_ptr<google::protobuf::MessageLite>, - const PostCleanupCallback&)>; - - // Report rpc name to send to Apiary. - static const char kReportRequestRpcName[]; - - // Constructor. The CopresenceStateImpl and GCMHandler may be null. - // The first four parameters are owned by the caller and (if not null) - // must outlive the RpcHandler. - RpcHandler(CopresenceDelegate* delegate, - DirectiveHandler* directive_handler, - CopresenceStateImpl* state, - GCMHandler* gcm_handler, - const MessagesCallback& new_messages_callback, - const PostCallback& server_post_callback = PostCallback()); - - // Not copyable. - RpcHandler(const RpcHandler&) = delete; - void operator=(const RpcHandler&) = delete; - - ~RpcHandler(); - - // Sends a ReportRequest from a specific app, and get notified of completion. - void SendReportRequest(std::unique_ptr<ReportRequest> request, - const std::string& app_id, - const std::string& auth_token, - const StatusCallback& callback); - - // Reports a set of tokens to the server for a given medium. - // Uses all active auth tokens (if any). - void ReportTokens(const std::vector<audio_modem::AudioToken>& tokens); - - private: - // A queued ReportRequest along with its metadata. - struct PendingRequest { - PendingRequest(std::unique_ptr<ReportRequest> report, - const std::string& app_id, - bool authenticated, - const StatusCallback& callback); - ~PendingRequest(); - - std::unique_ptr<ReportRequest> report; - const std::string app_id; - const bool authenticated; - const StatusCallback callback; - }; - - friend class RpcHandlerTest; - - // Before accepting any other calls, the server requires registration, - // which is tied to the auth token (or lack thereof) used to call Report. - void RegisterDevice(bool authenticated); - - // Device registration has completed. Send the requests that it was blocking. - void ProcessQueuedRequests(bool authenticated); - - // Sends a ReportRequest from Chrome itself, i.e. no app id. - void ReportOnAllDevices(std::unique_ptr<ReportRequest> request); - - // Stores a GCM ID and send it to the server if needed. - void RegisterGcmId(const std::string& gcm_id); - - // Server call response handlers. - void RegisterResponseHandler(bool authenticated, - bool gcm_pending, - HttpPost* completed_post, - int http_status_code, - const std::string& response_data); - void ReportResponseHandler(const StatusCallback& status_callback, - HttpPost* completed_post, - int http_status_code, - const std::string& response_data); - - // Removes unpublished or unsubscribed operations from the directive handlers. - void ProcessRemovedOperations(const ReportRequest& request); - - // Adds all currently playing tokens to the update signals in this report - // request. This ensures that the server doesn't keep issueing new tokens to - // us when we're already playing valid tokens. - void AddPlayingTokens(ReportRequest* request); - - void DispatchMessages( - const google::protobuf::RepeatedPtrField<SubscribedMessage>& - subscribed_messages); - - RequestHeader* CreateRequestHeader(const std::string& app_id, - const std::string& device_id) const; - - // Wrapper for the http post constructor. This is the default way - // to contact the server, but it can be overridden for testing. - void SendHttpPost( - net::URLRequestContextGetter* url_context_getter, - const std::string& rpc_name, - const std::string& api_key, - const std::string& auth_token, - std::unique_ptr<google::protobuf::MessageLite> request_proto, - const PostCleanupCallback& callback); - - // These belong to the caller. - CopresenceDelegate* const delegate_; - DirectiveHandler* const directive_handler_; - CopresenceStateImpl* state_; - GCMHandler* const gcm_handler_; - - MessagesCallback new_messages_callback_; - PostCallback server_post_callback_; - - ScopedVector<PendingRequest> pending_requests_queue_; - TimedMap<std::string, bool> invalid_audio_token_cache_; - std::set<HttpPost*> pending_posts_; - std::set<bool> pending_registrations_; - std::string auth_token_; - std::string gcm_id_; -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_RPC_RPC_HANDLER_H_
diff --git a/components/copresence/rpc/rpc_handler_unittest.cc b/components/copresence/rpc/rpc_handler_unittest.cc deleted file mode 100644 index ea4baab8..0000000 --- a/components/copresence/rpc/rpc_handler_unittest.cc +++ /dev/null
@@ -1,348 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/copresence/rpc/rpc_handler.h" - -#include <map> -#include <string> -#include <utility> -#include <vector> - -#include "base/bind.h" -#include "base/bind_helpers.h" -#include "base/memory/ptr_util.h" -#include "base/memory/scoped_vector.h" -#include "base/message_loop/message_loop.h" -#include "components/audio_modem/public/modem.h" -#include "components/audio_modem/test/stub_whispernet_client.h" -#include "components/copresence/copresence_state_impl.h" -#include "components/copresence/handlers/directive_handler.h" -#include "components/copresence/proto/data.pb.h" -#include "components/copresence/proto/enums.pb.h" -#include "components/copresence/proto/rpcs.pb.h" -#include "components/copresence/test/fake_directive_handler.h" -#include "net/http/http_status_code.h" -#include "testing/gmock/include/gmock/gmock.h" - -using google::protobuf::MessageLite; -using google::protobuf::RepeatedPtrField; - -using testing::ElementsAre; -using testing::Property; -using testing::SizeIs; - -using audio_modem::AudioToken; -using audio_modem::WhispernetClient; - -namespace copresence { - -namespace { - -const char kChromeVersion[] = "Chrome Version String"; - -void IgnoreMessages( - const RepeatedPtrField<SubscribedMessage>& /* messages */) {} - -} // namespace - -class RpcHandlerTest : public testing::Test, public CopresenceDelegate { - public: - RpcHandlerTest() - : whispernet_client_(new audio_modem::StubWhispernetClient), - // TODO(ckehoe): Use a FakeCopresenceState here - // and test that it gets called correctly. - rpc_handler_(this, - &directive_handler_, - nullptr, - nullptr, - base::Bind(&IgnoreMessages), - base::Bind(&RpcHandlerTest::CaptureHttpPost, - base::Unretained(this))), - status_(SUCCESS) {} - - // CopresenceDelegate implementation - - void HandleMessages(const std::string& /* app_id */, - const std::string& subscription_id, - const std::vector<Message>& messages) override { - NOTREACHED(); - } - - void HandleStatusUpdate(CopresenceStatus /* status */) override { - NOTREACHED(); - } - - net::URLRequestContextGetter* GetRequestContext() const override { - return nullptr; - } - - std::string GetPlatformVersionString() const override { - return kChromeVersion; - } - - std::string GetAPIKey(const std::string& app_id) const override { - return app_id + " API Key"; - } - - WhispernetClient* GetWhispernetClient() override { - return whispernet_client_.get(); - } - - // TODO(ckehoe): Add GCM tests. - gcm::GCMDriver* GetGCMDriver() override { - return nullptr; - } - - std::string GetDeviceId(bool authenticated) override { - return device_id_by_auth_state_[authenticated]; - } - - void SaveDeviceId(bool authenticated, const std::string& device_id) override { - device_id_by_auth_state_[authenticated] = device_id; - } - - protected: - - // Send test input to RpcHandler - - void RegisterDevice(bool authenticated) { - rpc_handler_.RegisterDevice(authenticated); - } - - void SendRegisterResponse(bool authenticated, - const std::string& device_id) { - RegisterDeviceResponse response; - response.set_registered_device_id(device_id); - response.mutable_header()->mutable_status()->set_code(OK); - - std::string serialized_response; - response.SerializeToString(&serialized_response); - rpc_handler_.RegisterResponseHandler( - authenticated, false, nullptr, net::HTTP_OK, serialized_response); - } - - void SendReport(std::unique_ptr<ReportRequest> request, - const std::string& app_id, - const std::string& auth_token) { - rpc_handler_.SendReportRequest(std::move(request), app_id, auth_token, - StatusCallback()); - } - - void SendReportResponse(int status_code, - std::unique_ptr<ReportResponse> response) { - response->mutable_header()->mutable_status()->set_code(OK); - - std::string serialized_response; - response->SerializeToString(&serialized_response); - rpc_handler_.ReportResponseHandler( - base::Bind(&RpcHandlerTest::CaptureStatus, base::Unretained(this)), - nullptr, - status_code, - serialized_response); - } - - // Read and modify RpcHandler state - - void SetAuthToken(const std::string& auth_token) { - rpc_handler_.auth_token_ = auth_token; - } - - const ScopedVector<RpcHandler::PendingRequest>& request_queue() const { - return rpc_handler_.pending_requests_queue_; - } - - void AddInvalidToken(const std::string& token) { - rpc_handler_.invalid_audio_token_cache_.Add(token, true); - } - - bool TokenIsInvalid(const std::string& token) { - return rpc_handler_.invalid_audio_token_cache_.HasKey(token); - } - - // For rpc_handler_.invalid_audio_token_cache_ - base::MessageLoop message_loop_; - - std::unique_ptr<WhispernetClient> whispernet_client_; - FakeDirectiveHandler directive_handler_; - RpcHandler rpc_handler_; - - std::map<bool, std::string> device_id_by_auth_state_; - - CopresenceStatus status_; - std::string rpc_name_; - std::string api_key_; - std::string auth_token_; - ScopedVector<MessageLite> request_protos_; - - private: - void CaptureHttpPost( - net::URLRequestContextGetter* url_context_getter, - const std::string& rpc_name, - const std::string& api_key, - const std::string& auth_token, - std::unique_ptr<MessageLite> request_proto, - const RpcHandler::PostCleanupCallback& response_callback) { - rpc_name_ = rpc_name; - api_key_ = api_key; - auth_token_ = auth_token; - request_protos_.push_back(request_proto.release()); - } - - void CaptureStatus(CopresenceStatus status) { - status_ = status; - } -}; - -TEST_F(RpcHandlerTest, RegisterDevice) { - RegisterDevice(false); - EXPECT_THAT(request_protos_, SizeIs(1)); - const RegisterDeviceRequest* registration = - static_cast<RegisterDeviceRequest*>(request_protos_[0]); - EXPECT_EQ(CHROME, registration->device_identifiers().registrant().type()); - - SetAuthToken("Register auth"); - RegisterDevice(true); - EXPECT_THAT(request_protos_, SizeIs(2)); - registration = static_cast<RegisterDeviceRequest*>(request_protos_[1]); - EXPECT_FALSE(registration->has_device_identifiers()); -} - -TEST_F(RpcHandlerTest, RequestQueuing) { - // Send a report. - ReportRequest* report = new ReportRequest; - report->mutable_manage_messages_request()->add_id_to_unpublish("unpublish"); - SendReport(base::WrapUnique(report), "Q App ID", "Q Auth Token"); - EXPECT_THAT(request_queue(), SizeIs(1)); - EXPECT_TRUE(request_queue()[0]->authenticated); - - // Check for registration request. - EXPECT_THAT(request_protos_, SizeIs(1)); - const RegisterDeviceRequest* registration = - static_cast<RegisterDeviceRequest*>(request_protos_[0]); - EXPECT_FALSE(registration->device_identifiers().has_registrant()); - EXPECT_EQ("Q Auth Token", auth_token_); - - // Send a second report. - report = new ReportRequest; - report->mutable_manage_subscriptions_request()->add_id_to_unsubscribe( - "unsubscribe"); - SendReport(base::WrapUnique(report), "Q App ID", "Q Auth Token"); - EXPECT_THAT(request_protos_, SizeIs(1)); - EXPECT_THAT(request_queue(), SizeIs(2)); - EXPECT_TRUE(request_queue()[1]->authenticated); - - // Send an anonymous report. - report = new ReportRequest; - report->mutable_update_signals_request()->add_token_observation() - ->set_token_id("Q Audio Token"); - SendReport(base::WrapUnique(report), "Q App ID", ""); - EXPECT_THAT(request_queue(), SizeIs(3)); - EXPECT_FALSE(request_queue()[2]->authenticated); - - // Check for another registration request. - EXPECT_THAT(request_protos_, SizeIs(2)); - registration = static_cast<RegisterDeviceRequest*>(request_protos_[1]); - EXPECT_TRUE(registration->device_identifiers().has_registrant()); - EXPECT_EQ("", auth_token_); - - // Respond to the first registration. - SendRegisterResponse(true, "Q Auth Device ID"); - EXPECT_EQ("Q Auth Device ID", device_id_by_auth_state_[true]); - - // Check that queued reports are sent. - EXPECT_THAT(request_protos_, SizeIs(4)); - EXPECT_THAT(request_queue(), SizeIs(1)); - EXPECT_THAT(directive_handler_.removed_directives(), - ElementsAre("unpublish", "unsubscribe")); - report = static_cast<ReportRequest*>(request_protos_[2]); - EXPECT_EQ("unpublish", report->manage_messages_request().id_to_unpublish(0)); - report = static_cast<ReportRequest*>(request_protos_[3]); - EXPECT_EQ("unsubscribe", - report->manage_subscriptions_request().id_to_unsubscribe(0)); - - // Respond to the second registration. - SendRegisterResponse(false, "Q Anonymous Device ID"); - EXPECT_EQ("Q Anonymous Device ID", device_id_by_auth_state_[false]); - - // Check for last report. - EXPECT_THAT(request_protos_, SizeIs(5)); - EXPECT_TRUE(request_queue().empty()); - report = static_cast<ReportRequest*>(request_protos_[4]); - EXPECT_EQ("Q Audio Token", - report->update_signals_request().token_observation(0).token_id()); -} - -TEST_F(RpcHandlerTest, CreateRequestHeader) { - device_id_by_auth_state_[true] = "CreateRequestHeader Device ID"; - SendReport(base::WrapUnique(new ReportRequest), "CreateRequestHeader App", - "CreateRequestHeader Auth Token"); - - EXPECT_EQ(RpcHandler::kReportRequestRpcName, rpc_name_); - EXPECT_EQ("CreateRequestHeader App API Key", api_key_); - EXPECT_EQ("CreateRequestHeader Auth Token", auth_token_); - const ReportRequest* report = static_cast<ReportRequest*>(request_protos_[0]); - EXPECT_EQ(kChromeVersion, - report->header().framework_version().version_name()); - EXPECT_EQ("CreateRequestHeader App", - report->header().client_version().client()); - EXPECT_EQ("CreateRequestHeader Device ID", - report->header().registered_device_id()); - EXPECT_EQ(CHROME_PLATFORM_TYPE, - report->header().device_fingerprint().type()); -} - -TEST_F(RpcHandlerTest, ReportTokens) { - std::vector<AudioToken> test_tokens; - test_tokens.push_back(AudioToken("token 1", false)); - test_tokens.push_back(AudioToken("token 2", false)); - test_tokens.push_back(AudioToken("token 3", true)); - AddInvalidToken("token 2"); - - device_id_by_auth_state_[false] = "ReportTokens Anonymous Device"; - device_id_by_auth_state_[true] = "ReportTokens Auth Device"; - SetAuthToken("ReportTokens Auth"); - - rpc_handler_.ReportTokens(test_tokens); - EXPECT_EQ(RpcHandler::kReportRequestRpcName, rpc_name_); - EXPECT_EQ(" API Key", api_key_); - EXPECT_THAT(request_protos_, SizeIs(2)); - const ReportRequest* report = static_cast<ReportRequest*>(request_protos_[0]); - RepeatedPtrField<TokenObservation> tokens_sent = - report->update_signals_request().token_observation(); - EXPECT_THAT(tokens_sent, ElementsAre( - Property(&TokenObservation::token_id, "token 1"), - Property(&TokenObservation::token_id, "token 3"), - Property(&TokenObservation::token_id, "current audible"), - Property(&TokenObservation::token_id, "current inaudible"))); -} - -TEST_F(RpcHandlerTest, ReportResponseHandler) { - // Fail on HTTP status != 200. - std::unique_ptr<ReportResponse> response(new ReportResponse); - status_ = SUCCESS; - SendReportResponse(net::HTTP_BAD_REQUEST, std::move(response)); - EXPECT_EQ(FAIL, status_); - - // Construct a test ReportResponse. - response.reset(new ReportResponse); - response->mutable_header()->mutable_status()->set_code(OK); - UpdateSignalsResponse* update_response = - response->mutable_update_signals_response(); - update_response->set_status(util::error::OK); - Token* invalid_token = update_response->add_token(); - invalid_token->set_id("bad token"); - invalid_token->set_status(INVALID); - update_response->add_directive()->set_subscription_id("Subscription 1"); - update_response->add_directive()->set_subscription_id("Subscription 2"); - - // Check processing. - status_ = FAIL; - SendReportResponse(net::HTTP_OK, std::move(response)); - EXPECT_EQ(SUCCESS, status_); - EXPECT_TRUE(TokenIsInvalid("bad token")); - EXPECT_THAT(directive_handler_.added_directives(), - ElementsAre("Subscription 1", "Subscription 2")); -} - -} // namespace copresence
diff --git a/components/copresence/test/fake_directive_handler.cc b/components/copresence/test/fake_directive_handler.cc deleted file mode 100644 index 51131330..0000000 --- a/components/copresence/test/fake_directive_handler.cc +++ /dev/null
@@ -1,33 +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 "components/copresence/test/fake_directive_handler.h" - -#include "components/copresence/proto/data.pb.h" - -namespace copresence { - -FakeDirectiveHandler::FakeDirectiveHandler() {} - -FakeDirectiveHandler::~FakeDirectiveHandler() {} - -void FakeDirectiveHandler::AddDirective(const Directive& directive) { - added_directives_.push_back(directive.subscription_id()); -} - -void FakeDirectiveHandler::RemoveDirectives(const std::string& op_id) { - removed_directives_.push_back(op_id); -} - -const std::string -FakeDirectiveHandler::GetCurrentAudioToken(audio_modem::AudioType type) const { - return type == audio_modem::AUDIBLE ? "current audible" : "current inaudible"; -} - -bool FakeDirectiveHandler::IsAudioTokenHeard( - audio_modem::AudioType type) const { - return true; -} - -} // namespace copresence
diff --git a/components/copresence/test/fake_directive_handler.h b/components/copresence/test/fake_directive_handler.h deleted file mode 100644 index c3b8c01..0000000 --- a/components/copresence/test/fake_directive_handler.h +++ /dev/null
@@ -1,47 +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 COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ -#define COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ - -#include <string> -#include <vector> - -#include "base/macros.h" -#include "components/copresence/handlers/directive_handler.h" - -namespace copresence { - -class FakeDirectiveHandler final : public DirectiveHandler { - public: - FakeDirectiveHandler(); - ~FakeDirectiveHandler() override; - - const std::vector<std::string>& added_directives() const { - return added_directives_; - } - - const std::vector<std::string>& removed_directives() const { - return removed_directives_; - } - - // DirectiveHandler overrides. - void Start(audio_modem::WhispernetClient* /* whispernet_client */, - const audio_modem::TokensCallback& /* tokens_cb */) override {} - void AddDirective(const Directive& directive) override; - void RemoveDirectives(const std::string& op_id) override; - const std::string - GetCurrentAudioToken(audio_modem::AudioType type) const override; - bool IsAudioTokenHeard(audio_modem::AudioType type) const override; - - private: - std::vector<std::string> added_directives_; - std::vector<std::string> removed_directives_; - - DISALLOW_COPY_AND_ASSIGN(FakeDirectiveHandler); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_
diff --git a/components/copresence/timed_map.h b/components/copresence/timed_map.h deleted file mode 100644 index ef3b996..0000000 --- a/components/copresence/timed_map.h +++ /dev/null
@@ -1,114 +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 COMPONENTS_COPRESENCE_TIMED_MAP_H_ -#define COMPONENTS_COPRESENCE_TIMED_MAP_H_ - -#include <stddef.h> - -#include <map> -#include <memory> -#include <queue> -#include <utility> -#include <vector> - -#include "base/macros.h" -#include "base/time/default_tick_clock.h" -#include "base/time/tick_clock.h" -#include "base/time/time.h" -#include "base/timer/timer.h" - -namespace copresence { - -// TimedMap is a map with the added functionality of clearing any -// key/value pair after its specified lifetime is over. -// TODO(ckehoe): Why is this interface so different from std::map? -template <typename KeyType, typename ValueType> -class TimedMap { - public: - TimedMap(const base::TimeDelta& lifetime, size_t max_elements) - : kEmptyValue(ValueType()), - clock_(new base::DefaultTickClock()), - lifetime_(lifetime), - max_elements_(max_elements) { - timer_.Start(FROM_HERE, lifetime_, this, &TimedMap::ClearExpiredTokens); - } - - ~TimedMap() {} - - void Add(const KeyType& key, const ValueType& value) { - map_[key] = value; - expiry_queue_.push(KeyTimeTuple(key, clock_->NowTicks() + lifetime_)); - while (map_.size() > max_elements_) - ClearOldestToken(); - } - - bool HasKey(const KeyType& key) { - ClearExpiredTokens(); - return map_.find(key) != map_.end(); - } - - const ValueType& GetValue(const KeyType& key) { - ClearExpiredTokens(); - auto elt = map_.find(key); - return elt == map_.end() ? kEmptyValue : elt->second; - } - - ValueType* GetMutableValue(const KeyType& key) { - ClearExpiredTokens(); - auto elt = map_.find(key); - return elt == map_.end() ? nullptr : &(elt->second); - } - - // TODO(ckehoe): Add a unit test for this. - size_t Erase(const KeyType& key) { - return map_.erase(key); - } - - void set_clock_for_testing(std::unique_ptr<base::TickClock> clock) { - clock_ = std::move(clock); - } - - private: - void ClearExpiredTokens() { - while (!expiry_queue_.empty() && - expiry_queue_.top().second <= clock_->NowTicks()) - ClearOldestToken(); - } - - void ClearOldestToken() { - map_.erase(expiry_queue_.top().first); - expiry_queue_.pop(); - } - - using KeyTimeTuple = std::pair<KeyType, base::TimeTicks>; - - class EarliestFirstComparator { - public: - // This will sort our queue with the 'earliest' time being the top. - bool operator()(const KeyTimeTuple& left, const KeyTimeTuple& right) const { - return left.second > right.second; - } - }; - - using ExpiryQueue = std::priority_queue< - KeyTimeTuple, std::vector<KeyTimeTuple>, EarliestFirstComparator>; - - const ValueType kEmptyValue; - - std::unique_ptr<base::TickClock> clock_; - base::RepeatingTimer timer_; - const base::TimeDelta lifetime_; - const size_t max_elements_; - std::map<KeyType, ValueType> map_; - // Priority queue with our element keys ordered by the earliest expiring keys - // first. - ExpiryQueue expiry_queue_; - - DISALLOW_COPY_AND_ASSIGN(TimedMap); -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_TIMED_MAP_H_
diff --git a/components/copresence/timed_map_unittest.cc b/components/copresence/timed_map_unittest.cc deleted file mode 100644 index 2d55f6a..0000000 --- a/components/copresence/timed_map_unittest.cc +++ /dev/null
@@ -1,131 +0,0 @@ -// Copyright (c) 2011 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/copresence/timed_map.h" - -#include "base/macros.h" -#include "base/memory/ptr_util.h" -#include "base/message_loop/message_loop.h" -#include "base/test/simple_test_tick_clock.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace { - -struct Value { - Value() : value(0) {} - explicit Value(int new_value) : value(new_value) {} - - int value; -}; - -} // namespace - -class TimedMapTest : public testing::Test { - public: - using Map = copresence::TimedMap<int, Value>; - - TimedMapTest() {} - - private: - // Exists since the timer needs a message loop. - base::MessageLoop message_loop_; - - DISALLOW_COPY_AND_ASSIGN(TimedMapTest); -}; - -TEST_F(TimedMapTest, Basic) { - Map map(base::TimeDelta::FromSeconds(9999), 3); - - EXPECT_FALSE(map.HasKey(0)); - EXPECT_EQ(0, map.GetValue(0).value); - - map.Add(0x1337, Value(0x7331)); - EXPECT_TRUE(map.HasKey(0x1337)); - EXPECT_EQ(0x7331, map.GetValue(0x1337).value); - - map.Add(0xbaad, Value(0xf00d)); - EXPECT_TRUE(map.HasKey(0xbaad)); - EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value); - EXPECT_EQ(0x7331, map.GetValue(0x1337).value); - - map.Add(0x1234, Value(0x5678)); - EXPECT_TRUE(map.HasKey(0x1234)); - EXPECT_TRUE(map.HasKey(0xbaad)); - EXPECT_TRUE(map.HasKey(0x1337)); - - EXPECT_EQ(0x5678, map.GetValue(0x1234).value); - EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value); - EXPECT_EQ(0x7331, map.GetValue(0x1337).value); -} - -TEST_F(TimedMapTest, ValueReplacement) { - Map map(base::TimeDelta::FromSeconds(9999), 10); - - map.Add(0x1337, Value(0x7331)); - EXPECT_TRUE(map.HasKey(0x1337)); - EXPECT_EQ(0x7331, map.GetValue(0x1337).value); - - map.Add(0xbaad, Value(0xf00d)); - EXPECT_TRUE(map.HasKey(0xbaad)); - EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value); - - map.Add(0x1337, Value(0xd00d)); - EXPECT_TRUE(map.HasKey(0x1337)); - EXPECT_EQ(0xd00d, map.GetValue(0x1337).value); -} - -TEST_F(TimedMapTest, SizeEvict) { - Map two_element_map(base::TimeDelta::FromSeconds(9999), 2); - - two_element_map.Add(0x1337, Value(0x7331)); - EXPECT_TRUE(two_element_map.HasKey(0x1337)); - EXPECT_EQ(0x7331, two_element_map.GetValue(0x1337).value); - - two_element_map.Add(0xbaad, Value(0xf00d)); - EXPECT_TRUE(two_element_map.HasKey(0xbaad)); - EXPECT_EQ(0xf00d, two_element_map.GetValue(0xbaad).value); - - two_element_map.Add(0x1234, Value(0x5678)); - EXPECT_TRUE(two_element_map.HasKey(0x1234)); - EXPECT_EQ(0xf00d, two_element_map.GetValue(0xbaad).value); - - EXPECT_FALSE(two_element_map.HasKey(0x1337)); - EXPECT_EQ(0, two_element_map.GetValue(0x1337).value); -} - -TEST_F(TimedMapTest, TimedEvict) { - const int kLargeTimeValueSeconds = 9999; - Map map(base::TimeDelta::FromSeconds(kLargeTimeValueSeconds), 2); - - // The map takes ownership of the clock, but we retain a pointer. - base::SimpleTestTickClock* clock = new base::SimpleTestTickClock; - map.set_clock_for_testing(base::WrapUnique<base::TickClock>(clock)); - - // Add value at T=0. - map.Add(0x1337, Value(0x7331)); - EXPECT_TRUE(map.HasKey(0x1337)); - EXPECT_EQ(0x7331, map.GetValue(0x1337).value); - - // Add value at T=kLargeTimeValueSeconds-1. - clock->Advance(base::TimeDelta::FromSeconds(kLargeTimeValueSeconds - 1)); - map.Add(0xbaad, Value(0xf00d)); - - // Check values at T=kLargeTimeValueSeconds-1. - EXPECT_TRUE(map.HasKey(0xbaad)); - EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value); - EXPECT_TRUE(map.HasKey(0x1337)); - EXPECT_EQ(0x7331, map.GetValue(0x1337).value); - - // Check values at T=kLargeTimeValueSeconds. - clock->Advance(base::TimeDelta::FromSeconds(1)); - EXPECT_FALSE(map.HasKey(0x1337)); - EXPECT_EQ(0, map.GetValue(0x1337).value); - EXPECT_TRUE(map.HasKey(0xbaad)); - EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value); - - // Check values at T=2*kLargeTimeValueSeconds - clock->Advance(base::TimeDelta::FromSeconds(kLargeTimeValueSeconds)); - EXPECT_FALSE(map.HasKey(0xbaad)); - EXPECT_EQ(0, map.GetValue(0xbaad).value); -}
diff --git a/components/copresence/tokens.cc b/components/copresence/tokens.cc deleted file mode 100644 index 0fdb0c7c..0000000 --- a/components/copresence/tokens.cc +++ /dev/null
@@ -1,25 +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 "components/copresence/tokens.h" - -namespace copresence { - -TransmittedToken::TransmittedToken() - : medium(TOKEN_MEDIUM_UNKNOWN), - broadcast_confirmed(false) {} - -ReceivedToken::ReceivedToken() - : medium(TOKEN_MEDIUM_UNKNOWN), - valid(UNKNOWN) {} - -ReceivedToken::ReceivedToken(const std::string& id, - TokenMedium medium, - base::Time last_time) - : id(id), - medium(medium), - last_time(last_time), - valid(UNKNOWN) {} - -} // namespace copresence
diff --git a/components/copresence/tokens.h b/components/copresence/tokens.h deleted file mode 100644 index 8895df9..0000000 --- a/components/copresence/tokens.h +++ /dev/null
@@ -1,49 +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 COMPONENTS_COPRESENCE_TOKENS_H_ -#define COMPONENTS_COPRESENCE_TOKENS_H_ - -#include <string> - -#include "base/time/time.h" -#include "components/copresence/proto/enums.pb.h" - -namespace copresence { - -// It's an error to define these constructors inline, -// so they're defined in tokens.cc. - -struct TransmittedToken final { - TransmittedToken(); - - std::string id; - TokenMedium medium; - base::Time start_time; - base::Time stop_time; - bool broadcast_confirmed; -}; - -struct ReceivedToken final { - enum Validity { - UNKNOWN = 0, - VALID = 1, - INVALID = 2 - }; - - ReceivedToken(); - ReceivedToken(const std::string& id, - TokenMedium medium, - base::Time last_time); - - std::string id; - TokenMedium medium; - base::Time start_time; - base::Time last_time; - Validity valid; -}; - -} // namespace copresence - -#endif // COMPONENTS_COPRESENCE_TOKENS_H_
diff --git a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetChunkedOutputStream.java b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetChunkedOutputStream.java index dd0d53c0..1f2c1711 100644 --- a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetChunkedOutputStream.java +++ b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetChunkedOutputStream.java
@@ -82,11 +82,8 @@ @Override public void close() throws IOException { - if (!mLastChunk) { - // Write last chunk. - mLastChunk = true; - mMessageLoop.loop(); - } + // Last chunk is written. + mLastChunk = true; mClosed = true; } @@ -137,9 +134,11 @@ byteBuffer.put(mBuffer); // Reuse this buffer. mBuffer.clear(); - // Quit message loop so embedder can write more data. - mMessageLoop.quit(); uploadDataSink.onReadSucceeded(mLastChunk); + if (!mLastChunk) { + // Quit message loop so embedder can write more data. + mMessageLoop.quit(); + } } }
diff --git a/components/cronet/ios/Cronet.h b/components/cronet/ios/Cronet.h index d4becbe..fc7b9c2 100644 --- a/components/cronet/ios/Cronet.h +++ b/components/cronet/ios/Cronet.h
@@ -32,7 +32,11 @@ // captures. This method only has any effect before |start| is called. + (void)setSslKeyLogFileName:(NSString*)sslKeyLogFileName; -// Starts CronetEngine. +// Starts CronetEngine. It is recommended to call this method on the application +// main thread. If the method is called on any thread other than the main one, +// the method will internally try to execute synchronously using the main GCD +// queue. Please make sure that the main thread is not blocked by a job +// that calls this method; otherwise, a deadlock can occur. + (void)start; // Starts net-internals logging to a file named |fileName| in the application
diff --git a/components/cronet/ios/cronet_environment.cc b/components/cronet/ios/cronet_environment.cc index bece3b2..292b4a3 100644 --- a/components/cronet/ios/cronet_environment.cc +++ b/components/cronet/ios/cronet_environment.cc
@@ -9,6 +9,7 @@ #include "base/at_exit.h" #include "base/atomicops.h" #include "base/command_line.h" +#include "base/feature_list.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_file.h" @@ -234,6 +235,7 @@ void CronetEnvironment::InitializeOnNetworkThread() { DCHECK(network_io_thread_->task_runner()->BelongsToCurrentThread()); + base::FeatureList::InitializeInstance(std::string(), std::string()); // TODO(mef): Use net:UrlRequestContextBuilder instead of manual build. main_context_.reset(new net::URLRequestContext); main_context_->set_net_log(net_log_.get());
diff --git a/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc b/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc index 22699f32..51a48b9e 100644 --- a/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc +++ b/components/data_reduction_proxy/content/browser/content_lofi_ui_service_unittest.cc
@@ -44,7 +44,7 @@ context.Init(); content_lofi_ui_service_.reset(new ContentLoFiUIService( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), base::Bind(&ContentLoFiUIServiceTest::OnLoFiResponseReceivedCallback, base::Unretained(this))));
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc index df76a35..7367069 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc
@@ -109,7 +109,6 @@ io_data->basic_url_request_context_getter_.get()->GetURLRequestContext(); const net::HttpNetworkSession::Params* http_params = request_context->GetNetworkSessionParams(); - EXPECT_FALSE(http_params->enable_spdy31); EXPECT_FALSE(http_params->enable_http2); EXPECT_FALSE(http_params->enable_quic);
diff --git a/components/data_use_measurement/content/data_use_measurement.cc b/components/data_use_measurement/content/data_use_measurement.cc index 31b3eb3..e45368ae 100644 --- a/components/data_use_measurement/content/data_use_measurement.cc +++ b/components/data_use_measurement/content/data_use_measurement.cc
@@ -61,14 +61,6 @@ void DataUseMeasurement::ReportDataUseUMA( const net::URLRequest* request) const { - const content::ResourceRequestInfo* info = - content::ResourceRequestInfo::ForRequest(request); - // Having |info| is the sign of a request for a web content from user. For now - // we could add a condition to check ProcessType in info is - // content::PROCESS_TYPE_RENDERER, but it won't be compatible with upcoming - // PlzNavigate architecture. So just existence of |info| is verified, and the - // current check should be compatible with upcoming changes in PlzNavigate. - bool is_user_traffic = info != nullptr; // Counts rely on URLRequest::GetTotalReceivedBytes() and // URLRequest::GetTotalSentBytes(), which does not include the send path, @@ -77,6 +69,7 @@ // bytes in lower levels. int64_t total_upload_bytes = request->GetTotalSentBytes(); int64_t total_received_bytes = request->GetTotalReceivedBytes(); + bool is_user_traffic = IsUserInitiatedRequest(request); bool is_connection_cellular = net::NetworkChangeNotifier::IsConnectionCellular( @@ -112,6 +105,20 @@ } } +// static +bool DataUseMeasurement::IsUserInitiatedRequest( + const net::URLRequest* request) { + // Having ResourceRequestInfo in the URL request is a sign that the request is + // for a web content from user. For now we could add a condition to check + // ProcessType in info is content::PROCESS_TYPE_RENDERER, but it won't be + // compatible with upcoming PlzNavigate architecture. So just existence of + // ResourceRequestInfo is verified, and the current check should be compatible + // with upcoming changes in PlzNavigate. + // TODO(rajendrant): Verify this condition for different use cases. See + // crbug.com/626063. + return content::ResourceRequestInfo::ForRequest(request) != nullptr; +} + #if defined(OS_ANDROID) void DataUseMeasurement::OnApplicationStateChangeForTesting( base::android::ApplicationState application_state) {
diff --git a/components/data_use_measurement/content/data_use_measurement.h b/components/data_use_measurement/content/data_use_measurement.h index babaead..cb344fa 100644 --- a/components/data_use_measurement/content/data_use_measurement.h +++ b/components/data_use_measurement/content/data_use_measurement.h
@@ -41,6 +41,9 @@ // Records the data use of the |request|, thus |request| must be non-null. void ReportDataUseUMA(const net::URLRequest* request) const; + // Returns true if the URLRequest |request| is initiated by user traffic. + static bool IsUserInitiatedRequest(const net::URLRequest* request); + #if defined(OS_ANDROID) // This function should just be used for testing purposes. A change in // application state can be simulated by calling this function.
diff --git a/components/drive/drive_uploader.cc b/components/drive/drive_uploader.cc index 125fdd8..a072c074 100644 --- a/components/drive/drive_uploader.cc +++ b/components/drive/drive_uploader.cc
@@ -103,9 +103,9 @@ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, device::PowerSaveBlocker::kReasonOther, "Upload in progress", - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE))), cancelled(false), weak_ptr_factory_(this) {}
diff --git a/components/drive/file_system/get_file_for_saving_operation_unittest.cc b/components/drive/file_system/get_file_for_saving_operation_unittest.cc index a7664f5..8675e3b 100644 --- a/components/drive/file_system/get_file_for_saving_operation_unittest.cc +++ b/components/drive/file_system/get_file_for_saving_operation_unittest.cc
@@ -64,7 +64,7 @@ void SetUp() override { OperationTestBase::SetUp(); - file_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + file_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE); operation_.reset(new GetFileForSavingOperation(
diff --git a/components/drive/file_system_unittest.cc b/components/drive/file_system_unittest.cc index 2fe9512b..88adfe9 100644 --- a/components/drive/file_system_unittest.cc +++ b/components/drive/file_system_unittest.cc
@@ -148,7 +148,7 @@ const base::FilePath temp_file_dir = temp_dir_.path().AppendASCII("tmp"); ASSERT_TRUE(base::CreateDirectory(temp_file_dir)); - file_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( + file_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE); file_system_.reset(new FileSystem( pref_service_.get(), logger_.get(), cache_.get(), scheduler_.get(),
diff --git a/components/drive/file_write_watcher_unittest.cc b/components/drive/file_write_watcher_unittest.cc index 5e3465b..1cc62fb 100644 --- a/components/drive/file_write_watcher_unittest.cc +++ b/components/drive/file_write_watcher_unittest.cc
@@ -89,7 +89,7 @@ // Set up the watcher. scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE); FileWriteWatcher watcher(file_task_runner.get()); watcher.DisableDelayForTesting();
diff --git a/components/drive/service/fake_drive_service.cc b/components/drive/service/fake_drive_service.cc index 6bffc045..8cdbf69 100644 --- a/components/drive/service/fake_drive_service.cc +++ b/components/drive/service/fake_drive_service.cc
@@ -336,10 +336,6 @@ about_resource_->set_quota_bytes_total(total); } -GURL FakeDriveService::GetFakeLinkUrl(const std::string& resource_id) { - return GURL("https://fake_server/" + net::EscapePath(resource_id)); -} - void FakeDriveService::Initialize(const std::string& account_id) { DCHECK(thread_checker_.CalledOnValidThread()); } @@ -851,7 +847,6 @@ ParentReference parent; parent.set_file_id(parent_resource_id); - parent.set_parent_link(GetFakeLinkUrl(parent_resource_id)); std::vector<ParentReference> parents; parents.push_back(parent); *new_file->mutable_parents() = parents; @@ -919,7 +914,6 @@ if (!parent_resource_id.empty()) { ParentReference parent; parent.set_file_id(parent_resource_id); - parent.set_parent_link(GetFakeLinkUrl(parent_resource_id)); std::vector<ParentReference> parents; parents.push_back(parent); @@ -973,7 +967,6 @@ // one more parent, not overwriting old ones. ParentReference parent; parent.set_file_id(parent_resource_id); - parent.set_parent_link(GetFakeLinkUrl(parent_resource_id)); change->mutable_file()->mutable_parents()->push_back(parent); AddNewChangestamp(change); @@ -1633,7 +1626,6 @@ if (!parent_resource_id.empty()) { ParentReference parent; parent.set_file_id(parent_resource_id); - parent.set_parent_link(GetFakeLinkUrl(parent.file_id())); std::vector<ParentReference> parents; parents.push_back(parent); *new_file->mutable_parents() = parents;
diff --git a/components/drive/service/fake_drive_service.h b/components/drive/service/fake_drive_service.h index affd45dc..99d0d44 100644 --- a/components/drive/service/fake_drive_service.h +++ b/components/drive/service/fake_drive_service.h
@@ -123,9 +123,6 @@ return last_cancelled_file_; } - // Returns the (fake) URL for the link. - static GURL GetFakeLinkUrl(const std::string& resource_id); - // Sets the printf format for constructing the response of AuthorizeApp(). // The format string must include two %s that are to be filled with // resource_id and app_id.
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc index c7f0e7f..0c05e4f 100644 --- a/components/history/core/browser/history_service.cc +++ b/components/history/core/browser/history_service.cc
@@ -307,7 +307,7 @@ base::CancelableTaskTracker::IsCanceledCallback is_canceled; base::CancelableTaskTracker::TaskId task_id = tracker->NewTrackedTaskId(&is_canceled); - // Use base::ThreadTaskRunnerHandler::Get() to get a message loop proxy to + // Use base::ThreadTaskRunnerHandler::Get() to get a task runner for // the current message loop so that we can forward the call to the method // HistoryDBTask::DoneRunOnMainThread() in the correct thread. thread_->task_runner()->PostTask(
diff --git a/components/keyed_service/core/refcounted_keyed_service.h b/components/keyed_service/core/refcounted_keyed_service.h index 31815d6..891fc28 100644 --- a/components/keyed_service/core/refcounted_keyed_service.h +++ b/components/keyed_service/core/refcounted_keyed_service.h
@@ -51,7 +51,7 @@ // If you need your service to be deleted on a specific thread (for example, // you're converting a service that used content::DeleteOnThread<IO>), then // use this constructor with a reference to the SingleThreadTaskRunner (you - // can get it from content::BrowserThread::GetMessageLoopProxyForThread). + // can get it from content::BrowserThread::GetTaskRunnerForThread). explicit RefcountedKeyedService( const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
diff --git a/components/nacl/browser/nacl_browser.cc b/components/nacl/browser/nacl_browser.cc index 3be87152..ca3fb97 100644 --- a/components/nacl/browser/nacl_browser.cc +++ b/components/nacl/browser/nacl_browser.cc
@@ -247,10 +247,10 @@ if (IsOk() && irt_state_ == NaClResourceUninitialized) { irt_state_ = NaClResourceRequested; // TODO(ncbray) use blocking pool. - std::unique_ptr<base::FileProxy> file_proxy(new base::FileProxy( - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::FILE) - .get())); + std::unique_ptr<base::FileProxy> file_proxy( + new base::FileProxy(content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::FILE) + .get())); base::FileProxy* proxy = file_proxy.get(); if (!proxy->CreateOrOpen(irt_filepath_, base::File::FLAG_OPEN | base::File::FLAG_READ,
diff --git a/components/nacl/browser/pnacl_translation_cache.cc b/components/nacl/browser/pnacl_translation_cache.cc index 29cd8246..a183d59 100644 --- a/components/nacl/browser/pnacl_translation_cache.cc +++ b/components/nacl/browser/pnacl_translation_cache.cc
@@ -338,12 +338,9 @@ int cache_size, const CompletionCallback& callback) { int rv = disk_cache::CreateCacheBackend( - cache_type, - net::CACHE_BACKEND_DEFAULT, - cache_dir, - cache_size, + cache_type, net::CACHE_BACKEND_DEFAULT, cache_dir, cache_size, true /* force_initialize */, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE).get(), NULL, /* dummy net log */ &disk_cache_, base::Bind(&PnaclTranslationCache::OnCreateBackendComplete, AsWeakPtr()));
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc index 66f9671..5b629115 100644 --- a/components/nacl/loader/nacl_listener.cc +++ b/components/nacl/loader/nacl_listener.cc
@@ -101,7 +101,7 @@ // Creates the PPAPI IPC channel between the NaCl IRT and the host // (browser/renderer) process, and starts to listen it on the thread where -// the given message_loop_proxy runs. +// the given task runner runs. // Also, creates and sets the corresponding NaClDesc to the given nap with // the FD #. void SetUpIPCAdapter(
diff --git a/components/nacl/renderer/manifest_service_channel.cc b/components/nacl/renderer/manifest_service_channel.cc index 2a8f4d1..e0596fa 100644 --- a/components/nacl/renderer/manifest_service_channel.cc +++ b/components/nacl/renderer/manifest_service_channel.cc
@@ -32,7 +32,7 @@ handle, IPC::Channel::MODE_CLIENT, this, - content::RenderThread::Get()->GetIOMessageLoopProxy(), + content::RenderThread::Get()->GetIOTaskRunner(), true, waitable_event)), peer_pid_(base::kNullProcessId),
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc index 5c318d68..4daa4c7 100644 --- a/components/nacl/renderer/ppb_nacl_private_impl.cc +++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -92,8 +92,8 @@ if (!render_thread) return false; if (!g_pnacl_resource_host.Get().get()) { - g_pnacl_resource_host.Get() = new PnaclTranslationResourceHost( - render_thread->GetIOMessageLoopProxy()); + g_pnacl_resource_host.Get() = + new PnaclTranslationResourceHost(render_thread->GetIOTaskRunner()); render_thread->AddFilter(g_pnacl_resource_host.Get().get()); } return true; @@ -530,12 +530,9 @@ // Return an IPC channel which allows communicating with a PNaCl // translator process. *translator_channel = IPC::SyncChannel::Create( - instance_info.channel_handle, - IPC::Channel::MODE_CLIENT, - new NoOpListener, - content::RenderThread::Get()->GetIOMessageLoopProxy(), - true, - content::RenderThread::Get()->GetShutdownEvent()); + instance_info.channel_handle, IPC::Channel::MODE_CLIENT, + new NoOpListener, content::RenderThread::Get()->GetIOTaskRunner(), + true, content::RenderThread::Get()->GetShutdownEvent()); } else { // Save the channel handle for when StartPpapiProxy() is called. NaClPluginInstance* nacl_plugin_instance =
diff --git a/components/nacl/renderer/trusted_plugin_channel.cc b/components/nacl/renderer/trusted_plugin_channel.cc index 1feaa5ca6..1cfef17 100644 --- a/components/nacl/renderer/trusted_plugin_channel.cc +++ b/components/nacl/renderer/trusted_plugin_channel.cc
@@ -24,8 +24,7 @@ is_helper_nexe_(is_helper_nexe) { channel_ = IPC::SyncChannel::Create( handle, IPC::Channel::MODE_CLIENT, this, - content::RenderThread::Get()->GetIOMessageLoopProxy(), true, - shutdown_event); + content::RenderThread::Get()->GetIOTaskRunner(), true, shutdown_event); } TrustedPluginChannel::~TrustedPluginChannel() {
diff --git a/components/nacl_nonsfi.gyp b/components/nacl_nonsfi.gyp index 20df8231..7fdfe1f73 100644 --- a/components/nacl_nonsfi.gyp +++ b/components/nacl_nonsfi.gyp
@@ -65,6 +65,8 @@ '-lcontent_common_nacl_nonsfi', '-lelf_loader', '-levent_nacl_nonsfi', + '-lgfx_geometry_nacl', + '-lgfx_ipc_geometry_nacl', '-lgio', '-lgles2_cmd_helper_nacl', '-lgles2_implementation_nacl', @@ -94,6 +96,8 @@ '>(tc_lib_dir_nonsfi_helper32)/libcontent_common_nacl_nonsfi.a', '>(tc_lib_dir_nonsfi_helper32)/libelf_loader.a', '>(tc_lib_dir_nonsfi_helper32)/libevent_nacl_nonsfi.a', + '>(tc_lib_dir_nonsfi_helper32)/libgfx_geometry_nacl.a', + '>(tc_lib_dir_nonsfi_helper32)/libgfx_ipc_geometry_nacl.a', '>(tc_lib_dir_nonsfi_helper32)/libgio.a', '>(tc_lib_dir_nonsfi_helper32)/libgles2_cmd_helper_nacl.a', '>(tc_lib_dir_nonsfi_helper32)/libgles2_implementation_nacl.a', @@ -122,6 +126,8 @@ '>(tc_lib_dir_nonsfi_helper_arm)/libcontent_common_nacl_nonsfi.a', '>(tc_lib_dir_nonsfi_helper_arm)/libelf_loader.a', '>(tc_lib_dir_nonsfi_helper_arm)/libevent_nacl_nonsfi.a', + '>(tc_lib_dir_nonsfi_helper_arm)/libgfx_geometry_nacl.a', + '>(tc_lib_dir_nonsfi_helper_arm)/libgfx_ipc_geometry_nacl.a', '>(tc_lib_dir_nonsfi_helper_arm)/libgio.a', '>(tc_lib_dir_nonsfi_helper_arm)/libgles2_cmd_helper_nacl.a', '>(tc_lib_dir_nonsfi_helper_arm)/libgles2_implementation_nacl.a',
diff --git a/components/network_session_configurator/network_session_configurator.cc b/components/network_session_configurator/network_session_configurator.cc index f2f70aef..f706eab 100644 --- a/components/network_session_configurator/network_session_configurator.cc +++ b/components/network_session_configurator/network_session_configurator.cc
@@ -32,18 +32,9 @@ const char kQuicFieldTrialEnabledGroupName[] = "Enabled"; const char kQuicFieldTrialHttpsEnabledGroupName[] = "HttpsEnabled"; -// The SPDY trial composes two different trial plus control groups: -// * A "holdback" group with SPDY disabled, and corresponding control -// (SPDY/3.1). The primary purpose of the holdback group is to encourage site -// operators to do feature detection rather than UA-sniffing. As such, this -// trial runs continuously. -// * A SPDY/4 experiment, for SPDY/4 (aka HTTP/2) vs SPDY/3.1 comparisons and -// eventual SPDY/4 deployment. -const char kSpdyFieldTrialName[] = "SPDY"; -const char kSpdyFieldTrialHoldbackGroupNamePrefix[] = "SpdyDisabled"; -const char kSpdyFieldTrialSpdy31GroupNamePrefix[] = "Spdy31Enabled"; -const char kSpdyFieldTrialSpdy4GroupNamePrefix[] = "Spdy4Enabled"; -const char kSpdyFieldTrialParametrizedPrefix[] = "Parametrized"; +// Field trial for HTTP/2. +const char kHttp2FieldTrialName[] = "HTTP2"; +const char kHttp2FieldTrialDisablePrefix[] = "Disable"; // Field trial for priority dependencies. const char kSpdyDependenciesFieldTrial[] = "SpdyEnableDependencies"; @@ -78,60 +69,19 @@ params->enable_tcp_fast_open_for_ssl = true; } -void ConfigureSpdyParams(const base::CommandLine& command_line, - base::StringPiece spdy_trial_group, - const VariationParameters& spdy_trial_params, - bool is_spdy_allowed_by_policy, - net::HttpNetworkSession::Params* params) { - // Only handle SPDY field trial parameters and command line flags if - // "spdy.disabled" preference is not forced via policy. - if (!is_spdy_allowed_by_policy) { - params->enable_spdy31 = false; - return; - } - +void ConfigureHttp2Params(const base::CommandLine& command_line, + base::StringPiece http2_trial_group, + net::HttpNetworkSession::Params* params) { if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) net::URLFetcher::SetIgnoreCertificateRequests(true); if (command_line.HasSwitch(switches::kDisableHttp2)) { - params->enable_spdy31 = false; params->enable_http2 = false; return; } - if (spdy_trial_group.starts_with(kSpdyFieldTrialHoldbackGroupNamePrefix)) { - net::HttpStreamFactory::set_spdy_enabled(false); - return; - } - if (spdy_trial_group.starts_with(kSpdyFieldTrialSpdy31GroupNamePrefix)) { - params->enable_spdy31 = true; + if (http2_trial_group.starts_with(kHttp2FieldTrialDisablePrefix)) { params->enable_http2 = false; - return; - } - if (spdy_trial_group.starts_with(kSpdyFieldTrialSpdy4GroupNamePrefix)) { - params->enable_spdy31 = true; - params->enable_http2 = true; - return; - } - if (spdy_trial_group.starts_with(kSpdyFieldTrialParametrizedPrefix)) { - bool spdy_enabled = false; - params->enable_spdy31 = false; - params->enable_http2 = false; - if (base::LowerCaseEqualsASCII( - GetVariationParam(spdy_trial_params, "enable_http2"), "true")) { - spdy_enabled = true; - params->enable_http2 = true; - } - if (base::LowerCaseEqualsASCII( - GetVariationParam(spdy_trial_params, "enable_spdy31"), "true")) { - spdy_enabled = true; - params->enable_spdy31 = true; - } - // TODO(bnc): https://crbug.com/521597 - // HttpStreamFactory::spdy_enabled_ is redundant with params->enable_http2 - // and enable_spdy31, can it be eliminated? - net::HttpStreamFactory::set_spdy_enabled(spdy_enabled); - return; } } @@ -253,6 +203,11 @@ GetVariationParam(quic_trial_params, "prefer_aes"), "true"); } +bool ShouldForceHolBlocking(const VariationParameters& quic_trial_params) { + return base::LowerCaseEqualsASCII( + GetVariationParam(quic_trial_params, "force_hol_blocking"), "true"); +} + int GetQuicMaxNumberOfLossyConnections( const VariationParameters& quic_trial_params) { int value; @@ -426,6 +381,7 @@ params->quic_disable_disk_cache = ShouldQuicDisableDiskCache(quic_trial_params); params->quic_prefer_aes = ShouldQuicPreferAes(quic_trial_params); + params->quic_force_hol_blocking = ShouldForceHolBlocking(quic_trial_params); int max_number_of_lossy_connections = GetQuicMaxNumberOfLossyConnections(quic_trial_params); if (max_number_of_lossy_connections != 0) { @@ -488,7 +444,6 @@ void ParseFieldTrialsAndCommandLineInternal( const base::CommandLine& command_line, - bool is_spdy_allowed_by_policy, bool is_quic_allowed_by_policy, const std::string& quic_user_agent_id, net::HttpNetworkSession::Params* params) { @@ -516,18 +471,9 @@ ConfigureQuicParams(command_line, quic_trial_group, quic_trial_params, is_quic_allowed_by_policy, quic_user_agent_id, params); - if (!is_spdy_allowed_by_policy) { - base::FieldTrial* trial = base::FieldTrialList::Find(kSpdyFieldTrialName); - if (trial) - trial->Disable(); - } - std::string spdy_trial_group = - base::FieldTrialList::FindFullName(kSpdyFieldTrialName); - VariationParameters spdy_trial_params; - if (!variations::GetVariationParams(kSpdyFieldTrialName, &spdy_trial_params)) - spdy_trial_params.clear(); - ConfigureSpdyParams(command_line, spdy_trial_group, spdy_trial_params, - is_spdy_allowed_by_policy, params); + std::string http2_trial_group = + base::FieldTrialList::FindFullName(kHttp2FieldTrialName); + ConfigureHttp2Params(command_line, http2_trial_group, params); const std::string tfo_trial_group = base::FieldTrialList::FindFullName(kTCPFastOpenFieldTrialName); @@ -542,25 +488,21 @@ namespace network_session_configurator { -void ParseFieldTrials(bool is_spdy_allowed_by_policy, - bool is_quic_allowed_by_policy, +void ParseFieldTrials(bool is_quic_allowed_by_policy, const std::string& quic_user_agent_id, net::HttpNetworkSession::Params* params) { const base::CommandLine command_line(base::CommandLine::NO_PROGRAM); ParseFieldTrialsAndCommandLineInternal( - command_line, is_spdy_allowed_by_policy, is_quic_allowed_by_policy, - quic_user_agent_id, params); + command_line, is_quic_allowed_by_policy, quic_user_agent_id, params); } -void ParseFieldTrialsAndCommandLine(bool is_spdy_allowed_by_policy, - bool is_quic_allowed_by_policy, +void ParseFieldTrialsAndCommandLine(bool is_quic_allowed_by_policy, const std::string& quic_user_agent_id, net::HttpNetworkSession::Params* params) { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); ParseFieldTrialsAndCommandLineInternal( - command_line, is_spdy_allowed_by_policy, is_quic_allowed_by_policy, - quic_user_agent_id, params); + command_line, is_quic_allowed_by_policy, quic_user_agent_id, params); } } // namespace network_session_configurator
diff --git a/components/network_session_configurator/network_session_configurator.h b/components/network_session_configurator/network_session_configurator.h index 4af1648..cd746c5 100644 --- a/components/network_session_configurator/network_session_configurator.h +++ b/components/network_session_configurator/network_session_configurator.h
@@ -16,15 +16,13 @@ namespace network_session_configurator { // Configure |params| based on field trials and policy arguments. -void ParseFieldTrials(bool is_spdy_allowed_by_policy, - bool is_quic_allowed_by_policy, +void ParseFieldTrials(bool is_quic_allowed_by_policy, const std::string& quic_user_agent_id, net::HttpNetworkSession::Params* params); // Configure |params| based on field trials, policy arguments, // and command line. -void ParseFieldTrialsAndCommandLine(bool is_spdy_allowed_by_policy, - bool is_quic_allowed_by_policy, +void ParseFieldTrialsAndCommandLine(bool is_quic_allowed_by_policy, const std::string& quic_user_agent_id, net::HttpNetworkSession::Params* params);
diff --git a/components/network_session_configurator/network_session_configurator_unittest.cc b/components/network_session_configurator/network_session_configurator_unittest.cc index 604c0461..db607b08 100644 --- a/components/network_session_configurator/network_session_configurator_unittest.cc +++ b/components/network_session_configurator/network_session_configurator_unittest.cc
@@ -20,8 +20,7 @@ class NetworkSessionConfiguratorTest : public testing::Test { public: NetworkSessionConfiguratorTest() - : is_spdy_allowed_by_policy_(true), - is_quic_allowed_by_policy_(true), + : is_quic_allowed_by_policy_(true), quic_user_agent_id_("Chrome/52.0.2709.0 Linux x86_64") { field_trial_list_.reset( new base::FieldTrialList(new base::MockEntropyProvider())); @@ -30,17 +29,14 @@ void ParseFieldTrials() { network_session_configurator::ParseFieldTrials( - is_spdy_allowed_by_policy_, is_quic_allowed_by_policy_, - quic_user_agent_id_, ¶ms_); + is_quic_allowed_by_policy_, quic_user_agent_id_, ¶ms_); } void ParseFieldTrialsAndCommandLine() { network_session_configurator::ParseFieldTrialsAndCommandLine( - is_spdy_allowed_by_policy_, is_quic_allowed_by_policy_, - quic_user_agent_id_, ¶ms_); + is_quic_allowed_by_policy_, quic_user_agent_id_, ¶ms_); } - bool is_spdy_allowed_by_policy_; bool is_quic_allowed_by_policy_; std::string quic_user_agent_id_; std::unique_ptr<base::FieldTrialList> field_trial_list_; @@ -54,7 +50,6 @@ EXPECT_EQ("Chrome/52.0.2709.0 Linux x86_64", params_.quic_user_agent_id); EXPECT_EQ(0u, params_.testing_fixed_http_port); EXPECT_EQ(0u, params_.testing_fixed_https_port); - EXPECT_FALSE(params_.enable_spdy31); EXPECT_TRUE(params_.enable_http2); EXPECT_FALSE(params_.enable_tcp_fast_open_for_ssl); EXPECT_TRUE(params_.enable_quic_alternative_service_with_different_host); @@ -83,67 +78,22 @@ EXPECT_EQ(1234u, params_.testing_fixed_https_port); } -TEST_F(NetworkSessionConfiguratorTest, SpdyFieldTrialHoldbackEnabled) { - net::HttpStreamFactory::set_spdy_enabled(true); - base::FieldTrialList::CreateFieldTrial("SPDY", "SpdyDisabled"); +TEST_F(NetworkSessionConfiguratorTest, Http2FieldTrialHttp2Disable) { + base::FieldTrialList::CreateFieldTrial("HTTP2", "Disable"); ParseFieldTrials(); - EXPECT_FALSE(net::HttpStreamFactory::spdy_enabled()); -} - -TEST_F(NetworkSessionConfiguratorTest, SpdyFieldTrialSpdy31Enabled) { - base::FieldTrialList::CreateFieldTrial("SPDY", "Spdy31Enabled"); - - ParseFieldTrials(); - - EXPECT_TRUE(params_.enable_spdy31); EXPECT_FALSE(params_.enable_http2); } -TEST_F(NetworkSessionConfiguratorTest, SpdyFieldTrialSpdy4Enabled) { - base::FieldTrialList::CreateFieldTrial("SPDY", "Spdy4Enabled"); - - ParseFieldTrials(); - - EXPECT_TRUE(params_.enable_spdy31); - EXPECT_TRUE(params_.enable_http2); -} - -TEST_F(NetworkSessionConfiguratorTest, SpdyFieldTrialParametrized) { - std::map<std::string, std::string> field_trial_params; - field_trial_params["enable_spdy31"] = "false"; - field_trial_params["enable_http2"] = "true"; - variations::AssociateVariationParams("SPDY", "ParametrizedHTTP2Only", - field_trial_params); - base::FieldTrialList::CreateFieldTrial("SPDY", "ParametrizedHTTP2Only"); - - ParseFieldTrials(); - - EXPECT_FALSE(params_.enable_spdy31); - EXPECT_TRUE(params_.enable_http2); -} - -TEST_F(NetworkSessionConfiguratorTest, SpdyCommandLineDisableHttp2) { - // Command line should overwrite field trial group. +TEST_F(NetworkSessionConfiguratorTest, Http2CommandLineDisableHttp2) { base::CommandLine::ForCurrentProcess()->AppendSwitch("disable-http2"); - base::FieldTrialList::CreateFieldTrial("SPDY", "Spdy4Enabled"); ParseFieldTrialsAndCommandLine(); - EXPECT_FALSE(params_.enable_spdy31); EXPECT_FALSE(params_.enable_http2); } -TEST_F(NetworkSessionConfiguratorTest, SpdyDisallowedByPolicy) { - is_spdy_allowed_by_policy_ = false; - - ParseFieldTrialsAndCommandLine(); - - EXPECT_FALSE(params_.enable_spdy31); - EXPECT_TRUE(params_.enable_http2); -} - TEST_F(NetworkSessionConfiguratorTest, PriorityDependenciesTrialEnabled) { base::FieldTrialList::CreateFieldTrial("SpdyEnableDependencies", "Enable-experiment"); @@ -189,6 +139,7 @@ EXPECT_FALSE(params_.quic_migrate_sessions_on_network_change); EXPECT_FALSE(params_.quic_migrate_sessions_early); EXPECT_TRUE(params_.quic_host_whitelist.empty()); + EXPECT_FALSE(params_.quic_force_hol_blocking); net::HttpNetworkSession::Params default_params; EXPECT_EQ(default_params.quic_supported_versions, @@ -605,4 +556,15 @@ EXPECT_TRUE(params_.enable_tcp_fast_open_for_ssl); } +TEST_F(NetworkSessionConfiguratorTest, QuicForceHolBlocking) { + std::map<std::string, std::string> field_trial_params; + field_trial_params["force_hol_blocking"] = "true"; + variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params); + base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled"); + + ParseFieldTrials(); + + EXPECT_TRUE(params_.quic_force_hol_blocking); +} + } // namespace test
diff --git a/components/ntp_snippets.gypi b/components/ntp_snippets.gypi index ce551f7..817968f 100644 --- a/components/ntp_snippets.gypi +++ b/components/ntp_snippets.gypi
@@ -28,10 +28,15 @@ 'variations', ], 'sources': [ - 'ntp_snippets/content_suggestion_category.h', 'ntp_snippets/content_suggestion.cc', 'ntp_snippets/content_suggestion.h', - 'ntp_snippets/content_suggestions_provider_type.h', + 'ntp_snippets/content_suggestions_category_status.cc', + 'ntp_snippets/content_suggestions_category_status.h', + 'ntp_snippets/content_suggestions_category.h', + 'ntp_snippets/content_suggestions_provider.cc', + 'ntp_snippets/content_suggestions_provider.h', + 'ntp_snippets/content_suggestions_service.cc', + 'ntp_snippets/content_suggestions_service.h', 'ntp_snippets/ntp_snippet.cc', 'ntp_snippets/ntp_snippet.h', 'ntp_snippets/ntp_snippets_constants.cc',
diff --git a/components/ntp_snippets/BUILD.gn b/components/ntp_snippets/BUILD.gn index 546b4303..8d9fb594 100644 --- a/components/ntp_snippets/BUILD.gn +++ b/components/ntp_snippets/BUILD.gn
@@ -14,8 +14,13 @@ sources = [ "content_suggestion.cc", "content_suggestion.h", - "content_suggestion_category.h", - "content_suggestions_provider_type.h", + "content_suggestions_category.h", + "content_suggestions_category_status.cc", + "content_suggestions_category_status.h", + "content_suggestions_provider.cc", + "content_suggestions_provider.h", + "content_suggestions_service.cc", + "content_suggestions_service.h", "ntp_snippet.cc", "ntp_snippet.h", "ntp_snippets_constants.cc",
diff --git a/components/ntp_snippets/content_suggestion.cc b/components/ntp_snippets/content_suggestion.cc index 0fa4f0c..ee6dd76 100644 --- a/components/ntp_snippets/content_suggestion.cc +++ b/components/ntp_snippets/content_suggestion.cc
@@ -6,12 +6,12 @@ namespace ntp_snippets { -ContentSuggestion::ContentSuggestion( - const std::string& id, - const ContentSuggestionsProviderType provider, - const ContentSuggestionCategory category, - const GURL& url) - : id_(id), provider_(provider), category_(category), url_(url), score_(0) {} +ContentSuggestion::ContentSuggestion(const std::string& id, const GURL& url) + : id_(id), url_(url), score_(0) {} + +ContentSuggestion::ContentSuggestion(ContentSuggestion&&) = default; + +ContentSuggestion& ContentSuggestion::operator=(ContentSuggestion&&) = default; ContentSuggestion::~ContentSuggestion() {}
diff --git a/components/ntp_snippets/content_suggestion.h b/components/ntp_snippets/content_suggestion.h index 60ab272..f187b337 100644 --- a/components/ntp_snippets/content_suggestion.h +++ b/components/ntp_snippets/content_suggestion.h
@@ -11,8 +11,6 @@ #include "base/macros.h" #include "base/time/time.h" -#include "components/ntp_snippets/content_suggestion_category.h" -#include "components/ntp_snippets/content_suggestions_provider_type.h" #include "url/gurl.h" namespace ntp_snippets { @@ -23,24 +21,18 @@ // (see ntp_snippet.h). class ContentSuggestion { public: + // Creates a new ContentSuggestion. The caller must ensure that the |id| + // passed in here is unique application-wide. ContentSuggestion(const std::string& id, - const ContentSuggestionsProviderType provider, - const ContentSuggestionCategory category, const GURL& url); + ContentSuggestion(ContentSuggestion&&); + ContentSuggestion& operator=(ContentSuggestion&&); ~ContentSuggestion(); - // An ID for identifying the suggestion. The ID is unique among all - // suggestions from the same provider, so to determine a globally unique - // identifier, combine this ID with the provider type. + // An ID for identifying the suggestion. The ID is unique application-wide. const std::string& id() const { return id_; } - // The provider that created this suggestion. - ContentSuggestionsProviderType provider() const { return provider_; } - - // The category that this suggestion belongs to. - ContentSuggestionCategory category() const { return category_; } - // The normal content URL where the content referenced by the suggestion can // be accessed. const GURL& url() const { return url_; } @@ -72,7 +64,7 @@ publisher_name_ = publisher_name; } - // TODO(pke) Remove the score from the ContentSuggestion class. The UI only + // TODO(pke): Remove the score from the ContentSuggestion class. The UI only // uses it to track user clicks (histogram data). Instead, the providers // should be informed about clicks and do appropriate logging themselves. // IMPORTANT: The score may simply be 0 for suggestions from providers which @@ -82,8 +74,6 @@ private: std::string id_; - ContentSuggestionsProviderType provider_; - ContentSuggestionCategory category_; GURL url_; GURL amp_url_; std::string title_;
diff --git a/components/ntp_snippets/content_suggestion_category.h b/components/ntp_snippets/content_suggestion_category.h deleted file mode 100644 index 80268fbe1..0000000 --- a/components/ntp_snippets/content_suggestion_category.h +++ /dev/null
@@ -1,18 +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 COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_CATEGORY_H_ -#define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_CATEGORY_H_ - -namespace ntp_snippets { - -// The category of a content suggestion. Note that even though these categories -// currently match the provider types, a provider type is not limited to provide -// suggestions of a single (fixed) category only. The category is used to -// determine where to display the suggestion. -enum class ContentSuggestionCategory : int { ARTICLE }; - -} // namespace ntp_snippets - -#endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTION_CATEGORY_H_
diff --git a/components/ntp_snippets/content_suggestions_category.h b/components/ntp_snippets/content_suggestions_category.h new file mode 100644 index 0000000..98f9a161 --- /dev/null +++ b/components/ntp_snippets/content_suggestions_category.h
@@ -0,0 +1,15 @@ +// 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 COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_H_ +#define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_H_ + +namespace ntp_snippets { + +// A category groups ContentSuggestions which belong together. +enum class ContentSuggestionsCategory { ARTICLES, COUNT }; + +} // namespace ntp_snippets + +#endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_H_
diff --git a/components/ntp_snippets/content_suggestions_category_status.cc b/components/ntp_snippets/content_suggestions_category_status.cc new file mode 100644 index 0000000..7c7b8666 --- /dev/null +++ b/components/ntp_snippets/content_suggestions_category_status.cc
@@ -0,0 +1,15 @@ +// 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 "components/ntp_snippets/content_suggestions_category_status.h" + +namespace ntp_snippets { + +bool IsContentSuggestionsCategoryStatusAvailable( + ContentSuggestionsCategoryStatus status) { + return status == ContentSuggestionsCategoryStatus::AVAILABLE_LOADING || + status == ContentSuggestionsCategoryStatus::AVAILABLE; +} + +} // namespace ntp_snippets
diff --git a/components/ntp_snippets/content_suggestions_category_status.h b/components/ntp_snippets/content_suggestions_category_status.h new file mode 100644 index 0000000..d3b5ba4 --- /dev/null +++ b/components/ntp_snippets/content_suggestions_category_status.h
@@ -0,0 +1,50 @@ +// 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 COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_STATUS_H_ +#define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_STATUS_H_ + +namespace ntp_snippets { + +// Represents the status of a category of content suggestions. +// On Android builds, a Java counterpart will be generated for this enum. +// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets +enum class ContentSuggestionsCategoryStatus { + // Content suggestions are available (though the list of available suggestions + // may be empty simply because there are no reasonable suggestions to be made + // at the moment). + AVAILABLE, + // Content suggestions are provided but not yet loaded. + AVAILABLE_LOADING, + + // There is no provider that provides suggestions for this category. + NOT_PROVIDED, + // The entire content suggestions feature has explicitly been disabled as part + // of the service configuration. + ALL_SUGGESTIONS_EXPLICITLY_DISABLED, + // Content suggestions from a specific category have been disabled as part of + // the service configuration. + CATEGORY_EXPLICITLY_DISABLED, + + // Content suggestions are not available because the user is not signed in. + SIGNED_OUT, + // Content suggestions are not available because sync is disabled. + SYNC_DISABLED, + // Content suggestions are not available because passphrase encryption is + // enabled (and it should be disabled). + PASSPHRASE_ENCRYPTION_ENABLED, + // Content suggestions are not available because history sync is disabled. + HISTORY_SYNC_DISABLED, + // Content suggestions are not available because the history sync service is + // not yet completely initialized and its status is unknown. + HISTORY_SYNC_STATE_UNKNOWN +}; + +// Determines whether the given status is one of the AVAILABLE statuses. +bool IsContentSuggestionsCategoryStatusAvailable( + ContentSuggestionsCategoryStatus status); + +} // namespace ntp_snippets + +#endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_CATEGORY_STATUS_H_
diff --git a/components/ntp_snippets/content_suggestions_provider.cc b/components/ntp_snippets/content_suggestions_provider.cc new file mode 100644 index 0000000..696a3813 --- /dev/null +++ b/components/ntp_snippets/content_suggestions_provider.cc
@@ -0,0 +1,30 @@ +// 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 "components/ntp_snippets/content_suggestions_provider.h" + +#include "base/strings/stringprintf.h" + +namespace ntp_snippets { + +namespace { + +const char kCombinedIDFormat[] = "%d:%s"; + +} // namespace + +ContentSuggestionsProvider::ContentSuggestionsProvider( + const std::vector<ContentSuggestionsCategory>& provided_categories) + : provided_categories_(provided_categories) {} + +ContentSuggestionsProvider::~ContentSuggestionsProvider() {} + +std::string ContentSuggestionsProvider::MakeUniqueID( + ContentSuggestionsCategory category, + const std::string& within_category_id) { + return base::StringPrintf(kCombinedIDFormat, int(category), + within_category_id.c_str()); +} + +} // namespace ntp_snippets
diff --git a/components/ntp_snippets/content_suggestions_provider.h b/components/ntp_snippets/content_suggestions_provider.h new file mode 100644 index 0000000..93872f58 --- /dev/null +++ b/components/ntp_snippets/content_suggestions_provider.h
@@ -0,0 +1,117 @@ +// 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 COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ +#define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ + +#include <string> +#include <vector> + +#include "base/callback_forward.h" +#include "components/ntp_snippets/content_suggestion.h" +#include "components/ntp_snippets/content_suggestions_category.h" +#include "components/ntp_snippets/content_suggestions_category_status.h" + +namespace gfx { +class Image; +} + +namespace ntp_snippets { + +// Provides content suggestions from one particular source. +// A provider can provide suggestions for multiple ContentSuggestionCategories, +// but for every category that it provides, it will be the only provider in the +// system which provides suggestions for that category. +// A provider can be a keyed service, in which case it should notify the +// ContentSuggestionsService through the observer before it shuts down. +class ContentSuggestionsProvider { + public: + using ImageFetchedCallback = + base::Callback<void(const std::string& suggestion_id, const gfx::Image&)>; + + // The observer of a provider is notified when new data is available. + class Observer { + public: + // Called when the available content changed. + // If a provider provides suggestions for multiple categories, this callback + // is called once per category. The |suggestions| parameter always contains + // the full list of currently available suggestions for that category, i.e., + // an empty list will remove all suggestions from the given category. Note + // that to clear them from the UI immediately, the provider needs to change + // the status of the respective category. + // IDs for the ContentSuggestions should be generated with + // |MakeUniqueID(..)| below. + virtual void OnNewSuggestions( + ContentSuggestionsCategory changed_category, + std::vector<ContentSuggestion> suggestions) = 0; + + // Called when the status of a category changed. + // |new_status| must be the value that is currently returned from the + // provider's |GetCategoryStatus(category)| below. + // Whenever the status changes to an unavailable status, all suggestions in + // that category must immediately be removed from all caches and from the + // UI. + virtual void OnCategoryStatusChanged( + ContentSuggestionsCategory changed_category, + ContentSuggestionsCategoryStatus new_status) = 0; + + // Called when the provider needs to shut down and will not deliver any + // suggestions anymore. + virtual void OnProviderShutdown(ContentSuggestionsProvider* provider) = 0; + }; + + // Sets an observer which is notified about changes to the available + // suggestions, or removes it by passing a nullptr. + virtual void SetObserver(Observer* observer) = 0; + + // Determines the status of the given |category|, see + // ContentSuggestionsCategoryStatus. + virtual ContentSuggestionsCategoryStatus GetCategoryStatus( + ContentSuggestionsCategory category) = 0; + + // Discards the suggestion with the given ID. A provider needs to ensure that + // a once-discarded suggestion is never delivered again (through the + // Observer). The provider must not call Observer::OnSuggestionsChanged if the + // removal of the discarded suggestion is the only change. + virtual void DiscardSuggestion(const std::string& suggestion_id) = 0; + + // Fetches the image for the suggestion with the given ID and returns it + // through the callback. This fetch may occur locally or from the internet. + virtual void FetchSuggestionImage(const std::string& suggestion_id, + const ImageFetchedCallback& callback) = 0; + + // Used only for debugging purposes. Clears all caches so that the next + // fetch starts from scratch. + virtual void ClearCachedSuggestionsForDebugging() = 0; + + // Used only for debugging purposes. Clears the cache of discarded + // suggestions, if present, so that no suggestions are suppressed. This does + // not necessarily make previously discarded suggestions reappear, as they may + // have been permanently deleted, depending on the provider implementation. + virtual void ClearDiscardedSuggestionsForDebugging() = 0; + + const std::vector<ContentSuggestionsCategory>& provided_categories() const { + return provided_categories_; + } + + protected: + ContentSuggestionsProvider( + const std::vector<ContentSuggestionsCategory>& provided_categories); + virtual ~ContentSuggestionsProvider(); + + // Creates a unique ID. The given |within_category_id| must be unique among + // all suggestion IDs from this provider for the given |category|. This method + // combines it with the |category| to form an ID that is unique + // application-wide, because this provider is the only one that provides + // suggestions for that category. + static std::string MakeUniqueID(ContentSuggestionsCategory category, + const std::string& within_category_id); + + private: + const std::vector<ContentSuggestionsCategory> provided_categories_; +}; + +} // namespace ntp_snippets + +#endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_
diff --git a/components/ntp_snippets/content_suggestions_provider_type.h b/components/ntp_snippets/content_suggestions_provider_type.h deleted file mode 100644 index 9825de8..0000000 --- a/components/ntp_snippets/content_suggestions_provider_type.h +++ /dev/null
@@ -1,19 +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 COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_TYPE_H_ -#define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_TYPE_H_ - -namespace ntp_snippets { - -// A type of content suggestion provider. For each of these types, there will be -// at most one provider instance registered and running. Note that these -// provider types do not necessarily match the suggestion categories. The -// provider type is used to identify the source of a suggestion and to direct -// calls from the UI like discarding back to the right provider. -enum class ContentSuggestionsProviderType : int { ARTICLES }; - -} // namespace ntp_snippets - -#endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_TYPE_H_
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc new file mode 100644 index 0000000..5b86d95 --- /dev/null +++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -0,0 +1,207 @@ +// 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 "components/ntp_snippets/content_suggestions_service.h" + +#include <algorithm> +#include <iterator> + +#include "base/bind.h" +#include "base/strings/string_number_conversions.h" +#include "ui/gfx/image/image.h" + +namespace ntp_snippets { + +ContentSuggestionsService::ContentSuggestionsService(State state) + : state_(state) {} + +ContentSuggestionsService::~ContentSuggestionsService() {} + +void ContentSuggestionsService::Shutdown() { + DCHECK(providers_.empty()); + DCHECK(categories_.empty()); + DCHECK(suggestions_by_category_.empty()); + DCHECK(id_category_map_.empty()); + state_ = State::DISABLED; + FOR_EACH_OBSERVER(Observer, observers_, ContentSuggestionsServiceShutdown()); +} + +ContentSuggestionsCategoryStatus ContentSuggestionsService::GetCategoryStatus( + ContentSuggestionsCategory category) const { + if (state_ == State::DISABLED) { + return ContentSuggestionsCategoryStatus:: + ALL_SUGGESTIONS_EXPLICITLY_DISABLED; + } + + auto iterator = providers_.find(category); + if (iterator == providers_.end()) + return ContentSuggestionsCategoryStatus::NOT_PROVIDED; + + return iterator->second->GetCategoryStatus(category); +} + +const std::vector<ContentSuggestion>& +ContentSuggestionsService::GetSuggestionsForCategory( + ContentSuggestionsCategory category) const { + auto iterator = suggestions_by_category_.find(category); + if (iterator == suggestions_by_category_.end()) + return no_suggestions_; + return iterator->second; +} + +void ContentSuggestionsService::FetchSuggestionImage( + const std::string& suggestion_id, + const ImageFetchedCallback& callback) { + if (!id_category_map_.count(suggestion_id)) { + LOG(WARNING) << "Requested image for unknown suggestion " << suggestion_id; + callback.Run(suggestion_id, gfx::Image()); + return; + } + ContentSuggestionsCategory category = id_category_map_[suggestion_id]; + if (!providers_.count(category)) { + LOG(WARNING) << "Requested image for suggestion " << suggestion_id + << " for unavailable category " << int(category); + callback.Run(suggestion_id, gfx::Image()); + return; + } + providers_[category]->FetchSuggestionImage(suggestion_id, callback); +} + +void ContentSuggestionsService::ClearCachedSuggestionsForDebugging() { + suggestions_by_category_.clear(); + id_category_map_.clear(); + for (auto& category_provider_pair : providers_) { + category_provider_pair.second->ClearCachedSuggestionsForDebugging(); + } + FOR_EACH_OBSERVER(Observer, observers_, OnNewSuggestions()); +} + +void ContentSuggestionsService::ClearDiscardedSuggestionsForDebugging() { + for (auto& category_provider_pair : providers_) { + category_provider_pair.second->ClearDiscardedSuggestionsForDebugging(); + } +} + +void ContentSuggestionsService::DiscardSuggestion( + const std::string& suggestion_id) { + if (!id_category_map_.count(suggestion_id)) { + LOG(WARNING) << "Discarded unknown suggestion " << suggestion_id; + return; + } + ContentSuggestionsCategory category = id_category_map_[suggestion_id]; + if (!providers_.count(category)) { + LOG(WARNING) << "Discarded suggestion " << suggestion_id + << " for unavailable category " << int(category); + return; + } + providers_[category]->DiscardSuggestion(suggestion_id); + + // Remove the suggestion locally. + id_category_map_.erase(suggestion_id); + std::vector<ContentSuggestion>* suggestions = + &suggestions_by_category_[category]; + auto position = + std::find_if(suggestions->begin(), suggestions->end(), + [&suggestion_id](const ContentSuggestion& suggestion) { + return suggestion_id == suggestion.id(); + }); + DCHECK(position != suggestions->end()); + suggestions->erase(position); +} + +void ContentSuggestionsService::AddObserver(Observer* observer) { + observers_.AddObserver(observer); +} + +void ContentSuggestionsService::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +void ContentSuggestionsService::RegisterProvider( + ContentSuggestionsProvider* provider) { + // TODO(pke): When NTPSnippetsService is purely a provider, think about + // removing this state check. + if (state_ == State::DISABLED) + return; + + for (ContentSuggestionsCategory category : provider->provided_categories()) { + DCHECK_EQ(0ul, providers_.count(category)); + providers_[category] = provider; + // TODO(pke): In the future, make sure that the categories have some useful + // (maybe constant, at least consistent) ordering for the UI. + categories_.push_back(category); + if (IsContentSuggestionsCategoryStatusAvailable( + provider->GetCategoryStatus(category))) { + suggestions_by_category_[category] = std::vector<ContentSuggestion>(); + } + NotifyCategoryStatusChanged(category); + } + provider->SetObserver(this); +} + +//////////////////////////////////////////////////////////////////////////////// +// Private methods + +void ContentSuggestionsService::OnNewSuggestions( + ContentSuggestionsCategory changed_category, + std::vector<ContentSuggestion> new_suggestions) { + DCHECK(IsCategoryRegistered(changed_category)); + + for (const ContentSuggestion& suggestion : + suggestions_by_category_[changed_category]) { + id_category_map_.erase(suggestion.id()); + } + + for (const ContentSuggestion& suggestion : new_suggestions) { + id_category_map_[suggestion.id()] = changed_category; + } + + suggestions_by_category_[changed_category] = std::move(new_suggestions); + + FOR_EACH_OBSERVER(Observer, observers_, OnNewSuggestions()); +} + +void ContentSuggestionsService::OnCategoryStatusChanged( + ContentSuggestionsCategory changed_category, + ContentSuggestionsCategoryStatus new_status) { + if (!IsContentSuggestionsCategoryStatusAvailable(new_status)) { + for (const ContentSuggestion& suggestion : + suggestions_by_category_[changed_category]) { + id_category_map_.erase(suggestion.id()); + } + suggestions_by_category_.erase(changed_category); + } + NotifyCategoryStatusChanged(changed_category); +} + +void ContentSuggestionsService::OnProviderShutdown( + ContentSuggestionsProvider* provider) { + for (ContentSuggestionsCategory category : provider->provided_categories()) { + auto iterator = std::find(categories_.begin(), categories_.end(), category); + DCHECK(iterator != categories_.end()); + categories_.erase(iterator); + for (const ContentSuggestion& suggestion : + suggestions_by_category_[category]) { + id_category_map_.erase(suggestion.id()); + } + suggestions_by_category_.erase(category); + providers_.erase(category); + NotifyCategoryStatusChanged(category); + } +} + +bool ContentSuggestionsService::IsCategoryRegistered( + ContentSuggestionsCategory category) const { + return std::find(categories_.begin(), categories_.end(), category) != + categories_.end(); +} + +void ContentSuggestionsService::NotifyCategoryStatusChanged( + ContentSuggestionsCategory category) { + FOR_EACH_OBSERVER( + Observer, observers_, + OnCategoryStatusChanged(category, GetCategoryStatus(category))); +} + +} // namespace ntp_snippets
diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h new file mode 100644 index 0000000..bc15142 --- /dev/null +++ b/components/ntp_snippets/content_suggestions_service.h
@@ -0,0 +1,174 @@ +// 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 COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ +#define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ + +#include <stddef.h> + +#include <map> +#include <string> +#include <vector> + +#include "base/callback_forward.h" +#include "base/observer_list.h" +#include "components/keyed_service/core/keyed_service.h" +#include "components/ntp_snippets/content_suggestions_category_status.h" +#include "components/ntp_snippets/content_suggestions_provider.h" + +namespace gfx { +class Image; +} + +namespace ntp_snippets { + +// Retrieves suggestions from a number of ContentSuggestionsProviders and serves +// them grouped into categories. There can be at most one provider per category. +// NOTE: This class is not yet in use, please use NTPSnippetsService for now +// (see ntp_snippets_service.h). +class ContentSuggestionsService : public KeyedService, + public ContentSuggestionsProvider::Observer { + public: + using ImageFetchedCallback = + base::Callback<void(const std::string& suggestion_id, const gfx::Image&)>; + + class Observer { + public: + // Fired every time the service receives a new set of data, replacing any + // previously available data (though in most cases there will be an overlap + // and only a few changes within the data). The new data is then available + // through the getters of the service. + virtual void OnNewSuggestions() = 0; + + // Fired when the status of a suggestions category changed. When the status + // changes to an unavailable status, the suggestions of the respective + // category have been invalidated, which means that they must no longer be + // displayed to the user. The UI must immediately clear any suggestions of + // that category. + virtual void OnCategoryStatusChanged( + ContentSuggestionsCategory category, + ContentSuggestionsCategoryStatus new_status) = 0; + + // Sent when the service is shutting down. After the service has shut down, + // it will not provide any data anymore, though calling the getters is still + // safe. + virtual void ContentSuggestionsServiceShutdown() = 0; + + protected: + virtual ~Observer() {} + }; + + enum State { + ENABLED, + DISABLED, + }; + + ContentSuggestionsService(State state); + ~ContentSuggestionsService() override; + + // Inherited from KeyedService. + void Shutdown() override; + + State state() { return state_; } + + // Gets all categories for which a provider is registered. The categories + // may or may not be available, see |GetCategoryStatus()|. + const std::vector<ContentSuggestionsCategory>& GetCategories() const { + return categories_; + } + + // Gets the status of a category. + ContentSuggestionsCategoryStatus GetCategoryStatus( + ContentSuggestionsCategory category) const; + + // Gets the available suggestions for a category. The result is empty if the + // category is available and empty, but also if the category is unavailable + // for any reason, see |GetCategoryStatus()|. + const std::vector<ContentSuggestion>& GetSuggestionsForCategory( + ContentSuggestionsCategory category) const; + + // Fetches the image for the suggestion with the given |suggestion_id| and + // runs the |callback|. If that suggestion doesn't exist or the fetch fails, + // the callback gets an empty image. + void FetchSuggestionImage(const std::string& suggestion_id, + const ImageFetchedCallback& callback); + + // Discards the suggestion with the given |suggestion_id|, if it exists. + // This will not trigger an update through the observers. + void DiscardSuggestion(const std::string& suggestion_id); + + // Observer accessors. + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + + // Registers a new ContentSuggestionsProvider. It must be ensured that at most + // one provider is registered for every category and that this method is + // called only once per provider. + void RegisterProvider(ContentSuggestionsProvider* provider); + + // Only for debugging use through the internals page. + // Removes all suggestions from all caches or internal stores in all + // providers. It does, however, not remove any suggestions from the provider's + // sources, so if their configuration hasn't changed, they should return the + // same results when they fetch the next time. In particular, calling this + // method will not mark any suggestions as discarded. + void ClearCachedSuggestionsForDebugging(); + + // Only for debugging use through the internals page. Some providers + // internally store a list of discarded suggestions to prevent them from + // reappearing. This function clears all such lists in all providers, making + // discarded suggestions reappear (only for certain providers). + void ClearDiscardedSuggestionsForDebugging(); + + private: + // Implementation of ContentSuggestionsProvider::Observer. + void OnNewSuggestions(ContentSuggestionsCategory changed_category, + std::vector<ContentSuggestion> suggestions) override; + void OnCategoryStatusChanged( + ContentSuggestionsCategory changed_category, + ContentSuggestionsCategoryStatus new_status) override; + void OnProviderShutdown(ContentSuggestionsProvider* provider) override; + + // Checks whether a provider for the given |category| is registered. + bool IsCategoryRegistered(ContentSuggestionsCategory category) const; + + // Fires the OnCategoryStatusChanged event for the given |category|. + void NotifyCategoryStatusChanged(ContentSuggestionsCategory category); + + // Whether the content suggestions feature is enabled. + State state_; + + // All registered providers. A provider may be contained multiple times, if it + // provides multiple categories. The keys of this map are exactly the entries + // of |categories_|. + std::map<ContentSuggestionsCategory, ContentSuggestionsProvider*> providers_; + + // All current suggestion categories, in an order determined by the service. + // Currently, this is simply the order in which the providers were registered. + // This vector contains exactly the same categories as |providers_|. + // TODO(pke): Implement a useful and consistent ordering for categories. + std::vector<ContentSuggestionsCategory> categories_; + + // All current suggestions grouped by category. This contains an entry for + // every category in |categories_| whose status is an available status. It may + // contain an empty vector if the category is available but empty (or still + // loading). + std::map<ContentSuggestionsCategory, std::vector<ContentSuggestion>> + suggestions_by_category_; + + // Map used to determine the category of a suggestion (of which only the ID + // is available). This also determines the provider that delivered the + // suggestion. + std::map<std::string, ContentSuggestionsCategory> id_category_map_; + + base::ObserverList<Observer> observers_; + + const std::vector<ContentSuggestion> no_suggestions_; + + DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); +}; + +} // namespace ntp_snippets + +#endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
diff --git a/components/ntp_snippets/ntp_snippet.cc b/components/ntp_snippets/ntp_snippet.cc index f7870f9..6670d99a 100644 --- a/components/ntp_snippets/ntp_snippet.cc +++ b/components/ntp_snippets/ntp_snippet.cc
@@ -8,9 +8,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" #include "base/values.h" -#include "components/ntp_snippets/content_suggestion.h" -#include "components/ntp_snippets/content_suggestion_category.h" -#include "components/ntp_snippets/content_suggestions_provider_type.h" + #include "components/ntp_snippets/proto/ntp_snippets.pb.h" namespace { @@ -246,19 +244,6 @@ return result; } -std::unique_ptr<ContentSuggestion> NTPSnippet::ToContentSuggestion() const { - std::unique_ptr<ContentSuggestion> result(new ContentSuggestion( - id_, ContentSuggestionsProviderType::ARTICLES, - ContentSuggestionCategory::ARTICLE, best_source().url)); - result->set_amp_url(best_source().amp_url); - result->set_title(title_); - result->set_snippet_text(snippet_); - result->set_publish_date(publish_date_); - result->set_publisher_name(best_source().publisher_name); - result->set_score(score_); - return result; -} - // static base::Time NTPSnippet::TimeFromJsonString(const std::string& timestamp_str) { int64_t timestamp;
diff --git a/components/ntp_snippets/ntp_snippet.h b/components/ntp_snippets/ntp_snippet.h index 416cffc..2d92bd3 100644 --- a/components/ntp_snippets/ntp_snippet.h +++ b/components/ntp_snippets/ntp_snippet.h
@@ -11,7 +11,6 @@ #include "base/macros.h" #include "base/time/time.h" -#include "components/ntp_snippets/content_suggestion.h" #include "url/gurl.h" namespace base { @@ -126,8 +125,6 @@ bool is_discarded() const { return is_discarded_; } void set_discarded(bool discarded) { is_discarded_ = discarded; } - std::unique_ptr<ContentSuggestion> ToContentSuggestion() const; - // Public for testing. static base::Time TimeFromJsonString(const std::string& timestamp_str); static std::string TimeToJsonString(const base::Time& time);
diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h index faf064a..5c0ed8c 100644 --- a/components/ntp_snippets/ntp_snippets_service.h +++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -12,6 +12,7 @@ #include <string> #include <vector> +#include "base/callback_forward.h" #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/observer_list.h"
diff --git a/components/omnibox/browser/shortcuts_database_unittest.cc b/components/omnibox/browser/shortcuts_database_unittest.cc index c98bdeb..2f151b1 100644 --- a/components/omnibox/browser/shortcuts_database_unittest.cc +++ b/components/omnibox/browser/shortcuts_database_unittest.cc
@@ -96,13 +96,13 @@ void AddAll(); + base::ScopedTempDir temp_dir_; scoped_refptr<ShortcutsDatabase> db_; }; void ShortcutsDatabaseTest::SetUp() { - base::ScopedTempDir temp_dir; - ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath db_path(temp_dir.path().Append(kShortcutsDatabaseName)); + ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); + base::FilePath db_path(temp_dir_.path().Append(kShortcutsDatabaseName)); db_ = new ShortcutsDatabase(db_path); ASSERT_TRUE(db_->Init()); ClearDB();
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.cc b/components/page_load_metrics/browser/metrics_web_contents_observer.cc index 617d7d6..c327616 100644 --- a/components/page_load_metrics/browser/metrics_web_contents_observer.cc +++ b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
@@ -5,6 +5,7 @@ #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" #include <algorithm> +#include <ostream> #include <string> #include <utility> @@ -53,6 +54,16 @@ namespace { +// Helper to allow use of Optional<> values in LOG() messages. +std::ostream& operator<<(std::ostream& os, + const base::Optional<base::TimeDelta>& opt) { + if (opt) + os << opt.value(); + else + os << "(unset)"; + return os; +} + // The url we see from the renderer side is not always the same as what // we see from the browser side (e.g. chrome://newtab). We want to be // sure here that we aren't logging UMA for internal pages. @@ -70,11 +81,12 @@ // If second is non-zero, first must also be non-zero and less than or equal to // second. -bool EventsInOrder(base::TimeDelta first, base::TimeDelta second) { - if (second.is_zero()) { +bool EventsInOrder(const base::Optional<base::TimeDelta>& first, + const base::Optional<base::TimeDelta>& second) { + if (!second) { return true; } - return !first.is_zero() && first <= second; + return first && first <= second; } bool IsValidPageLoadTiming(const PageLoadTiming& timing) { @@ -111,9 +123,9 @@ return false; } - if (!timing.parse_stop.is_zero()) { + if (timing.parse_stop) { const base::TimeDelta parse_duration = - timing.parse_stop - timing.parse_start; + timing.parse_stop.value() - timing.parse_start.value(); if (timing.parse_blocked_on_script_load_duration > parse_duration) { NOTREACHED() << "Invalid parse_blocked_on_script_load_duration " << timing.parse_blocked_on_script_load_duration @@ -212,28 +224,24 @@ const PageLoadMetadata& last_metadata, const PageLoadExtraInfo& extra_info) { observer->OnTimingUpdate(new_timing, extra_info); - if (!new_timing.dom_content_loaded_event_start.is_zero() && - last_timing.dom_content_loaded_event_start.is_zero()) + if (new_timing.dom_content_loaded_event_start && + !last_timing.dom_content_loaded_event_start) observer->OnDomContentLoadedEventStart(new_timing, extra_info); - if (!new_timing.load_event_start.is_zero() && - last_timing.load_event_start.is_zero()) + if (new_timing.load_event_start && !last_timing.load_event_start) observer->OnLoadEventStart(new_timing, extra_info); - if (!new_timing.first_layout.is_zero() && last_timing.first_layout.is_zero()) + if (new_timing.first_layout && !last_timing.first_layout) observer->OnFirstLayout(new_timing, extra_info); - if (!new_timing.first_paint.is_zero() && last_timing.first_paint.is_zero()) + if (new_timing.first_paint && !last_timing.first_paint) observer->OnFirstPaint(new_timing, extra_info); - if (!new_timing.first_text_paint.is_zero() && - last_timing.first_text_paint.is_zero()) + if (new_timing.first_text_paint && !last_timing.first_text_paint) observer->OnFirstTextPaint(new_timing, extra_info); - if (!new_timing.first_image_paint.is_zero() && - last_timing.first_image_paint.is_zero()) + if (new_timing.first_image_paint && !last_timing.first_image_paint) observer->OnFirstImagePaint(new_timing, extra_info); - if (!new_timing.first_contentful_paint.is_zero() && - last_timing.first_contentful_paint.is_zero()) + if (new_timing.first_contentful_paint && !last_timing.first_contentful_paint) observer->OnFirstContentfulPaint(new_timing, extra_info); - if (!new_timing.parse_start.is_zero() && last_timing.parse_start.is_zero()) + if (new_timing.parse_start && !last_timing.parse_start) observer->OnParseStart(new_timing, extra_info); - if (!new_timing.parse_stop.is_zero() && last_timing.parse_stop.is_zero()) + if (new_timing.parse_stop && !last_timing.parse_stop) observer->OnParseStop(new_timing, extra_info); if (extra_info.metadata.behavior_flags != last_metadata.behavior_flags) observer->OnLoadingBehaviorObserved(extra_info); @@ -390,8 +398,9 @@ void PageLoadTracker::NotifyClientRedirectTo( const PageLoadTracker& destination) { base::TimeDelta redirect_delay_after_paint; - if (!timing_.first_paint.is_zero()) { - base::TimeTicks first_paint_time = navigation_start() + timing_.first_paint; + if (timing_.first_paint) { + base::TimeTicks first_paint_time = + navigation_start() + timing_.first_paint.value(); if (destination.navigation_start() > first_paint_time) redirect_delay_after_paint = destination.navigation_start() - first_paint_time;
diff --git a/components/page_load_metrics/browser/page_load_metrics_util.cc b/components/page_load_metrics/browser/page_load_metrics_util.cc index 96217bf..f12ac24 100644 --- a/components/page_load_metrics/browser/page_load_metrics_util.cc +++ b/components/page_load_metrics/browser/page_load_metrics_util.cc
@@ -11,16 +11,6 @@ namespace page_load_metrics { -bool WasStartedInForegroundEventInForeground(base::TimeDelta event, - const PageLoadExtraInfo& info) { - return info.started_in_foreground && !event.is_zero() && - (!info.first_background_time || - event <= info.first_background_time.value()); -} - -// TODO (shivanisha) The above function is used for TimeDeltas coming over IPC. -// Merge these two when page_load_metrics only handles Optional TimeDelta -// values in the browser process. bool WasStartedInForegroundOptionalEventInForeground( const base::Optional<base::TimeDelta>& event, const PageLoadExtraInfo& info) { @@ -29,17 +19,16 @@ event.value() <= info.first_background_time.value()); } -bool WasParseInForeground(base::TimeDelta parse_start, - base::TimeDelta parse_stop, +bool WasParseInForeground(const base::Optional<base::TimeDelta>& parse_start, + const base::Optional<base::TimeDelta>& parse_stop, const PageLoadExtraInfo& info) { - if (parse_start.is_zero()) { + if (!parse_start) { return false; } - const bool incomplete_parse_in_foreground = parse_stop.is_zero() && - info.started_in_foreground && - !info.first_background_time; + const bool incomplete_parse_in_foreground = + !parse_stop && info.started_in_foreground && !info.first_background_time; return incomplete_parse_in_foreground || - WasStartedInForegroundEventInForeground(parse_stop, info); + WasStartedInForegroundOptionalEventInForeground(parse_stop, info); } } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/page_load_metrics_util.h b/components/page_load_metrics/browser/page_load_metrics_util.h index 66dc3aa..dfeeabdb 100644 --- a/components/page_load_metrics/browser/page_load_metrics_util.h +++ b/components/page_load_metrics/browser/page_load_metrics_util.h
@@ -29,9 +29,6 @@ // If the event time delta and background time delta are equal, we still // consider the event to be logged in the foreground histogram since any // background specific handling would not yet have been applied to that event. -bool WasStartedInForegroundEventInForeground(base::TimeDelta event, - const PageLoadExtraInfo& info); - bool WasStartedInForegroundOptionalEventInForeground( const base::Optional<base::TimeDelta>& event, const PageLoadExtraInfo& info); @@ -40,8 +37,8 @@ // - Parse started and did not complete but the entire page load duration // happened in the foreground. // - Parse completed and happened entirely in the foreground. -bool WasParseInForeground(base::TimeDelta parse_start, - base::TimeDelta parse_stop, +bool WasParseInForeground(const base::Optional<base::TimeDelta>& parse_start, + const base::Optional<base::TimeDelta>& parse_stop, const PageLoadExtraInfo& info); } // namespace page_load_metrics
diff --git a/components/page_load_metrics/common/page_load_timing.cc b/components/page_load_metrics/common/page_load_timing.cc index 1c3de65..8bda0f8 100644 --- a/components/page_load_metrics/common/page_load_timing.cc +++ b/components/page_load_metrics/common/page_load_timing.cc
@@ -31,14 +31,12 @@ } bool PageLoadTiming::IsEmpty() const { - return navigation_start.is_null() && response_start.is_zero() && - dom_loading.is_zero() && dom_content_loaded_event_start.is_zero() && - load_event_start.is_zero() && first_layout.is_zero() && - first_paint.is_zero() && first_text_paint.is_zero() && - first_image_paint.is_zero() && parse_start.is_zero() && - parse_stop.is_zero() && - parse_blocked_on_script_load_duration.is_zero() && - parse_blocked_on_script_load_from_document_write_duration.is_zero(); + return navigation_start.is_null() && !response_start && !dom_loading && + !dom_content_loaded_event_start && !load_event_start && + !first_layout && !first_paint && !first_text_paint && + !first_image_paint && !parse_start && !parse_stop && + !parse_blocked_on_script_load_duration && + !parse_blocked_on_script_load_from_document_write_duration; } PageLoadMetadata::PageLoadMetadata() {}
diff --git a/components/page_load_metrics/common/page_load_timing.h b/components/page_load_metrics/common/page_load_timing.h index a61551d..8d44cfca 100644 --- a/components/page_load_metrics/common/page_load_timing.h +++ b/components/page_load_metrics/common/page_load_timing.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ #define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ +#include "base/optional.h" #include "base/time/time.h" #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" @@ -28,53 +29,52 @@ // All TimeDeltas are relative to navigation_start - // TODO(shivanisha): Issue 596367 shows that it is possible for a valid - // TimeDelta value to be 0 (2 TimeTicks can have the same value even if they - // were assigned in separate instructions if the clock speed is less - // granular). The solution there was to use base::Optional for those values. - // Consider changing the below values to Optional as well. - // Time that the first byte of the response is received. - base::TimeDelta response_start; + base::Optional<base::TimeDelta> response_start; // Time that the document transitions to the 'loading' state. This is roughly // the time that the HTML parser begins parsing the main HTML resource. - base::TimeDelta dom_loading; + base::Optional<base::TimeDelta> dom_loading; // Time immediately before the DOMContentLoaded event is fired. - base::TimeDelta dom_content_loaded_event_start; + base::Optional<base::TimeDelta> dom_content_loaded_event_start; // Time immediately before the load event is fired. - base::TimeDelta load_event_start; + base::Optional<base::TimeDelta> load_event_start; // Time when the first layout is completed. - base::TimeDelta first_layout; + base::Optional<base::TimeDelta> first_layout; // Time when the first paint is performed. - base::TimeDelta first_paint; + base::Optional<base::TimeDelta> first_paint; // Time when the first non-blank text is painted. - base::TimeDelta first_text_paint; + base::Optional<base::TimeDelta> first_text_paint; // Time when the first image is painted. - base::TimeDelta first_image_paint; + base::Optional<base::TimeDelta> first_image_paint; // Time when the first contentful thing (image, text, etc.) is painted. - base::TimeDelta first_contentful_paint; + base::Optional<base::TimeDelta> first_contentful_paint; // Time that the document's parser started and stopped parsing main resource // content. - base::TimeDelta parse_start; - base::TimeDelta parse_stop; + base::Optional<base::TimeDelta> parse_start; + base::Optional<base::TimeDelta> parse_stop; // Sum of times when the parser is blocked waiting on the load of a script. // This duration takes place between parser_start and parser_stop, and thus - // must be less than or equal to parser_stop - parser_start. - base::TimeDelta parse_blocked_on_script_load_duration; + // must be less than or equal to parser_stop - parser_start. Note that this + // value may be updated multiple times during the period between parse_start + // and parse_stop. + base::Optional<base::TimeDelta> parse_blocked_on_script_load_duration; // Sum of times when the parser is blocked waiting on the load of a script // that was inserted from document.write. This duration must be less than or - // equal to parse_blocked_on_script_load_duration. Note that some uncommon - // cases where scripts are loaded via document.write are not currently covered - // by this field. See crbug/600711 for details. - base::TimeDelta parse_blocked_on_script_load_from_document_write_duration; + // equal to parse_blocked_on_script_load_duration. Note that this value may be + // updated multiple times during the period between parse_start and + // parse_stop. Note that some uncommon cases where scripts are loaded via + // document.write are not currently covered by this field. See crbug/600711 + // for details. + base::Optional<base::TimeDelta> + parse_blocked_on_script_load_from_document_write_duration; // If you add additional members, also be sure to update operator==, // page_load_metrics_messages.h, and IsEmpty().
diff --git a/components/page_load_metrics/renderer/metrics_render_frame_observer.cc b/components/page_load_metrics/renderer/metrics_render_frame_observer.cc index 0be2cad..9f92393 100644 --- a/components/page_load_metrics/renderer/metrics_render_frame_observer.cc +++ b/components/page_load_metrics/renderer/metrics_render_frame_observer.cc
@@ -118,24 +118,39 @@ PageLoadTiming timing; double start = perf.navigationStart(); timing.navigation_start = base::Time::FromDoubleT(start); - timing.response_start = ClampDelta(perf.responseStart(), start); - timing.dom_loading = ClampDelta(perf.domLoading(), start); - timing.dom_content_loaded_event_start = - ClampDelta(perf.domContentLoadedEventStart(), start); - timing.load_event_start = ClampDelta(perf.loadEventStart(), start); - timing.first_layout = ClampDelta(perf.firstLayout(), start); - timing.first_paint = ClampDelta(perf.firstPaint(), start); - timing.first_text_paint = ClampDelta(perf.firstTextPaint(), start); - timing.first_image_paint = ClampDelta(perf.firstImagePaint(), start); - timing.first_contentful_paint = - ClampDelta(perf.firstContentfulPaint(), start); - timing.parse_start = ClampDelta(perf.parseStart(), start); - timing.parse_stop = ClampDelta(perf.parseStop(), start); - timing.parse_blocked_on_script_load_duration = - base::TimeDelta::FromSecondsD(perf.parseBlockedOnScriptLoadDuration()); - timing.parse_blocked_on_script_load_from_document_write_duration = - base::TimeDelta::FromSecondsD( - perf.parseBlockedOnScriptLoadFromDocumentWriteDuration()); + if (perf.responseStart() > 0.0) + timing.response_start = ClampDelta(perf.responseStart(), start); + if (perf.domLoading() > 0.0) + timing.dom_loading = ClampDelta(perf.domLoading(), start); + if (perf.domContentLoadedEventStart() > 0.0) + timing.dom_content_loaded_event_start = + ClampDelta(perf.domContentLoadedEventStart(), start); + if (perf.loadEventStart() > 0.0) + timing.load_event_start = ClampDelta(perf.loadEventStart(), start); + if (perf.firstLayout() > 0.0) + timing.first_layout = ClampDelta(perf.firstLayout(), start); + if (perf.firstPaint() > 0.0) + timing.first_paint = ClampDelta(perf.firstPaint(), start); + if (perf.firstTextPaint() > 0.0) + timing.first_text_paint = ClampDelta(perf.firstTextPaint(), start); + if (perf.firstImagePaint() > 0.0) + timing.first_image_paint = ClampDelta(perf.firstImagePaint(), start); + if (perf.firstContentfulPaint() > 0.0) + timing.first_contentful_paint = + ClampDelta(perf.firstContentfulPaint(), start); + if (perf.parseStart() > 0.0) + timing.parse_start = ClampDelta(perf.parseStart(), start); + if (perf.parseStop() > 0.0) + timing.parse_stop = ClampDelta(perf.parseStop(), start); + if (timing.parse_start) { + // If we started parsing, record all parser durations such as the amount of + // time blocked on script load, even if those values are zero. + timing.parse_blocked_on_script_load_duration = + base::TimeDelta::FromSecondsD(perf.parseBlockedOnScriptLoadDuration()); + timing.parse_blocked_on_script_load_from_document_write_duration = + base::TimeDelta::FromSecondsD( + perf.parseBlockedOnScriptLoadFromDocumentWriteDuration()); + } return timing; }
diff --git a/components/precache/content/precache_manager.cc b/components/precache/content/precache_manager.cc index 376c457..9a81fbb 100644 --- a/components/precache/content/precache_manager.cc +++ b/components/precache/content/precache_manager.cc
@@ -214,6 +214,21 @@ return is_precaching_; } +void PrecacheManager::UpdatePrecacheMetricsAndState( + const GURL& url, + const GURL& referrer, + const base::TimeDelta& latency, + const base::Time& fetch_time, + int64_t size, + bool was_cached, + bool is_user_traffic) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + RecordStatsForFetch(url, referrer, latency, fetch_time, size, was_cached); + if (is_user_traffic && IsPrecaching()) + CancelPrecaching(); +} + void PrecacheManager::RecordStatsForFetch(const GURL& url, const GURL& referrer, const base::TimeDelta& latency,
diff --git a/components/precache/content/precache_manager.h b/components/precache/content/precache_manager.h index 614ea0b..259ced767 100644 --- a/components/precache/content/precache_manager.h +++ b/components/precache/content/precache_manager.h
@@ -26,6 +26,7 @@ namespace base { class FilePath; class Time; +class TimeDelta; } namespace content { @@ -96,19 +97,34 @@ // Returns true if precaching is currently in progress, or false otherwise. bool IsPrecaching() const; - // Update precache-related metrics in response to a URL being fetched. - void RecordStatsForFetch(const GURL& url, - const GURL& referrer, - const base::TimeDelta& latency, - const base::Time& fetch_time, - int64_t size, - bool was_cached); - // Posts a task to the DB thread to delete all history entries from the // database. Does not wait for completion of this task. void ClearHistory(); + // Update precache about an URL being fetched. Metrics related to precache are + // updated and any ongoing precache will be cancelled if this is an user + // initiated request. Should be called on UI thread. + void UpdatePrecacheMetricsAndState(const GURL& url, + const GURL& referrer, + const base::TimeDelta& latency, + const base::Time& fetch_time, + int64_t size, + bool was_cached, + bool is_user_traffic); + private: + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, DeleteExpiredPrecacheHistory); + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, + RecordStatsForFetchDuringPrecaching); + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, RecordStatsForFetchHTTP); + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, RecordStatsForFetchHTTPS); + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, RecordStatsForFetchInTopHosts); + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, + RecordStatsForFetchWithEmptyURL); + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, RecordStatsForFetchWithNonHTTP); + FRIEND_TEST_ALL_PREFIXES(PrecacheManagerTest, + RecordStatsForFetchWithSizeZero); + enum class AllowedType { ALLOWED, DISALLOWED, @@ -138,6 +154,14 @@ // Returns true if precaching is allowed for the browser context. AllowedType PrecachingAllowed() const; + // Update precache-related metrics in response to a URL being fetched. + void RecordStatsForFetch(const GURL& url, + const GURL& referrer, + const base::TimeDelta& latency, + const base::Time& fetch_time, + int64_t size, + bool was_cached); + // Update precache-related metrics in response to a URL being fetched. Called // by RecordStatsForFetch() by way of an asynchronous HistoryService callback. void RecordStatsForFetchInternal(const GURL& url,
diff --git a/components/precache/content/precache_manager_unittest.cc b/components/precache/content/precache_manager_unittest.cc index 27b167f3..d075231 100644 --- a/components/precache/content/precache_manager_unittest.cc +++ b/components/precache/content/precache_manager_unittest.cc
@@ -147,6 +147,8 @@ bool control_group_; }; +} // namespace + class PrecacheManagerTest : public testing::Test { public: PrecacheManagerTest() @@ -342,6 +344,8 @@ EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls()); } +// TODO(rajendrant): Add unittests for +// PrecacheUtil::UpdatePrecacheMetricsAndState() for more test coverage. TEST_F(PrecacheManagerTest, RecordStatsForFetchWithSizeZero) { // Fetches with size 0 should be ignored. precache_manager_->RecordStatsForFetch(GURL("http://url.com"), GURL(), @@ -523,6 +527,4 @@ ContainerEq(expected_histogram_count_map)); } -} // namespace - } // namespace precache
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc index 683bf39..ce1b004 100644 --- a/components/printing/renderer/print_web_view_helper.cc +++ b/components/printing/renderer/print_web_view_helper.cc
@@ -960,8 +960,7 @@ // If the user has selected text in the currently focused frame we print // only that frame (this makes print selection work for multiple frames). - blink::WebLocalFrame* focusedFrame = - webView->focusedFrame()->toWebLocalFrame(); + blink::WebLocalFrame* focusedFrame = webView->focusedFrame(); *frame = focusedFrame->hasSelection() ? focusedFrame : webView->mainFrame()->toWebLocalFrame();
diff --git a/components/printing/test/print_mock_render_thread.cc b/components/printing/test/print_mock_render_thread.cc index 45733f5..a5e66e4 100644 --- a/components/printing/test/print_mock_render_thread.cc +++ b/components/printing/test/print_mock_render_thread.cc
@@ -34,11 +34,11 @@ } scoped_refptr<base::SingleThreadTaskRunner> -PrintMockRenderThread::GetIOMessageLoopProxy() { +PrintMockRenderThread::GetIOTaskRunner() { return io_task_runner_; } -void PrintMockRenderThread::set_io_message_loop_proxy( +void PrintMockRenderThread::set_io_task_runner( const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { io_task_runner_ = task_runner; }
diff --git a/components/printing/test/print_mock_render_thread.h b/components/printing/test/print_mock_render_thread.h index 4c38176..a483fa1 100644 --- a/components/printing/test/print_mock_render_thread.h +++ b/components/printing/test/print_mock_render_thread.h
@@ -35,13 +35,12 @@ ~PrintMockRenderThread() override; // content::RenderThread overrides. - scoped_refptr<base::SingleThreadTaskRunner> GetIOMessageLoopProxy() override; + scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; ////////////////////////////////////////////////////////////////////////// // The following functions are called by the test itself. - // Set IO message loop proxy. - void set_io_message_loop_proxy( + void set_io_task_runner( const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); #if defined(ENABLE_PRINTING)
diff --git a/components/signin/core/browser/signin_metrics.h b/components/signin/core/browser/signin_metrics.h index f0de9c02..a83851c 100644 --- a/components/signin/core/browser/signin_metrics.h +++ b/components/signin/core/browser/signin_metrics.h
@@ -138,7 +138,8 @@ ACCESS_POINT_RECENT_TABS, ACCESS_POINT_UNKNOWN, // This should never have been used to get signin URL. ACCESS_POINT_PASSWORD_BUBBLE, - ACCESS_POINT_MAX, // This must be last. + ACCESS_POINT_AUTOFILL_DROPDOWN, + ACCESS_POINT_MAX, // This must be last. }; // Enum values which enumerates all reasons to start sign in process.
diff --git a/components/startup_metric_utils/browser/startup_metric_utils.cc b/components/startup_metric_utils/browser/startup_metric_utils.cc index d2d6444..00edc15 100644 --- a/components/startup_metric_utils/browser/startup_metric_utils.cc +++ b/components/startup_metric_utils/browser/startup_metric_utils.cc
@@ -186,8 +186,7 @@ // On Windows, records the number of hard-faults that have occurred in the // current chrome.exe process since it was started. A version of the histograms // recorded in this method suffixed by |same_version_startup_count| will also be -// recorded (unless |same_version_startup_count| is 0 which indicates it's -// unknown). This is a nop on other platforms. +// recorded. This is a nop on other platforms. void RecordHardFaultHistogram(int same_version_startup_count) { #if defined(OS_WIN) uint32_t hard_fault_count = 0; @@ -196,22 +195,19 @@ if (!GetHardFaultCountForCurrentProcess(&hard_fault_count)) return; - std::string same_version_startup_count_suffix; - if (same_version_startup_count != 0) { - // Histograms below will be suffixed by |same_version_startup_count| up to - // |kMaxSameVersionCountRecorded|, higher counts will be grouped in the - // ".Over" suffix. Make sure to reflect changes to - // kMaxSameVersionCountRecorded in the "SameVersionStartupCounts" histogram - // suffix. - const int kMaxSameVersionCountRecorded = 9; - same_version_startup_count_suffix.push_back('.'); - DCHECK_GE(same_version_startup_count, 1); - if (same_version_startup_count <= kMaxSameVersionCountRecorded) { - same_version_startup_count_suffix.append( - base::IntToString(same_version_startup_count)); - } else { - same_version_startup_count_suffix.append("Over"); - } + // Histograms below will be suffixed by |same_version_startup_count| up to + // |kMaxSameVersionCountRecorded|, higher counts will be grouped in the + // ".Over" suffix. Make sure to reflect changes to + // kMaxSameVersionCountRecorded in the "SameVersionStartupCounts" histogram + // suffix. + std::string same_version_startup_count_suffix("."); + constexpr int kMaxSameVersionCountRecorded = 9; + DCHECK_GE(same_version_startup_count, 1); + if (same_version_startup_count <= kMaxSameVersionCountRecorded) { + same_version_startup_count_suffix.append( + base::IntToString(same_version_startup_count)); + } else { + same_version_startup_count_suffix.append("Over"); } // Hard fault counts are expected to be in the thousands range, @@ -545,15 +541,15 @@ void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks, bool is_first_run, PrefService* pref_service) { - int same_version_startup_count = 0; - if (pref_service) - same_version_startup_count = RecordSameVersionStartupCount(pref_service); + DCHECK(pref_service); + + const int same_version_startup_count = + RecordSameVersionStartupCount(pref_service); // Keep RecordHardFaultHistogram() first as much as possible as many other // histograms depend on it setting |g_startup_temperature|. RecordHardFaultHistogram(same_version_startup_count); AddStartupEventsForTelemetry(); - if (pref_service) - RecordTimeSinceLastStartup(pref_service); + RecordTimeSinceLastStartup(pref_service); RecordSystemUptimeHistogram(); RecordMainEntryTimeHistogram();
diff --git a/components/startup_metric_utils/browser/startup_metric_utils.h b/components/startup_metric_utils/browser/startup_metric_utils.h index cdfb55c9..3d373c2 100644 --- a/components/startup_metric_utils/browser/startup_metric_utils.h +++ b/components/startup_metric_utils/browser/startup_metric_utils.h
@@ -78,9 +78,7 @@ // Call this with the time recorded just before the message loop is started. // |is_first_run| - is the current launch part of a first run. |pref_service| is -// an optional parameter which, if provided, will be used to store state for -// stats that span multiple startups; in its absence those stats will not be -// recorded. +// used to store state for stats that span multiple startups. void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks, bool is_first_run, PrefService* pref_service);
diff --git a/components/storage_monitor/storage_monitor_linux.cc b/components/storage_monitor/storage_monitor_linux.cc index b089867..1441eaa5 100644 --- a/components/storage_monitor/storage_monitor_linux.cc +++ b/components/storage_monitor/storage_monitor_linux.cc
@@ -268,7 +268,7 @@ if (!media_transfer_protocol_manager_) { media_transfer_protocol_manager_.reset( device::MediaTransferProtocolManager::Initialize( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); } media_transfer_protocol_device_observer_.reset(
diff --git a/components/test_runner/test_runner_for_specific_view.cc b/components/test_runner/test_runner_for_specific_view.cc index 3cc1fb7..11dfca60 100644 --- a/components/test_runner/test_runner_for_specific_view.cc +++ b/components/test_runner/test_runner_for_specific_view.cc
@@ -673,7 +673,11 @@ } std::string TestRunnerForSpecificView::SelectionAsMarkup() { - return web_view()->mainFrame()->selectionAsMarkup().utf8(); + if (!web_view()->mainFrame()->toWebLocalFrame()) { + CHECK(false) << "This function cannot be called if the main frame is not a " + "local frame."; + } + return web_view()->mainFrame()->toWebLocalFrame()->selectionAsMarkup().utf8(); } void TestRunnerForSpecificView::SetViewSourceForFrame(const std::string& name,
diff --git a/components/test_runner/text_input_controller.cc b/components/test_runner/text_input_controller.cc index 041eff9..a10d849 100644 --- a/components/test_runner/text_input_controller.cc +++ b/components/test_runner/text_input_controller.cc
@@ -166,8 +166,14 @@ } void TextInputController::DoCommand(const std::string& text) { - if (view()->mainFrame()) - view()->mainFrame()->executeCommand(blink::WebString::fromUTF8(text)); + if (view()->mainFrame()) { + if (!view()->mainFrame()->toWebLocalFrame()) { + CHECK(false) << "This function cannot be called if the main frame is not" + "a local frame."; + } + view()->mainFrame()->toWebLocalFrame()->executeCommand( + blink::WebString::fromUTF8(text)); + } } void TextInputController::SetMarkedText(const std::string& text, @@ -199,14 +205,27 @@ } bool TextInputController::HasMarkedText() { - return view()->mainFrame() && view()->mainFrame()->hasMarkedText(); + if (!view()->mainFrame()) + return false; + + if (!view()->mainFrame()->toWebLocalFrame()) { + CHECK(false) << "This function cannot be called if the main frame is not" + "a local frame."; + } + + return view()->mainFrame()->toWebLocalFrame()->hasMarkedText(); } std::vector<int> TextInputController::MarkedRange() { if (!view()->mainFrame()) return std::vector<int>(); - blink::WebRange range = view()->mainFrame()->markedRange(); + if (!view()->mainFrame()->toWebLocalFrame()) { + CHECK(false) << "This function cannot be called if the main frame is not" + "a local frame."; + } + + blink::WebRange range = view()->mainFrame()->toWebLocalFrame()->markedRange(); std::vector<int> int_array(2); int_array[0] = range.startOffset(); int_array[1] = range.endOffset(); @@ -218,7 +237,13 @@ if (!view()->mainFrame()) return std::vector<int>(); - blink::WebRange range = view()->mainFrame()->selectionRange(); + if (!view()->mainFrame()->toWebLocalFrame()) { + CHECK(false) << "This function cannot be called if the main frame is not" + "a local frame."; + } + + blink::WebRange range = + view()->mainFrame()->toWebLocalFrame()->selectionRange(); if (range.isNull()) return std::vector<int>(); std::vector<int> int_array(2);
diff --git a/content/app/mac/mac_init.mm b/content/app/mac/mac_init.mm index eea835a..bd11bf4 100644 --- a/content/app/mac/mac_init.mm +++ b/content/app/mac/mac_init.mm
@@ -6,8 +6,6 @@ #import <Cocoa/Cocoa.h> -#include "base/mac/mac_util.h" - namespace content { void InitializeMac() { @@ -27,7 +25,7 @@ // in the window server, which is the default when not not using the // 10.9 SDK. // TODO: Remove this when we build with the 10.9 SDK. - @"NSWindowHostsLayersInWindowServer": @(base::mac::IsOSMavericksOrLater()) + @"NSWindowHostsLayersInWindowServer": @YES }]; }
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 6a8cd88..b8ffbbe 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -389,9 +389,12 @@ "//ui/aura", "//ui/aura_extra", "//ui/strings", + "//ui/views/mus", "//ui/wm", ] sources += [ + "compositor/mus_browser_compositor_output_surface.cc", + "compositor/mus_browser_compositor_output_surface.h", "compositor/software_output_device_mus.cc", "compositor/software_output_device_mus.h", "renderer_host/render_widget_host_view_mus.cc",
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index bead70f8..d7d47c1 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc
@@ -70,7 +70,10 @@ // implementation details, but we want to expose them as leaves to platform // accessibility APIs because screen readers might be confused if they find // any children. - if (IsSimpleTextControl() || IsTextOnlyObject()) + // Note that if a combo box, search box or text field are not native, they + // might present a menu of choices using aria-owns which should not be hidden + // from tree. + if (IsNativeTextControl() || IsTextOnlyObject()) return true; // Roles whose children are only presentational according to the ARIA and @@ -1064,6 +1067,20 @@ } } +bool BrowserAccessibility::IsNativeTextControl() const { + const std::string& html_tag = GetStringAttribute(ui::AX_ATTR_HTML_TAG); + if (html_tag == "input") { + std::string input_type; + if (!GetHtmlAttribute("type", &input_type)) + return true; + return input_type.empty() || input_type == "email" || + input_type == "password" || input_type == "search" || + input_type == "tel" || input_type == "text" || input_type == "url" || + input_type == "number"; + } + return html_tag == "textarea"; +} + bool BrowserAccessibility::IsSimpleTextControl() const { // Time fields, color wells and spinner buttons might also use text fields as // constituent parts, but they are not considered text fields as a whole.
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index 78aa200..18e63545 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h
@@ -331,7 +331,7 @@ virtual bool IsClickable() const; bool IsControl() const; bool IsMenuRelated() const; - bool IsRangeControl() const; + bool IsNativeTextControl() const; bool IsSimpleTextControl() const; // Indicates if this object is at the root of a rich edit text control. bool IsRichTextControl() const;
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index dd96eaa9b..dbbca9fd 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -125,7 +125,7 @@ return true; // Nodes with only static text as children can drop their children. - if (HasOnlyStaticTextChildren()) + if (HasOnlyTextChildren()) return true; } @@ -359,7 +359,7 @@ GetIntAttribute(ui::AX_ATTR_NAME_FROM) == ui::AX_NAME_FROM_CONTENTS) { // This is an approximation of "PlatformChildCount() > 0" because we can't // call PlatformChildCount from here. - if (InternalChildCount() > 0 && !HasOnlyStaticTextChildren()) + if (InternalChildCount() > 0 && !HasOnlyTextChildren()) return base::string16(); } @@ -406,9 +406,8 @@ // This is called from PlatformIsLeaf, so don't call PlatformChildCount // from within this! - if (text.empty() && - (HasOnlyStaticTextChildren() || - (IsFocusable() && HasOnlyTextAndImageChildren()))) { + if (text.empty() && (HasOnlyTextChildren() || + (IsFocusable() && HasOnlyTextAndImageChildren()))) { for (uint32_t i = 0; i < InternalChildCount(); i++) { BrowserAccessibility* child = InternalGetChild(i); text += static_cast<BrowserAccessibilityAndroid*>(child)->GetText(); @@ -1336,12 +1335,12 @@ return false; } -bool BrowserAccessibilityAndroid::HasOnlyStaticTextChildren() const { +bool BrowserAccessibilityAndroid::HasOnlyTextChildren() const { // This is called from PlatformIsLeaf, so don't call PlatformChildCount // from within this! for (uint32_t i = 0; i < InternalChildCount(); i++) { BrowserAccessibility* child = InternalGetChild(i); - if (child->GetRole() != ui::AX_ROLE_STATIC_TEXT) + if (!child->IsTextOnlyObject()) return false; } return true;
diff --git a/content/browser/accessibility/browser_accessibility_android.h b/content/browser/accessibility/browser_accessibility_android.h index f8d80c1..690954e 100644 --- a/content/browser/accessibility/browser_accessibility_android.h +++ b/content/browser/accessibility/browser_accessibility_android.h
@@ -123,7 +123,7 @@ BrowserAccessibilityAndroid(); - bool HasOnlyStaticTextChildren() const; + bool HasOnlyTextChildren() const; bool HasOnlyTextAndImageChildren() const; bool IsIframe() const;
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc index 6e7bf7a..d2fb4326 100644 --- a/content/browser/accessibility/browser_accessibility_manager.cc +++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -517,9 +517,7 @@ bool BrowserAccessibilityManager::NativeViewHasFocus() { BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager(); - if (delegate) - return delegate->AccessibilityViewHasFocus(); - return false; + return delegate && delegate->AccessibilityViewHasFocus(); } BrowserAccessibility* BrowserAccessibilityManager::GetFocus() { @@ -530,7 +528,7 @@ BrowserAccessibilityManager* focused_manager = nullptr; if (focused_tree_id) - focused_manager =BrowserAccessibilityManager::FromID(focused_tree_id); + focused_manager = BrowserAccessibilityManager::FromID(focused_tree_id); // BrowserAccessibilityManager::FromID(focused_tree_id) may return nullptr // if the tree is not created or has been destroyed. @@ -853,8 +851,7 @@ text += text_only_objects[i]->GetText(); } - const BrowserAccessibility* end_text_object = - text_only_objects[text_only_objects.size() - 1]; + const BrowserAccessibility* end_text_object = text_only_objects.back(); if (end_offset <= static_cast<int>(end_text_object->GetText().length())) { text += end_text_object->GetText().substr(0, end_offset); } else {
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc index 3439caf..777944f 100644 --- a/content/browser/accessibility/browser_accessibility_win.cc +++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -699,7 +699,6 @@ return E_INVALIDARG; *role = ia2_role(); - return S_OK; } @@ -3326,7 +3325,7 @@ return; std::map<int, std::vector<base::string16>> attributes_map; - if (PlatformIsLeaf()) { + if (PlatformIsLeaf() || IsSimpleTextControl()) { attributes_map[0] = ComputeTextAttributes(); std::map<int, std::vector<base::string16>> spelling_attributes = GetSpellingAttributes(); @@ -3338,11 +3337,15 @@ } else { std::vector<base::string16>& existing_attributes = attributes_iterator->second; + + // There might be a spelling attribute already in the list of text + // attributes, originating from "aria-invalid". auto existing_spelling_attribute = std::find(existing_attributes.begin(), existing_attributes.end(), L"invalid:false"); if (existing_spelling_attribute != existing_attributes.end()) existing_attributes.erase(existing_spelling_attribute); + existing_attributes.insert(existing_attributes.end(), spelling_attribute.second.begin(), spelling_attribute.second.end()); @@ -3559,16 +3562,17 @@ } void BrowserAccessibilityWin::UpdateStep2ComputeHypertext() { + if (IsSimpleTextControl()) { + win_attributes_->hypertext = value(); + return; + } + if (!PlatformChildCount()) { - if (IsSimpleTextControl()) { - win_attributes_->hypertext = value(); - } else if (IsRichTextControl()) { + if (IsRichTextControl()) { // We don't want to expose any associated label in IA2 Hypertext. return; - } else { - win_attributes_->hypertext = name(); } - + win_attributes_->hypertext = name(); return; } @@ -3889,13 +3893,6 @@ std::map<int, std::vector<base::string16>> BrowserAccessibilityWin::GetSpellingAttributes() const { std::map<int, std::vector<base::string16>> spelling_attributes; - - // It doesn't make sense to expose spelling error information on anything - // other than a leaf object, because non-leaf objects do not expose text - // directly. - if (!PlatformIsLeaf()) - return spelling_attributes; - if (IsTextOnlyObject()) { const std::vector<int32_t>& marker_types = GetIntListAttribute(ui::AX_ATTR_MARKER_TYPES); @@ -3917,7 +3914,6 @@ spelling_attributes[end_offset] = end_attributes; } } - if (IsSimpleTextControl()) { int start_offset = 0; for (const BrowserAccessibility* static_text = @@ -3936,7 +3932,6 @@ } } } - return spelling_attributes; }
diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc index e10e819..206f29a 100644 --- a/content/browser/accessibility/browser_accessibility_win_unittest.cc +++ b/content/browser/accessibility/browser_accessibility_win_unittest.cc
@@ -340,8 +340,8 @@ ui::AXNodeData text_field; text_field.id = 2; text_field.role = ui::AX_ROLE_TEXT_FIELD; - text_field.state = ui::AX_STATE_EDITABLE; - text_field.AddStringAttribute(ui::AX_ATTR_VALUE, text_value); + text_field.state = 1 << ui::AX_STATE_EDITABLE; + text_field.SetValue(text_value); std::vector<int32_t> line_start_offsets; line_start_offsets.push_back(15); text_field.AddIntListAttribute( @@ -353,15 +353,15 @@ ui::AXNodeData static_text1; static_text1.id = 3; static_text1.role = ui::AX_ROLE_STATIC_TEXT; - static_text1.state = ui::AX_STATE_EDITABLE; - static_text1.AddStringAttribute(ui::AX_ATTR_NAME, line1); + static_text1.state = 1 << ui::AX_STATE_EDITABLE; + static_text1.SetName(line1); static_text1.child_ids.push_back(4); ui::AXNodeData inline_box1; inline_box1.id = 4; inline_box1.role = ui::AX_ROLE_INLINE_TEXT_BOX; - inline_box1.state = ui::AX_STATE_EDITABLE; - inline_box1.AddStringAttribute(ui::AX_ATTR_NAME, line1); + inline_box1.state = 1 << ui::AX_STATE_EDITABLE; + inline_box1.SetName(line1); std::vector<int32_t> word_start_offsets1; word_start_offsets1.push_back(0); word_start_offsets1.push_back(4); @@ -372,21 +372,21 @@ ui::AXNodeData line_break; line_break.id = 5; line_break.role = ui::AX_ROLE_LINE_BREAK; - line_break.state = ui::AX_STATE_EDITABLE; - line_break.AddStringAttribute(ui::AX_ATTR_NAME, "\n"); + line_break.state = 1 << ui::AX_STATE_EDITABLE; + line_break.SetName("\n"); ui::AXNodeData static_text2; static_text2.id = 6; static_text2.role = ui::AX_ROLE_STATIC_TEXT; - static_text2.state = ui::AX_STATE_EDITABLE; - static_text2.AddStringAttribute(ui::AX_ATTR_NAME, line2); + static_text2.state = 1 << ui::AX_STATE_EDITABLE; + static_text2.SetName(line2); static_text2.child_ids.push_back(7); ui::AXNodeData inline_box2; inline_box2.id = 7; inline_box2.role = ui::AX_ROLE_INLINE_TEXT_BOX; - inline_box2.state = ui::AX_STATE_EDITABLE; - inline_box2.AddStringAttribute(ui::AX_ATTR_NAME, line2); + inline_box2.state = 1 << ui::AX_STATE_EDITABLE; + inline_box2.SetName(line2); std::vector<int32_t> word_start_offsets2; word_start_offsets2.push_back(0); word_start_offsets2.push_back(5); @@ -410,7 +410,6 @@ BrowserAccessibilityWin* text_field_obj = ToBrowserAccessibilityWin(root_obj->PlatformGetChild(0)); ASSERT_NE(nullptr, text_field_obj); - ASSERT_EQ(0U, text_field_obj->PlatformChildCount()); long text_len; EXPECT_EQ(S_OK, text_field_obj->get_nCharacters(&text_len)); @@ -2004,7 +2003,7 @@ BrowserAccessibilityWin* ax_combo_box = ToBrowserAccessibilityWin(ax_root->PlatformGetChild(0)); ASSERT_NE(nullptr, ax_combo_box); - ASSERT_EQ(0U, ax_combo_box->PlatformChildCount()); + ASSERT_EQ(1U, ax_combo_box->PlatformChildCount()); HRESULT hr; LONG start_offset, end_offset;
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index 561c2fb0..8eacd0d1 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc
@@ -58,6 +58,7 @@ #include "ui/android/view_android.h" #include "ui/android/window_android.h" #include "ui/base/clipboard/clipboard.h" +#include "ui/base/ui_base_switches_util.h" #include "ui/events/android/motion_event_android.h" #include "ui/events/blink/blink_event_util.h" #include "ui/events/event_utils.h" @@ -838,7 +839,7 @@ void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { layer->RemoveFromParent(); - if (!root_layer_->children().size()) + if (root_layer_->children().empty()) root_layer_->SetIsDrawable(true); } @@ -1476,6 +1477,12 @@ } } +bool ContentViewCoreImpl::IsTouchDragDropEnabled( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& jobj) { + return switches::IsTouchDragDropEnabled(); +} + void ContentViewCoreImpl::OnDragEvent( JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj,
diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h index 0cc3c7e2..a2b8113 100644 --- a/content/browser/android/content_view_core_impl.h +++ b/content/browser/android/content_view_core_impl.h
@@ -282,6 +282,10 @@ void SetBackgroundOpaque(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj, jboolean opaque); + + bool IsTouchDragDropEnabled(JNIEnv* env, + const base::android::JavaParamRef<jobject>& jobj); + void OnDragEvent(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj, jint action,
diff --git a/content/browser/android/synchronous_compositor_host.cc b/content/browser/android/synchronous_compositor_host.cc index 5bd7165..646a60c 100644 --- a/content/browser/android/synchronous_compositor_host.cc +++ b/content/browser/android/synchronous_compositor_host.cc
@@ -66,8 +66,7 @@ bool use_in_proc_software_draw) : rwhva_(rwhva), client_(client), - ui_task_runner_( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)), + ui_task_runner_(BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)), process_id_(rwhva_->GetRenderWidgetHost()->GetProcess()->GetID()), routing_id_(rwhva_->GetRenderWidgetHost()->GetRoutingID()), sender_(rwhva_->GetRenderWidgetHost()),
diff --git a/content/browser/appcache/appcache_internals_ui.cc b/content/browser/appcache/appcache_internals_ui.cc index 0c83ce03..18eb9fc 100644 --- a/content/browser/appcache/appcache_internals_ui.cc +++ b/content/browser/appcache/appcache_internals_ui.cc
@@ -265,7 +265,7 @@ } void AppCacheInternalsUI::Proxy::HandleFileDetailsRequest() { - if (preparing_response_ || !response_enquiries_.size() || !appcache_service_) + if (preparing_response_ || response_enquiries_.empty() || !appcache_service_) return; preparing_response_ = true; appcache_service_->storage()->LoadResponseInfo(
diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc index 11d107ce..a508c5e 100644 --- a/content/browser/appcache/chrome_appcache_service.cc +++ b/content/browser/appcache/chrome_appcache_service.cc
@@ -44,12 +44,10 @@ set_request_context(request_context_getter->GetURLRequestContext()); // Init our base class. - Initialize( - cache_path_, - BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::FILE_USER_BLOCKING) - .get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get()); + Initialize(cache_path_, BrowserThread::GetTaskRunnerForThread( + BrowserThread::FILE_USER_BLOCKING) + .get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE).get()); set_appcache_policy(this); set_special_storage_policy(special_storage_policy.get()); }
diff --git a/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.cc b/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.cc deleted file mode 100644 index 5623d517..0000000 --- a/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.cc +++ /dev/null
@@ -1,146 +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 "content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h" - -#include <stddef.h> - -#include <utility> - -#include "base/threading/thread_task_runner_handle.h" -#include "base/time/time.h" -#include "content/public/browser/browser_thread.h" -#include "device/bluetooth/bluetooth_adapter_factory.h" - -using device::BluetoothAdapter; -using device::BluetoothAdapterFactory; - -namespace { -// TODO(ortuno): Once we have a chooser for scanning and a way to control that -// chooser from tests we should delete this constant. -// https://crbug.com/436280 -enum { kTestingScanDuration = 0 }; // No need to wait when testing. -enum { kScanDuration = 10 }; -} // namespace - -namespace content { - -BluetoothAdapterFactoryWrapper::BluetoothAdapterFactoryWrapper() - : scan_duration_(base::TimeDelta::FromSecondsD(kScanDuration)), - testing_(false), - weak_ptr_factory_(this) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); -} - -BluetoothAdapterFactoryWrapper::~BluetoothAdapterFactoryWrapper() { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - // All observers should have been removed already. - DCHECK(adapter_observers_.empty()); - // Clear adapter. - set_adapter(scoped_refptr<device::BluetoothAdapter>()); -} - -bool BluetoothAdapterFactoryWrapper::IsBluetoothAdapterAvailable() { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - return BluetoothAdapterFactory::IsBluetoothAdapterAvailable() || testing_; -} - -void BluetoothAdapterFactoryWrapper::AcquireAdapter( - device::BluetoothAdapter::Observer* observer, - const AcquireAdapterCallback& callback) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - DCHECK(!GetAdapter(observer)); - - AddAdapterObserver(observer); - if (adapter_.get()) { - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::Bind(callback, base::Unretained(adapter_.get()))); - return; - } - - DCHECK(BluetoothAdapterFactory::IsBluetoothAdapterAvailable()); - BluetoothAdapterFactory::GetAdapter( - base::Bind(&BluetoothAdapterFactoryWrapper::OnGetAdapter, - weak_ptr_factory_.GetWeakPtr(), callback)); -} - -void BluetoothAdapterFactoryWrapper::ReleaseAdapter( - device::BluetoothAdapter::Observer* observer) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - if (!HasAdapter(observer)) { - return; - } - RemoveAdapterObserver(observer); - if (adapter_observers_.empty()) - set_adapter(scoped_refptr<device::BluetoothAdapter>()); -} - -BluetoothAdapter* BluetoothAdapterFactoryWrapper::GetAdapter( - device::BluetoothAdapter::Observer* observer) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - if (HasAdapter(observer)) { - return adapter_.get(); - } - return nullptr; -} - -void BluetoothAdapterFactoryWrapper::SetBluetoothAdapterForTesting( - scoped_refptr<device::BluetoothAdapter> mock_adapter) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - scan_duration_ = base::TimeDelta::FromSecondsD(kTestingScanDuration); - testing_ = true; - set_adapter(std::move(mock_adapter)); -} - -void BluetoothAdapterFactoryWrapper::OnGetAdapter( - const AcquireAdapterCallback& continuation, - scoped_refptr<device::BluetoothAdapter> adapter) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - set_adapter(adapter); - continuation.Run(adapter_.get()); -} - -bool BluetoothAdapterFactoryWrapper::HasAdapter( - device::BluetoothAdapter::Observer* observer) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - return ContainsKey(adapter_observers_, observer); -} - -void BluetoothAdapterFactoryWrapper::AddAdapterObserver( - device::BluetoothAdapter::Observer* observer) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - auto iter = adapter_observers_.insert(observer); - DCHECK(iter.second); - if (adapter_) { - adapter_->AddObserver(observer); - } -} - -void BluetoothAdapterFactoryWrapper::RemoveAdapterObserver( - device::BluetoothAdapter::Observer* observer) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - size_t removed = adapter_observers_.erase(observer); - DCHECK(removed); - if (adapter_) { - adapter_->RemoveObserver(observer); - } -} - -void BluetoothAdapterFactoryWrapper::set_adapter( - scoped_refptr<device::BluetoothAdapter> adapter) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - if (adapter_.get()) { - for (device::BluetoothAdapter::Observer* observer : adapter_observers_) { - adapter_->RemoveObserver(observer); - } - } - adapter_ = adapter; - if (adapter_.get()) { - for (device::BluetoothAdapter::Observer* observer : adapter_observers_) { - adapter_->AddObserver(observer); - } - } -} - -} // namespace content
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc index 34bf2d49..4214b01 100644 --- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc +++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -28,10 +28,16 @@ namespace content { +bool BluetoothDeviceChooserController::use_test_scan_duration_ = false; + namespace { constexpr size_t kMaxLengthForDeviceName = 29; // max length of device name in filter. +// The duration of a Bluetooth Scan in seconds. +constexpr int kScanDuration = 10; +constexpr int kTestScanDuration = 0; + void LogRequestDeviceOptions( const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options) { VLOG(1) << "requestDevice called with the following filters: "; @@ -181,8 +187,7 @@ BluetoothDeviceChooserController::BluetoothDeviceChooserController( WebBluetoothServiceImpl* web_bluetooth_service, RenderFrameHost* render_frame_host, - device::BluetoothAdapter* adapter, - base::TimeDelta scan_duration) + device::BluetoothAdapter* adapter) : adapter_(adapter), web_bluetooth_service_(web_bluetooth_service), render_frame_host_(render_frame_host), @@ -191,7 +196,8 @@ FROM_HERE, // TODO(jyasskin): Add a way for tests to control the dialog // directly, and change this to a reasonable discovery timeout. - scan_duration, + base::TimeDelta::FromSeconds( + use_test_scan_duration_ ? kTestScanDuration : kScanDuration), base::Bind(&BluetoothDeviceChooserController::StopDeviceDiscovery, // base::Timer guarantees it won't call back after its // destructor starts. @@ -356,6 +362,10 @@ } } +void BluetoothDeviceChooserController::SetTestScanDurationForTesting() { + BluetoothDeviceChooserController::use_test_scan_duration_ = true; +} + void BluetoothDeviceChooserController::PopulateFoundDevices() { VLOG(1) << "Populating " << adapter_->GetDevices().size() << " devices in chooser.";
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.h b/content/browser/bluetooth/bluetooth_device_chooser_controller.h index dfa8724..5d81fd25 100644 --- a/content/browser/bluetooth/bluetooth_device_chooser_controller.h +++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.h
@@ -10,6 +10,7 @@ #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "content/common/content_export.h" #include "content/public/browser/bluetooth_chooser.h" #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom.h" @@ -29,7 +30,7 @@ // Class that interacts with a chooser and starts a bluetooth discovery session. // This class needs to be re-instantiated for each call to GetDevice(). Calling // GetDevice() twice for the same instance will DCHECK. -class BluetoothDeviceChooserController final { +class CONTENT_EXPORT BluetoothDeviceChooserController final { public: typedef base::Callback<void(blink::mojom::WebBluetoothRequestDeviceOptionsPtr, const std::string& device_address)> @@ -41,12 +42,10 @@ // |render_frame_host| should be the RenderFrameHost that owns the // |web_bluetooth_service_|. // |adapter| should be the adapter used to scan for Bluetooth devices. - // |scan_duration| is how long will a discovery session be active. BluetoothDeviceChooserController( WebBluetoothServiceImpl* web_bluetooth_service_, RenderFrameHost* render_frame_host, - device::BluetoothAdapter* adapter, - base::TimeDelta scan_duration); + device::BluetoothAdapter* adapter); ~BluetoothDeviceChooserController(); // This function performs the following checks before starting a discovery @@ -79,6 +78,10 @@ // that the adapter changed states. void AdapterPoweredChanged(bool powered); + // After this method is called any new instance of + // BluetoothDeviceChooserController will have a scan duration of 0. + static void SetTestScanDurationForTesting(); + private: // Populates the chooser with the devices that are already in the adapter. void PopulateFoundDevices(); @@ -107,6 +110,9 @@ // Helper function to asynchronously run error_callback_. void PostErrorCallback(blink::mojom::WebBluetoothError error); + // If true all new instances of this class will have a scan duration of 0. + static bool use_test_scan_duration_; + // The adapter used to get existing devices and start a discovery session. device::BluetoothAdapter* adapter_; // The WebBluetoothServiceImpl that owns this instance.
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc index b4ee20f..355e344 100644 --- a/content/browser/bluetooth/web_bluetooth_service_impl.cc +++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -15,7 +15,6 @@ #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" -#include "content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h" #include "content/browser/bluetooth/bluetooth_blacklist.h" #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" #include "content/browser/bluetooth/bluetooth_metrics.h" @@ -25,8 +24,10 @@ #include "content/public/browser/navigation_handle.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" +#include "device/bluetooth/bluetooth_adapter_factory_wrapper.h" #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" +using device::BluetoothAdapterFactoryWrapper; using device::BluetoothUUID; namespace content { @@ -314,8 +315,8 @@ RecordRequestDeviceOptions(options); if (!GetAdapter()) { - if (GetBluetoothAdapterFactoryWrapper()->IsBluetoothAdapterAvailable()) { - GetBluetoothAdapterFactoryWrapper()->AcquireAdapter( + if (BluetoothAdapterFactoryWrapper::Get().IsBluetoothAdapterAvailable()) { + BluetoothAdapterFactoryWrapper::Get().AcquireAdapter( this, base::Bind(&WebBluetoothServiceImpl::RequestDeviceImpl, weak_ptr_factory_.GetWeakPtr(), base::Passed(std::move(options)), callback)); @@ -678,9 +679,8 @@ // they can't conflict. device_chooser_controller_.reset(); - device_chooser_controller_.reset(new BluetoothDeviceChooserController( - this, render_frame_host_, adapter, - GetBluetoothAdapterFactoryWrapper()->GetScanDuration())); + device_chooser_controller_.reset( + new BluetoothDeviceChooserController(this, render_frame_host_, adapter)); device_chooser_controller_->GetDevice( std::move(options), @@ -970,15 +970,8 @@ return render_frame_host_->GetProcess(); } -BluetoothAdapterFactoryWrapper* -WebBluetoothServiceImpl::GetBluetoothAdapterFactoryWrapper() { - RenderProcessHostImpl* render_process_host_impl = - static_cast<RenderProcessHostImpl*>(GetRenderProcessHost()); - return render_process_host_impl->GetBluetoothAdapterFactoryWrapper(); -} - device::BluetoothAdapter* WebBluetoothServiceImpl::GetAdapter() { - return GetBluetoothAdapterFactoryWrapper()->GetAdapter(this); + return BluetoothAdapterFactoryWrapper::Get().GetAdapter(this); } void WebBluetoothServiceImpl::CrashRendererAndClosePipe( @@ -1000,7 +993,7 @@ new FrameConnectedBluetoothDevices(render_frame_host_)); allowed_devices_map_ = BluetoothAllowedDevicesMap(); device_chooser_controller_.reset(); - GetBluetoothAdapterFactoryWrapper()->ReleaseAdapter(this); + BluetoothAdapterFactoryWrapper::Get().ReleaseAdapter(this); } } // namespace content
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h index 4c07543..952d89d 100644 --- a/content/browser/bluetooth/web_bluetooth_service_impl.h +++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -31,7 +31,6 @@ namespace content { class BluetoothDeviceChooserController; -class BluetoothAdapterFactoryWrapper; class FrameConnectedBluetoothDevices; class RenderFrameHost; class RenderProcessHost; @@ -208,7 +207,6 @@ const std::string& characteristic_instance_id); RenderProcessHost* GetRenderProcessHost(); - BluetoothAdapterFactoryWrapper* GetBluetoothAdapterFactoryWrapper(); device::BluetoothAdapter* GetAdapter(); url::Origin GetOrigin();
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc index 4ce6485..729df89 100644 --- a/content/browser/browser_context.cc +++ b/content/browser/browser_context.cc
@@ -152,7 +152,9 @@ std::unique_ptr<shell::Connection> connection, shell::mojom::ServiceRequest request) : root_connection_(std::move(connection)), - shell_connection_(MojoShellConnection::Create(std::move(request))) {} + shell_connection_(MojoShellConnection::Create( + std::move(request), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))) {} ~BrowserContextShellConnectionHolder() override {} MojoShellConnection* shell_connection() { return shell_connection_.get(); } @@ -433,16 +435,17 @@ browser_context->SetUserData(kMojoShellConnection, connection_holder); MojoShellConnection* connection = connection_holder->shell_connection(); + connection->Start(); // New embedded service factories should be added to |connection| here. if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMojoLocalStorage)) { MojoApplicationInfo info; - info.application_factory = base::Bind( - &user_service::CreateUserService, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)); + info.application_factory = + base::Bind(&user_service::CreateUserService, + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB)); connection->AddEmbeddedService(user_service::kUserServiceName, info); } }
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 94ee2c3..910422da 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -278,8 +278,8 @@ void WaitForMojoShellInitialize() { // TODO(rockot): Remove this. http://crbug.com/594852. base::RunLoop wait_loop; - MojoShellConnection::GetForProcess()->GetShellConnection()-> - set_initialize_handler(wait_loop.QuitClosure()); + MojoShellConnection::GetForProcess()->SetInitializeHandler( + wait_loop.QuitClosure()); wait_loop.Run(); } #endif // defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) @@ -582,7 +582,7 @@ { base::SetRecordActionTaskRunner( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)); } #if defined(OS_WIN) @@ -1106,7 +1106,7 @@ } // Must happen after the IO thread is shutdown since this may be accessed from // it. - { + if (!shell::ShellIsRemote()) { TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GPUChannelFactory"); if (BrowserGpuChannelHostFactory::instance()) BrowserGpuChannelHostFactory::Terminate(); @@ -1175,8 +1175,11 @@ #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) // TODO(rockot): Remove the blocking wait for init. // http://crbug.com/594852. - if (shell::ShellIsRemote() && MojoShellConnection::GetForProcess()) + if (shell::ShellIsRemote() && MojoShellConnection::GetForProcess()) { + base::CommandLine::ForCurrentProcess()->AppendSwitch( + switches::kIsRunningInMash); WaitForMojoShellInitialize(); + } #endif #if defined(OS_MACOSX) @@ -1209,7 +1212,8 @@ #elif defined(USE_AURA) || defined(OS_MACOSX) established_gpu_channel = true; if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() || - parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) { + parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit) || + shell::ShellIsRemote()) { established_gpu_channel = always_uses_gpu = false; } BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); @@ -1316,9 +1320,8 @@ // since creating the GPU thread races against creation of the one-and-only // ChildProcess instance which is created by the renderer thread. if (GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL) && - !established_gpu_channel && - always_uses_gpu && - !UsingInProcessGpu()) { + !established_gpu_channel && always_uses_gpu && !UsingInProcessGpu() && + !shell::ShellIsRemote()) { TRACE_EVENT_INSTANT0("gpu", "Post task to launch GPU process", TRACE_EVENT_SCOPE_THREAD); BrowserThread::PostTask(
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc index 669a293..9a67701 100644 --- a/content/browser/browser_thread_impl.cc +++ b/content/browser/browser_thread_impl.cc
@@ -493,9 +493,8 @@ const tracked_objects::Location& from_here, const base::Closure& task, const base::Closure& reply) { - return GetMessageLoopProxyForThread(identifier)->PostTaskAndReply(from_here, - task, - reply); + return GetTaskRunnerForThread(identifier) + ->PostTaskAndReply(from_here, task, reply); } // static @@ -523,7 +522,7 @@ // static scoped_refptr<base::SingleThreadTaskRunner> -BrowserThread::GetMessageLoopProxyForThread(ID identifier) { +BrowserThread::GetTaskRunnerForThread(ID identifier) { return g_task_runners.Get().proxies[identifier]; }
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc index bef2c9f..f3f3795 100644 --- a/content/browser/browser_thread_unittest.cc +++ b/content/browser/browser_thread_unittest.cc
@@ -95,7 +95,7 @@ TEST_F(BrowserThreadTest, PostTaskViaTaskRunner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); task_runner->PostTask( FROM_HERE, base::Bind(&BasicFunction, base::MessageLoop::current())); base::RunLoop().Run(); @@ -103,7 +103,7 @@ TEST_F(BrowserThreadTest, ReleaseViaTaskRunner) { scoped_refptr<base::SingleThreadTaskRunner> task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); task_runner->ReleaseSoon(FROM_HERE, this); base::RunLoop().Run(); }
diff --git a/content/browser/byte_stream.h b/content/browser/byte_stream.h index 1a86c723..91152df 100644 --- a/content/browser/byte_stream.h +++ b/content/browser/byte_stream.h
@@ -66,8 +66,8 @@ // std::unique_ptr<ByteStreamWriter> writer; // std::unique_ptr<ByteStreamReader> reader; // CreateByteStream( -// BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), -// BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), +// BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), +// BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), // kStreamBufferSize /* e.g. 10240. */, // &writer, // &reader); // Presumed passed to FILE thread for reading.
diff --git a/content/browser/cache_storage/cache_storage_cache.cc b/content/browser/cache_storage/cache_storage_cache.cc index 5a9bb3db..fe333c0 100644 --- a/content/browser/cache_storage/cache_storage_cache.cc +++ b/content/browser/cache_storage/cache_storage_cache.cc
@@ -1414,8 +1414,8 @@ int rv = disk_cache::CreateCacheBackend( cache_type, net::CACHE_BACKEND_SIMPLE, path_, kMaxCacheBytes, false, /* force */ - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get(), - NULL, backend, create_cache_callback); + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE).get(), NULL, + backend, create_cache_callback); if (rv != net::ERR_IO_PENDING) create_cache_callback.Run(rv); }
diff --git a/content/browser/compositor/DEPS b/content/browser/compositor/DEPS index e6444fc..e96fc1b 100644 --- a/content/browser/compositor/DEPS +++ b/content/browser/compositor/DEPS
@@ -1,5 +1,7 @@ include_rules = [ "+components/bitmap_uploader", "+components/display_compositor", + "+services/ui/common", "+ui/platform_window", + "+ui/views", ]
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc index 124b04b2..eb8a142 100644 --- a/content/browser/compositor/gpu_process_transport_factory.cc +++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -60,7 +60,10 @@ #include "ui/gfx/geometry/size.h" #if defined(MOJO_RUNNER_CLIENT) +#include "content/browser/compositor/mus_browser_compositor_output_surface.h" +#include "content/public/common/mojo_shell_connection.h" #include "services/shell/runner/common/client_util.h" +#include "services/ui/common/gpu_service.h" #endif #if defined(OS_WIN) @@ -101,9 +104,18 @@ const int kNumRetriesBeforeSoftwareFallback = 4; +bool IsUsingMus() { +#if defined(MOJO_RUNNER_CLIENT) + return shell::ShellIsRemote(); +#else + return false; +#endif +} + scoped_refptr<content::ContextProviderCommandBuffer> CreateContextCommon( scoped_refptr<gpu::GpuChannelHost> gpu_channel_host, gpu::SurfaceHandle surface_handle, + bool need_alpha_channel, bool support_locking, content::ContextProviderCommandBuffer* shared_context_provider, content::command_buffer_metrics::ContextType type) { @@ -115,7 +127,7 @@ // - The shared main thread context (offscreen). // - The compositor context, which is used by the browser compositor // (offscreen) for synchronization mostly, and by the display compositor - // (onscreen) for actual GL drawing. + // (onscreen, except for with mus) for actual GL drawing. // - The compositor worker context (offscreen) used for GPU raster. // So ask for capabilities needed by any of these cases (we can optimize by // branching on |surface_handle| being null if these needs diverge). @@ -123,14 +135,18 @@ // The default framebuffer for an offscreen context is not used, so it does // not need alpha, stencil, depth, antialiasing. The display compositor does // not use these things either, so we can request nothing here. + // The display compositor does not use these things either (except for alpha + // when using mus for non-opaque ui that overlaps the system's window + // borders), so we can request only that when needed. gpu::gles2::ContextCreationAttribHelper attributes; - attributes.alpha_size = -1; + attributes.alpha_size = need_alpha_channel ? 8 : -1; attributes.depth_size = 0; attributes.stencil_size = 0; attributes.samples = 0; attributes.sample_buffers = 0; attributes.bind_generates_resource = false; attributes.lose_context_when_out_of_memory = true; + attributes.buffer_preserved = false; constexpr bool automatic_flushes = false; @@ -254,11 +270,8 @@ static bool ShouldCreateGpuOutputSurface(ui::Compositor* compositor) { #if defined(MOJO_RUNNER_CLIENT) - // Chrome running as a mojo app currently can only use software compositing. - // TODO(rjkroege): http://crbug.com/548451 - if (shell::ShellIsRemote()) { + if (shell::ShellIsRemote() && !ui::GpuService::UseChromeGpuCommandBuffer()) return false; - } #endif #if defined(OS_CHROMEOS) @@ -294,15 +307,24 @@ #endif const bool use_vulkan = static_cast<bool>(SharedVulkanContextProvider()); - + const bool use_mus = IsUsingMus(); const bool create_gpu_output_surface = ShouldCreateGpuOutputSurface(compositor.get()); if (create_gpu_output_surface && !use_vulkan) { - BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel( - CAUSE_FOR_GPU_LAUNCH_SHARED_WORKER_THREAD_CONTEXT, + base::Closure callback( base::Bind(&GpuProcessTransportFactory::EstablishedGpuChannel, callback_factory_.GetWeakPtr(), compositor, create_gpu_output_surface, 0)); + if (!use_mus) { + BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel( + CAUSE_FOR_GPU_LAUNCH_SHARED_WORKER_THREAD_CONTEXT, callback); + } else { +#if defined(MOJO_RUNNER_CLIENT) + ui::GpuService::GetInstance()->EstablishGpuChannel(callback); +#else + NOTREACHED(); +#endif + } } else { EstablishedGpuChannel(compositor, create_gpu_output_surface, 0); } @@ -339,7 +361,7 @@ scoped_refptr<cc::VulkanInProcessContextProvider> vulkan_context_provider = SharedVulkanContextProvider(); - + const bool use_mus = IsUsingMus(); scoped_refptr<ContextProviderCommandBuffer> context_provider; if (create_gpu_output_surface && !vulkan_context_provider) { // Try to reuse existing worker context provider. @@ -360,18 +382,28 @@ if (GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) { // We attempted to do EstablishGpuChannel already, so we just use // GetGpuChannel() instead of EstablishGpuChannelSync(). - gpu_channel_host = - BrowserGpuChannelHostFactory::instance()->GetGpuChannel(); + if (!use_mus) { + gpu_channel_host = + BrowserGpuChannelHostFactory::instance()->GetGpuChannel(); + } else { +#if defined(MOJO_RUNNER_CLIENT) + gpu_channel_host = ui::GpuService::GetInstance()->GetGpuChannel(); +#else + NOTREACHED(); +#endif + } } if (!gpu_channel_host) { shared_worker_context_provider_ = nullptr; } else { if (!shared_worker_context_provider_) { + bool need_alpha_channel = false; const bool support_locking = true; - shared_worker_context_provider_ = CreateContextCommon( - gpu_channel_host, gpu::kNullSurfaceHandle, support_locking, nullptr, - command_buffer_metrics::BROWSER_WORKER_CONTEXT); + shared_worker_context_provider_ = + CreateContextCommon(gpu_channel_host, gpu::kNullSurfaceHandle, + need_alpha_channel, support_locking, nullptr, + command_buffer_metrics::BROWSER_WORKER_CONTEXT); // TODO(vadimt): Remove ScopedTracker below once crbug.com/125248 is // fixed. Tracking time in BindToCurrentThread. tracked_objects::ScopedTracker tracking_profile( @@ -387,10 +419,17 @@ // display compositor. It shares resources with the worker context, so if // we failed to make a worker context, just start over and try again. if (shared_worker_context_provider_) { + // For mus, we create an offscreen context for a mus window, and we will + // use CommandBufferProxyImpl::TakeFrontBuffer() to take the context's + // front buffer into a mailbox, insert a sync token, and send the + // mailbox+sync to the ui service process. + gpu::SurfaceHandle surface_handle = + IsUsingMus() ? gpu::kNullSurfaceHandle : data->surface_handle; + bool need_alpha_channel = IsUsingMus(); bool support_locking = false; context_provider = CreateContextCommon( - std::move(gpu_channel_host), data->surface_handle, support_locking, - shared_worker_context_provider_.get(), + std::move(gpu_channel_host), surface_handle, need_alpha_channel, + support_locking, shared_worker_context_provider_.get(), command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); // TODO(vadimt): Remove ScopedTracker below once crbug.com/125248 is // fixed. Tracking time in BindToCurrentThread. @@ -418,11 +457,20 @@ if (!created_gpu_browser_compositor) { // Try again. - BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel( - CAUSE_FOR_GPU_LAUNCH_SHARED_WORKER_THREAD_CONTEXT, + base::Closure callback( base::Bind(&GpuProcessTransportFactory::EstablishedGpuChannel, callback_factory_.GetWeakPtr(), compositor, create_gpu_output_surface, num_attempts + 1)); + if (!use_mus) { + BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel( + CAUSE_FOR_GPU_LAUNCH_SHARED_WORKER_THREAD_CONTEXT, callback); + } else { +#if defined(MOJO_RUNNER_CLIENT) + ui::GpuService::GetInstance()->EstablishGpuChannel(callback); +#else + NOTREACHED(); +#endif + } return; } } @@ -491,12 +539,25 @@ validator; #if !defined(OS_MACOSX) // Overlays are only supported on surfaceless output surfaces on Mac. - validator = CreateOverlayCandidateValidator(compositor->widget()); + if (!use_mus) + validator = CreateOverlayCandidateValidator(compositor->widget()); #endif - display_output_surface = - base::WrapUnique(new GpuBrowserCompositorOutputSurface( - context_provider, compositor->vsync_manager(), - begin_frame_source.get(), std::move(validator))); + if (!use_mus) { + display_output_surface = + base::WrapUnique(new GpuBrowserCompositorOutputSurface( + context_provider, compositor->vsync_manager(), + begin_frame_source.get(), std::move(validator))); + } else { +#if defined(MOJO_RUNNER_CLIENT) + display_output_surface = + base::WrapUnique(new MusBrowserCompositorOutputSurface( + data->surface_handle, context_provider, + compositor->vsync_manager(), begin_frame_source.get(), + std::move(validator))); +#else + NOTREACHED(); +#endif + } } } } @@ -732,18 +793,32 @@ if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) return nullptr; - scoped_refptr<gpu::GpuChannelHost> gpu_channel_host( - BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync( - CAUSE_FOR_GPU_LAUNCH_BROWSER_SHARED_MAIN_THREAD_CONTEXT)); + + const bool use_mus = IsUsingMus(); + scoped_refptr<gpu::GpuChannelHost> gpu_channel_host; + if (!use_mus) { + gpu_channel_host = + BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync( + CAUSE_FOR_GPU_LAUNCH_BROWSER_SHARED_MAIN_THREAD_CONTEXT); + } else { +#if defined(MOJO_RUNNER_CLIENT) + gpu_channel_host = ui::GpuService::GetInstance()->EstablishGpuChannelSync(); +#else + NOTREACHED(); +#endif + } + if (!gpu_channel_host) return nullptr; // We need a separate context from the compositor's so that skia and gl_helper // don't step on each other. + bool need_alpha_channel = false; bool support_locking = false; shared_main_thread_contexts_ = CreateContextCommon( - std::move(gpu_channel_host), gpu::kNullSurfaceHandle, support_locking, - nullptr, command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); + std::move(gpu_channel_host), gpu::kNullSurfaceHandle, need_alpha_channel, + support_locking, nullptr, + command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); shared_main_thread_contexts_->SetLostContextCallback(base::Bind( &GpuProcessTransportFactory::OnLostMainThreadSharedContextInsideCallback, callback_factory_.GetWeakPtr()));
diff --git a/content/browser/compositor/mus_browser_compositor_output_surface.cc b/content/browser/compositor/mus_browser_compositor_output_surface.cc new file mode 100644 index 0000000..0cd81f2c --- /dev/null +++ b/content/browser/compositor/mus_browser_compositor_output_surface.cc
@@ -0,0 +1,173 @@ +// 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 "content/browser/compositor/mus_browser_compositor_output_surface.h" + +#include <utility> + +#include "cc/output/compositor_frame.h" +#include "cc/quads/render_pass.h" +#include "cc/quads/texture_draw_quad.h" +#include "components/display_compositor/compositor_overlay_candidate_validator.h" +#include "content/common/gpu/client/context_provider_command_buffer.h" +#include "gpu/command_buffer/client/gles2_interface.h" +#include "gpu/ipc/client/command_buffer_proxy_impl.h" +#include "services/ui/common/gpu_service.h" +#include "services/ui/public/cpp/window.h" +#include "services/ui/public/cpp/window_surface.h" +#include "ui/views/mus/native_widget_mus.h" +#include "ui/views/mus/window_tree_host_mus.h" + +namespace content { + +MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface( + gpu::SurfaceHandle surface_handle, + scoped_refptr<ContextProviderCommandBuffer> context, + scoped_refptr<ui::CompositorVSyncManager> vsync_manager, + cc::SyntheticBeginFrameSource* begin_frame_source, + std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> + overlay_candidate_validator) + : GpuBrowserCompositorOutputSurface(std::move(context), + std::move(vsync_manager), + begin_frame_source, + std::move(overlay_candidate_validator)), + ui_window_(nullptr) { + DCHECK(ui::GpuService::UseChromeGpuCommandBuffer()); + views::WindowTreeHostMus* window_tree_host = + static_cast<views::WindowTreeHostMus*>( + aura::WindowTreeHost::GetForAcceleratedWidget(surface_handle)); + ui_window_ = window_tree_host->native_widget()->window(); + ui_window_surface_ = + ui_window_->RequestSurface(ui::mojom::SurfaceType::DEFAULT); +} + +MusBrowserCompositorOutputSurface::~MusBrowserCompositorOutputSurface() {} + +void MusBrowserCompositorOutputSurface::SwapBuffers(cc::CompositorFrame frame) { + const gfx::Rect bounds(ui_window_->bounds().size()); + cc::CompositorFrame ui_frame; + ui_frame.metadata = std::move(frame.metadata); + ui_frame.delegated_frame_data = base::MakeUnique<cc::DelegatedFrameData>(); + const cc::RenderPassId render_pass_id(1, 1); + std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); + const bool has_transparent_background = true; + pass->SetAll(render_pass_id, bounds, bounds, gfx::Transform(), + has_transparent_background); + // The SharedQuadState is owned by the SharedQuadStateList + // shared_quad_state_list. + cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState(); + sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, + false /* is_clipped */, 1.f /* opacity */, SkXfermode::kSrc_Mode, + 0 /* sorting_context_id */); + + cc::TransferableResource resource; + resource.id = AllocateResourceId(); + resource.format = cc::ResourceFormat::RGBA_8888; + resource.filter = GL_LINEAR; + resource.size = frame.gl_frame_data->size; + + const gpu::Mailbox& mailbox = GetMailboxFromResourceId(resource.id); + DCHECK(!mailbox.IsZero()); + const gfx::Rect rect(frame.gl_frame_data->size); + + // Call parent's SwapBuffers to generate the front buffer, and then send the + // front buffer to mus. + // TODO(penghuang): we should avoid extra copies here by sending frames to mus + // directly from renderer. + GpuBrowserCompositorOutputSurface::SwapBuffers(std::move(frame)); + GetCommandBufferProxy()->TakeFrontBuffer(mailbox); + + auto* gl = context_provider()->ContextGL(); + const GLuint64 fence_sync = gl->InsertFenceSyncCHROMIUM(); + gl->ShallowFlushCHROMIUM(); + gpu::SyncToken sync_token; + gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); + + resource.mailbox_holder = + gpu::MailboxHolder(mailbox, sync_token, GL_TEXTURE_2D); + resource.read_lock_fences_enabled = false; + resource.is_software = false; + resource.is_overlay_candidate = false; + ui_frame.delegated_frame_data->resource_list.push_back(std::move(resource)); + + const bool needs_blending = true; + const bool premultiplied_alpha = true; + const gfx::PointF uv_top_left(0.f, 0.f); + const gfx::PointF uv_bottom_right(1.f, 1.f); + const uint32_t background_color = 0x00000000; + const float vertex_opacity[4] = {1.f, 1.f, 1.f, 1.f}; + const bool y_flipped = true; + const bool nearest_neighbor = false; + const bool secure_output_only = false; + + cc::TextureDrawQuad* quad = + pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>(); + quad->SetAll(sqs, rect, rect, rect, needs_blending, resource.id, gfx::Size(), + premultiplied_alpha, uv_top_left, uv_bottom_right, + background_color, vertex_opacity, y_flipped, nearest_neighbor, + secure_output_only); + + ui_frame.delegated_frame_data->render_pass_list.push_back(std::move(pass)); + // ui_frame_surface_ will be destroyed by MusBrowserCompositorOutputSurface's + // destructor, and the callback of SubmitCompositorFrame() will not be fired + // after ui_window_surface_ is destroyed, so it is safe to use + // base::Unretained(this) here. + ui_window_surface_->SubmitCompositorFrame( + std::move(ui_frame), + base::Bind(&MusBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted, + base::Unretained(this), std::vector<ui::LatencyInfo>(), + gfx::SwapResult::SWAP_ACK, nullptr)); + return; +} + +bool MusBrowserCompositorOutputSurface::BindToClient( + cc::OutputSurfaceClient* client) { + if (!GpuBrowserCompositorOutputSurface::BindToClient(client)) + return false; + ui_window_surface_->BindToThread(); + ui_window_surface_->set_client(this); + return true; +} + +void MusBrowserCompositorOutputSurface::OnResourcesReturned( + ui::WindowSurface* surface, + mojo::Array<cc::ReturnedResource> resources) { + for (const auto& resource : resources) { + DCHECK_EQ(1, resource.count); + const gpu::Mailbox& mailbox = GetMailboxFromResourceId(resource.id); + GetCommandBufferProxy()->ReturnFrontBuffer(mailbox, resource.sync_token, + resource.lost); + FreeResourceId(resource.id); + } +} + +uint32_t MusBrowserCompositorOutputSurface::AllocateResourceId() { + if (!free_resource_ids_.empty()) { + uint32_t id = free_resource_ids_.back(); + free_resource_ids_.pop_back(); + return id; + } + // If there is no free resource id, we generate a new mailbox in the mailbox + // vector, and the index of the new mailbox is the new allocated resource id. + uint32_t id = mailboxes_.size(); + mailboxes_.push_back(gpu::Mailbox::Generate()); + return id; +} + +void MusBrowserCompositorOutputSurface::FreeResourceId(uint32_t id) { + DCHECK_LT(id, mailboxes_.size()); + DCHECK(std::find(free_resource_ids_.begin(), free_resource_ids_.end(), id) == + free_resource_ids_.end()); + free_resource_ids_.push_back(id); +} + +const gpu::Mailbox& MusBrowserCompositorOutputSurface::GetMailboxFromResourceId( + uint32_t id) { + DCHECK_LT(id, mailboxes_.size()); + DCHECK(std::find(free_resource_ids_.begin(), free_resource_ids_.end(), id) == + free_resource_ids_.end()); + return mailboxes_[id]; +} + +} // namespace content
diff --git a/content/browser/compositor/mus_browser_compositor_output_surface.h b/content/browser/compositor/mus_browser_compositor_output_surface.h new file mode 100644 index 0000000..c1f9d26 --- /dev/null +++ b/content/browser/compositor/mus_browser_compositor_output_surface.h
@@ -0,0 +1,66 @@ +// 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 CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ +#define CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ + +#include <memory> +#include <vector> + +#include "base/macros.h" +#include "content/browser/compositor/gpu_browser_compositor_output_surface.h" +#include "gpu/command_buffer/common/mailbox.h" +#include "gpu/ipc/common/surface_handle.h" +#include "services/ui/public/cpp/window_surface_client.h" + +namespace ui { +class Window; +class WindowSurface; +} + +namespace content { + +// Adapts a WebGraphicsContext3DCommandBufferImpl into a +// cc::OutputSurface that also handles vsync parameter updates +// arriving from the GPU process. +class MusBrowserCompositorOutputSurface + : public GpuBrowserCompositorOutputSurface, + public ui::WindowSurfaceClient { + public: + MusBrowserCompositorOutputSurface( + gpu::SurfaceHandle surface_handle, + scoped_refptr<ContextProviderCommandBuffer> context, + scoped_refptr<ui::CompositorVSyncManager> vsync_manager, + cc::SyntheticBeginFrameSource* begin_frame_source, + std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> + overlay_candidate_validator); + + ~MusBrowserCompositorOutputSurface() override; + + protected: + // cc::OutputSurface implementation. + void SwapBuffers(cc::CompositorFrame frame) override; + bool BindToClient(cc::OutputSurfaceClient* client) override; + + // ui::WindowSurfaceClient: + void OnResourcesReturned( + ui::WindowSurface* surface, + mojo::Array<cc::ReturnedResource> resources) override; + + private: + uint32_t AllocateResourceId(); + void FreeResourceId(uint32_t id); + const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id); + + ui::Window* ui_window_; + std::unique_ptr<ui::WindowSurface> ui_window_surface_; + std::vector<uint32_t> free_resource_ids_; + std::vector<gpu::Mailbox> mailboxes_; + + DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface); +}; + +} // namespace content + +#endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
diff --git a/content/browser/devtools/devtools_io_context.cc b/content/browser/devtools/devtools_io_context.cc index 74f062b..4b2778b2 100644 --- a/content/browser/devtools/devtools_io_context.cc +++ b/content/browser/devtools/devtools_io_context.cc
@@ -22,7 +22,7 @@ Stream::Stream() : base::RefCountedDeleteOnMessageLoop<Stream>( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), handle_(base::UintToString(++s_last_stream_handle)), had_errors_(false), last_read_pos_(0) {}
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc index 6646dcdb..a22158bb 100644 --- a/content/browser/devtools/render_frame_devtools_agent_host.cc +++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -503,8 +503,8 @@ power_save_blocker_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, device::PowerSaveBlocker::kReasonOther, "DevTools", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); if (web_contents()->GetNativeView()) { view_weak_factory_.reset(new base::WeakPtrFactory<ui::ViewAndroid>( web_contents()->GetNativeView()));
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc index bd44972..6c1cef29 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc
@@ -283,8 +283,7 @@ worker_pool, worker_pool->GetNamedSequenceToken("dom_storage_primary"), worker_pool->GetNamedSequenceToken("dom_storage_commit"), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO) - .get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get())); memory_pressure_listener_.reset(new base::MemoryPressureListener( base::Bind(&DOMStorageContextWrapper::OnMemoryPressure, this)));
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc index ab09c1d..d9da7e8f 100644 --- a/content/browser/download/download_browsertest.cc +++ b/content/browser/download/download_browsertest.cc
@@ -259,8 +259,8 @@ std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, device::PowerSaveBlocker::kReasonOther, "Download in progress", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); return new DownloadFileWithDelay(std::move(save_info), default_download_directory, std::move(stream), @@ -358,8 +358,8 @@ std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, device::PowerSaveBlocker::kReasonOther, "Download in progress", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); return new CountingDownloadFile(std::move(save_info), default_downloads_directory, std::move(stream),
diff --git a/content/browser/download/download_request_core.cc b/content/browser/download/download_request_core.cc index fa76875..ba99579 100644 --- a/content/browser/download/download_request_core.cc +++ b/content/browser/download/download_request_core.cc
@@ -207,8 +207,8 @@ power_save_blocker_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, device::PowerSaveBlocker::kReasonOther, "Download in progress", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); DownloadRequestData* request_data = DownloadRequestData::Get(request_); if (request_data) { save_info_ = request_data->TakeSaveInfo(); @@ -285,10 +285,9 @@ // Create the ByteStream for sending data to the download sink. std::unique_ptr<ByteStreamReader> stream_reader; - CreateByteStream( - base::ThreadTaskRunnerHandle::Get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), - kDownloadByteStreamSize, &stream_writer_, &stream_reader); + CreateByteStream(base::ThreadTaskRunnerHandle::Get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), + kDownloadByteStreamSize, &stream_writer_, &stream_reader); stream_writer_->RegisterCallback( base::Bind(&DownloadRequestCore::ResumeRequest, AsWeakPtr()));
diff --git a/content/browser/fileapi/browser_file_system_helper.cc b/content/browser/fileapi/browser_file_system_helper.cc index 64402cd..5dba6e3 100644 --- a/content/browser/fileapi/browser_file_system_helper.cc +++ b/content/browser/fileapi/browser_file_system_helper.cc
@@ -76,7 +76,7 @@ scoped_refptr<storage::FileSystemContext> file_system_context = new storage::FileSystemContext( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), file_task_runner.get(), BrowserContext::GetMountPoints(browser_context), browser_context->GetSpecialStoragePolicy(), quota_manager_proxy,
diff --git a/content/browser/fileapi/file_system_browsertest.cc b/content/browser/fileapi/file_system_browsertest.cc index ef65b80..fc2e8ddfd 100644 --- a/content/browser/fileapi/file_system_browsertest.cc +++ b/content/browser/fileapi/file_system_browsertest.cc
@@ -76,7 +76,7 @@ qm->SetTemporaryGlobalOverrideQuota(bytes, storage::QuotaCallback()); // Don't return until the quota has been set. scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get())); ASSERT_TRUE(helper->Run()); } };
diff --git a/content/browser/fileapi/file_system_operation_runner_unittest.cc b/content/browser/fileapi/file_system_operation_runner_unittest.cc index 70436e6..29a8905 100644 --- a/content/browser/fileapi/file_system_operation_runner_unittest.cc +++ b/content/browser/fileapi/file_system_operation_runner_unittest.cc
@@ -194,7 +194,7 @@ ScopedVector<storage::FileSystemBackend> additional_providers; file_system_context_ = new FileSystemContext( base::ThreadTaskRunnerHandle::Get().get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), storage::ExternalMountPoints::CreateRefCounted().get(), make_scoped_refptr(new MockSpecialStoragePolicy()).get(), nullptr, std::move(additional_providers),
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc index 2dd42dd..8fd9e87 100644 --- a/content/browser/frame_host/cross_process_frame_connector.cc +++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -15,6 +15,7 @@ #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_input_event_router.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/common/frame_messages.h" #include "gpu/ipc/common/gpu_messages.h" @@ -26,12 +27,12 @@ RenderFrameProxyHost* frame_proxy_in_parent_renderer) : frame_proxy_in_parent_renderer_(frame_proxy_in_parent_renderer), view_(nullptr), - device_scale_factor_(1) { -} + device_scale_factor_(1), + is_scroll_bubbling_(false) {} CrossProcessFrameConnector::~CrossProcessFrameConnector() { - if (view_) - view_->SetCrossProcessFrameConnector(nullptr); + // Notify the view of this object being destroyed, if the view still exists. + set_view(nullptr); } bool CrossProcessFrameConnector::OnMessageReceived(const IPC::Message& msg) { @@ -54,8 +55,17 @@ void CrossProcessFrameConnector::set_view( RenderWidgetHostViewChildFrame* view) { // Detach ourselves from the previous |view_|. - if (view_) + if (view_) { + if (is_scroll_bubbling_ && GetParentRenderWidgetHostView()) { + RenderWidgetHostImpl::From( + GetParentRenderWidgetHostView()->GetRenderWidgetHost()) + ->delegate() + ->GetInputEventRouter() + ->CancelScrollBubbling(view_); + is_scroll_bubbling_ = false; + } view_->SetCrossProcessFrameConnector(nullptr); + } view_ = view; @@ -144,40 +154,32 @@ } void CrossProcessFrameConnector::BubbleScrollEvent( - const blink::WebInputEvent& event) { + const blink::WebGestureEvent& event) { + DCHECK(event.type == blink::WebInputEvent::GestureScrollUpdate || + event.type == blink::WebInputEvent::GestureScrollEnd); auto parent_view = GetParentRenderWidgetHostView(); if (!parent_view) return; + auto event_router = + RenderWidgetHostImpl::From(parent_view->GetRenderWidgetHost()) + ->delegate() + ->GetInputEventRouter(); + gfx::Vector2d offset_from_parent = child_frame_rect_.OffsetFromOrigin(); + blink::WebGestureEvent resent_gesture_event(event); + // TODO(kenrb, wjmaclean): Do we need to account for transforms here? + // See https://crbug.com/626020. + resent_gesture_event.x += offset_from_parent.x(); + resent_gesture_event.y += offset_from_parent.y(); if (event.type == blink::WebInputEvent::GestureScrollUpdate) { - blink::WebGestureEvent resent_gesture_event; - memcpy(&resent_gesture_event, &event, sizeof(resent_gesture_event)); - resent_gesture_event.x += offset_from_parent.x(); - resent_gesture_event.y += offset_from_parent.y(); - // TODO(wjmaclean, kenrb): The resendingPluginId field is used by - // BrowserPlugin to associate bubbled events with each plugin, which is - // not needed for OOPIFs. However the field needs to be set in order - // to prompt the parent frame's RenderWidgetHostImpl to - // manage the gesture scroll event lifetime (in particular creating the - // GestureScrollBegin and GestureScrollEnd events). This can be converted - // to a flag or otherwise refactored out when BrowserPlugin supporting - // code is eventually removed (https://crbug.com/533069). - resent_gesture_event.resendingPluginId = 1; - ui::LatencyInfo latency_info; - parent_view->ProcessGestureEvent(resent_gesture_event, latency_info); - } else if (event.type == blink::WebInputEvent::MouseWheel) { - blink::WebMouseWheelEvent resent_wheel_event; - memcpy(&resent_wheel_event, &event, sizeof(resent_wheel_event)); - resent_wheel_event.x += offset_from_parent.x(); - resent_wheel_event.y += offset_from_parent.y(); - // TODO(wjmaclean): Initialize latency info correctly for OOPIFs. - // https://crbug.com/613628 - ui::LatencyInfo latency_info; - parent_view->ProcessMouseWheelEvent(resent_wheel_event, latency_info); - } else { - NOTIMPLEMENTED(); + event_router->BubbleScrollEvent(parent_view, resent_gesture_event); + is_scroll_bubbling_ = true; + } else if (event.type == blink::WebInputEvent::GestureScrollEnd && + is_scroll_bubbling_) { + event_router->BubbleScrollEvent(parent_view, resent_gesture_event); + is_scroll_bubbling_ = false; } }
diff --git a/content/browser/frame_host/cross_process_frame_connector.h b/content/browser/frame_host/cross_process_frame_connector.h index d72969d..c553fca 100644 --- a/content/browser/frame_host/cross_process_frame_connector.h +++ b/content/browser/frame_host/cross_process_frame_connector.h
@@ -14,6 +14,7 @@ #include "ui/gfx/geometry/rect.h" namespace blink { +class WebGestureEvent; class WebInputEvent; struct WebScreenInfo; } @@ -100,9 +101,9 @@ // Pass acked touch events to the root view for gesture processing. void ForwardProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result); - // Gesture and wheel events with unused scroll deltas must be bubbled to - // ancestors who may consume the delta. - void BubbleScrollEvent(const blink::WebInputEvent& event); + // Gesture events with unused scroll deltas must be bubbled to ancestors + // who may consume the delta. + void BubbleScrollEvent(const blink::WebGestureEvent& event); // Determines whether the root RenderWidgetHostView (and thus the current // page) has focus. @@ -146,6 +147,8 @@ gfx::Rect child_frame_rect_; float device_scale_factor_; + + bool is_scroll_bubbling_; }; } // namespace content
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc index 9f573afa..1ad247d 100644 --- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc +++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -4600,6 +4600,91 @@ GURL(exploded_state.top.children.at(0).url_string.string())); } +// Ensure that we do not corrupt a NavigationEntry's PageState if two forward +// navigations compete in different frames. See https://crbug.com/623319. +IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, + PageStateAfterForwardInCompetingFrames) { + // Navigate to a page with an iframe. + GURL url_a(embedded_test_server()->GetURL( + "/navigation_controller/page_with_data_iframe.html")); + GURL frame_url_a1("data:text/html,Subframe"); + EXPECT_TRUE(NavigateToURL(shell(), url_a)); + + NavigationController& controller = shell()->web_contents()->GetController(); + FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) + ->GetFrameTree() + ->root(); + EXPECT_EQ(url_a, root->current_url()); + EXPECT_EQ(frame_url_a1, root->child_at(0)->current_url()); + + // Navigate the iframe to a second page. + GURL frame_url_a2 = embedded_test_server()->GetURL( + "/navigation_controller/simple_page_1.html"); + NavigateFrameToURL(root->child_at(0), frame_url_a2); + + // Navigate the iframe to about:blank. + GURL blank_url(url::kAboutBlankURL); + NavigateFrameToURL(root->child_at(0), blank_url); + EXPECT_EQ(3, controller.GetEntryCount()); + EXPECT_EQ(2, controller.GetLastCommittedEntryIndex()); + EXPECT_EQ(url_a, root->current_url()); + EXPECT_EQ(blank_url, root->child_at(0)->current_url()); + + // Go back to the middle entry. + controller.GoBack(); + EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); + EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); + + // Replace the entry with a cross-site top-level page. By doing a + // replacement, the main frame pages before and after have the same item + // sequence number, and thus going between them only requires loads in the + // subframe. + GURL url_b(embedded_test_server()->GetURL( + "b.com", "/navigation_controller/simple_page_2.html")); + std::string replace_script = "location.replace('" + url_b.spec() + "')"; + TestNavigationObserver replace_observer(shell()->web_contents()); + EXPECT_TRUE(ExecuteScript(shell()->web_contents(), replace_script)); + replace_observer.Wait(); + EXPECT_EQ(3, controller.GetEntryCount()); + EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); + EXPECT_EQ(url_b, root->current_url()); + + // Go back to the original page. + controller.GoBack(); + EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); + + // Navigate forward twice using script. In https://crbug.com/623319, this + // caused a mismatch between the NavigationEntry's URL and PageState. + EXPECT_TRUE(ExecuteScript(shell()->web_contents(), + "history.forward(); history.forward();")); + EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); + EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); + EXPECT_EQ(url_b, root->current_url()); + NavigationEntry* entry = controller.GetLastCommittedEntry(); + EXPECT_EQ(url_b, entry->GetURL()); + ExplodedPageState exploded_state; + EXPECT_TRUE( + DecodePageState(entry->GetPageState().ToEncodedData(), &exploded_state)); + EXPECT_EQ(url_b, GURL(exploded_state.top.url_string.string())); + // TODO(creis): Clear subframe FNEs after location.replace in + // --isolate-extensions mode. See https://crbug.com/596707. + if (!SiteIsolationPolicy::UseSubframeNavigationEntries()) + EXPECT_EQ(0U, exploded_state.top.children.size()); + + // Go back and then forward to see if the PageState loads correctly. + controller.GoBack(); + EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); + controller.GoForward(); + EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); + + // We should be on url_b, and the renderer process shouldn't be killed. + ASSERT_TRUE(root->current_frame_host()->IsRenderFrameLive()); + EXPECT_EQ(1, controller.GetLastCommittedEntryIndex()); + EXPECT_EQ(url_b, shell()->web_contents()->GetVisibleURL()); + EXPECT_EQ(url_b, root->current_url()); + EXPECT_EQ(0U, root->child_count()); +} + // Ensure that forward navigations in cloned tabs can commit if they redirect to // a different site than before. This causes the navigation's item sequence // number to change, meaning that we can't use it for determining whether the
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc index cfea857..9be164e 100644 --- a/content/browser/frame_host/render_widget_host_view_child_frame.cc +++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -323,24 +323,22 @@ } } -void RenderWidgetHostViewChildFrame::WheelEventAck( - const blink::WebMouseWheelEvent& event, - InputEventAckState ack_result) { - if (frame_connector_ && - (ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED || - ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS)) - frame_connector_->BubbleScrollEvent(event); -} - void RenderWidgetHostViewChildFrame::GestureEventAck( const blink::WebGestureEvent& event, InputEventAckState ack_result) { bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED || ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; - // GestureScrollBegin/End are always consumed by the target frame, so we only - // forward GestureScrollUpdate. - if (frame_connector_ && - event.type == blink::WebInputEvent::GestureScrollUpdate && not_consumed) + // GestureScrollBegin is consumed by the target frame and not forwarded, + // because we don't know whether we will need to bubble scroll until we + // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused + // scroll extent is forwarded for bubbling, while GestureScrollEnd is + // always forwarded and handled according to current scroll state in the + // RenderWidgetHostInputEventRouter. + if (!frame_connector_) + return; + if ((event.type == blink::WebInputEvent::GestureScrollUpdate && + not_consumed) || + event.type == blink::WebInputEvent::GestureScrollEnd) frame_connector_->BubbleScrollEvent(event); }
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.h b/content/browser/frame_host/render_widget_host_view_child_frame.h index a569b9c..eef16d0 100644 --- a/content/browser/frame_host/render_widget_host_view_child_frame.h +++ b/content/browser/frame_host/render_widget_host_view_child_frame.h
@@ -117,8 +117,6 @@ const base::Callback<void(const gfx::Rect&, bool)>& callback) override; bool CanCopyToVideoFrame() const override; bool HasAcceleratedSurface(const gfx::Size& desired_size) override; - void WheelEventAck(const blink::WebMouseWheelEvent& event, - InputEventAckState ack_result) override; void GestureEventAck(const blink::WebGestureEvent& event, InputEventAckState ack_result) override; void OnSwapCompositorFrame(uint32_t output_surface_id,
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc index aff2083..9064694 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -29,6 +29,10 @@ #include "ipc/ipc_channel_handle.h" #include "ipc/message_filter.h" +#if defined(MOJO_RUNNER_CLIENT) +#include "services/shell/runner/common/client_util.h" +#endif + namespace content { BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL; @@ -81,7 +85,7 @@ scoped_refptr<EstablishRequest> establish_request = new EstablishRequest( cause, gpu_client_id, gpu_client_tracing_id, gpu_host_id); scoped_refptr<base::SingleThreadTaskRunner> task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); // PostTask outside the constructor to ensure at least one reference exists. task_runner->PostTask( FROM_HERE, @@ -267,7 +271,7 @@ scoped_refptr<base::SingleThreadTaskRunner> BrowserGpuChannelHostFactory::GetIOThreadTaskRunner() { - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } std::unique_ptr<base::SharedMemory> @@ -297,6 +301,9 @@ void BrowserGpuChannelHostFactory::EstablishGpuChannel( CauseForGpuLaunch cause_for_gpu_launch, const base::Closure& callback) { +#if defined(MOJO_RUNNER_CLIENT) + DCHECK(!shell::ShellIsRemote()); +#endif if (gpu_channel_.get() && gpu_channel_->IsLost()) { DCHECK(!pending_request_.get()); // Recreate the channel if it has been lost.
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc index a8acccd1..09d20976 100644 --- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc +++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -462,7 +462,7 @@ new_id, request->size, request->format, base::Bind( &GpuMemoryBufferDeleted, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), base::Bind(&BrowserGpuMemoryBufferManager::DestroyGpuMemoryBufferOnIO, base::Unretained(this), new_id, request->client_id))); request->event.Signal(); @@ -489,7 +489,7 @@ handle, request->size, request->format, request->usage, base::Bind( &GpuMemoryBufferDeleted, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), base::Bind(&BrowserGpuMemoryBufferManager::DestroyGpuMemoryBufferOnIO, base::Unretained(this), new_id, request->client_id))); request->event.Signal(); @@ -512,7 +512,7 @@ handle, request->size, request->format, request->usage, base::Bind( &GpuMemoryBufferDeleted, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), base::Bind(&BrowserGpuMemoryBufferManager::DestroyGpuMemoryBufferOnIO, base::Unretained(this), handle.id, request->client_id))); request->event.Signal();
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc index bd9e61b6..892b1b3c 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -48,11 +48,9 @@ #if defined(OS_WIN) #include "base/win/windows_version.h" #endif // OS_WIN -#if defined(OS_ANDROID) -#include "ui/gfx/android/device_display_info.h" -#endif // OS_ANDROID #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) -#include "services/shell/runner/common/client_util.h" +#include "services/shell/runner/common/client_util.h" // nogncheck +#include "services/ui/common/gpu_service.h" // nogncheck #endif namespace content { @@ -270,7 +268,7 @@ bool ShouldDisableHardwareAcceleration() { #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) // TODO(rjkroege): Remove this when https://crbug.com/602519 is fixed. - if (shell::ShellIsRemote()) + if (shell::ShellIsRemote() && !ui::GpuService::UseChromeGpuCommandBuffer()) return true; #endif return base::CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index dc270709..ff47de9 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc
@@ -91,6 +91,10 @@ #include "content/browser/gpu/gpu_surface_tracker.h" #endif +#if defined(MOJO_SHELL_CLIENT) +#include "services/shell/runner/common/client_util.h" +#endif + namespace content { bool GpuProcessHost::gpu_enabled_ = true; @@ -313,6 +317,9 @@ // static GpuProcessHost* GpuProcessHost::Get(GpuProcessKind kind, CauseForGpuLaunch cause) { +#if defined(MOJO_SHELL_CLIENT) + DCHECK(!shell::ShellIsRemote()); +#endif DCHECK_CURRENTLY_ON(BrowserThread::IO); // Don't grant further access to GPU if it is not allowed. @@ -558,10 +565,9 @@ DCHECK(!mojo_child_connection_); mojo_child_connection_.reset(new MojoChildConnection( - kGpuMojoApplicationName, - "", - child_token_, - MojoShellContext::GetConnectorForIOThread())); + kGpuMojoApplicationName, "", child_token_, + MojoShellContext::GetConnectorForIOThread(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine(); if (in_process_) { @@ -932,11 +938,11 @@ } shell::InterfaceRegistry* GpuProcessHost::GetInterfaceRegistry() { - return mojo_child_connection_->connection()->GetInterfaceRegistry(); + return mojo_child_connection_->GetInterfaceRegistry(); } shell::InterfaceProvider* GpuProcessHost::GetRemoteInterfaces() { - return mojo_child_connection_->connection()->GetRemoteInterfaces(); + return mojo_child_connection_->GetRemoteInterfaces(); } GpuProcessHost::GpuProcessKind GpuProcessHost::kind() {
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc index 2f4fbd74..96a00c7 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.cc +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -72,8 +72,7 @@ ui::OzonePlatform::GetInstance() ->GetGpuPlatformSupportHost() ->OnChannelEstablished( - host_id, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), + host_id, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), base::Bind(&SendOnIOThreadTask, host_id_)); #endif }
diff --git a/content/browser/gpu/shader_disk_cache.cc b/content/browser/gpu/shader_disk_cache.cc index e31af92..f75fe83 100644 --- a/content/browser/gpu/shader_disk_cache.cc +++ b/content/browser/gpu/shader_disk_cache.cc
@@ -532,15 +532,11 @@ is_initialized_ = true; int rv = disk_cache::CreateCacheBackend( - net::SHADER_CACHE, - net::CACHE_BACKEND_DEFAULT, + net::SHADER_CACHE, net::CACHE_BACKEND_DEFAULT, cache_path_.Append(kGpuCachePath), - gpu::kDefaultMaxProgramCacheMemoryBytes, - true, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get(), - NULL, - &backend_, - base::Bind(&ShaderDiskCache::CacheCreatedCallback, this)); + gpu::kDefaultMaxProgramCacheMemoryBytes, true, + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE).get(), NULL, + &backend_, base::Bind(&ShaderDiskCache::CacheCreatedCallback, this)); if (rv == net::OK) cache_available_ = true;
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc index a34e632..1f2b932 100644 --- a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc +++ b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
@@ -41,7 +41,7 @@ } bool CheckNoOriginsInUse() const { - return !duplicate_calls_ && !origins_.size(); + return !duplicate_calls_ && origins_.empty(); } bool CheckSingleOriginInUse(const url::Origin& origin) const {
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc index c3fba32e..754c95e 100644 --- a/content/browser/indexed_db/indexed_db_backing_store.cc +++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -1396,7 +1396,7 @@ StringPiece key_piece(it->Key()); std::string user_key = BlobEntryKey::ReencodeToObjectStoreDataKey(&key_piece); - if (!user_key.size()) { + if (user_key.empty()) { INTERNAL_CONSISTENCY_ERROR_UNTESTED(GET_IDBDATABASE_METADATA); return InternalInconsistencyStatus(); } @@ -1936,7 +1936,7 @@ handles); if (!s.ok()) return s; - DCHECK(!handles->size()); + DCHECK(handles->empty()); const std::string exists_entry_key = ExistsEntryKey::Encode(database_id, object_store_id, key); @@ -2180,7 +2180,7 @@ } if (!*found) return leveldb::Status::OK(); - if (!data.size()) { + if (data.empty()) { INTERNAL_READ_ERROR_UNTESTED(KEY_EXISTS_IN_OBJECT_STORE); return InternalInconsistencyStatus(); } @@ -3044,7 +3044,7 @@ } if (!found) return s; - if (!found_encoded_primary_key.size()) { + if (found_encoded_primary_key.empty()) { INTERNAL_READ_ERROR_UNTESTED(GET_PRIMARY_KEY_VIA_INDEX); return InvalidDBKeyStatus(); } @@ -3606,7 +3606,7 @@ transaction_->transaction()->Remove(iterator_->Key()); return false; } - if (!result.size()) { + if (result.empty()) { INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW); return false; } @@ -3723,7 +3723,7 @@ transaction_->transaction()->Remove(iterator_->Key()); return false; } - if (!result.size()) { + if (result.empty()) { INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW); return false; } @@ -4165,7 +4165,7 @@ return s; } - DCHECK(!new_files_to_write.size() || + DCHECK(new_files_to_write.empty() || KeyPrefix::IsValidDatabaseId(database_id_)); if (!CollectBlobFilesToRemove()) { INTERNAL_WRITE_ERROR_UNTESTED(TRANSACTION_COMMIT_METHOD); @@ -4444,7 +4444,7 @@ DCHECK_EQ(record->object_store_id(), object_store_id); record->SetBlobInfo(blob_info); record->SetHandles(handles); - DCHECK(!handles || !handles->size()); + DCHECK(!handles || handles->empty()); } IndexedDBBackingStore::Transaction::WriteDescriptor::WriteDescriptor(
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc index 8262bbb..03183f03 100644 --- a/content/browser/indexed_db/indexed_db_browsertest.cc +++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -140,7 +140,7 @@ qm->SetTemporaryGlobalOverrideQuota(bytes, storage::QuotaCallback()); // Don't return until the quota has been set. scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB))); ASSERT_TRUE(helper->Run()); }
diff --git a/content/browser/indexed_db/indexed_db_cursor.cc b/content/browser/indexed_db/indexed_db_cursor.cc index 6d01e2a..cd8692d 100644 --- a/content/browser/indexed_db/indexed_db_cursor.cc +++ b/content/browser/indexed_db/indexed_db_cursor.cc
@@ -167,7 +167,7 @@ break; } - if (!found_keys.size()) { + if (found_keys.empty()) { callbacks->OnSuccess(nullptr); return; }
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc index a73ba29..0835c8a 100644 --- a/content/browser/indexed_db/indexed_db_database.cc +++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -233,6 +233,7 @@ DCHECK(transactions_.empty()); DCHECK(pending_open_calls_.empty()); DCHECK(pending_delete_calls_.empty()); + DCHECK(blocked_delete_calls_.empty()); } size_t IndexedDBDatabase::GetMaxMessageSizeInBytes() const { @@ -1636,31 +1637,58 @@ DCHECK_EQ(1u, ConnectionCount()); // Fall through would be a no-op, since transaction must complete // asynchronously. + DCHECK(IsUpgradeRunning()); DCHECK(IsDeleteDatabaseBlocked()); DCHECK(IsOpenConnectionBlocked()); return; } - if (!IsDeleteDatabaseBlocked()) { - std::list<PendingDeleteCall*> pending_delete_calls; + if (IsUpgradeRunning()) { + DCHECK_EQ(ConnectionCount(), 1UL); + return; + } + + // These delete calls were blocked by a running upgrade, and did not even + // get as far as broadcasting OnVersionChange (if needed). + { + std::list<std::unique_ptr<PendingDeleteCall>> pending_delete_calls; pending_delete_calls_.swap(pending_delete_calls); while (!pending_delete_calls.empty()) { + std::unique_ptr<PendingDeleteCall> pending_delete_call( + std::move(pending_delete_calls.front())); + pending_delete_calls.pop_front(); + DeleteDatabase(pending_delete_call->callbacks()); + } + // DeleteDatabase should never re-queue these calls. + DCHECK(pending_delete_calls_.empty()); + // Fall through when complete, as pending deletes/opens may be unblocked. + } + + // These delete calls broadcast OnVersionChange (if needed) but were blocked + // by open connections. + if (!IsDeleteDatabaseBlocked()) { + std::list<std::unique_ptr<PendingDeleteCall>> blocked_delete_calls; + blocked_delete_calls_.swap(blocked_delete_calls); + while (!blocked_delete_calls.empty()) { // Only the first delete call will delete the database, but each must fire // callbacks. std::unique_ptr<PendingDeleteCall> pending_delete_call( - pending_delete_calls.front()); - pending_delete_calls.pop_front(); + std::move(blocked_delete_calls.front())); + blocked_delete_calls.pop_front(); DeleteDatabaseFinal(pending_delete_call->callbacks()); } - // delete_database_final should never re-queue calls. - DCHECK(pending_delete_calls_.empty()); + // DeleteDatabaseFinal should never re-queue these calls. + DCHECK(blocked_delete_calls_.empty()); // Fall through when complete, as pending opens may be unblocked. } + // These open calls were blocked by a pending/running upgrade or a pending + // delete. if (!IsOpenConnectionBlocked()) { std::queue<IndexedDBPendingConnection> pending_open_calls; pending_open_calls_.swap(pending_open_calls); while (!pending_open_calls.empty()) { + // This may re-queue open calls if an upgrade is necessary. OpenConnection(pending_open_calls.front()); pending_open_calls.pop(); } @@ -1694,18 +1722,22 @@ transactions_[transaction->id()] = transaction; } +bool IndexedDBDatabase::IsUpgradeRunning() const { + return transaction_coordinator_.IsRunningVersionChangeTransaction(); +} + +bool IndexedDBDatabase::IsUpgradePendingOrRunning() const { + return pending_run_version_change_transaction_call_ || IsUpgradeRunning(); +} + bool IndexedDBDatabase::IsOpenConnectionBlocked() const { - return !pending_delete_calls_.empty() || - transaction_coordinator_.IsRunningVersionChangeTransaction() || - pending_run_version_change_transaction_call_; + return IsUpgradePendingOrRunning() || !blocked_delete_calls_.empty(); } void IndexedDBDatabase::OpenConnection( const IndexedDBPendingConnection& connection) { DCHECK(backing_store_.get()); - // TODO(jsbell): Should have a priority queue so that higher version - // requests are processed first. http://crbug.com/225850 if (IsOpenConnectionBlocked()) { // The backing store only detects data loss when it is first opened. The // presence of existing connections means we didn't even check for data loss @@ -1832,6 +1864,7 @@ object_store_ids, blink::WebIDBTransactionModeVersionChange); + DCHECK(transaction_coordinator_.IsRunningVersionChangeTransaction()); transactions_[transaction_id]->ScheduleTask( base::Bind(&IndexedDBDatabase::VersionChangeOperation, this, @@ -1843,6 +1876,13 @@ void IndexedDBDatabase::DeleteDatabase( scoped_refptr<IndexedDBCallbacks> callbacks) { + // If there's a running upgrade, the delete calls should be deferred so that + // "versionchange" is seen after "success" fires. + if (IsUpgradeRunning()) { + pending_delete_calls_.push_back( + std::unique_ptr<PendingDeleteCall>(new PendingDeleteCall(callbacks))); + return; + } if (IsDeleteDatabaseBlocked()) { for (const auto* connection : connections_) { @@ -1854,14 +1894,15 @@ // OnBlocked will be fired at the request when one of the other // connections acks that the OnVersionChange was ignored. - pending_delete_calls_.push_back(new PendingDeleteCall(callbacks)); + blocked_delete_calls_.push_back( + std::unique_ptr<PendingDeleteCall>(new PendingDeleteCall(callbacks))); return; } DeleteDatabaseFinal(callbacks); } bool IndexedDBDatabase::IsDeleteDatabaseBlocked() const { - return !!ConnectionCount(); + return IsUpgradePendingOrRunning() || !!ConnectionCount(); } void IndexedDBDatabase::DeleteDatabaseFinal( @@ -1900,15 +1941,15 @@ } void IndexedDBDatabase::VersionChangeIgnored() { - if (pending_run_version_change_transaction_call_) + if (pending_run_version_change_transaction_call_) { pending_run_version_change_transaction_call_->callbacks()->OnBlocked( metadata_.version); + } - for (const auto& pending_delete_call : pending_delete_calls_) + for (const auto& pending_delete_call : blocked_delete_calls_) pending_delete_call->callbacks()->OnBlocked(metadata_.version); } - void IndexedDBDatabase::Close(IndexedDBConnection* connection, bool forced) { DCHECK(connections_.count(connection)); DCHECK(connection->IsConnected()); @@ -1944,7 +1985,7 @@ // TODO(jsbell): Add a test for the pending_open_calls_ cases below. if (!ConnectionCount() && pending_open_calls_.empty() && - !pending_delete_calls_.size()) { + blocked_delete_calls_.empty()) { DCHECK(transactions_.empty()); backing_store_ = NULL; factory_->ReleaseDatabase(identifier_, forced);
diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h index 527b516..70d9b54 100644 --- a/content/browser/indexed_db/indexed_db_database.h +++ b/content/browser/indexed_db/indexed_db_database.h
@@ -267,6 +267,9 @@ typedef std::map<int64_t, IndexedDBTransaction*> TransactionMap; typedef list_set<IndexedDBConnection*> ConnectionSet; + bool IsUpgradeRunning() const; + bool IsUpgradePendingOrRunning() const; + bool IsOpenConnectionBlocked() const; leveldb::Status OpenInternal(); void RunVersionChangeTransaction( @@ -307,11 +310,38 @@ IndexedDBTransactionCoordinator transaction_coordinator_; TransactionMap transactions_; + + // An open request ends up here if: + // * There is a running or pending upgrade. + // * There are pending deletes. + // Requests here have *not* broadcast OnVersionChange if necessary. + // When no longer blocked, the OpenConnection() calls are remade. std::queue<IndexedDBPendingConnection> pending_open_calls_; + + // This owns the connection for the first upgrade request (open with higher + // version) that could not be immediately processed. The request has already + // broadcast OnVersionChange if necessary. std::unique_ptr<PendingUpgradeCall> pending_run_version_change_transaction_call_; + + // This references a connection for an upgrade request while the upgrade + // transaction is running, so that the success/error result can be sent. It + // is not set until the upgrade transaction actually starts executing + // operations, so do not rely on it to determine if an upgrade is in + // progress. std::unique_ptr<PendingSuccessCall> pending_second_half_open_; - std::list<PendingDeleteCall*> pending_delete_calls_; + + // A delete request ends up here if: + // * There is a running upgrade. + // Requests here have *not* broadcast OnVersionChange if necessary. + // When no longer blocked, DeleteDatabase() calls are remade. + std::list<std::unique_ptr<PendingDeleteCall>> pending_delete_calls_; + + // A delete request ends up here if: + // * There are open connections. + // Requests here have already broadcast OnVersionChange if necessary. + // When no longer blocked, DeleteDatabaseFinal() calls are made. + std::list<std::unique_ptr<PendingDeleteCall>> blocked_delete_calls_; ConnectionSet connections_; bool experimental_web_platform_features_enabled_;
diff --git a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc index f552141c..5ab9255 100644 --- a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc +++ b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
@@ -13,8 +13,8 @@ IndexedDBTransactionCoordinator::IndexedDBTransactionCoordinator() {} IndexedDBTransactionCoordinator::~IndexedDBTransactionCoordinator() { - DCHECK(!queued_transactions_.size()); - DCHECK(!started_transactions_.size()); + DCHECK(queued_transactions_.empty()); + DCHECK(started_transactions_.empty()); } void IndexedDBTransactionCoordinator::DidCreateTransaction(
diff --git a/content/browser/indexed_db/indexed_db_value.cc b/content/browser/indexed_db/indexed_db_value.cc index e8be18a..6feed69 100644 --- a/content/browser/indexed_db/indexed_db_value.cc +++ b/content/browser/indexed_db/indexed_db_value.cc
@@ -13,7 +13,7 @@ const std::string& input_bits, const std::vector<IndexedDBBlobInfo>& input_blob_info) : bits(input_bits), blob_info(input_blob_info) { - DCHECK(!input_blob_info.size() || input_bits.size()); + DCHECK(input_blob_info.empty() || input_bits.size()); } IndexedDBValue::IndexedDBValue(const IndexedDBValue& other) = default; IndexedDBValue::~IndexedDBValue() = default;
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc index 02951daf..b0969b59 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1440,11 +1440,9 @@ blob_context); } new_request->set_upload(UploadDataStreamBuilder::Build( - request_data.request_body.get(), - blob_context, + request_data.request_body.get(), blob_context, filter_->file_system_context(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) - .get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get())); } bool allow_download = request_data.allow_download && @@ -1686,8 +1684,8 @@ // Block power save while uploading data. throttles.push_back(new PowerSaveBlockResourceThrottle( request->url().host(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); } // TODO(ricea): Stop looking this up so much. @@ -2187,11 +2185,9 @@ // another renderer requested this navigation, this should be the same // FileSystemContext passed into ShouldServiceRequest. new_request->set_upload(UploadDataStreamBuilder::Build( - body, - blob_context, + body, blob_context, nullptr, // file_system_context - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) - .get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get())); } request_id_--;
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc index 67450986..b3aca28 100644 --- a/content/browser/loader/resource_dispatcher_host_unittest.cc +++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -3443,10 +3443,8 @@ ASSERT_TRUE(base::CreateTemporaryFile(&file_path)); scoped_refptr<ShareableFileReference> deletable_file = ShareableFileReference::GetOrCreate( - file_path, - ShareableFileReference::DELETE_ON_FINAL_RELEASE, - BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::FILE).get()); + file_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE, + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()); // Not readable. EXPECT_FALSE(ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( @@ -3490,10 +3488,8 @@ ASSERT_TRUE(base::CreateTemporaryFile(&file_path)); scoped_refptr<ShareableFileReference> deletable_file = ShareableFileReference::GetOrCreate( - file_path, - ShareableFileReference::DELETE_ON_FINAL_RELEASE, - BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::FILE).get()); + file_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE, + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()); // Register it for a resource request. host_.RegisterDownloadedTempFile(filter_->child_id(), kRequestID, file_path);
diff --git a/content/browser/loader/resource_loader_unittest.cc b/content/browser/loader/resource_loader_unittest.cc index 04a551f..e5a3419 100644 --- a/content/browser/loader/resource_loader_unittest.cc +++ b/content/browser/loader/resource_loader_unittest.cc
@@ -938,10 +938,8 @@ base::ThreadTaskRunnerHandle::Get())); file_stream_ = file_stream.get(); deletable_file_ = ShareableFileReference::GetOrCreate( - temp_path_, - ShareableFileReference::DELETE_ON_FINAL_RELEASE, - BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::FILE).get()); + temp_path_, ShareableFileReference::DELETE_ON_FINAL_RELEASE, + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()); // Inject them into the handler. std::unique_ptr<RedirectToFileResourceHandler> handler(
diff --git a/content/browser/loader/temporary_file_stream.cc b/content/browser/loader/temporary_file_stream.cc index bff6ed4..74ca492 100644 --- a/content/browser/loader/temporary_file_stream.cc +++ b/content/browser/loader/temporary_file_stream.cc
@@ -32,7 +32,7 @@ } scoped_refptr<base::TaskRunner> task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); // Cancelled or not, create the deletable_file so the temporary is cleaned up. scoped_refptr<ShareableFileReference> deletable_file = @@ -54,7 +54,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::IO); std::unique_ptr<base::FileProxy> file_proxy(new base::FileProxy( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get())); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get())); base::FileProxy* proxy = file_proxy.get(); proxy->CreateTemporary( base::File::FLAG_ASYNC,
diff --git a/content/browser/media/android/browser_demuxer_android.cc b/content/browser/media/android/browser_demuxer_android.cc index ed56bf7..65fd0bd 100644 --- a/content/browser/media/android/browser_demuxer_android.cc +++ b/content/browser/media/android/browser_demuxer_android.cc
@@ -60,10 +60,9 @@ VLOG(1) << "Using " << (use_media_thread ? "media" : "UI") << " thread" << " for MSE playback"; task_runner_ = - use_media_thread ? - media::GetMediaTaskRunner().get() : - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(); - + use_media_thread + ? media::GetMediaTaskRunner().get() + : BrowserThread::GetTaskRunnerForThread(BrowserThread::UI).get(); } BrowserDemuxerAndroid::~BrowserDemuxerAndroid() {}
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc index 426bc89..392190e 100644 --- a/content/browser/media/capture/aura_window_capture_machine.cc +++ b/content/browser/media/capture/aura_window_capture_machine.cc
@@ -88,8 +88,8 @@ power_save_blocker_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, device::PowerSaveBlocker::kReasonOther, "DesktopCaptureDevice is running", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); return true; }
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc index f5a73646..efd4e31 100644 --- a/content/browser/media/capture/desktop_capture_device.cc +++ b/content/browser/media/capture/desktop_capture_device.cc
@@ -176,8 +176,8 @@ power_save_blocker_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, device::PowerSaveBlocker::kReasonOther, "DesktopCaptureDevice is running", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); desktop_capturer_->Start(this);
diff --git a/content/browser/media/cdm/browser_cdm_manager.cc b/content/browser/media/cdm/browser_cdm_manager.cc index c50184a..6b051ac 100644 --- a/content/browser/media/cdm/browser_cdm_manager.cc +++ b/content/browser/media/cdm/browser_cdm_manager.cc
@@ -186,8 +186,7 @@ new BrowserCdmManagerProcessWatcher(render_process_id, this); if (!task_runner_.get()) { - task_runner_ = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + task_runner_ = BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); } }
diff --git a/content/browser/media/media_web_contents_observer.cc b/content/browser/media/media_web_contents_observer.cc index 066d46fd..c15de1c 100644 --- a/content/browser/media/media_web_contents_observer.cc +++ b/content/browser/media/media_web_contents_observer.cc
@@ -186,8 +186,8 @@ audio_power_save_blocker_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, device::PowerSaveBlocker::kReasonAudioPlayback, "Playing audio", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); } void MediaWebContentsObserver::CreateVideoPowerSaveBlocker() { @@ -196,8 +196,8 @@ video_power_save_blocker_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, device::PowerSaveBlocker::kReasonVideoPlayback, "Playing video", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); #if defined(OS_ANDROID) if (web_contents()->GetNativeView()) { view_weak_factory_.reset(new base::WeakPtrFactory<ui::ViewAndroid>(
diff --git a/content/browser/media/webrtc/webrtc_internals.cc b/content/browser/media/webrtc/webrtc_internals.cc index 070dfb3..ae8a7ed 100644 --- a/content/browser/media/webrtc/webrtc_internals.cc +++ b/content/browser/media/webrtc/webrtc_internals.cc
@@ -509,8 +509,8 @@ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, device::PowerSaveBlocker::kReasonOther, "WebRTC has active PeerConnections", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); } }
diff --git a/content/browser/mojo/mojo_child_connection.cc b/content/browser/mojo/mojo_child_connection.cc index cb7ea985..1fe0c2e 100644 --- a/content/browser/mojo/mojo_child_connection.cc +++ b/content/browser/mojo/mojo_child_connection.cc
@@ -7,6 +7,7 @@ #include <stdint.h> #include <utility> +#include "base/macros.h" #include "content/public/common/mojo_shell_connection.h" #include "mojo/edk/embedder/embedder.h" #include "mojo/public/cpp/system/message_pipe.h" @@ -16,43 +17,163 @@ namespace content { -MojoChildConnection::MojoChildConnection(const std::string& application_name, - const std::string& instance_id, - const std::string& child_token, - shell::Connector* connector) - : service_token_(mojo::edk::GenerateRandomToken()) { +namespace { + +void CallBinderOnTaskRunner( + const shell::InterfaceRegistry::Binder& binder, + scoped_refptr<base::SequencedTaskRunner> task_runner, + const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle) { + task_runner->PostTask( + FROM_HERE, + base::Bind(binder, interface_name, base::Passed(&request_handle))); +} + +} // namespace + +class MojoChildConnection::IOThreadContext + : public base::RefCountedThreadSafe<IOThreadContext> { + public: + IOThreadContext() {} + + void Initialize(const std::string& application_name, + const std::string& instance_id, + shell::Connector* connector, + mojo::ScopedMessagePipeHandle service_pipe, + scoped_refptr<base::SequencedTaskRunner> io_task_runner, + const shell::InterfaceRegistry::Binder& default_binder) { + DCHECK(!io_task_runner_); + io_task_runner_ = io_task_runner; + std::unique_ptr<shell::Connector> io_thread_connector; + if (connector) + io_thread_connector = connector->Clone(); + io_task_runner_->PostTask( + FROM_HERE, + base::Bind(&IOThreadContext::InitializeOnIOThread, this, + application_name, instance_id, + base::Passed(&io_thread_connector), + base::Passed(&service_pipe), + base::Bind(&CallBinderOnTaskRunner, default_binder, + base::ThreadTaskRunnerHandle::Get()))); + } + + void ShutDown() { + if (!io_task_runner_) + return; + bool posted = io_task_runner_->PostTask( + FROM_HERE, + base::Bind(&IOThreadContext::ShutDownOnIOThread, this)); + DCHECK(posted); + } + + void GetRemoteInterfaceOnIOThread( + const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle) { + if (connection_) { + connection_->GetRemoteInterfaces()->GetInterface( + interface_name, std::move(request_handle)); + } + } + + void SetProcessHandle(base::ProcessHandle handle) { + DCHECK(io_task_runner_); + io_task_runner_->PostTask( + FROM_HERE, + base::Bind(&IOThreadContext::SetProcessHandleOnIOThread, this, handle)); + } + + private: + friend class base::RefCountedThreadSafe<IOThreadContext>; + + virtual ~IOThreadContext() {} + + void InitializeOnIOThread( + const std::string& application_name, + const std::string& instance_id, + std::unique_ptr<shell::Connector> connector, + mojo::ScopedMessagePipeHandle service_pipe, + const shell::InterfaceRegistry::Binder& default_binder) { + shell::mojom::ServicePtr service; + service.Bind(mojo::InterfacePtrInfo<shell::mojom::Service>( + std::move(service_pipe), 0u)); + shell::mojom::PIDReceiverRequest pid_receiver_request = + mojo::GetProxy(&pid_receiver_); + + shell::Identity target(application_name, shell::mojom::kInheritUserID, + instance_id); + shell::Connector::ConnectParams params(target); + params.set_client_process_connection(std::move(service), + std::move(pid_receiver_request)); + + // In some unit testing scenarios a null connector is passed. + if (!connector) + return; + + connection_ = connector->Connect(¶ms); + connection_->GetInterfaceRegistry()->set_default_binder(default_binder); + } + + void ShutDownOnIOThread() { + connection_.reset(); + pid_receiver_.reset(); + } + + void SetProcessHandleOnIOThread(base::ProcessHandle handle) { + DCHECK(pid_receiver_.is_bound()); + pid_receiver_->SetPID(base::GetProcId(handle)); + pid_receiver_.reset(); + } + + scoped_refptr<base::SequencedTaskRunner> io_task_runner_; + std::unique_ptr<shell::Connection> connection_; + shell::mojom::PIDReceiverPtr pid_receiver_; + + DISALLOW_COPY_AND_ASSIGN(IOThreadContext); +}; + +MojoChildConnection::MojoChildConnection( + const std::string& application_name, + const std::string& instance_id, + const std::string& child_token, + shell::Connector* connector, + scoped_refptr<base::SequencedTaskRunner> io_task_runner) + : context_(new IOThreadContext), + service_token_(mojo::edk::GenerateRandomToken()), + interface_registry_(nullptr), + weak_factory_(this) { mojo::ScopedMessagePipeHandle service_pipe = mojo::edk::CreateParentMessagePipe(service_token_, child_token); - shell::mojom::ServicePtr service; - service.Bind(mojo::InterfacePtrInfo<shell::mojom::Service>( - std::move(service_pipe), 0u)); - shell::mojom::PIDReceiverRequest pid_receiver_request = - GetProxy(&pid_receiver_); + context_ = new IOThreadContext; + context_->Initialize( + application_name, instance_id, connector, std::move(service_pipe), + io_task_runner, + base::Bind(&MojoChildConnection::GetInterface, + weak_factory_.GetWeakPtr())); + remote_interfaces_.Forward( + base::Bind(&CallBinderOnTaskRunner, + base::Bind(&IOThreadContext::GetRemoteInterfaceOnIOThread, + context_), io_task_runner)); - shell::Identity target(application_name, shell::mojom::kInheritUserID, - instance_id); - shell::Connector::ConnectParams params(target); - params.set_client_process_connection(std::move(service), - std::move(pid_receiver_request)); - - // In some unit testing scenarios a null connector is passed. - if (!connector) - return; - - connection_ = connector->Connect(¶ms); #if defined(OS_ANDROID) - service_registry_android_ = ServiceRegistryAndroid::Create( - connection_->GetInterfaceRegistry(), connection_->GetRemoteInterfaces()); + service_registry_android_ = + ServiceRegistryAndroid::Create(&interface_registry_, &remote_interfaces_); #endif } -MojoChildConnection::~MojoChildConnection() {} +MojoChildConnection::~MojoChildConnection() { + context_->ShutDown(); +} void MojoChildConnection::SetProcessHandle(base::ProcessHandle handle) { - DCHECK(pid_receiver_.is_bound()); - pid_receiver_->SetPID(base::GetProcId(handle)); - pid_receiver_.reset(); + context_->SetProcessHandle(handle); +} + +void MojoChildConnection::GetInterface( + const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle) { + static_cast<shell::mojom::InterfaceProvider*>(&interface_registry_) + ->GetInterface(interface_name, std::move(request_handle)); } } // namespace content
diff --git a/content/browser/mojo/mojo_child_connection.h b/content/browser/mojo/mojo_child_connection.h index 9ed83da..c51f67e4 100644 --- a/content/browser/mojo/mojo_child_connection.h +++ b/content/browser/mojo/mojo_child_connection.h
@@ -9,7 +9,12 @@ #include <string> #include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "base/memory/weak_ptr.h" #include "base/process/process_handle.h" +#include "base/sequenced_task_runner.h" +#include "services/shell/public/cpp/interface_provider.h" +#include "services/shell/public/cpp/interface_registry.h" #include "services/shell/public/interfaces/connector.mojom.h" #if defined(OS_ANDROID) @@ -35,11 +40,16 @@ MojoChildConnection(const std::string& application_name, const std::string& instance_id, const std::string& child_token, - shell::Connector* connector); + shell::Connector* connector, + scoped_refptr<base::SequencedTaskRunner> io_task_runner); ~MojoChildConnection(); - shell::Connection* connection() const { - return connection_.get(); + shell::InterfaceRegistry* GetInterfaceRegistry() { + return &interface_registry_; + } + + shell::InterfaceProvider* GetRemoteInterfaces() { + return &remote_interfaces_; } // A token which must be passed to the child process via @@ -59,13 +69,24 @@ #endif private: + class IOThreadContext; + + void GetInterface(const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle); + + scoped_refptr<IOThreadContext> context_; + const std::string service_token_; - std::unique_ptr<shell::Connection> connection_; - shell::mojom::PIDReceiverPtr pid_receiver_; + + shell::InterfaceRegistry interface_registry_; + shell::InterfaceProvider remote_interfaces_; + #if defined(OS_ANDROID) std::unique_ptr<ServiceRegistryAndroid> service_registry_android_; #endif + base::WeakPtrFactory<MojoChildConnection> weak_factory_; + DISALLOW_COPY_AND_ASSIGN(MojoChildConnection); };
diff --git a/content/browser/mojo/mojo_shell_context.cc b/content/browser/mojo/mojo_shell_context.cc index a7148d1..37b9e70 100644 --- a/content/browser/mojo/mojo_shell_context.cc +++ b/content/browser/mojo/mojo_shell_context.cc
@@ -49,20 +49,10 @@ namespace { -using ConnectorPtr = base::ThreadLocalPointer<shell::Connector>; +base::LazyInstance<std::unique_ptr<shell::Connector>>::Leaky + g_io_thread_connector = LAZY_INSTANCE_INITIALIZER; -base::LazyInstance<ConnectorPtr>::Leaky io_connector_tls_ptr = - LAZY_INSTANCE_INITIALIZER; - -void SetConnectorOnIOThread(std::unique_ptr<shell::Connector> connector) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - io_connector_tls_ptr.Pointer()->Set(connector.release()); -} - -void DestroyConnectorOnIOThread() { - delete MojoShellContext::GetConnectorForIOThread(); - io_connector_tls_ptr.Pointer()->Set(nullptr); -} +void DestroyConnectorOnIOThread() { g_io_thread_connector.Get().reset(); } void StartUtilityProcessOnIOThread( mojo::InterfaceRequest<mojom::ProcessControl> request, @@ -232,7 +222,7 @@ proxy_.Get().reset(new Proxy(this)); scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); std::unique_ptr<shell::NativeRunnerFactory> native_runner_factory( new shell::InProcessNativeRunnerFactory( BrowserThread::GetBlockingPool())); @@ -272,14 +262,9 @@ request = service_manager_->StartEmbedderService(kBrowserMojoApplicationName); } - MojoShellConnection::SetForProcess( - MojoShellConnection::Create(std::move(request))); - - std::unique_ptr<shell::Connector> io_connector = - MojoShellConnection::GetForProcess()->GetConnector()->Clone(); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - base::Bind(&SetConnectorOnIOThread, base::Passed(&io_connector))); + MojoShellConnection::SetForProcess(MojoShellConnection::Create( + std::move(request), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); ContentBrowserClient::StaticMojoApplicationMap apps; GetContentClient()->browser()->RegisterInProcessMojoApplications(&apps); @@ -288,6 +273,13 @@ entry.second); } + // This is safe to assign directly from any thread, because MojoShellContext + // must be constructed before anyone can call GetConnectorForIOThread(). + g_io_thread_connector.Get() = + MojoShellConnection::GetForProcess()->GetConnector()->Clone(); + + MojoShellConnection::GetForProcess()->Start(); + ContentBrowserClient::OutOfProcessMojoApplicationMap sandboxed_apps; GetContentClient() ->browser() @@ -340,7 +332,7 @@ // static shell::Connector* MojoShellContext::GetConnectorForIOThread() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - return io_connector_tls_ptr.Pointer()->Get(); + return g_io_thread_connector.Get().get(); } void MojoShellContext::ConnectToApplicationOnOwnThread(
diff --git a/content/browser/net/quota_policy_cookie_store.cc b/content/browser/net/quota_policy_cookie_store.cc index c2ab6b0..325dc01 100644 --- a/content/browser/net/quota_policy_cookie_store.cc +++ b/content/browser/net/quota_policy_cookie_store.cc
@@ -149,7 +149,7 @@ if (!client_task_runner.get()) { client_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } if (!background_task_runner.get()) {
diff --git a/content/browser/notifications/notification_id_generator.cc b/content/browser/notifications/notification_id_generator.cc index 254c83e..7bdbb2c 100644 --- a/content/browser/notifications/notification_id_generator.cc +++ b/content/browser/notifications/notification_id_generator.cc
@@ -105,7 +105,7 @@ // tag is being used. Tags still identify uniqueness for the given origin. stream << base::IntToString(!tag.empty()); - if (!tag.size()) { + if (tag.empty()) { stream << base::IntToString(render_process_id_); stream << kSeparator;
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc index 9028997..8ee48789 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -69,7 +69,7 @@ // persistent notification ids are stable. For M44 we need to support the // case where there may be no notifications after a Chrome restart. if (notification_synchronization_supported && - !displayed_notifications.size()) { + displayed_notifications.empty()) { prune_database_on_open_ = true; } }
diff --git a/content/browser/notifications/platform_notification_context_unittest.cc b/content/browser/notifications/platform_notification_context_unittest.cc index f8fcbfe..3616794 100644 --- a/content/browser/notifications/platform_notification_context_unittest.cc +++ b/content/browser/notifications/platform_notification_context_unittest.cc
@@ -80,8 +80,7 @@ protected: // Creates a new PlatformNotificationContextImpl instance. When using this - // method, the underlying database will always be created in memory. The - // current message loop proxy will be used as the task runner. + // method, the underlying database will always be created in memory. PlatformNotificationContextImpl* CreatePlatformNotificationContext() { PlatformNotificationContextImpl* context = new PlatformNotificationContextImpl(base::FilePath(), &browser_context_,
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc index c81e19b..b4f9eb0 100644 --- a/content/browser/plugin_service_impl.cc +++ b/content/browser/plugin_service_impl.cc
@@ -334,15 +334,10 @@ // There should generally be very few plugins so a brute-force search is fine. PepperPluginInfo* PluginServiceImpl::GetRegisteredPpapiPluginInfo( const base::FilePath& plugin_path) { - PepperPluginInfo* info = NULL; for (size_t i = 0; i < ppapi_plugins_.size(); ++i) { - if (ppapi_plugins_[i].path == plugin_path) { - info = &ppapi_plugins_[i]; - break; - } + if (ppapi_plugins_[i].path == plugin_path) + return &ppapi_plugins_[i]; } - if (info) - return info; // We did not find the plugin in our list. But wait! the plugin can also // be a latecomer, as it happens with pepper flash. This information // can be obtained from the PluginList singleton and we can use it to @@ -350,12 +345,12 @@ // in the renderer side in PepperPluginRegistry. WebPluginInfo webplugin_info; if (!GetPluginInfoByPath(plugin_path, &webplugin_info)) - return NULL; + return nullptr; PepperPluginInfo new_pepper_info; if (!MakePepperPluginInfo(webplugin_info, &new_pepper_info)) - return NULL; + return nullptr; ppapi_plugins_.push_back(new_pepper_info); - return &ppapi_plugins_[ppapi_plugins_.size() - 1]; + return &ppapi_plugins_.back(); } void PluginServiceImpl::SetFilter(PluginServiceFilter* filter) {
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h index ca10f252..e2bb10e 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.h +++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -25,7 +25,6 @@ class BrowserCompositorMacClient { public: virtual NSView* BrowserCompositorMacGetNSView() const = 0; - virtual bool BrowserCompositorMacIsVisible() const = 0; virtual SkColor BrowserCompositorMacGetGutterColor(SkColor color) const = 0; virtual void BrowserCompositorMacSendCompositorSwapAck( int output_surface_id,
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm index 0593c725..a8e2fa9 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -391,10 +391,7 @@ } bool BrowserCompositorMac::DelegatedFrameHostIsVisible() const { - // TODO(ccameron): This should return the same value as - // |render_widget_host_is_hidden_|, rather than going back to the - // RenderWidgetHostImpl. - return client_->BrowserCompositorMacIsVisible(); + return state_ == HasAttachedCompositor; } SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index 5540e0b..78e5ca7 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -120,6 +120,12 @@ } bool DelegatedFrameHost::ShouldCreateResizeLock() { + static const bool is_disabled = + base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableResizeLock); + if (is_disabled) + return false; + if (!client_->DelegatedFrameCanCreateResizeLock()) return false;
diff --git a/content/browser/renderer_host/input/touch_emulator_unittest.cc b/content/browser/renderer_host/input/touch_emulator_unittest.cc index 51580ff..2852a1f 100644 --- a/content/browser/renderer_host/input/touch_emulator_unittest.cc +++ b/content/browser/renderer_host/input/touch_emulator_unittest.cc
@@ -219,7 +219,7 @@ if (ack) { // Can't send ack if there are some pending acks. - DCHECK(!touch_events_to_ack_.size()); + DCHECK(touch_events_to_ack_.empty()); // Touch event is forwarded, ack should not be handled by emulator. EXPECT_FALSE(emulator()->HandleTouchEventAck(
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc index 8e4c7ca..2433951 100644 --- a/content/browser/renderer_host/media/media_stream_manager.cc +++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -1599,7 +1599,7 @@ "457525 MediaStreamManager::InitializeDeviceManagersOnIOThread 4")); video_capture_manager_ = new VideoCaptureManager(media::VideoCaptureDeviceFactory::CreateFactory( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); #if defined(OS_WIN) // Use an STA Video Capture Thread to try to avoid crashes on enumeration of // buggy third party Direct Show modules, http://crbug.com/428958.
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc index 721c87e1..3a836dd 100644 --- a/content/browser/renderer_host/media/video_capture_controller.cc +++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -179,7 +179,7 @@ } // If this is the first client added to the controller, cache the parameters. - if (!controller_clients_.size()) + if (controller_clients_.empty()) video_capture_format_ = params.requested_format; // Signal error in case device is already in error state.
diff --git a/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.cc b/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.cc index d97070af3..60e29e32 100644 --- a/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.cc +++ b/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.cc
@@ -27,8 +27,7 @@ path_(path), render_process_id_(render_process_id), weak_factory_(this) { - task_runner_ = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); + task_runner_ = BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); } PepperExternalFileRefBackend::~PepperExternalFileRefBackend() {}
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 06621c08..70f8626 100644 --- a/content/browser/renderer_host/pepper/pepper_file_io_host.cc +++ b/content/browser/renderer_host/pepper/pepper_file_io_host.cc
@@ -110,8 +110,7 @@ PP_Resource resource) : ResourceHost(host->GetPpapiHost(), instance, resource), browser_ppapi_host_(host), - file_(BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) - .get()), + file_(BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()), open_flags_(0), file_system_type_(PP_FILESYSTEMTYPE_INVALID), max_written_offset_(0),
diff --git a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc index bccea9c..a8a1a3e 100644 --- a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc
@@ -103,7 +103,7 @@ PepperHostResolverMessageFilter::OverrideTaskRunnerForMessage( const IPC::Message& message) { if (message.type() == PpapiHostMsg_HostResolver_Resolve::ID) - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); return NULL; }
diff --git a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc index 467597f..ea05dc4 100644 --- a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc +++ b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc
@@ -233,23 +233,18 @@ std::vector<PP_FileType> file_types; if (error == base::File::FILE_OK && fs_host_.get()) { std::string dir_path = path_; - if (dir_path.empty() || dir_path[dir_path.size() - 1] != '/') + if (dir_path.empty() || dir_path.back() != '/') dir_path += '/'; - for (storage::FileSystemOperation::FileEntryList::const_iterator it = - accumulated_file_list->begin(); - it != accumulated_file_list->end(); - ++it) { - if (it->is_directory) - file_types.push_back(PP_FILETYPE_DIRECTORY); - else - file_types.push_back(PP_FILETYPE_REGULAR); + for (const auto& it : *accumulated_file_list) { + file_types.push_back(it.is_directory ? PP_FILETYPE_DIRECTORY + : PP_FILETYPE_REGULAR); ppapi::FileRefCreateInfo info; info.file_system_type = fs_type_; info.file_system_plugin_resource = fs_host_->pp_resource(); std::string path = - dir_path + storage::FilePathToString(base::FilePath(it->name)); + dir_path + storage::FilePathToString(base::FilePath(it.name)); info.internal_path = path; info.display_name = ppapi::GetNameForInternalFilePath(path); infos.push_back(info);
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc index 37e95ee0..20aebb9 100644 --- a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc
@@ -81,10 +81,10 @@ const IPC::Message& message) { switch (message.type()) { case PpapiHostMsg_TCPServerSocket_Listen::ID: - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); case PpapiHostMsg_TCPServerSocket_Accept::ID: case PpapiHostMsg_TCPServerSocket_StopListening::ID: - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } return NULL; }
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc index 23dea67..e876ee9 100644 --- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
@@ -153,14 +153,14 @@ case PpapiHostMsg_TCPSocket_Connect::ID: case PpapiHostMsg_TCPSocket_ConnectWithNetAddress::ID: case PpapiHostMsg_TCPSocket_Listen::ID: - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); case PpapiHostMsg_TCPSocket_SSLHandshake::ID: case PpapiHostMsg_TCPSocket_Read::ID: case PpapiHostMsg_TCPSocket_Write::ID: case PpapiHostMsg_TCPSocket_Accept::ID: case PpapiHostMsg_TCPSocket_Close::ID: case PpapiHostMsg_TCPSocket_SetOption::ID: - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } return NULL; }
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc index 06af4cb..7fb9f0a3 100644 --- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
@@ -108,12 +108,12 @@ case PpapiHostMsg_UDPSocket_SetOption::ID: case PpapiHostMsg_UDPSocket_Close::ID: case PpapiHostMsg_UDPSocket_RecvSlotAvailable::ID: - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); case PpapiHostMsg_UDPSocket_Bind::ID: case PpapiHostMsg_UDPSocket_SendTo::ID: case PpapiHostMsg_UDPSocket_JoinGroup::ID: case PpapiHostMsg_UDPSocket_LeaveGroup::ID: - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); } return NULL; }
diff --git a/content/browser/renderer_host/pepper/pepper_vpn_provider_message_filter_chromeos.cc b/content/browser/renderer_host/pepper/pepper_vpn_provider_message_filter_chromeos.cc index 6338167..8799b033 100644 --- a/content/browser/renderer_host/pepper/pepper_vpn_provider_message_filter_chromeos.cc +++ b/content/browser/renderer_host/pepper/pepper_vpn_provider_message_filter_chromeos.cc
@@ -94,7 +94,7 @@ case PpapiHostMsg_VpnProvider_Bind::ID: case PpapiHostMsg_VpnProvider_SendPacket::ID: case PpapiHostMsg_VpnProvider_OnPacketReceivedReply::ID: - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); } return nullptr; }
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 77e6b662..c4b72a3 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -169,6 +169,8 @@ #include "mojo/edk/embedder/embedder.h" #include "net/url_request/url_request_context_getter.h" #include "ppapi/shared_impl/ppapi_switches.h" +#include "services/shell/public/cpp/interface_provider.h" +#include "services/shell/public/cpp/interface_registry.h" #include "services/shell/runner/common/switches.h" #include "storage/browser/fileapi/sandbox_file_system_backend.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -600,6 +602,8 @@ #endif // defined(OS_MACOSX) #endif // USE_ATTACHMENT_BROKER + scoped_refptr<base::SequencedTaskRunner> io_task_runner = + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); shell::Connector* connector = BrowserContext::GetShellConnectorFor(browser_context_); // Some embedders may not initialize Mojo or the shell connector for a browser @@ -612,15 +616,14 @@ if (!MojoShellConnection::GetForProcess()) { shell::mojom::ServiceRequest request = mojo::GetProxy(&test_service_); MojoShellConnection::SetForProcess(MojoShellConnection::Create( - std::move(request))); + std::move(request), io_task_runner)); } connector = MojoShellConnection::GetForProcess()->GetConnector(); } mojo_child_connection_.reset(new MojoChildConnection( kRendererMojoApplicationName, - base::StringPrintf("%d_%d", id_, instance_id_++), - child_token_, - connector)); + base::StringPrintf("%d_%d", id_, instance_id_++), child_token_, connector, + io_task_runner)); } // static @@ -736,7 +739,7 @@ // is created. On Mac audio thread is the UI thread, a hang monitor is not // necessary or recommended. media::AudioManager::StartHangMonitorIfNeeded( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); #endif // !defined(OS_MACOSX) #if defined(OS_ANDROID) @@ -760,8 +763,7 @@ in_process_renderer_.reset( g_renderer_main_thread_factory(InProcessChildThreadParams( channel_id, - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) - ->task_runner(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), mojo_channel_token_, mojo_child_connection_->service_token()))); @@ -822,7 +824,7 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy( const std::string& channel_id) { scoped_refptr<base::SingleThreadTaskRunner> runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); mojo_channel_token_ = mojo::edk::GenerateRandomToken(); mojo::ScopedMessagePipeHandle handle = mojo::edk::CreateParentMessagePipe(mojo_channel_token_, child_token_); @@ -843,8 +845,8 @@ new IPC::ChannelProxy(this, runner.get())); #if USE_ATTACHMENT_BROKER IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel( - channel.get(), content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::IO)); + channel.get(), content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::IO)); #endif channel->Init(IPC::ChannelMojo::CreateServerFactory(std::move(handle)), true); return channel; @@ -1076,10 +1078,10 @@ GetInterfaceRegistry()->AddInterface( base::Bind(&MimeRegistryImpl::Create), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceLightHost::Create), io_task_runner); GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceMotionHost::Create), @@ -1121,16 +1123,11 @@ } shell::InterfaceRegistry* RenderProcessHostImpl::GetInterfaceRegistry() { - return GetChildConnection()->GetInterfaceRegistry(); + return mojo_child_connection_->GetInterfaceRegistry(); } shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() { - return GetChildConnection()->GetRemoteInterfaces(); -} - -shell::Connection* RenderProcessHostImpl::GetChildConnection() { - DCHECK(mojo_child_connection_); - return mojo_child_connection_->connection(); + return mojo_child_connection_->GetRemoteInterfaces(); } std::unique_ptr<base::SharedPersistentMemoryAllocator> @@ -1476,6 +1473,7 @@ switches::kFullMemoryCrashReport, switches::kInertVisualViewport, switches::kIPCConnectionTimeout, + switches::kIsRunningInMash, switches::kJavaScriptFlags, switches::kLoggingLevel, switches::kMainFrameResizesAreOrientationChanges, @@ -2433,9 +2431,8 @@ connector = MojoShellConnection::GetForProcess()->GetConnector(); mojo_child_connection_.reset(new MojoChildConnection( kRendererMojoApplicationName, - base::StringPrintf("%d_%d", id_, instance_id_++), - child_token_, - connector)); + base::StringPrintf("%d_%d", id_, instance_id_++), child_token_, connector, + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); within_process_died_observer_ = true; NotificationService::current()->Notify( @@ -2731,11 +2728,6 @@ audio_renderer_host()->GetOutputControllers(callback); } -BluetoothAdapterFactoryWrapper* -RenderProcessHostImpl::GetBluetoothAdapterFactoryWrapper() { - return &bluetooth_adapter_factory_wrapper_; -} - void RenderProcessHostImpl::RecomputeAndUpdateWebKitPreferences() { // We are updating all widgets including swapped out ones. std::unique_ptr<RenderWidgetHostIterator> widgets(
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h index 18b9386..5a07a6c 100644 --- a/content/browser/renderer_host/render_process_host_impl.h +++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -20,7 +20,6 @@ #include "base/single_thread_task_runner.h" #include "base/synchronization/waitable_event.h" #include "build/build_config.h" -#include "content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h" #include "content/browser/child_process_launcher.h" #include "content/browser/dom_storage/session_storage_namespace_impl.h" #include "content/browser/media/webrtc/webrtc_eventlog_host.h" @@ -158,7 +157,6 @@ void NotifyTimezoneChange(const std::string& timezone) override; shell::InterfaceRegistry* GetInterfaceRegistry() override; shell::InterfaceProvider* GetRemoteInterfaces() override; - shell::Connection* GetChildConnection() override; std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() override; const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; @@ -263,8 +261,6 @@ void GetAudioOutputControllers( const GetAudioOutputControllersCallback& callback) const override; - BluetoothAdapterFactoryWrapper* GetBluetoothAdapterFactoryWrapper(); - #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) // Launch the zygote early in the browser startup. static void EarlyZygoteLaunch(); @@ -467,8 +463,6 @@ scoped_refptr<AudioInputRendererHost> audio_input_renderer_host_; - BluetoothAdapterFactoryWrapper bluetooth_adapter_factory_wrapper_; - #if defined(OS_ANDROID) scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; #endif
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 8c8bae4..00ebb223 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1254,8 +1254,8 @@ power_save_blocker_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, device::PowerSaveBlocker::kReasonOther, "GetSnapshot", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); } #endif pending_browser_snapshots_.insert(std::make_pair(id, callback));
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc index d6f8de7..0df21e1e 100644 --- a/content/browser/renderer_host/render_widget_host_input_event_router.cc +++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
@@ -57,6 +57,12 @@ if (view == touchpad_gesture_target_.target) touchpad_gesture_target_.target = nullptr; + + if (view == bubbling_gesture_scroll_target_.target || + view == first_bubbling_scroll_target_.target) { + bubbling_gesture_scroll_target_.target = nullptr; + first_bubbling_scroll_target_.target = nullptr; + } } void RenderWidgetHostInputEventRouter::ClearAllObserverRegistrations() { @@ -237,6 +243,108 @@ } } +void RenderWidgetHostInputEventRouter::BubbleScrollEvent( + RenderWidgetHostViewBase* target_view, + const blink::WebGestureEvent& event) { + // TODO(kenrb, tdresser): This needs to be refactored when scroll latching + // is implemented (see https://crbug.com/526463). This design has some + // race problems that can result in lost scroll delta, which are very + // difficult to resolve until this is changed to do all scroll targeting, + // including bubbling, based on GestureScrollBegin. + DCHECK(target_view); + DCHECK(event.type == blink::WebInputEvent::GestureScrollUpdate || + event.type == blink::WebInputEvent::GestureScrollEnd); + // DCHECK_XNOR the current and original bubble targets. Both should be set + // if a bubbling gesture scroll is in progress. + DCHECK(!first_bubbling_scroll_target_.target == + !bubbling_gesture_scroll_target_.target); + + // If target_view is already set up for bubbled scrolls, we forward + // the event to the current scroll target without further consideration. + if (target_view == first_bubbling_scroll_target_.target) { + bubbling_gesture_scroll_target_.target->ProcessGestureEvent( + event, ui::LatencyInfo()); + if (event.type == blink::WebInputEvent::GestureScrollEnd) { + first_bubbling_scroll_target_.target = nullptr; + bubbling_gesture_scroll_target_.target = nullptr; + } + return; + } + + // Disregard GestureScrollEnd events going to non-current targets. + // These should only happen on ACKs of synthesized GSE events that are + // sent from SendGestureScrollEnd calls, and are not relevant here. + if (event.type == blink::WebInputEvent::GestureScrollEnd) + return; + + // This is a special case to catch races where multiple GestureScrollUpdates + // have been sent to a renderer before the first one was ACKed, and the ACK + // caused a bubble retarget. In this case they all get forwarded. + if (target_view == bubbling_gesture_scroll_target_.target) { + bubbling_gesture_scroll_target_.target->ProcessGestureEvent( + event, ui::LatencyInfo()); + return; + } + + // If target_view has unrelated gesture events in progress, do + // not proceed. This could cause confusion between independent + // scrolls. + if (target_view == touchscreen_gesture_target_.target || + target_view == touchpad_gesture_target_.target) + return; + + // This accounts for bubbling through nested OOPIFs. A gesture scroll has + // been bubbled but the target has sent back a gesture scroll event ack with + // unused scroll delta, and so another level of bubbling is needed. This + // requires a GestureScrollEnd be sent to the last view, which will no + // longer be the scroll target. + if (bubbling_gesture_scroll_target_.target) + SendGestureScrollEnd(bubbling_gesture_scroll_target_.target, event); + else + first_bubbling_scroll_target_.target = target_view; + + bubbling_gesture_scroll_target_.target = target_view; + + SendGestureScrollBegin(target_view, event); + target_view->ProcessGestureEvent(event, ui::LatencyInfo()); +} + +void RenderWidgetHostInputEventRouter::SendGestureScrollBegin( + RenderWidgetHostViewBase* view, + const blink::WebGestureEvent& event) { + DCHECK(event.type == blink::WebInputEvent::GestureScrollUpdate); + blink::WebGestureEvent scroll_begin(event); + scroll_begin.type = blink::WebInputEvent::GestureScrollBegin; + scroll_begin.data.scrollBegin.deltaXHint = event.data.scrollUpdate.deltaX; + scroll_begin.data.scrollBegin.deltaYHint = event.data.scrollUpdate.deltaY; + scroll_begin.data.scrollBegin.deltaHintUnits = + event.data.scrollUpdate.deltaUnits; + view->ProcessGestureEvent(scroll_begin, ui::LatencyInfo()); +} + +void RenderWidgetHostInputEventRouter::SendGestureScrollEnd( + RenderWidgetHostViewBase* view, + const blink::WebGestureEvent& event) { + DCHECK(event.type == blink::WebInputEvent::GestureScrollUpdate); + blink::WebGestureEvent scroll_end(event); + scroll_end.type = blink::WebInputEvent::GestureScrollEnd; + scroll_end.timeStampSeconds = + (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); + scroll_end.data.scrollEnd.inertialPhase = + event.data.scrollUpdate.inertialPhase; + scroll_end.data.scrollEnd.deltaUnits = event.data.scrollUpdate.deltaUnits; + view->ProcessGestureEvent(scroll_end, ui::LatencyInfo()); +} + +void RenderWidgetHostInputEventRouter::CancelScrollBubbling( + RenderWidgetHostViewBase* target_view) { + DCHECK(target_view); + if (target_view == first_bubbling_scroll_target_.target) { + first_bubbling_scroll_target_.target = nullptr; + bubbling_gesture_scroll_target_.target = nullptr; + } +} + void RenderWidgetHostInputEventRouter::AddSurfaceIdNamespaceOwner( uint32_t id, RenderWidgetHostViewBase* owner) {
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.h b/content/browser/renderer_host/render_widget_host_input_event_router.h index 387c5c2..18f7172 100644 --- a/content/browser/renderer_host/render_widget_host_input_event_router.h +++ b/content/browser/renderer_host/render_widget_host_input_event_router.h
@@ -66,6 +66,10 @@ blink::WebTouchEvent *event, const ui::LatencyInfo& latency); + void BubbleScrollEvent(RenderWidgetHostViewBase* target_view, + const blink::WebGestureEvent& event); + void CancelScrollBubbling(RenderWidgetHostViewBase* target_view); + void AddSurfaceIdNamespaceOwner(uint32_t id, RenderWidgetHostViewBase* owner); void RemoveSurfaceIdNamespaceOwner(uint32_t id); @@ -117,11 +121,21 @@ blink::WebGestureEvent* event, const ui::LatencyInfo& latency); + // The following methods take a GestureScrollUpdate event and send a + // GestureScrollBegin or GestureScrollEnd for wrapping it. This is needed + // when GestureScrollUpdates are being forwarded for scroll bubbling. + void SendGestureScrollBegin(RenderWidgetHostViewBase* view, + const blink::WebGestureEvent& event); + void SendGestureScrollEnd(RenderWidgetHostViewBase* view, + const blink::WebGestureEvent& event); + SurfaceIdNamespaceOwnerMap owner_map_; TargetQueue touchscreen_gesture_target_queue_; TargetData touch_target_; TargetData touchscreen_gesture_target_; TargetData touchpad_gesture_target_; + TargetData bubbling_gesture_scroll_target_; + TargetData first_bubbling_scroll_target_; int active_touches_; std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash> hittest_data_;
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index 55216b1c..efe0d820 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -961,7 +961,7 @@ return; std::copy(resources.begin(), resources.end(), std::back_inserter(surface_returned_resources_)); - if (!ack_callbacks_.size()) + if (ack_callbacks_.empty()) SendReturnedDelegatedResources(last_output_surface_id_); }
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h index 3e664e3..625346a 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -445,7 +445,6 @@ // BrowserCompositorMacClient implementation. NSView* BrowserCompositorMacGetNSView() const override; - bool BrowserCompositorMacIsVisible() const override; SkColor BrowserCompositorMacGetGutterColor(SkColor color) const override; void BrowserCompositorMacSendCompositorSwapAck( int output_surface_id,
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 fccf4a5..79c311e0 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -408,10 +408,6 @@ return cocoa_view_; } -bool RenderWidgetHostViewMac::BrowserCompositorMacIsVisible() const { - return !render_widget_host_->is_hidden(); -} - SkColor RenderWidgetHostViewMac::BrowserCompositorMacGetGutterColor( SkColor color) const { // When making an element on the page fullscreen the element's background @@ -1305,14 +1301,6 @@ page_at_minimum_scale_ = frame.metadata.page_scale_factor == frame.metadata.min_page_scale_factor; if (frame.delegated_frame_data) { - // TODO(ccameron): This would not be needed if BrowserCompostiorMac were to - // correctly subscribe to the show and hide notifications for - // RenderWidgetHostImpl. We do not correctly subscribe to these - // notifications because we want to set the hide property property only - // after all notifications (the thumbnailer in particular) have all - // completed. - browser_compositor_->SetRenderWidgetHostIsHidden( - render_widget_host_->is_hidden()); browser_compositor_->SwapCompositorFrame(output_surface_id, std::move(frame)); SendVSyncParametersToRenderer();
diff --git a/content/browser/renderer_host/render_widget_host_view_mus.cc b/content/browser/renderer_host/render_widget_host_view_mus.cc index 3932681..1befbca3 100644 --- a/content/browser/renderer_host/render_widget_host_view_mus.cc +++ b/content/browser/renderer_host/render_widget_host_view_mus.cc
@@ -43,7 +43,7 @@ // Connect to the renderer, pass it a WindowTreeClient interface request // and embed that client inside our mus window. mojom::RenderWidgetWindowTreeClientFactoryPtr factory; - host_->GetProcess()->GetChildConnection()->GetInterface(&factory); + host_->GetProcess()->GetRemoteInterfaces()->GetInterface(&factory); ui::mojom::WindowTreeClientPtr window_tree_client; factory->CreateWindowTreeClientForRenderWidget(
diff --git a/content/browser/renderer_host/websocket_blob_sender_unittest.cc b/content/browser/renderer_host/websocket_blob_sender_unittest.cc index f3b44dd..590c914b 100644 --- a/content/browser/renderer_host/websocket_blob_sender_unittest.cc +++ b/content/browser/renderer_host/websocket_blob_sender_unittest.cc
@@ -156,7 +156,7 @@ net::WebSocketEventInterface::CHANNEL_ALIVE; return sender_->Start( uuid, expected_size, context(), GetFileSystemContext(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), &channel_state, callback); }
diff --git a/content/browser/renderer_host/websocket_host.cc b/content/browser/renderer_host/websocket_host.cc index e0efc20..6f1ebde 100644 --- a/content/browser/renderer_host/websocket_host.cc +++ b/content/browser/renderer_host/websocket_host.cc
@@ -500,7 +500,7 @@ int rv = blob_sender_->Start( uuid, expected_size, dispatcher_->blob_storage_context(), file_system_context, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get(), &channel_state, base::Bind(&WebSocketHost::BlobSendComplete, base::Unretained(this))); if (channel_state == net::WebSocketEventInterface::CHANNEL_ALIVE &&
diff --git a/content/browser/service_worker/embedded_worker_registry.h b/content/browser/service_worker/embedded_worker_registry.h index 8e83b1d..4a420b0 100644 --- a/content/browser/service_worker/embedded_worker_registry.h +++ b/content/browser/service_worker/embedded_worker_registry.h
@@ -111,6 +111,9 @@ friend class base::RefCounted<EmbeddedWorkerRegistry>; friend class EmbeddedWorkerInstance; friend class EmbeddedWorkerInstanceTest; + // TODO(falken): For temporary debugging. Remove when https://crbug.com/625040 + // is fixed. + friend class ServiceWorkerDispatcherHost; FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTest, RemoveWorkerInSharedProcess);
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc index 631ea7b..fa5725bc 100644 --- a/content/browser/service_worker/service_worker_browsertest.cc +++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -1689,7 +1689,7 @@ blob_data_handle_ = std::move(blob_data_handle); blob_reader_ = blob_data_handle_->CreateReader( file_system_context_, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get()); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()); const storage::BlobReader::Status status = blob_reader_->CalculateSize( base::Bind(&self::OnBlobReaderCalculateSizeCallback, this, result, continuation));
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc index a289fdf..0c32d716 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -128,7 +128,7 @@ std::unique_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager( new ServiceWorkerDatabaseTaskManagerImpl(pool)); scoped_refptr<base::SingleThreadTaskRunner> disk_cache_thread = - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE); + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE); InitInternal(user_data_directory, std::move(database_task_manager), disk_cache_thread, quota_manager_proxy, special_storage_policy); }
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.cc b/content/browser/service_worker/service_worker_controllee_request_handler.cc index e45ca4c..2aedf74 100644 --- a/content/browser/service_worker/service_worker_controllee_request_handler.cc +++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc
@@ -27,6 +27,23 @@ namespace content { +namespace { + +bool MaybeForwardToServiceWorker(ServiceWorkerURLRequestJob* job, + const ServiceWorkerVersion* version) { + DCHECK(job); + DCHECK(version); + if (version->has_fetch_handler()) { + job->ForwardToServiceWorker(); + return true; + } + + job->FallbackToNetworkOrRenderer(); + return false; +} + +} // namespace + ServiceWorkerControlleeRequestHandler::ServiceWorkerControlleeRequestHandler( base::WeakPtr<ServiceWorkerContextCore> context, base::WeakPtr<ServiceWorkerProviderHost> provider_host, @@ -266,11 +283,15 @@ ServiceWorkerMetrics::CountControlledPageLoad( stripped_url_, active_version->has_fetch_handler(), is_main_frame_load_); - job_->ForwardToServiceWorker(); + bool is_forwarded = + MaybeForwardToServiceWorker(job_.get(), active_version.get()); + TRACE_EVENT_ASYNC_END2( "ServiceWorker", "ServiceWorkerControlleeRequestHandler::PrepareForMainResource", - job_.get(), "Status", status, "Info", "Forwarded to the ServiceWorker"); + job_.get(), "Status", status, "Info", + (is_forwarded) ? "Forwarded to the ServiceWorker" + : "Skipped the ServiceWorker which has no fetch handler"); } void ServiceWorkerControlleeRequestHandler::OnVersionStatusChanged( @@ -294,7 +315,8 @@ provider_host_->AssociateRegistration(registration, false /* notify_controllerchange */); - job_->ForwardToServiceWorker(); + + MaybeForwardToServiceWorker(job_.get(), version); } void ServiceWorkerControlleeRequestHandler::DidUpdateRegistration( @@ -364,7 +386,7 @@ DCHECK(job_.get()); DCHECK(context_); DCHECK(provider_host_->active_version()); - job_->ForwardToServiceWorker(); + MaybeForwardToServiceWorker(job_.get(), provider_host_->active_version()); } void ServiceWorkerControlleeRequestHandler::OnPrepareToRestart() {
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc index 1e2ac45..ef10ba4 100644 --- a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc +++ b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
@@ -60,7 +60,8 @@ ServiceWorkerRequestTestResources( ServiceWorkerControlleeRequestHandlerTest* test, const GURL& url, - ResourceType type) + ResourceType type, + FetchRequestMode fetch_type = FETCH_REQUEST_MODE_NO_CORS) : test_(test), request_(test->url_request_context_.CreateRequest( url, @@ -70,7 +71,7 @@ test->context()->AsWeakPtr(), test->provider_host_, base::WeakPtr<storage::BlobStorageContext>(), - FETCH_REQUEST_MODE_NO_CORS, + fetch_type, FETCH_CREDENTIALS_MODE_OMIT, FetchRedirectMode::FOLLOW_MODE, type, @@ -171,6 +172,7 @@ // Store an activated worker. version_->SetStatus(ServiceWorkerVersion::ACTIVATED); + version_->set_has_fetch_handler(true); registration_->SetActiveVersion(version_); context()->storage()->StoreRegistration( registration_.get(), @@ -199,6 +201,7 @@ TEST_F(ServiceWorkerControlleeRequestHandlerTest, ActivateWaitingVersion) { // Store a registration that is installed but not activated yet. version_->SetStatus(ServiceWorkerVersion::INSTALLED); + version_->set_has_fetch_handler(true); registration_->SetWaitingVersion(version_); context()->storage()->StoreRegistration( registration_.get(), @@ -232,6 +235,7 @@ TEST_F(ServiceWorkerControlleeRequestHandlerTest, InstallingRegistration) { // Create an installing registration. version_->SetStatus(ServiceWorkerVersion::INSTALLING); + version_->set_has_fetch_handler(true); registration_->SetInstallingVersion(version_); context()->storage()->NotifyInstallingRegistration(registration_.get()); @@ -257,6 +261,7 @@ // Store a registration so the call to FindRegistrationForDocument will read // from the database. version_->SetStatus(ServiceWorkerVersion::ACTIVATED); + version_->set_has_fetch_handler(true); registration_->SetActiveVersion(version_); context()->storage()->StoreRegistration( registration_.get(), @@ -284,4 +289,53 @@ EXPECT_FALSE(sw_job->ShouldForwardToServiceWorker()); } +TEST_F(ServiceWorkerControlleeRequestHandlerTest, FallbackWithNoFetchHandler) { + version_->SetStatus(ServiceWorkerVersion::ACTIVATED); + version_->set_has_fetch_handler(false); + registration_->SetActiveVersion(version_); + context()->storage()->StoreRegistration( + registration_.get(), version_.get(), + base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); + base::RunLoop().RunUntilIdle(); + + ServiceWorkerRequestTestResources main_test_resources( + this, GURL("https://host/scope/doc"), RESOURCE_TYPE_MAIN_FRAME); + ServiceWorkerURLRequestJob* main_job = main_test_resources.MaybeCreateJob(); + + EXPECT_FALSE(main_job->ShouldFallbackToNetwork()); + EXPECT_FALSE(main_job->ShouldForwardToServiceWorker()); + EXPECT_FALSE(version_->HasControllee()); + + base::RunLoop().RunUntilIdle(); + + EXPECT_TRUE(main_job->ShouldFallbackToNetwork()); + EXPECT_FALSE(main_job->ShouldForwardToServiceWorker()); + EXPECT_TRUE(version_->HasControllee()); + EXPECT_EQ(version_, provider_host_->controlling_version()); + + ServiceWorkerRequestTestResources sub_test_resources( + this, GURL("https://host/scope/doc/subresource"), RESOURCE_TYPE_IMAGE); + ServiceWorkerURLRequestJob* sub_job = sub_test_resources.MaybeCreateJob(); + + // This job shouldn't be created because this worker doesn't have fetch + // handler. + EXPECT_EQ(nullptr, sub_job); + + // CORS request should be returned to renderer for CORS checking. + ServiceWorkerRequestTestResources sub_test_resources_cors( + this, GURL("https://host/scope/doc/subresource"), RESOURCE_TYPE_SCRIPT, + FETCH_REQUEST_MODE_CORS); + ServiceWorkerURLRequestJob* sub_cors_job = + sub_test_resources_cors.MaybeCreateJob(); + + EXPECT_TRUE(sub_cors_job); + EXPECT_FALSE(sub_cors_job->ShouldFallbackToNetwork()); + EXPECT_FALSE(sub_cors_job->ShouldForwardToServiceWorker()); + + base::RunLoop().RunUntilIdle(); + + EXPECT_FALSE(sub_cors_job->ShouldFallbackToNetwork()); + EXPECT_FALSE(sub_cors_job->ShouldForwardToServiceWorker()); +} + } // namespace content
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc index 5173be2..08cb58c 100644 --- a/content/browser/service_worker/service_worker_dispatcher_host.cc +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -6,6 +6,7 @@ #include <utility> +#include "base/debug/crash_logging.h" #include "base/logging.h" #include "base/macros.h" #include "base/memory/ptr_util.h" @@ -85,6 +86,52 @@ OriginCanAccessServiceWorkers(given_document_url); } +std::string GetIPCMessageTypeAsString(uint32_t type) { + switch (type) { + case ServiceWorkerHostMsg_InstallEventFinished::ID: + return "ServiceWorkerHostMsg_InstallEventFinished"; + case ServiceWorkerHostMsg_ActivateEventFinished::ID: + return "ServiceWorkerHostMsg_ActivateEventFinished"; + case ServiceWorkerHostMsg_ExtendableMessageEventFinished::ID: + return "ServiceWorkerHostMsg_ExtendableMessageEventFinished"; + case ServiceWorkerHostMsg_FetchEventResponse::ID: + return "ServiceWorkerHostMsg_FetchEventResponse"; + case ServiceWorkerHostMsg_FetchEventFinished::ID: + return "ServiceWorkerHostMsg_FetchEventFinished"; + case ServiceWorkerHostMsg_NotificationClickEventFinished::ID: + return "ServiceWorkerHostMsg_NotificationClickEventFinished"; + case ServiceWorkerHostMsg_NotificationCloseEventFinished::ID: + return "ServiceWorkerHostMsg_NotificationCloseEventFinished"; + case ServiceWorkerHostMsg_PushEventFinished::ID: + return "ServiceWorkerHostMsg_PushEventFinished"; + case ServiceWorkerHostMsg_Pong::ID: + return "ServiceWorkerHostMsg_Pong"; + case ServiceWorkerHostMsg_GetClient::ID: + return "ServiceWorkerHostMsg_GetClient"; + case ServiceWorkerHostMsg_GetClients::ID: + return "ServiceWorkerHostMsg_GetClients"; + case ServiceWorkerHostMsg_PostMessageToClient::ID: + return "ServiceWorkerHostMsg_PostMessageToClient"; + case ServiceWorkerHostMsg_SetCachedMetadata::ID: + return "ServiceWorkerHostMsg_SetCachedMetadata"; + case ServiceWorkerHostMsg_ClearCachedMetadata::ID: + return "ServiceWorkerHostMsg_ClearCachedMetadata"; + case ServiceWorkerHostMsg_OpenWindow::ID: + return "ServiceWorkerHostMsg_OpenWindow"; + case ServiceWorkerHostMsg_FocusClient::ID: + return "ServiceWorkerHostMsg_FocusClient"; + case ServiceWorkerHostMsg_NavigateClient::ID: + return "ServiceWorkerHostMsg_NavigateClient"; + case ServiceWorkerHostMsg_SkipWaiting::ID: + return "ServiceWorkerHostMsg_SkipWaiting"; + case ServiceWorkerHostMsg_ClaimClients::ID: + return "ServiceWorkerHostMsg_ClaimClients"; + case ServiceWorkerHostMsg_RegisterForeignFetchScopes::ID: + return "ServiceWorkerHostMsg_RegisterForeignFetchScopes"; + } + return "Unknown"; +} + } // namespace ServiceWorkerDispatcherHost::ServiceWorkerDispatcherHost( @@ -207,8 +254,18 @@ if (!handled && GetContext()) { handled = GetContext()->embedded_worker_registry()->OnMessageReceived( message, render_process_id_); - if (!handled) + if (!handled) { + // Temporary debugging for https://crbug.com/625040 + EmbeddedWorkerInstance* worker = + GetContext()->embedded_worker_registry()->GetWorkerForMessage( + render_process_id_, message.routing_id()); + base::debug::ScopedCrashKey("swdh_not_handled_message_type", + GetIPCMessageTypeAsString(message.type())); + base::debug::ScopedCrashKey( + "swdh_not_handled_worker_status", + EmbeddedWorkerInstance::StatusToString(worker->status())); bad_message::ReceivedBadMessage(this, bad_message::SWDH_NOT_HANDLED); + } } return handled;
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h index 98b87b6..e727cc1a5 100644 --- a/content/browser/service_worker/service_worker_version.h +++ b/content/browser/service_worker/service_worker_version.h
@@ -355,6 +355,8 @@ FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, ActivateWaitingVersion); + FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, + FallbackWithNoFetchHandler); FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, IdleTimeout); FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, SetDevToolsAttached); FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, StaleUpdate_FreshWorker);
diff --git a/content/browser/shared_worker/shared_worker_service_impl.cc b/content/browser/shared_worker/shared_worker_service_impl.cc index 7e5134c..2bc9179 100644 --- a/content/browser/shared_worker/shared_worker_service_impl.cc +++ b/content/browser/shared_worker/shared_worker_service_impl.cc
@@ -422,27 +422,24 @@ SharedWorkerMessageFilter* filter) { ScopedWorkerDependencyChecker checker(this); std::vector<ProcessRouteIdPair> remove_list; - for (WorkerHostMap::iterator iter = worker_hosts_.begin(); - iter != worker_hosts_.end(); - ++iter) { - iter->second->FilterShutdown(filter); - if (iter->first.first == filter->render_process_id()) - remove_list.push_back(iter->first); + for (auto it : worker_hosts_) { + it.second->FilterShutdown(filter); + if (it.first.first == filter->render_process_id()) + remove_list.push_back(it.first); } - for (size_t i = 0; i < remove_list.size(); ++i) { + for (ProcessRouteIdPair& to_remove : remove_list) { std::unique_ptr<SharedWorkerHost> host = - worker_hosts_.take_and_erase(remove_list[i]); + worker_hosts_.take_and_erase(to_remove); } std::vector<int> remove_pending_instance_list; - for (PendingInstanceMap::iterator iter = pending_instances_.begin(); - iter != pending_instances_.end(); ++iter) { - iter->second->RemoveRequest(filter->render_process_id()); - if (!iter->second->requests()->size()) - remove_pending_instance_list.push_back(iter->first); + for (auto it : pending_instances_) { + it.second->RemoveRequest(filter->render_process_id()); + if (it.second->requests()->empty()) + remove_pending_instance_list.push_back(it.first); } - for (size_t i = 0; i < remove_pending_instance_list.size(); ++i) - pending_instances_.take_and_erase(remove_pending_instance_list[i]); + for (int to_remove : remove_pending_instance_list) + pending_instances_.take_and_erase(to_remove); } void SharedWorkerServiceImpl::NotifyWorkerDestroyed(int worker_process_id,
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc index 12caec4..1baeba0 100644 --- a/content/browser/site_per_process_browsertest.cc +++ b/content/browser/site_per_process_browsertest.cc
@@ -954,7 +954,7 @@ // This test uses the position of the nested iframe within the parent iframe // to infer the scroll position of the parent. FrameRectChangedMessageFilter // catches updates to the position in order to avoid busy waiting. - // It gets set created early to catch the initial rects from the navigation. + // It gets created early to catch the initial rects from the navigation. scoped_refptr<FrameRectChangedMessageFilter> filter = new FrameRectChangedMessageFilter(); parent_iframe_node->current_frame_host()->GetProcess()->AddFilter( @@ -964,6 +964,12 @@ "b.com", "/frame_tree/page_with_positioned_frame.html")); NavigateFrameToURL(parent_iframe_node, site_url); + // Navigate the nested frame to a page large enough to have scrollbars. + FrameTreeNode* nested_iframe_node = parent_iframe_node->child_at(0); + GURL nested_site_url(embedded_test_server()->GetURL( + "baz.com", "/tall_page.html")); + NavigateFrameToURL(nested_iframe_node, nested_site_url); + EXPECT_EQ( " Site A ------------ proxies for B C\n" " +--Site B ------- proxies for A C\n" @@ -979,7 +985,6 @@ ->GetRenderWidgetHost() ->GetView()); - FrameTreeNode* nested_iframe_node = parent_iframe_node->child_at(0); RenderWidgetHostViewBase* rwhv_nested = static_cast<RenderWidgetHostViewBase*>( nested_iframe_node->current_frame_host() @@ -1074,6 +1079,24 @@ run_loop.Run(); update_rect = filter->last_rect(); } + + // Test that when the child frame absorbs all of the scroll delta, it does + // not propagate to the parent (see https://crbug.com/621624). + filter->Reset(); + scroll_event.deltaY = -5.0f; + rwhv_nested->ProcessMouseWheelEvent(scroll_event, ui::LatencyInfo()); + // It isn't possible to busy loop waiting on the renderer here because we + // are explicitly testing that something does *not* happen. This creates a + // small chance of false positives but shouldn't result in false negatives, + // so flakiness implies this test is failing. + { + base::RunLoop run_loop; + base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( + FROM_HERE, run_loop.QuitClosure(), TestTimeouts::action_timeout()); + run_loop.Run(); + } + DCHECK_EQ(filter->last_rect().x(), 0); + DCHECK_EQ(filter->last_rect().y(), 0); } // Test that an ET_SCROLL event sent to an out-of-process iframe correctly
diff --git a/content/browser/speech/endpointer/energy_endpointer.cc b/content/browser/speech/endpointer/energy_endpointer.cc index a554465..fc1d871 100644 --- a/content/browser/speech/endpointer/energy_endpointer.cc +++ b/content/browser/speech/endpointer/energy_endpointer.cc
@@ -98,7 +98,7 @@ } float EnergyEndpointer::HistoryRing::RingSum(float duration_sec) { - if (!decision_points_.size()) + if (decision_points_.empty()) return 0.0; int64_t sum_us = 0;
diff --git a/content/browser/speech/speech_recognition_browsertest.cc b/content/browser/speech/speech_recognition_browsertest.cc index d2c3d58..ac6bcbc 100644 --- a/content/browser/speech/speech_recognition_browsertest.cc +++ b/content/browser/speech/speech_recognition_browsertest.cc
@@ -121,10 +121,9 @@ void SetUpOnMainThread() override { ASSERT_TRUE(SpeechRecognitionManagerImpl::GetInstance()); media::AudioManager::StartHangMonitorIfNeeded( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); - SpeechRecognizerImpl::SetAudioManagerForTesting( - new media::MockAudioManager(BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::IO))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); + SpeechRecognizerImpl::SetAudioManagerForTesting(new media::MockAudioManager( + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); } void TearDownOnMainThread() override {
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index da339fe..3bc3b52 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -441,10 +441,9 @@ // that utilizes the QuotaManager. scoped_refptr<storage::QuotaManager> quota_manager = new storage::QuotaManager( - in_memory, - partition_path, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + in_memory, partition_path, + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), context->GetSpecialStoragePolicy()); // Each consumer is responsible for registering its QuotaClient during @@ -454,12 +453,10 @@ context, partition_path, in_memory, quota_manager->proxy()); scoped_refptr<storage::DatabaseTracker> database_tracker = - new storage::DatabaseTracker(partition_path, - in_memory, - context->GetSpecialStoragePolicy(), - quota_manager->proxy(), - BrowserThread::GetMessageLoopProxyForThread( - BrowserThread::FILE).get()); + new storage::DatabaseTracker( + partition_path, in_memory, context->GetSpecialStoragePolicy(), + quota_manager->proxy(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()); scoped_refptr<DOMStorageContextWrapper> dom_storage_context = new DOMStorageContextWrapper( @@ -708,7 +705,7 @@ // and SessionStorage. This loop wipes out most HTML5 storage for the given // origins. DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (!origins.size()) { + if (origins.empty()) { callback.Run(); return; }
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc index ba0c005..ae72484 100644 --- a/content/browser/storage_partition_impl_map.cc +++ b/content/browser/storage_partition_impl_map.cc
@@ -82,10 +82,8 @@ // the main thread but we want blob_protocol_handler_ constructed // on the IO thread. blob_protocol_handler_.reset(new storage::BlobProtocolHandler( - blob_storage_context_->context(), - file_system_context_.get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) - .get())); + blob_storage_context_->context(), file_system_context_.get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get())); } return blob_protocol_handler_->MaybeCreateJob(request, network_delegate); }
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc index f79529f..99fc51f 100644 --- a/content/browser/storage_partition_impl_unittest.cc +++ b/content/browser/storage_partition_impl_unittest.cc
@@ -576,10 +576,9 @@ MockQuotaManager* GetMockManager() { if (!quota_manager_.get()) { quota_manager_ = new MockQuotaManager( - browser_context_->IsOffTheRecord(), - browser_context_->GetPath(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(), + browser_context_->IsOffTheRecord(), browser_context_->GetPath(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), + BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), browser_context_->GetSpecialStoragePolicy()); } return quota_manager_.get();
diff --git a/content/browser/tracing/power_tracing_agent.cc b/content/browser/tracing/power_tracing_agent.cc index d1b718b..e46341a0 100644 --- a/content/browser/tracing/power_tracing_agent.cc +++ b/content/browser/tracing/power_tracing_agent.cc
@@ -69,9 +69,8 @@ DCHECK_CURRENTLY_ON(BrowserThread::IO); battor_agent_.reset(new battor::BattOrAgent( - path, this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); + path, this, BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); start_tracing_callback_ = callback; battor_agent_->StartTracing();
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc index e4b8228..ddab806 100644 --- a/content/browser/utility_process_host_impl.cc +++ b/content/browser/utility_process_host_impl.cc
@@ -172,9 +172,10 @@ child_token_)); mojo_child_connection_.reset(new MojoChildConnection( kUtilityMojoApplicationName, - base::StringPrintf("%d_0", process_->GetData().id), - child_token_, - MojoShellContext::GetConnectorForIOThread())); + base::StringPrintf("%d_0", process_->GetData().id), child_token_, + MojoShellContext::GetConnectorForIOThread(), + BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) + ->task_runner())); } UtilityProcessHostImpl::~UtilityProcessHostImpl() { @@ -239,11 +240,11 @@ } shell::InterfaceRegistry* UtilityProcessHostImpl::GetInterfaceRegistry() { - return mojo_child_connection_->connection()->GetInterfaceRegistry(); + return mojo_child_connection_->GetInterfaceRegistry(); } shell::InterfaceProvider* UtilityProcessHostImpl::GetRemoteInterfaces() { - return mojo_child_connection_->connection()->GetRemoteInterfaces(); + return mojo_child_connection_->GetRemoteInterfaces(); } void UtilityProcessHostImpl::SetName(const base::string16& name) {
diff --git a/content/browser/wake_lock/wake_lock_service_context.cc b/content/browser/wake_lock/wake_lock_service_context.cc index b17b5185..674f130a 100644 --- a/content/browser/wake_lock/wake_lock_service_context.cc +++ b/content/browser/wake_lock/wake_lock_service_context.cc
@@ -69,8 +69,8 @@ wake_lock_.reset(new device::PowerSaveBlocker( device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, device::PowerSaveBlocker::kReasonOther, "Wake Lock API", - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); #if defined(OS_ANDROID) // On Android, additionaly associate the blocker with this WebContents.
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc index fb45acf..b5f05b7 100644 --- a/content/browser/web_contents/web_contents_android.cc +++ b/content/browser/web_contents/web_contents_android.cc
@@ -601,7 +601,6 @@ // base::Callback. ScopedJavaGlobalRef<jobject> j_callback; j_callback.Reset(env, callback); - gfx::DeviceDisplayInfo device_info; WebContentsImpl::AXTreeSnapshotCallback snapshot_callback = base::Bind(&AXTreeSnapshotCallback, j_callback);
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm index 78fbfe9..90e950a 100644 --- a/content/browser/web_contents/web_contents_view_mac.mm +++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -660,7 +660,6 @@ } - (void)windowChangedOcclusionState:(NSNotification*)notification { - DCHECK(base::mac::IsOSMavericksOrLater()); NSWindow* window = [notification object]; WebContentsImpl* webContents = [self webContents]; if (window && webContents && !webContents->IsBeingDestroyed()) {
diff --git a/content/child/background_sync/background_sync_provider.cc b/content/child/background_sync/background_sync_provider.cc index 517a6b61..b10a33c 100644 --- a/content/child/background_sync/background_sync_provider.cc +++ b/content/child/background_sync/background_sync_provider.cc
@@ -16,6 +16,7 @@ #include "content/child/background_sync/background_sync_type_converters.h" #include "content/child/child_thread_impl.h" #include "content/child/service_worker/web_service_worker_registration_impl.h" +#include "services/shell/public/cpp/interface_provider.h" #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncError.h" #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncRegistration.h"
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc index 3bac8ae..d388d333 100644 --- a/content/child/child_thread_impl.cc +++ b/content/child/child_thread_impl.cc
@@ -68,6 +68,8 @@ #include "mojo/edk/embedder/named_platform_channel_pair.h" #include "mojo/edk/embedder/platform_channel_pair.h" #include "mojo/edk/embedder/scoped_ipc_support.h" +#include "services/shell/public/cpp/interface_provider.h" +#include "services/shell/public/cpp/interface_registry.h" #include "services/shell/runner/common/client_util.h" #if defined(OS_POSIX) @@ -331,14 +333,18 @@ ChildThreadImpl::ChildThreadImpl() : router_(this), - channel_connected_factory_(this) { + channel_connected_factory_( + new base::WeakPtrFactory<ChildThreadImpl>(this)), + weak_factory_(this) { Init(Options::Builder().Build()); } ChildThreadImpl::ChildThreadImpl(const Options& options) : router_(this), browser_process_io_runner_(options.browser_process_io_runner), - channel_connected_factory_(this) { + channel_connected_factory_( + new base::WeakPtrFactory<ChildThreadImpl>(this)), + weak_factory_(this) { Init(options); } @@ -413,8 +419,18 @@ mojo::edk::CreateChildMessagePipe(mojo_application_token); DCHECK(handle.is_valid()); mojo_shell_connection_ = MojoShellConnection::Create( - mojo::MakeRequest<shell::mojom::Service>(std::move(handle))); - mojo_shell_connection_->MergeService(this); + mojo::MakeRequest<shell::mojom::Service>(std::move(handle)), + GetIOTaskRunner()); + + // TODO(rockot): Remove this once all child-to-browser interface connections + // are made via a Connector rather than directly through an + // InterfaceProvider, and all exposed interfaces are exposed via a + // ConnectionFilter. + mojo_shell_connection_->SetupInterfaceRequestProxies( + GetInterfaceRegistry(), GetRemoteInterfaces()); + + AddConnectionFilters(mojo_shell_connection_.get()); + mojo_shell_connection_->Start(); } sync_message_filter_ = channel_->CreateSyncMessageFilter(); @@ -499,7 +515,7 @@ message_loop_->task_runner()->PostDelayedTask( FROM_HERE, base::Bind(&ChildThreadImpl::EnsureConnected, - channel_connected_factory_.GetWeakPtr()), + channel_connected_factory_->GetWeakPtr()), base::TimeDelta::FromSeconds(connection_timeout)); #if defined(OS_ANDROID) @@ -517,9 +533,6 @@ } ChildThreadImpl::~ChildThreadImpl() { - if (MojoShellConnection::GetForProcess()) - MojoShellConnection::DestroyForProcess(); - #ifdef IPC_MESSAGE_LOG_ENABLED IPC::Logging::GetInstance()->SetIPCSender(NULL); #endif @@ -556,7 +569,7 @@ } void ChildThreadImpl::OnChannelConnected(int32_t peer_pid) { - channel_connected_factory_.InvalidateWeakPtrs(); + channel_connected_factory_.reset(); } void ChildThreadImpl::OnChannelError() { @@ -608,14 +621,6 @@ return remote_interfaces_.get(); } -shell::InterfaceRegistry* ChildThreadImpl::GetInterfaceRegistryForConnection() { - return GetInterfaceRegistry(); -} - -shell::InterfaceProvider* ChildThreadImpl::GetInterfaceProviderForConnection() { - return GetRemoteInterfaces(); -} - IPC::MessageRouter* ChildThreadImpl::GetRouter() { DCHECK(message_loop_->task_runner()->BelongsToCurrentThread()); return &router_; @@ -691,6 +696,8 @@ return router_.OnMessageReceived(msg); } +void ChildThreadImpl::AddConnectionFilters(MojoShellConnection* connection) {} + bool ChildThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { return false; }
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h index 3680890..e4447c9e 100644 --- a/content/child/child_thread_impl.h +++ b/content/child/child_thread_impl.h
@@ -23,7 +23,6 @@ #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. #include "ipc/ipc_platform_file.h" #include "ipc/message_router.h" -#include "services/shell/public/cpp/service.h" namespace base { class MessageLoop; @@ -68,8 +67,7 @@ // The main thread of a child process derives from this class. class CONTENT_EXPORT ChildThreadImpl : public IPC::Listener, - virtual public ChildThread, - public NON_EXPORTED_BASE(shell::Service){ + virtual public ChildThread { public: struct CONTENT_EXPORT Options; @@ -101,10 +99,6 @@ shell::InterfaceRegistry* GetInterfaceRegistry() override; shell::InterfaceProvider* GetRemoteInterfaces() override; - // shell::Service: - shell::InterfaceRegistry* GetInterfaceRegistryForConnection() override; - shell::InterfaceProvider* GetInterfaceProviderForConnection() override; - IPC::SyncChannel* channel() { return channel_.get(); } IPC::MessageRouter* GetRouter(); @@ -209,6 +203,10 @@ // Called when the process refcount is 0. void OnProcessFinalRelease(); + // Implemented by subclasses to attach ConnectionFilters to the thread's + // shell connection. + virtual void AddConnectionFilters(MojoShellConnection* connection); + virtual bool OnControlMessageReceived(const IPC::Message& msg); virtual void OnProcessBackgrounded(bool backgrounded); virtual void OnProcessPurgeAndSuspend(); @@ -253,9 +251,9 @@ void EnsureConnected(); std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; - std::unique_ptr<MojoShellConnection> mojo_shell_connection_; std::unique_ptr<shell::InterfaceRegistry> interface_registry_; std::unique_ptr<shell::InterfaceProvider> remote_interfaces_; + std::unique_ptr<MojoShellConnection> mojo_shell_connection_; std::string channel_name_; std::unique_ptr<IPC::SyncChannel> channel_; @@ -309,7 +307,10 @@ scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_; - base::WeakPtrFactory<ChildThreadImpl> channel_connected_factory_; + std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>> + channel_connected_factory_; + + base::WeakPtrFactory<ChildThreadImpl> weak_factory_; DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); };
diff --git a/content/child/indexed_db/webidbcursor_impl.cc b/content/child/indexed_db/webidbcursor_impl.cc index 946b08dd..11294b6 100644 --- a/content/child/indexed_db/webidbcursor_impl.cc +++ b/content/child/indexed_db/webidbcursor_impl.cc
@@ -186,7 +186,7 @@ continue_count_ = 0; prefetch_amount_ = kMinPrefetchAmount; - if (!prefetch_keys_.size()) { + if (prefetch_keys_.empty()) { // No prefetch cache, so no need to reset the cursor in the back-end. return; }
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc index a1411c8a..54c91232 100644 --- a/content/common/gpu/client/context_provider_command_buffer.cc +++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -149,8 +149,6 @@ DCHECK_EQ(!!shared_command_buffer, !!share_group); } - DCHECK(attributes_.buffer_preserved); - // This command buffer is a client-side proxy to the command buffer in the // GPU process. scoped_refptr<base::SingleThreadTaskRunner> task_runner =
diff --git a/content/common/mojo/mojo_shell_connection_impl.cc b/content/common/mojo/mojo_shell_connection_impl.cc index 5311ba6c..ee7ff97 100644 --- a/content/common/mojo/mojo_shell_connection_impl.cc +++ b/content/common/mojo/mojo_shell_connection_impl.cc
@@ -4,63 +4,327 @@ #include "content/common/mojo/mojo_shell_connection_impl.h" +#include <queue> +#include <utility> +#include <vector> + #include "base/bind.h" +#include "base/callback_helpers.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/memory/ptr_util.h" -#include "base/threading/thread_local.h" +#include "base/threading/thread_checker.h" #include "content/common/mojo/embedded_application_runner.h" +#include "content/public/common/connection_filter.h" +#include "mojo/public/cpp/bindings/binding_set.h" +#include "mojo/public/cpp/system/message_pipe.h" #include "services/shell/public/cpp/service.h" #include "services/shell/public/cpp/service_context.h" +#include "services/shell/public/interfaces/service_factory.mojom.h" #include "services/shell/runner/common/client_util.h" namespace content { namespace { -using MojoShellConnectionPtr = - base::ThreadLocalPointer<MojoShellConnection>; - -// Env is thread local so that aura may be used on multiple threads. -base::LazyInstance<MojoShellConnectionPtr>::Leaky lazy_tls_ptr = - LAZY_INSTANCE_INITIALIZER; +base::LazyInstance<std::unique_ptr<MojoShellConnection>>::Leaky + g_connection_for_process = LAZY_INSTANCE_INITIALIZER; MojoShellConnection::Factory* mojo_shell_connection_factory = nullptr; } // namespace +// A ref-counted object which owns the IO thread state of a +// MojoShellConnectionImpl. This includes Service and ServiceFactory +// bindings. +class MojoShellConnectionImpl::IOThreadContext + : public base::RefCountedThreadSafe<IOThreadContext>, + public shell::Service, + public shell::InterfaceFactory<shell::mojom::ServiceFactory>, + public shell::mojom::ServiceFactory { + public: + using InitializeCallback = base::Callback<void(const shell::Identity&)>; + using ServiceFactoryCallback = + base::Callback<void(shell::mojom::ServiceRequest, const mojo::String&)>; + + IOThreadContext(shell::mojom::ServiceRequest service_request, + scoped_refptr<base::SequencedTaskRunner> io_task_runner, + std::unique_ptr<shell::Connector> io_thread_connector, + shell::mojom::ConnectorRequest connector_request) + : pending_service_request_(std::move(service_request)), + io_task_runner_(io_task_runner), + io_thread_connector_(std::move(io_thread_connector)), + pending_connector_request_(std::move(connector_request)) { + // This will be reattached by any of the IO thread functions on first call. + io_thread_checker_.DetachFromThread(); + } + + // Safe to call from any thread. + void Start(const InitializeCallback& initialize_callback, + const ServiceFactoryCallback& create_service_callback, + const base::Closure& stop_callback) { + DCHECK(!started_); + + started_ = true; + callback_task_runner_ = base::ThreadTaskRunnerHandle::Get(); + initialize_handler_ = initialize_callback; + create_service_callback_ = create_service_callback; + stop_callback_ = stop_callback; + io_task_runner_->PostTask( + FROM_HERE, base::Bind(&IOThreadContext::StartOnIOThread, this)); + } + + // Safe to call from whichever thread called Start() (or may have called + // Start()). Must be called before IO thread shutdown. + void ShutDown() { + if (!started_) + return; + + bool posted = io_task_runner_->PostTask( + FROM_HERE, base::Bind(&IOThreadContext::ShutDownOnIOThread, this)); + DCHECK(posted); + } + + // Safe to call any time before Start() is called. + void AddConnectionFilter(std::unique_ptr<ConnectionFilter> filter) { + DCHECK(!started_); + connection_filters_.emplace_back(std::move(filter)); + } + + // Safe to call any time before Start() is called. + void SetDefaultBinderForBrowserConnection( + const shell::InterfaceRegistry::Binder& binder) { + DCHECK(!started_); + default_browser_binder_ = base::Bind( + &IOThreadContext::CallBinderOnTaskRunner, + base::ThreadTaskRunnerHandle::Get(), binder); + } + + // Safe to call any time after Start() is called. + void GetRemoteInterface(const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle) { + DCHECK(started_); + io_task_runner_->PostTask( + FROM_HERE, + base::Bind(&IOThreadContext::GetRemoteInterfaceOnIOThread, this, + interface_name, base::Passed(&request_handle))); + } + + private: + friend class base::RefCountedThreadSafe<IOThreadContext>; + + ~IOThreadContext() override {} + + void StartOnIOThread() { + // Should bind |io_thread_checker_| to the context's thread. + DCHECK(io_thread_checker_.CalledOnValidThread()); + service_context_.reset(new shell::ServiceContext( + this, std::move(pending_service_request_), + std::move(io_thread_connector_), + std::move(pending_connector_request_))); + } + + void ShutDownOnIOThread() { + DCHECK(io_thread_checker_.CalledOnValidThread()); + service_context_.reset(); + factory_bindings_.CloseAllBindings(); + } + + void GetRemoteInterfaceOnIOThread( + const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle) { + DCHECK(io_thread_checker_.CalledOnValidThread()); + if (browser_connection_) { + browser_connection_->GetRemoteInterfaces()->GetInterface( + interface_name, std::move(request_handle)); + } else { + pending_remote_interface_requests_.emplace(interface_name, + std::move(request_handle)); + } + } + + void OnBrowserConnectionLost() { + DCHECK(io_thread_checker_.CalledOnValidThread()); + browser_connection_ = nullptr; + } + + ///////////////////////////////////////////////////////////////////////////// + // shell::Service implementation + + void OnStart(shell::Connector* connector, + const shell::Identity& identity, + uint32_t id) override { + DCHECK(io_thread_checker_.CalledOnValidThread()); + DCHECK(!initialize_handler_.is_null()); + + InitializeCallback handler = base::ResetAndReturn(&initialize_handler_); + callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity)); + } + + bool OnConnect(shell::Connection* connection) override { + DCHECK(io_thread_checker_.CalledOnValidThread()); + std::string remote_app = connection->GetRemoteIdentity().name(); + if (remote_app == "mojo:shell") { + // Only expose the SCF interface to the shell. + connection->AddInterface<shell::mojom::ServiceFactory>(this); + return true; + } + + bool accept = false; + for (auto& filter : connection_filters_) { + accept = accept || + filter->OnConnect(connection, service_context_->connector()); + } + + // Capture the browser connection if possible. + if (remote_app == "exe:content_browser" && !browser_connection_) { + browser_connection_ = connection; + connection->GetInterfaceRegistry()->set_default_binder( + default_browser_binder_); + connection->SetConnectionLostClosure( + base::Bind(&IOThreadContext::OnBrowserConnectionLost, this)); + shell::InterfaceProvider* remote_interfaces = + connection->GetRemoteInterfaces(); + + // Flush any pending outgoing interface requests. + while (!pending_remote_interface_requests_.empty()) { + auto& request = pending_remote_interface_requests_.front(); + remote_interfaces->GetInterface( + request.first, std::move(request.second)); + pending_remote_interface_requests_.pop(); + } + return true; + } + + // If no filters were interested, reject the connection. + return accept; + } + + bool OnStop() override { + callback_task_runner_->PostTask(FROM_HERE, stop_callback_); + return true; + } + + ///////////////////////////////////////////////////////////////////////////// + // shell::InterfaceFactory<shell::mojom::ServiceFactory> implementation + + void Create(shell::Connection* connection, + shell::mojom::ServiceFactoryRequest request) override { + DCHECK(io_thread_checker_.CalledOnValidThread()); + factory_bindings_.AddBinding(this, std::move(request)); + } + + ///////////////////////////////////////////////////////////////////////////// + // shell::mojom::ServiceFactory implementation + + void CreateService(shell::mojom::ServiceRequest request, + const mojo::String& name) override { + DCHECK(io_thread_checker_.CalledOnValidThread()); + callback_task_runner_->PostTask( + FROM_HERE, + base::Bind(create_service_callback_, base::Passed(&request), name)); + } + + static void CallBinderOnTaskRunner( + scoped_refptr<base::SequencedTaskRunner> task_runner, + const shell::InterfaceRegistry::Binder& binder, + const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle) { + task_runner->PostTask(FROM_HERE, base::Bind(binder, interface_name, + base::Passed(&request_handle))); + } + + base::ThreadChecker io_thread_checker_; + bool started_ = false; + + // Temporary state established on construction and consumed on the IO thread + // once the connection is started. + shell::mojom::ServiceRequest pending_service_request_; + scoped_refptr<base::SequencedTaskRunner> io_task_runner_; + std::unique_ptr<shell::Connector> io_thread_connector_; + shell::mojom::ConnectorRequest pending_connector_request_; + + // TaskRunner on which to run our owner's callbacks, i.e. the ones passed to + // Start(). + scoped_refptr<base::SequencedTaskRunner> callback_task_runner_; + + // Callback to run once Service::OnStart is invoked. + InitializeCallback initialize_handler_; + + // Callback to run when a new Service request is received. + ServiceFactoryCallback create_service_callback_; + + // Callback to run if the service is stopped by the service manager. + base::Closure stop_callback_; + + // The incoming Connection from the browser process. This is captured the + // first time the browser connects to this Service and persists until shutdown + // or a connection error is detected. This connection is used to fulfill + // remote interface requests from legacy code which does not use + // shell::Connector. + // + // TODO(rockot): Remove this once all child-to-browser interface connections + // are made via a Connector rather than directly through an InterfaceProvider + // and all interfaces exposed to the browser are exposed via a + // ConnectionFilter. + shell::Connection* browser_connection_ = nullptr; + + // A queue of remote interface requests destined for the browser, which will + // remain pending until an incoming connection is accepted from the browser. + // + // TODO(rockot): Remove this once all child-to-browser interface connections + // are made via a Connector rather than directly through an InterfaceProvider. + std::queue<std::pair<mojo::String, mojo::ScopedMessagePipeHandle>> + pending_remote_interface_requests_; + + // Default binder callback used for the browser connection's + // InterfaceRegistry. + // + // TODO(rockot): Remove this once all interfaces exposed to the browser are + // exposed via a ConnectionFilter. + shell::InterfaceRegistry::Binder default_browser_binder_; + + std::unique_ptr<shell::ServiceContext> service_context_; + mojo::BindingSet<shell::mojom::ServiceFactory> factory_bindings_; + std::vector<std::unique_ptr<ConnectionFilter>> connection_filters_; + + DISALLOW_COPY_AND_ASSIGN(IOThreadContext); +}; + //////////////////////////////////////////////////////////////////////////////// // MojoShellConnection, public: // static void MojoShellConnection::SetForProcess( std::unique_ptr<MojoShellConnection> connection) { - DCHECK(!lazy_tls_ptr.Pointer()->Get()); - lazy_tls_ptr.Pointer()->Set(connection.release()); + DCHECK(!g_connection_for_process.Get()); + g_connection_for_process.Get() = std::move(connection); } // static MojoShellConnection* MojoShellConnection::GetForProcess() { - return lazy_tls_ptr.Pointer()->Get(); + return g_connection_for_process.Get().get(); } // static void MojoShellConnection::DestroyForProcess() { // This joins the shell controller thread. - delete GetForProcess(); - lazy_tls_ptr.Pointer()->Set(nullptr); + g_connection_for_process.Get().reset(); } // static void MojoShellConnection::SetFactoryForTest(Factory* factory) { - DCHECK(!lazy_tls_ptr.Pointer()->Get()); + DCHECK(!g_connection_for_process.Get()); mojo_shell_connection_factory = factory; } // static std::unique_ptr<MojoShellConnection> MojoShellConnection::Create( - shell::mojom::ServiceRequest request) { + shell::mojom::ServiceRequest request, + scoped_refptr<base::SequencedTaskRunner> io_task_runner) { if (mojo_shell_connection_factory) return mojo_shell_connection_factory->Run(); - return base::WrapUnique(new MojoShellConnectionImpl(std::move(request))); + return base::MakeUnique<MojoShellConnectionImpl>( + std::move(request), io_task_runner); } MojoShellConnection::~MojoShellConnection() {} @@ -69,115 +333,72 @@ // MojoShellConnectionImpl, public: MojoShellConnectionImpl::MojoShellConnectionImpl( - shell::mojom::ServiceRequest request) - : shell_connection_(new shell::ServiceContext(this, std::move(request))) {} - -MojoShellConnectionImpl::~MojoShellConnectionImpl() {} - -//////////////////////////////////////////////////////////////////////////////// -// MojoShellConnectionImpl, shell::Service implementation: - -void MojoShellConnectionImpl::OnStart(shell::Connector* connector, - const shell::Identity& identity, - uint32_t id) { - for (auto& client : embedded_services_) - client->OnStart(connector, identity, id); -} - -bool MojoShellConnectionImpl::OnConnect(shell::Connection* connection) { - std::string remote_app = connection->GetRemoteIdentity().name(); - if (remote_app == "mojo:shell") { - // Only expose the SCF interface to the shell. - connection->AddInterface<shell::mojom::ServiceFactory>(this); - return true; - } - - bool accept = false; - for (auto& client : embedded_services_) - accept |= client->OnConnect(connection); - - // Reject all other connections to this application. - return accept; -} - -shell::InterfaceRegistry* -MojoShellConnectionImpl::GetInterfaceRegistryForConnection() { - // TODO(beng): This is really horrible since obviously subject to issues - // of ordering, but is no more horrible than this API is in general. - shell::InterfaceRegistry* registry = nullptr; - for (auto& client : embedded_services_) { - registry = client->GetInterfaceRegistryForConnection(); - if (registry) - return registry; - } - return nullptr; -} - -shell::InterfaceProvider* -MojoShellConnectionImpl::GetInterfaceProviderForConnection() { - // TODO(beng): This is really horrible since obviously subject to issues - // of ordering, but is no more horrible than this API is in general. - shell::InterfaceProvider* provider = nullptr; - for (auto& client : embedded_services_) { - provider = client->GetInterfaceProviderForConnection(); - if (provider) - return provider; - } - return nullptr; -} - -//////////////////////////////////////////////////////////////////////////////// -// MojoShellConnectionImpl, -// shell::InterfaceFactory<shell::mojom::ServiceFactory> implementation: - -void MojoShellConnectionImpl::Create( - shell::Connection* connection, - shell::mojom::ServiceFactoryRequest request) { - factory_bindings_.AddBinding(this, std::move(request)); -} - -//////////////////////////////////////////////////////////////////////////////// -// MojoShellConnectionImpl, shell::mojom::ServiceFactory implementation: - -void MojoShellConnectionImpl::CreateService( shell::mojom::ServiceRequest request, - const mojo::String& name) { - auto it = request_handlers_.find(name); - if (it != request_handlers_.end()) - it->second.Run(std::move(request)); + scoped_refptr<base::SequencedTaskRunner> io_task_runner) + : weak_factory_(this) { + shell::mojom::ConnectorRequest connector_request; + connector_ = shell::Connector::Create(&connector_request); + + std::unique_ptr<shell::Connector> io_thread_connector = connector_->Clone(); + context_ = new IOThreadContext( + std::move(request), io_task_runner, std::move(io_thread_connector), + std::move(connector_request)); +} + +MojoShellConnectionImpl::~MojoShellConnectionImpl() { + context_->ShutDown(); } //////////////////////////////////////////////////////////////////////////////// // MojoShellConnectionImpl, MojoShellConnection implementation: -shell::ServiceContext* MojoShellConnectionImpl::GetShellConnection() { - return shell_connection_.get(); +void MojoShellConnectionImpl::Start() { + context_->Start( + base::Bind(&MojoShellConnectionImpl::OnContextInitialized, + weak_factory_.GetWeakPtr()), + base::Bind(&MojoShellConnectionImpl::CreateService, + weak_factory_.GetWeakPtr()), + base::Bind(&MojoShellConnectionImpl::OnConnectionLost, + weak_factory_.GetWeakPtr())); +} + +void MojoShellConnectionImpl::SetInitializeHandler( + const base::Closure& handler) { + DCHECK(initialize_handler_.is_null()); + initialize_handler_ = handler; } shell::Connector* MojoShellConnectionImpl::GetConnector() { - DCHECK(shell_connection_); - return shell_connection_->connector(); + return connector_.get(); } const shell::Identity& MojoShellConnectionImpl::GetIdentity() const { - DCHECK(shell_connection_); - return shell_connection_->identity(); + return identity_; } void MojoShellConnectionImpl::SetConnectionLostClosure( const base::Closure& closure) { - shell_connection_->SetConnectionLostClosure(closure); + connection_lost_handler_ = closure; } -void MojoShellConnectionImpl::MergeService( - std::unique_ptr<shell::Service> service) { - embedded_services_.push_back(service.get()); - owned_services_.push_back(std::move(service)); +void MojoShellConnectionImpl::SetupInterfaceRequestProxies( + shell::InterfaceRegistry* registry, + shell::InterfaceProvider* provider) { + // It's safe to bind |registry| as a raw pointer because the caller must + // guarantee that it outlives |this|, and |this| is bound as a weak ptr here. + context_->SetDefaultBinderForBrowserConnection( + base::Bind(&MojoShellConnectionImpl::GetInterface, + weak_factory_.GetWeakPtr(), registry)); + + // Forward all remote interface requests on |provider| to our IO-thread + // context. This will ensure they're forwarded to the provider on the + // incoming browser connection. + provider->Forward(base::Bind(&IOThreadContext::GetRemoteInterface, context_)); } -void MojoShellConnectionImpl::MergeService( - shell::Service* service) { - embedded_services_.push_back(service); +void MojoShellConnectionImpl::AddConnectionFilter( + std::unique_ptr<ConnectionFilter> filter) { + context_->AddConnectionFilter(std::move(filter)); } void MojoShellConnectionImpl::AddEmbeddedService( @@ -199,4 +420,31 @@ DCHECK(result.second); } +void MojoShellConnectionImpl::CreateService( + shell::mojom::ServiceRequest request, + const mojo::String& name) { + auto it = request_handlers_.find(name); + if (it != request_handlers_.end()) + it->second.Run(std::move(request)); +} + +void MojoShellConnectionImpl::OnContextInitialized( + const shell::Identity& identity) { + identity_ = identity; + if (!initialize_handler_.is_null()) + base::ResetAndReturn(&initialize_handler_).Run(); +} + +void MojoShellConnectionImpl::OnConnectionLost() { + if (!connection_lost_handler_.is_null()) + connection_lost_handler_.Run(); +} + +void MojoShellConnectionImpl::GetInterface( + shell::mojom::InterfaceProvider* provider, + const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle) { + provider->GetInterface(interface_name, std::move(request_handle)); +} + } // namespace content
diff --git a/content/common/mojo/mojo_shell_connection_impl.h b/content/common/mojo/mojo_shell_connection_impl.h index 6a6882413..c262c9e 100644 --- a/content/common/mojo/mojo_shell_connection_impl.h +++ b/content/common/mojo/mojo_shell_connection_impl.h
@@ -6,68 +6,73 @@ #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ #include <memory> -#include <vector> #include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "base/memory/weak_ptr.h" +#include "base/sequenced_task_runner.h" #include "content/public/common/mojo_shell_connection.h" -#include "mojo/public/cpp/bindings/binding_set.h" +#include "mojo/public/cpp/bindings/string.h" #include "mojo/public/cpp/system/message_pipe.h" -#include "services/shell/public/cpp/service.h" -#include "services/shell/public/cpp/service_context.h" -#include "services/shell/public/interfaces/service_factory.mojom.h" +#include "services/shell/public/cpp/identity.h" +#include "services/shell/public/interfaces/service.mojom.h" + +namespace shell { +class Connector; +} namespace content { class EmbeddedApplicationRunner; -class MojoShellConnectionImpl - : public MojoShellConnection, - public shell::Service, - public shell::InterfaceFactory<shell::mojom::ServiceFactory>, - public shell::mojom::ServiceFactory { - +class MojoShellConnectionImpl : public MojoShellConnection { public: - explicit MojoShellConnectionImpl(shell::mojom::ServiceRequest request); + explicit MojoShellConnectionImpl( + shell::mojom::ServiceRequest request, + scoped_refptr<base::SequencedTaskRunner> io_task_runner); ~MojoShellConnectionImpl() override; private: + class IOThreadContext; + // MojoShellConnection: - shell::ServiceContext* GetShellConnection() override; + void Start() override; + void SetInitializeHandler(const base::Closure& handler) override; shell::Connector* GetConnector() override; const shell::Identity& GetIdentity() const override; void SetConnectionLostClosure(const base::Closure& closure) override; - void MergeService(std::unique_ptr<shell::Service> service) override; - void MergeService(shell::Service* service) override; + void SetupInterfaceRequestProxies( + shell::InterfaceRegistry* registry, + shell::InterfaceProvider* provider) override; + void AddConnectionFilter(std::unique_ptr<ConnectionFilter> filter) override; void AddEmbeddedService(const std::string& name, const MojoApplicationInfo& info) override; void AddServiceRequestHandler( const std::string& name, const ServiceRequestHandler& handler) override; - // shell::Service: - void OnStart(shell::Connector* connector, - const shell::Identity& identity, - uint32_t id) override; - bool OnConnect(shell::Connection* connection) override; - shell::InterfaceRegistry* GetInterfaceRegistryForConnection() override; - shell::InterfaceProvider* GetInterfaceProviderForConnection() override; - - // shell::InterfaceFactory<shell::mojom::ServiceFactory>: - void Create(shell::Connection* connection, - shell::mojom::ServiceFactoryRequest request) override; - - // shell::mojom::ServiceFactory: + void OnContextInitialized(const shell::Identity& identity); + void OnConnectionLost(); void CreateService(shell::mojom::ServiceRequest request, - const mojo::String& name) override; + const mojo::String& name); + void GetInterface(shell::mojom::InterfaceProvider* provider, + const mojo::String& interface_name, + mojo::ScopedMessagePipeHandle request_handle); - std::unique_ptr<shell::ServiceContext> shell_connection_; - mojo::BindingSet<shell::mojom::ServiceFactory> factory_bindings_; - std::vector<shell::Service*> embedded_services_; - std::vector<std::unique_ptr<shell::Service>> owned_services_; + shell::Identity identity_; + + std::unique_ptr<shell::Connector> connector_; + scoped_refptr<IOThreadContext> context_; + + base::Closure initialize_handler_; + base::Closure connection_lost_handler_; + std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>> embedded_apps_; std::unordered_map<std::string, ServiceRequestHandler> request_handlers_; + base::WeakPtrFactory<MojoShellConnectionImpl> weak_factory_; + DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); };
diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 7aa2ca6..21fa35a 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi
@@ -488,8 +488,6 @@ 'browser/blob_storage/blob_dispatcher_host.h', 'browser/blob_storage/chrome_blob_storage_context.cc', 'browser/blob_storage/chrome_blob_storage_context.h', - 'browser/bluetooth/bluetooth_adapter_factory_wrapper.cc', - 'browser/bluetooth/bluetooth_adapter_factory_wrapper.h', 'browser/bluetooth/bluetooth_allowed_devices_map.cc', 'browser/bluetooth/bluetooth_allowed_devices_map.h', 'browser/bluetooth/bluetooth_blacklist.cc',
diff --git a/content/content_common.gypi b/content/content_common.gypi index 10cc09f7..914b7fa 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi
@@ -114,6 +114,7 @@ 'public/common/common_param_traits.h', 'public/common/common_param_traits_macros.h', 'public/common/console_message_level.h', + 'public/common/connection_filter.h', 'public/common/content_client.cc', 'public/common/content_client.h', 'public/common/content_constants.cc',
diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn index 16c4aea..5b0f6b6 100644 --- a/content/gpu/BUILD.gn +++ b/content/gpu/BUILD.gn
@@ -57,6 +57,7 @@ "//ipc", "//media/gpu", "//media/gpu/ipc/service", + "//services/shell/public/cpp", "//services/shell/public/interfaces", "//skia", "//ui/events/ipc",
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc index af207ab..2c36e17d 100644 --- a/content/gpu/gpu_child_thread.cc +++ b/content/gpu/gpu_child_thread.cc
@@ -22,6 +22,7 @@ #include "content/gpu/gpu_watchdog_thread.h" #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" +#include "content/public/common/mojo_shell_connection.h" #include "content/public/gpu/content_gpu_client.h" #include "gpu/command_buffer/service/gpu_switches.h" #include "gpu/command_buffer/service/sync_point_manager.h" @@ -36,6 +37,7 @@ #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h" #include "media/gpu/ipc/service/gpu_video_encode_accelerator.h" #include "media/gpu/ipc/service/media_service.h" +#include "services/shell/public/cpp/interface_registry.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_switches.h" #include "ui/gl/gpu_switching_manager.h" @@ -221,6 +223,18 @@ // Only set once per process instance. process_control_.reset(new GpuProcessControlImpl()); + GetInterfaceRegistry()->AddInterface(base::Bind( + &GpuChildThread::BindProcessControlRequest, base::Unretained(this))); + + if (GetContentClient()->gpu()) { // NULL in tests. + GetContentClient()->gpu()->ExposeInterfacesToBrowser( + GetInterfaceRegistry()); + } + + // We don't want to process any incoming interface requests until + // OnInitialize() is invoked. + GetInterfaceRegistry()->PauseBinding(); + if (GetContentClient()->gpu()) // NULL in tests. GetContentClient()->gpu()->Initialize(this); } @@ -290,37 +304,6 @@ return false; } -bool GpuChildThread::OnConnect(shell::Connection* connection) { - // Use of base::Unretained(this) is safe here because |service_registry()| - // will be destroyed before GpuChildThread is destructed. - connection->GetInterfaceRegistry()->AddInterface(base::Bind( - &GpuChildThread::BindProcessControlRequest, base::Unretained(this))); - - if (GetContentClient()->gpu()) { // NULL in tests. - GetContentClient()->gpu()->ExposeInterfacesToBrowser( - connection->GetInterfaceRegistry()); - } - - // We don't want to process any incoming interface requests until - // OnInitialize(). - if (!gpu_channel_manager_) { - connection->GetInterfaceRegistry()->PauseBinding(); - resume_interface_bindings_callback_ = base::Bind( - &shell::InterfaceRegistry::ResumeBinding, - connection->GetInterfaceRegistry()->GetWeakPtr()); - } - - return true; -} - -shell::InterfaceRegistry* GpuChildThread::GetInterfaceRegistryForConnection() { - return nullptr; -} - -shell::InterfaceProvider* GpuChildThread::GetInterfaceProviderForConnection() { - return nullptr; -} - void GpuChildThread::SetActiveURL(const GURL& url) { GetContentClient()->SetActiveURL(url); } @@ -364,8 +347,7 @@ } void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) { - if (!resume_interface_bindings_callback_.is_null()) - base::ResetAndReturn(&resume_interface_bindings_callback_).Run(); + GetInterfaceRegistry()->ResumeBinding(); gpu_preferences_ = gpu_preferences; @@ -584,7 +566,7 @@ } void GpuChildThread::BindProcessControlRequest( - mojo::InterfaceRequest<mojom::ProcessControl> request) { + mojom::ProcessControlRequest request) { DVLOG(1) << "GPU: Binding ProcessControl request"; DCHECK(process_control_); process_control_bindings_.AddBinding(process_control_.get(),
diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h index f51bba1..7eb8c462 100644 --- a/content/gpu/gpu_child_thread.h +++ b/content/gpu/gpu_child_thread.h
@@ -28,7 +28,6 @@ #include "gpu/ipc/service/gpu_config.h" #include "gpu/ipc/service/x_util.h" #include "mojo/public/cpp/bindings/binding_set.h" -#include "mojo/public/cpp/bindings/interface_request.h" #include "ui/gfx/native_widget_types.h" namespace gpu { @@ -87,9 +86,6 @@ bool Send(IPC::Message* msg) override; bool OnControlMessageReceived(const IPC::Message& msg) override; bool OnMessageReceived(const IPC::Message& msg) override; - bool OnConnect(shell::Connection* connection) override; - shell::InterfaceRegistry* GetInterfaceRegistryForConnection() override; - shell::InterfaceProvider* GetInterfaceProviderForConnection() override; // gpu::GpuChannelManagerDelegate: void SetActiveURL(const GURL& url) override; @@ -138,8 +134,7 @@ #endif void OnLoseAllContexts(); - void BindProcessControlRequest( - mojo::InterfaceRequest<mojom::ProcessControl> request); + void BindProcessControlRequest(mojom::ProcessControlRequest request); gpu::GpuPreferences gpu_preferences_; @@ -179,8 +174,6 @@ // Bindings to the mojom::ProcessControl impl. mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; - base::Closure resume_interface_bindings_callback_; - DISALLOW_COPY_AND_ASSIGN(GpuChildThread); };
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java index 0fe099be..a1c24280 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -3285,6 +3285,7 @@ public boolean onDragEvent(DragEvent event) { if (mNativeContentViewCore == 0) return false; + ClipDescription clipDescription = event.getClipDescription(); if (clipDescription == null && event.getAction() != DragEvent.ACTION_DRAG_ENDED) { Log.e(TAG, "Null clipDescription when the drag is not ended."); @@ -3297,7 +3298,7 @@ if (event.getAction() == DragEvent.ACTION_DRAG_STARTED) { // TODO(hush): support dragging more than just text. - return mimeTypes.length > 0; + return mimeTypes.length > 0 && nativeIsTouchDragDropEnabled(mNativeContentViewCore); } StringBuilder content = new StringBuilder(""); @@ -3568,6 +3569,7 @@ int x, int y, int w, int h); private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl, boolean opaque); + private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCoreImpl); private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int action, int x, int y, int screenX, int screenY, String[] mimeTypes, String content); }
diff --git a/content/public/browser/android/OWNERS b/content/public/browser/android/OWNERS index e98349f..c7eba949 100644 --- a/content/public/browser/android/OWNERS +++ b/content/public/browser/android/OWNERS
@@ -1,3 +1,2 @@ -torne@chromium.org tedchoc@chromium.org yfriedman@chromium.org
diff --git a/content/public/browser/android/synchronous_compositor_client.h b/content/public/browser/android/synchronous_compositor_client.h index fa28023..eaa5cc5 100644 --- a/content/public/browser/android/synchronous_compositor_client.h +++ b/content/public/browser/android/synchronous_compositor_client.h
@@ -32,7 +32,6 @@ int process_id, int routing_id) = 0; - // See LayerScrollOffsetDelegate for details. virtual void UpdateRootLayerState(SynchronousCompositor* compositor, const gfx::Vector2dF& total_scroll_offset, const gfx::Vector2dF& max_scroll_offset,
diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h index 90b955f..9233f5f 100644 --- a/content/public/browser/browser_thread.h +++ b/content/public/browser/browser_thread.h
@@ -131,7 +131,7 @@ const base::Callback<ReturnType(void)>& task, const base::Callback<void(ReplyArgType)>& reply) { scoped_refptr<base::SingleThreadTaskRunner> task_runner = - GetMessageLoopProxyForThread(identifier); + GetTaskRunnerForThread(identifier); return base::PostTaskAndReplyWithResult(task_runner.get(), from_here, task, reply); } @@ -140,16 +140,14 @@ static bool DeleteSoon(ID identifier, const tracked_objects::Location& from_here, const T* object) { - return GetMessageLoopProxyForThread(identifier)->DeleteSoon( - from_here, object); + return GetTaskRunnerForThread(identifier)->DeleteSoon(from_here, object); } template <class T> static bool ReleaseSoon(ID identifier, const tracked_objects::Location& from_here, const T* object) { - return GetMessageLoopProxyForThread(identifier)->ReleaseSoon( - from_here, object); + return GetTaskRunnerForThread(identifier)->ReleaseSoon(from_here, object); } // Simplified wrappers for posting to the blocking thread pool. Use this @@ -218,8 +216,8 @@ // Callers can hold on to a refcounted task runner beyond the lifetime // of the thread. - static scoped_refptr<base::SingleThreadTaskRunner> - GetMessageLoopProxyForThread(ID identifier); + static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunnerForThread( + ID identifier); // Returns a pointer to the thread's message loop, which will become // invalid during shutdown, so you probably shouldn't hold onto it.
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h index 8526ef7e..e1ddb079 100644 --- a/content/public/browser/render_process_host.h +++ b/content/public/browser/render_process_host.h
@@ -270,9 +270,6 @@ // interfaces exposed to it from the renderer. virtual shell::InterfaceProvider* GetRemoteInterfaces() = 0; - // Returns the shell connection for this process. - virtual shell::Connection* GetChildConnection() = 0; - // Extracts any persistent-memory-allocator used for renderer metrics. // Ownership is passed to the caller. To support sharing of histogram data // between the Renderer and the Browser, the allocator is created when the
diff --git a/content/public/child/child_thread.h b/content/public/child/child_thread.h index d3ad0ce..2a3c8d8 100644 --- a/content/public/child/child_thread.h +++ b/content/public/child/child_thread.h
@@ -5,6 +5,7 @@ #ifndef CONTENT_PUBLIC_CHILD_CHILD_THREAD_H_ #define CONTENT_PUBLIC_CHILD_CHILD_THREAD_H_ +#include <memory> #include <string> #include "base/logging.h" @@ -27,7 +28,8 @@ namespace content { - class MojoShellConnection; +class ConnectionFilter; +class MojoShellConnection; // An abstract base class that contains logic shared between most child // processes of the embedder.
diff --git a/content/public/common/connection_filter.h b/content/public/common/connection_filter.h new file mode 100644 index 0000000..be8da3f --- /dev/null +++ b/content/public/common/connection_filter.h
@@ -0,0 +1,40 @@ +// 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 CONTENT_PUBLIC_COMMON_CONNECTION_FILTER_H_ +#define CONTENT_PUBLIC_COMMON_CONNECTION_FILTER_H_ + +#include "content/common/content_export.h" + +namespace shell { +class Connection; +class Connector; +} + +namespace content { + +// A ConnectionFilter may be used to conditionally expose interfaces on inbound +// connections accepted by MojoShellConnection. ConnectionFilters are used +// exclusively on the IO thread. See MojoShellConnection::AddConnectionFilter +// for details. +class CONTENT_EXPORT ConnectionFilter { + public: + virtual ~ConnectionFilter() {} + + // Called for every new connection accepted. Implementations may add + // interfaces to |connection|, in which case they should return |true|. + // |connector| is a corresponding outgoing Connector that may be used by any + // interfaces added to the connection. Note that references to |connector| + // must not be retained, but an owned copy may be obtained by calling + // |connector->Clone()|. + // + // If a ConnectionFilter is not interested in an incoming connection, it + // should return |false|. + virtual bool OnConnect(shell::Connection* connection, + shell::Connector* connector) = 0; +}; + +} // namespace content + +#endif // CONTENT_PUBLIC_COMMON_CONNECTION_FILTER_H_
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 2521300..bdfe689 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc
@@ -272,6 +272,10 @@ // Prevent renderer process backgrounding when set. const char kDisableRendererBackgrounding[] = "disable-renderer-backgrounding"; +// Whether the resize lock is disabled. Default is false. This is generally only +// useful for tests that want to force disabling. +const char kDisableResizeLock[] = "disable-resize-lock"; + // Disable the seccomp filter sandbox (seccomp-bpf) (Linux only). const char kDisableSeccompFilterSandbox[] = "disable-seccomp-filter-sandbox"; @@ -604,6 +608,9 @@ // connection from the browser before killing itself. const char kIPCConnectionTimeout[] = "ipc-connection-timeout"; +// Chrome is running in Mash. +const char kIsRunningInMash[] = "is-running-in-mash"; + // Disable latest shipping ECMAScript 6 features. const char kDisableJavaScriptHarmonyShipping[] = "disable-javascript-harmony-shipping";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index a5fa59c..2f1edde 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h
@@ -88,6 +88,7 @@ extern const char kDisableRemoteFonts[]; extern const char kDisableRendererAccessibility[]; CONTENT_EXPORT extern const char kDisableRendererBackgrounding[]; +CONTENT_EXPORT extern const char kDisableResizeLock[]; CONTENT_EXPORT extern const char kDisableSeccompFilterSandbox[]; CONTENT_EXPORT extern const char kDisableSetuidSandbox[]; CONTENT_EXPORT extern const char kDisableSharedWorkers[]; @@ -183,6 +184,7 @@ CONTENT_EXPORT extern const char kInertVisualViewport[]; CONTENT_EXPORT extern const char kInProcessGPU[]; CONTENT_EXPORT extern const char kIPCConnectionTimeout[]; +CONTENT_EXPORT extern const char kIsRunningInMash[]; CONTENT_EXPORT extern const char kJavaScriptFlags[]; CONTENT_EXPORT extern const char kJavaScriptHarmony[]; CONTENT_EXPORT extern const char kLogGpuControlListDecisions[];
diff --git a/content/public/common/mojo_shell_connection.h b/content/public/common/mojo_shell_connection.h index 7014034..577f128 100644 --- a/content/public/common/mojo_shell_connection.h +++ b/content/public/common/mojo_shell_connection.h
@@ -8,6 +8,7 @@ #include <memory> #include "base/callback_forward.h" +#include "base/sequenced_task_runner.h" #include "content/common/content_export.h" #include "content/public/common/mojo_application_info.h" #include "services/shell/public/cpp/identity.h" @@ -16,11 +17,14 @@ namespace shell { class Connection; class Connector; -class ServiceContext; +class InterfaceProvider; +class InterfaceRegistry; } namespace content { +class ConnectionFilter; + // Encapsulates a connection to a //services/shell. // Access a global instance on the thread the ServiceContext was bound by // calling Holder::Get(). @@ -55,13 +59,21 @@ // called before the MojoShellConnection has been created. static void SetFactoryForTest(Factory* factory); - // Creates a MojoShellConnection from |request|. + // Creates a MojoShellConnection from |request|. The connection binds + // its interfaces and accept new connections on |io_task_runner| only. Note + // that no incoming connections are accepted until Start() is called. static std::unique_ptr<MojoShellConnection> Create( - shell::mojom::ServiceRequest request); + shell::mojom::ServiceRequest request, + scoped_refptr<base::SequencedTaskRunner> io_task_runner); - // Returns the bound shell::ServiceContext object. - // TODO(rockot): remove. - virtual shell::ServiceContext* GetShellConnection() = 0; + // Begins accepting incoming connections. Connection filters MUST be added + // before calling this in order to avoid races. See AddConnectionFilter() + // below. + virtual void Start() = 0; + + // Sets a closure to be invoked once the connection receives an Initialize() + // request from the shell. + virtual void SetInitializeHandler(const base::Closure& handler) = 0; // Returns the shell::Connector received via this connection's Service // implementation. Use this to initiate connections as this object's Identity. @@ -76,12 +88,31 @@ // run immediately before returning from this function. virtual void SetConnectionLostClosure(const base::Closure& closure) = 0; - // Allows the caller to expose interfaces to the caller using the identity of - // this object's Service. As distinct from MergeService() and - // AddServiceRequestHandler() which specify unique identities for the - // registered services. - virtual void MergeService(std::unique_ptr<shell::Service> service) = 0; - virtual void MergeService(shell::Service* service) = 0; + // Provides an InterfaceRegistry to forward incoming interface requests to + // on the MojoShellConnection's own thread if they aren't bound by the + // connection's internal InterfaceRegistry on the IO thread. + // + // Also configures |interface_provider| to forward all of its outgoing + // interface requests to the connection's internal remote interface provider. + // + // Note that neither |interface_registry| or |interface_provider| is owned + // and both MUST outlive the MojoShellConnection. + // + // TODO(rockot): Remove this. It's a temporary solution to avoid porting all + // relevant code to ConnectionFilters at once. + virtual void SetupInterfaceRequestProxies( + shell::InterfaceRegistry* registry, + shell::InterfaceProvider* provider) = 0; + + // Allows the caller to filter inbound connections and/or expose interfaces + // on them. |filter| may be created on any thread, but will be used and + // destroyed exclusively on the IO thread (the thread corresponding to + // |io_task_runner| passed to Create() above.) + // + // Connection filters MUST be added before calling Start() in order to avoid + // races. + virtual void AddConnectionFilter( + std::unique_ptr<ConnectionFilter> filter) = 0; // Adds an embedded service to this connection's ServiceFactory. // |info| provides details on how to construct new instances of the
diff --git a/content/public/renderer/render_thread.h b/content/public/renderer/render_thread.h index 2f8307d5..59add715 100644 --- a/content/public/renderer/render_thread.h +++ b/content/public/renderer/render_thread.h
@@ -53,8 +53,7 @@ virtual IPC::SyncChannel* GetChannel() = 0; virtual std::string GetLocale() = 0; virtual IPC::SyncMessageFilter* GetSyncMessageFilter() = 0; - virtual scoped_refptr<base::SingleThreadTaskRunner> - GetIOMessageLoopProxy() = 0; + virtual scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() = 0; // Called to add or remove a listener for a particular message routing ID. // These methods normally get delegated to a MessageRouter.
diff --git a/content/public/test/layouttest_support.h b/content/public/test/layouttest_support.h index 7a6a27e8..ea3460a 100644 --- a/content/public/test/layouttest_support.h +++ b/content/public/test/layouttest_support.h
@@ -119,9 +119,8 @@ // Set the device color profile associated with the profile |name|. void SetDeviceColorProfile(RenderView* render_view, const std::string& name); -// Change the bluetooth test adapter while running a layout test. -void SetBluetoothAdapter(int render_process_id, - scoped_refptr<device::BluetoothAdapter> adapter); +// Sets the scan duration to 0. +void SetTestBluetoothScanDuration(); // Enables or disables synchronous resize mode. When enabled, all window-sizing // machinery is short-circuited inside the renderer. This mode is necessary for
diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc index a75a3f9..5924b51 100644 --- a/content/public/test/mock_render_process_host.cc +++ b/content/public/test/mock_render_process_host.cc
@@ -269,10 +269,6 @@ return remote_interfaces_.get(); } -shell::Connection* MockRenderProcessHost::GetChildConnection() { - return nullptr; -} - std::unique_ptr<base::SharedPersistentMemoryAllocator> MockRenderProcessHost::TakeMetricsAllocator() { return nullptr;
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h index 38030657..770377d 100644 --- a/content/public/test/mock_render_process_host.h +++ b/content/public/test/mock_render_process_host.h
@@ -96,7 +96,6 @@ void NotifyTimezoneChange(const std::string& zone_id) override; shell::InterfaceRegistry* GetInterfaceRegistry() override; shell::InterfaceProvider* GetRemoteInterfaces() override; - shell::Connection* GetChildConnection() override; std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() override; const base::TimeTicks& GetInitTimeForNavigationMetrics() const override;
diff --git a/content/public/test/mock_render_thread.cc b/content/public/test/mock_render_thread.cc index 3049984..84cbc9c 100644 --- a/content/public/test/mock_render_thread.cc +++ b/content/public/test/mock_render_thread.cc
@@ -79,7 +79,7 @@ } scoped_refptr<base::SingleThreadTaskRunner> -MockRenderThread::GetIOMessageLoopProxy() { +MockRenderThread::GetIOTaskRunner() { return scoped_refptr<base::SingleThreadTaskRunner>(); }
diff --git a/content/public/test/mock_render_thread.h b/content/public/test/mock_render_thread.h index 7f694f6..fcfb53f 100644 --- a/content/public/test/mock_render_thread.h +++ b/content/public/test/mock_render_thread.h
@@ -54,7 +54,7 @@ IPC::SyncChannel* GetChannel() override; std::string GetLocale() override; IPC::SyncMessageFilter* GetSyncMessageFilter() override; - scoped_refptr<base::SingleThreadTaskRunner> GetIOMessageLoopProxy() override; + scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; void AddRoute(int32_t routing_id, IPC::Listener* listener) override; void RemoveRoute(int32_t routing_id) override; int GenerateRoutingID() override;
diff --git a/content/public/test/test_browser_thread.cc b/content/public/test/test_browser_thread.cc index 7092c6c..ae83f78 100644 --- a/content/public/test/test_browser_thread.cc +++ b/content/public/test/test_browser_thread.cc
@@ -15,30 +15,26 @@ class TestBrowserThreadImpl : public BrowserThreadImpl { public: explicit TestBrowserThreadImpl(BrowserThread::ID identifier) - : BrowserThreadImpl(identifier), - notification_service_(NULL) { - } + : BrowserThreadImpl(identifier) {} TestBrowserThreadImpl(BrowserThread::ID identifier, base::MessageLoop* message_loop) - : BrowserThreadImpl(identifier, message_loop), - notification_service_(NULL) {} + : BrowserThreadImpl(identifier, message_loop) {} ~TestBrowserThreadImpl() override { Stop(); } void Init() override { - notification_service_ = new NotificationServiceImpl; + notification_service_.reset(new NotificationServiceImpl); BrowserThreadImpl::Init(); } void CleanUp() override { - delete notification_service_; - notification_service_ = NULL; + notification_service_.reset(); BrowserThreadImpl::CleanUp(); } private: - NotificationService* notification_service_; + std::unique_ptr<NotificationService> notification_service_; DISALLOW_COPY_AND_ASSIGN(TestBrowserThreadImpl); }; @@ -77,8 +73,4 @@ return impl_->IsRunning(); } -base::Thread* TestBrowserThread::DeprecatedGetThreadObject() { - return impl_.get(); -} - } // namespace content
diff --git a/content/public/test/test_browser_thread.h b/content/public/test/test_browser_thread.h index e5c837d..5c01912 100644 --- a/content/public/test/test_browser_thread.h +++ b/content/public/test/test_browser_thread.h
@@ -12,7 +12,6 @@ namespace base { class MessageLoop; -class Thread; } namespace content { @@ -50,10 +49,6 @@ // Returns true if the thread is running. bool IsRunning(); - // Returns a Thread pointer for the thread. This should not be used - // in new tests. - base::Thread* DeprecatedGetThreadObject(); - private: std::unique_ptr<TestBrowserThreadImpl> impl_;
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc index 8f1bc34..5f0f28b 100644 --- a/content/renderer/history_controller.cc +++ b/content/renderer/history_controller.cc
@@ -196,8 +196,29 @@ bool navigation_within_page) { switch (commit_type) { case blink::WebBackForwardCommit: - if (!provisional_entry_) + if (!provisional_entry_) { + // The provisional entry may have been discarded due to a navigation in + // a different frame. For main frames, it is not safe to leave the + // current_entry_ in place, which may have a cross-site page and will be + // included in the PageState for this commit. Replace it with a new + // HistoryEntry corresponding to the commit. + // + // This will lack any subframe history items that were in the original + // provisional entry, but we don't know what those were after discarding + // it. We'll load the default URL in those subframes instead. + // + // TODO(creis): It's also possible to get here for subframe commits. + // We'll leave a stale current_entry_ in that case, but that only causes + // an earlier URL to load in the subframe when leaving and coming back, + // and only in rare cases. It does not risk a URL spoof, unlike the + // main frame case. Since this bug is not present in the new + // FrameNavigationEntry-based navigation path (https://crbug.com/236848) + // we'll wait for that to fix the subframe case. + if (frame->IsMainFrame()) + current_entry_.reset(new HistoryEntry(item)); + return; + } // If the current entry is null, this must be a main frame commit. DCHECK(current_entry_ || frame->IsMainFrame());
diff --git a/content/renderer/image_downloader/image_downloader_impl.cc b/content/renderer/image_downloader/image_downloader_impl.cc index 84c13a5..139abbc 100644 --- a/content/renderer/image_downloader/image_downloader_impl.cc +++ b/content/renderer/image_downloader/image_downloader_impl.cc
@@ -78,7 +78,7 @@ images->clear(); original_image_sizes->clear(); - if (!unfiltered.size()) + if (unfiltered.empty()) return; if (max_image_size == 0)
diff --git a/content/renderer/media/audio_device_factory.cc b/content/renderer/media/audio_device_factory.cc index a776d69..9f9b8c1 100644 --- a/content/renderer/media/audio_device_factory.cc +++ b/content/renderer/media/audio_device_factory.cc
@@ -31,7 +31,7 @@ // chance device authorization response is never received from the browser side. // In this case we will time out, to avoid renderer hang forever waiting for // device authorization (http://crbug/615589). This will result in "no audio". -const int64_t kMaxAuthorizationTimeoutMs = 900; +const int64_t kMaxAuthorizationTimeoutMs = 1000; #else const int64_t kMaxAuthorizationTimeoutMs = 0; // No timeout. #endif // defined(OS_WIN)
diff --git a/content/renderer/media/gpu/rtc_video_decoder.h b/content/renderer/media/gpu/rtc_video_decoder.h index 274f6dfb..d77220f5 100644 --- a/content/renderer/media/gpu/rtc_video_decoder.h +++ b/content/renderer/media/gpu/rtc_video_decoder.h
@@ -43,11 +43,11 @@ namespace content { // This class uses hardware accelerated video decoder to decode video for -// WebRTC. |vda_message_loop_| is the message loop proxy of the media thread, -// which VDA::Client methods run on. webrtc::VideoDecoder methods run on WebRTC -// DecodingThread or Chrome_libJingle_WorkerThread, which are trampolined to -// |vda_message_loop_|. Decode() is non-blocking and queues the buffers. Decoded -// frames are delivered to WebRTC on |vda_message_loop_|. +// WebRTC. Lives on the media thread, where VDA::Client methods run on. +// webrtc::VideoDecoder methods run on WebRTC DecodingThread or +// Chrome_libJingle_WorkerThread, which are trampolined to the media thread. +// Decode() is non-blocking and queues the buffers. Decoded frames are +// delivered to WebRTC on the media task runner. class CONTENT_EXPORT RTCVideoDecoder : NON_EXPORTED_BASE(public webrtc::VideoDecoder), public media::VideoDecodeAccelerator::Client { @@ -163,7 +163,7 @@ // Tells VDA that a picture buffer can be recycled. void ReusePictureBuffer(int64_t picture_buffer_id); - // Creates |vda_| on |vda_loop_proxy_|. + // Creates |vda_| on the media thread. void CreateVDA(media::VideoCodecProfile profile, base::WaitableEvent* waiter); void DestroyTextures(); @@ -294,7 +294,7 @@ gfx::Size min_resolution_; gfx::Size max_resolution_; - // Must be destroyed, or invalidated, on |vda_loop_proxy_| + // Must be destroyed, or invalidated, on the media thread. // NOTE: Weak pointers must be invalidated before all other member variables. base::WeakPtrFactory<RTCVideoDecoder> weak_factory_;
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc index 4e9da8b9..6c886e9d 100644 --- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc +++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -386,14 +386,6 @@ FilteringNetworkManager* filtering_network_manager = new FilteringNetworkManager(network_manager_, requesting_origin, media_permission); - if (media_permission) { - // Start permission check earlier to reduce any impact to call set up - // time. It's safe to use Unretained here since both destructor and - // Initialize can only be called on the worker thread. - chrome_worker_thread_.task_runner()->PostTask( - FROM_HERE, base::Bind(&FilteringNetworkManager::CheckPermission, - base::Unretained(filtering_network_manager))); - } network_manager.reset(filtering_network_manager); } else { network_manager.reset(new EmptyNetworkManager(network_manager_));
diff --git a/content/renderer/mus/render_widget_window_tree_client_factory.cc b/content/renderer/mus/render_widget_window_tree_client_factory.cc index ef56edd..a068781 100644 --- a/content/renderer/mus/render_widget_window_tree_client_factory.cc +++ b/content/renderer/mus/render_widget_window_tree_client_factory.cc
@@ -9,11 +9,14 @@ #include "base/logging.h" #include "base/macros.h" #include "base/memory/ptr_util.h" +#include "base/memory/ref_counted.h" +#include "base/sequenced_task_runner.h" +#include "base/threading/thread_task_runner_handle.h" #include "content/common/render_widget_window_tree_client_factory.mojom.h" +#include "content/public/common/connection_filter.h" #include "content/public/common/mojo_shell_connection.h" #include "content/renderer/mus/render_widget_mus_connection.h" #include "mojo/public/cpp/bindings/binding_set.h" -#include "services/shell/public/cpp/connection.h" #include "services/shell/public/cpp/interface_factory.h" #include "services/shell/public/cpp/service.h" #include "services/ui/public/interfaces/window_tree.mojom.h" @@ -23,23 +26,34 @@ namespace { +void BindMusConnectionOnMainThread( + uint32_t routing_id, + ui::mojom::WindowTreeClientRequest request) { + RenderWidgetMusConnection* connection = + RenderWidgetMusConnection::GetOrCreate(routing_id); + connection->Bind(std::move(request)); +} + // This object's lifetime is managed by MojoShellConnection because it's a // registered with it. class RenderWidgetWindowTreeClientFactoryImpl - : public shell::Service, + : public ConnectionFilter, public shell::InterfaceFactory< mojom::RenderWidgetWindowTreeClientFactory>, public mojom::RenderWidgetWindowTreeClientFactory { public: RenderWidgetWindowTreeClientFactoryImpl() { DCHECK(MojoShellConnection::GetForProcess()); + + main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); } ~RenderWidgetWindowTreeClientFactoryImpl() override {} private: - // shell::Service implementation: - bool OnConnect(shell::Connection* connection) override { + // ConnectionFilter implementation: + bool OnConnect(shell::Connection* connection, + shell::Connector* connector) override { connection->AddInterface<mojom::RenderWidgetWindowTreeClientFactory>(this); return true; } @@ -54,12 +68,13 @@ // mojom::RenderWidgetWindowTreeClientFactory implementation. void CreateWindowTreeClientForRenderWidget( uint32_t routing_id, - mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request) override { - RenderWidgetMusConnection* connection = - RenderWidgetMusConnection::GetOrCreate(routing_id); - connection->Bind(std::move(request)); + ui::mojom::WindowTreeClientRequest request) override { + main_thread_task_runner_->PostTask( + FROM_HERE, base::Bind(&BindMusConnectionOnMainThread, routing_id, + base::Passed(&request))); } + scoped_refptr<base::SequencedTaskRunner> main_thread_task_runner_; mojo::BindingSet<mojom::RenderWidgetWindowTreeClientFactory> bindings_; DISALLOW_COPY_AND_ASSIGN(RenderWidgetWindowTreeClientFactoryImpl); @@ -67,9 +82,10 @@ } // namespace -void CreateRenderWidgetWindowTreeClientFactory() { - MojoShellConnection::GetForProcess()->MergeService( - base::WrapUnique(new RenderWidgetWindowTreeClientFactoryImpl)); +void CreateRenderWidgetWindowTreeClientFactory( + MojoShellConnection* connection) { + connection->AddConnectionFilter( + base::MakeUnique<RenderWidgetWindowTreeClientFactoryImpl>()); } } // namespace content
diff --git a/content/renderer/mus/render_widget_window_tree_client_factory.h b/content/renderer/mus/render_widget_window_tree_client_factory.h index f3b3b73..f32e30fa8 100644 --- a/content/renderer/mus/render_widget_window_tree_client_factory.h +++ b/content/renderer/mus/render_widget_window_tree_client_factory.h
@@ -7,7 +7,9 @@ namespace content { -void CreateRenderWidgetWindowTreeClientFactory(); +class MojoShellConnection; + +void CreateRenderWidgetWindowTreeClientFactory(MojoShellConnection* connection); } // namespace content
diff --git a/content/renderer/p2p/filtering_network_manager.cc b/content/renderer/p2p/filtering_network_manager.cc index 667e199b..4112d56f 100644 --- a/content/renderer/p2p/filtering_network_manager.cc +++ b/content/renderer/p2p/filtering_network_manager.cc
@@ -34,22 +34,6 @@ } } -void FilteringNetworkManager::CheckPermission() { - DCHECK(thread_checker_.CalledOnValidThread()); - DCHECK(!started_permission_check_); - - started_permission_check_ = true; - pending_permission_checks_ = 2; - - // Request for media permission asynchronously. - media_permission_->HasPermission( - media::MediaPermission::AUDIO_CAPTURE, requesting_origin_, - base::Bind(&FilteringNetworkManager::OnPermissionStatus, GetWeakPtr())); - media_permission_->HasPermission( - media::MediaPermission::VIDEO_CAPTURE, requesting_origin_, - base::Bind(&FilteringNetworkManager::OnPermissionStatus, GetWeakPtr())); -} - FilteringNetworkManager::~FilteringNetworkManager() { DCHECK(thread_checker_.CalledOnValidThread()); // This helps to catch the case if permission never comes back. @@ -61,6 +45,12 @@ return weak_ptr_factory_.GetWeakPtr(); } +void FilteringNetworkManager::Initialize() { + rtc::NetworkManagerBase::Initialize(); + if (media_permission_) + CheckPermission(); +} + void FilteringNetworkManager::StartUpdating() { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(started_permission_check_); @@ -101,6 +91,22 @@ return network_manager_->GetDefaultLocalAddress(family, ipaddress); } +void FilteringNetworkManager::CheckPermission() { + DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK(!started_permission_check_); + + started_permission_check_ = true; + pending_permission_checks_ = 2; + + // Request for media permission asynchronously. + media_permission_->HasPermission( + media::MediaPermission::AUDIO_CAPTURE, requesting_origin_, + base::Bind(&FilteringNetworkManager::OnPermissionStatus, GetWeakPtr())); + media_permission_->HasPermission( + media::MediaPermission::VIDEO_CAPTURE, requesting_origin_, + base::Bind(&FilteringNetworkManager::OnPermissionStatus, GetWeakPtr())); +} + void FilteringNetworkManager::OnPermissionStatus(bool granted) { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK_GT(pending_permission_checks_, 0);
diff --git a/content/renderer/p2p/filtering_network_manager.h b/content/renderer/p2p/filtering_network_manager.h index 59e2242..01b0ccd 100644 --- a/content/renderer/p2p/filtering_network_manager.h +++ b/content/renderer/p2p/filtering_network_manager.h
@@ -46,11 +46,8 @@ CONTENT_EXPORT ~FilteringNetworkManager() override; - // Check mic/camera permission. - // This is called by PeerConnectionDependencyFactory. - CONTENT_EXPORT void CheckPermission(); - // rtc::NetworkManager: + void Initialize() override; void StartUpdating() override; void StopUpdating() override; void GetNetworks(NetworkList* networks) const override; @@ -58,6 +55,9 @@ rtc::IPAddress* ipaddress) const override; private: + // Check mic/camera permission. + void CheckPermission(); + // Receive callback from MediaPermission when the permission status is // available. void OnPermissionStatus(bool granted);
diff --git a/content/renderer/p2p/filtering_network_manager_unittest.cc b/content/renderer/p2p/filtering_network_manager_unittest.cc index 6dbe4f63..f4ce18e 100644 --- a/content/renderer/p2p/filtering_network_manager_unittest.cc +++ b/content/renderer/p2p/filtering_network_manager_unittest.cc
@@ -138,7 +138,7 @@ FilteringNetworkManager* filtering_network_manager = new FilteringNetworkManager(mock_network_manager_.get(), GURL(), media_permission_.get()); - filtering_network_manager->CheckPermission(); + filtering_network_manager->Initialize(); network_manager_.reset(filtering_network_manager); } else { network_manager_.reset(
diff --git a/content/renderer/p2p/port_allocator.cc b/content/renderer/p2p/port_allocator.cc index f2a9f1d9..00ee3bed 100644 --- a/content/renderer/p2p/port_allocator.cc +++ b/content/renderer/p2p/port_allocator.cc
@@ -27,6 +27,9 @@ socket_dispatcher_(socket_dispatcher), config_(config), origin_(origin) { + DCHECK(socket_dispatcher); + DCHECK(network_manager_); + DCHECK(socket_factory); uint32_t flags = 0; if (!config_.enable_multiple_routes) { flags |= cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION; @@ -51,4 +54,9 @@ P2PPortAllocator::~P2PPortAllocator() {} +void P2PPortAllocator::Initialize() { + BasicPortAllocator::Initialize(); + network_manager_->Initialize(); +} + } // namespace content
diff --git a/content/renderer/p2p/port_allocator.h b/content/renderer/p2p/port_allocator.h index 71a1f61..f686b39 100644 --- a/content/renderer/p2p/port_allocator.h +++ b/content/renderer/p2p/port_allocator.h
@@ -45,6 +45,9 @@ const GURL& origin); ~P2PPortAllocator() override; + // Will also initialize the network manager passed into the constructor. + void Initialize() override; + private: std::unique_ptr<rtc::NetworkManager> network_manager_; scoped_refptr<P2PSocketDispatcher> socket_dispatcher_;
diff --git a/content/renderer/pepper/host_globals.cc b/content/renderer/pepper/host_globals.cc index 964e599..6461206 100644 --- a/content/renderer/pepper/host_globals.cc +++ b/content/renderer/pepper/host_globals.cc
@@ -192,7 +192,7 @@ } base::TaskRunner* HostGlobals::GetFileTaskRunner() { - return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy().get(); + return RenderThreadImpl::current()->GetFileThreadTaskRunner().get(); } ppapi::MessageLoopShared* HostGlobals::GetCurrentMessageLoop() { return NULL; }
diff --git a/content/renderer/pepper/pepper_plugin_registry.cc b/content/renderer/pepper/pepper_plugin_registry.cc index 51c49ac..e90972f 100644 --- a/content/renderer/pepper/pepper_plugin_registry.cc +++ b/content/renderer/pepper/pepper_plugin_registry.cc
@@ -39,10 +39,10 @@ // PluginService. PepperPluginInfo plugin; if (!MakePepperPluginInfo(info, &plugin)) - return NULL; + return nullptr; plugin_list_.push_back(plugin); - return &plugin_list_[plugin_list_.size() - 1]; + return &plugin_list_.back(); } PluginModule* PepperPluginRegistry::GetLiveModule(const base::FilePath& path) {
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc index 927d10b..816c3a3f 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
@@ -52,9 +52,6 @@ bool use_image_chromium = !command_line->HasSwitch(switches::kDisablePepper3DImageChromium); use_image_chromium_ = use_image_chromium; - - // TODO(erikchen): Remove this line to enable the feature. - use_image_chromium_ = false; #endif } @@ -69,7 +66,7 @@ PP_Resource PPB_Graphics3D_Impl::CreateRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state_handle, gpu::CommandBufferId* command_buffer_id) { @@ -82,7 +79,7 @@ } scoped_refptr<PPB_Graphics3D_Impl> graphics_3d( new PPB_Graphics3D_Impl(instance)); - if (!graphics_3d->InitRaw(share_api, attrib_list, capabilities, + if (!graphics_3d->InitRaw(share_api, attrib_helper, capabilities, shared_state_handle, command_buffer_id)) return 0; return graphics_3d->GetReference(); @@ -212,11 +209,12 @@ return PP_OK_COMPLETIONPENDING; } -bool PPB_Graphics3D_Impl::InitRaw(PPB_Graphics3D_API* share_context, - const int32_t* attrib_list, - gpu::Capabilities* capabilities, - base::SharedMemoryHandle* shared_state_handle, - gpu::CommandBufferId* command_buffer_id) { +bool PPB_Graphics3D_Impl::InitRaw( + PPB_Graphics3D_API* share_context, + const gpu::gles2::ContextCreationAttribHelper& requested_attribs, + gpu::Capabilities* capabilities, + base::SharedMemoryHandle* shared_state_handle, + gpu::CommandBufferId* command_buffer_id) { PepperPluginInstanceImpl* plugin_instance = HostGlobals::Get()->GetInstance(pp_instance()); if (!plugin_instance) @@ -247,41 +245,9 @@ if (!channel) return false; - gpu::gles2::ContextCreationAttribHelper attrib_helper; - std::vector<int32_t> attribs; - attrib_helper.gpu_preference = gl::PreferDiscreteGpu; - // TODO(alokp): Change CommandBufferProxyImpl::Create() - // interface to accept width and height in the attrib_list so that - // we do not need to filter for width and height here. - if (attrib_list) { - for (const int32_t* attr = attrib_list; attr[0] != PP_GRAPHICS3DATTRIB_NONE; - attr += 2) { - switch (attr[0]) { - case PP_GRAPHICS3DATTRIB_WIDTH: - attrib_helper.offscreen_framebuffer_size.set_width(attr[1]); - break; - case PP_GRAPHICS3DATTRIB_HEIGHT: - attrib_helper.offscreen_framebuffer_size.set_height(attr[1]); - break; - case PP_GRAPHICS3DATTRIB_GPU_PREFERENCE: - attrib_helper.gpu_preference = - (attr[1] == PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER) - ? gl::PreferIntegratedGpu - : gl::PreferDiscreteGpu; - break; - case PP_GRAPHICS3DATTRIB_ALPHA_SIZE: - has_alpha_ = attr[1] > 0; - // fall-through - default: - attribs.push_back(attr[0]); - attribs.push_back(attr[1]); - break; - } - } - attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); - } - if (!attrib_helper.Parse(attribs)) - return false; + has_alpha_ = requested_attribs.alpha_size > 0; + + gpu::gles2::ContextCreationAttribHelper attrib_helper = requested_attribs; attrib_helper.should_use_native_gmb_for_backbuffer = use_image_chromium_; gpu::CommandBufferProxyImpl* share_buffer = NULL;
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.h b/content/renderer/pepper/ppb_graphics_3d_impl.h index 5d926ec1..9255e02 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.h +++ b/content/renderer/pepper/ppb_graphics_3d_impl.h
@@ -20,6 +20,9 @@ #include "ppapi/shared_impl/resource.h" namespace gpu { +namespace gles2 { +struct ContextCreationAttribHelper; +} struct Capabilities; class CommandBufferProxyImpl; } @@ -29,12 +32,13 @@ class PPB_Graphics3D_Impl : public ppapi::PPB_Graphics3D_Shared, public gpu::GpuControlClient { public: - static PP_Resource CreateRaw(PP_Instance instance, - PP_Resource share_context, - const int32_t* attrib_list, - gpu::Capabilities* capabilities, - base::SharedMemoryHandle* shared_state_handle, - gpu::CommandBufferId* command_buffer_id); + static PP_Resource CreateRaw( + PP_Instance instance, + PP_Resource share_context, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, + gpu::Capabilities* capabilities, + base::SharedMemoryHandle* shared_state_handle, + gpu::CommandBufferId* command_buffer_id); // PPB_Graphics3D_API trusted implementation. PP_Bool SetGetBuffer(int32_t transfer_buffer_id) override; @@ -78,7 +82,7 @@ explicit PPB_Graphics3D_Impl(PP_Instance instance); bool InitRaw(PPB_Graphics3D_API* share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& requested_attribs, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state_handle, gpu::CommandBufferId* command_buffer_id);
diff --git a/content/renderer/pepper/resource_creation_impl.cc b/content/renderer/pepper/resource_creation_impl.cc index 38819bb..fb86702 100644 --- a/content/renderer/pepper/resource_creation_impl.cc +++ b/content/renderer/pepper/resource_creation_impl.cc
@@ -121,11 +121,11 @@ PP_Resource ResourceCreationImpl::CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) { - return PPB_Graphics3D_Impl::CreateRaw(instance, share_context, attrib_list, + return PPB_Graphics3D_Impl::CreateRaw(instance, share_context, attrib_helper, capabilities, shared_state, command_buffer_id); }
diff --git a/content/renderer/pepper/resource_creation_impl.h b/content/renderer/pepper/resource_creation_impl.h index ad28338..5f48569 100644 --- a/content/renderer/pepper/resource_creation_impl.h +++ b/content/renderer/pepper/resource_creation_impl.h
@@ -57,7 +57,7 @@ PP_Resource CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) override;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 0845883..ef0fc885 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -142,6 +142,8 @@ #include "net/base/port_util.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "net/base/url_util.h" +#include "services/shell/public/cpp/interface_provider.h" +#include "services/shell/public/cpp/interface_registry.h" #include "skia/ext/event_tracer_impl.h" #include "skia/ext/skia_memory_dump_provider.h" #include "third_party/WebKit/public/platform/WebImageGenerator.h" @@ -454,6 +456,11 @@ automatic_flushes, support_locking, limits, attributes, nullptr, type)); } +bool IsRunningInMash() { + const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); + return cmdline->HasSwitch(switches::kIsRunningInMash); +} + } // namespace // For measuring memory usage after each task. Behind a command line flag. @@ -641,6 +648,13 @@ // Register this object as the main thread. ChildProcess::current()->set_main_thread(this); +#if defined(MOJO_SHELL_CLIENT) + if (IsRunningInMash()) { + auto* shell_connection = ChildThread::Get()->GetMojoShellConnection(); + ui::GpuService::Initialize(shell_connection->GetConnector()); + } +#endif + InitializeWebKit(resource_task_queue); // In single process the single process is all there is. @@ -667,9 +681,9 @@ kMaxResourceRequestsPerFlushWhenThrottled)); resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get()); - media_stream_center_ = NULL; + media_stream_center_ = nullptr; - blob_message_filter_ = new BlobMessageFilter(GetFileThreadMessageLoopProxy()); + blob_message_filter_ = new BlobMessageFilter(GetFileThreadTaskRunner()); AddFilter(blob_message_filter_.get()); db_message_filter_ = new DBMessageFilter(); AddFilter(db_message_filter_.get()); @@ -684,28 +698,26 @@ peer_connection_tracker_.reset(new PeerConnectionTracker()); AddObserver(peer_connection_tracker_.get()); - p2p_socket_dispatcher_ = - new P2PSocketDispatcher(GetIOMessageLoopProxy().get()); + p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOTaskRunner().get()); AddFilter(p2p_socket_dispatcher_.get()); peer_connection_factory_.reset( new PeerConnectionDependencyFactory(p2p_socket_dispatcher_.get())); aec_dump_message_filter_ = new AecDumpMessageFilter( - GetIOMessageLoopProxy(), message_loop()->task_runner()); + GetIOTaskRunner(), message_loop()->task_runner()); AddFilter(aec_dump_message_filter_.get()); #endif // defined(ENABLE_WEBRTC) - audio_input_message_filter_ = - new AudioInputMessageFilter(GetIOMessageLoopProxy()); + audio_input_message_filter_ = new AudioInputMessageFilter(GetIOTaskRunner()); AddFilter(audio_input_message_filter_.get()); - audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); + audio_message_filter_ = new AudioMessageFilter(GetIOTaskRunner()); AddFilter(audio_message_filter_.get()); - midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); + midi_message_filter_ = new MidiMessageFilter(GetIOTaskRunner()); AddFilter(midi_message_filter_.get()); AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); @@ -839,15 +851,6 @@ GetInterfaceRegistry()->AddInterface(base::Bind(CreateFrameFactory)); GetInterfaceRegistry()->AddInterface(base::Bind(CreateEmbeddedWorkerSetup)); -#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) - // We may not have a MojoShellConnection object in tests that directly - // instantiate a RenderThreadImpl. - if (MojoShellConnection::GetForProcess() && - base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kUseMusInRenderer)) - CreateRenderWidgetWindowTreeClientFactory(); -#endif - GetRemoteInterfaces()->GetInterface( mojo::GetProxy(&storage_partition_service_)); @@ -877,11 +880,11 @@ // Shutdown in reverse of the initialization order. if (devtools_agent_message_filter_.get()) { RemoveFilter(devtools_agent_message_filter_.get()); - devtools_agent_message_filter_ = NULL; + devtools_agent_message_filter_ = nullptr; } RemoveFilter(audio_input_message_filter_.get()); - audio_input_message_filter_ = NULL; + audio_input_message_filter_ = nullptr; #if defined(ENABLE_WEBRTC) RTCPeerConnectionHandler::DestructAllHandlers(); @@ -895,7 +898,7 @@ vc_manager_.reset(); RemoveFilter(db_message_filter_.get()); - db_message_filter_ = NULL; + db_message_filter_ = nullptr; // Shutdown the file thread if it's running. if (file_thread_) @@ -903,7 +906,7 @@ if (compositor_message_filter_.get()) { RemoveFilter(compositor_message_filter_.get()); - compositor_message_filter_ = NULL; + compositor_message_filter_ = nullptr; } #if defined(OS_ANDROID) @@ -922,7 +925,7 @@ // AudioMessageFilter may be accessed on |media_thread_|, so shutdown after. RemoveFilter(audio_message_filter_.get()); - audio_message_filter_ = NULL; + audio_message_filter_ = nullptr; categorized_worker_pool_->Shutdown(); @@ -930,7 +933,7 @@ input_handler_manager_.reset(); if (input_event_filter_.get()) { RemoveFilter(input_event_filter_.get()); - input_event_filter_ = NULL; + input_event_filter_ = nullptr; } // RemoveEmbeddedWorkerRoute may be called while deleting @@ -942,7 +945,7 @@ // hold pointers to V8 objects (e.g., via pending requests). main_thread_indexed_db_dispatcher_.reset(); - main_thread_compositor_task_runner_ = NULL; + main_thread_compositor_task_runner_ = nullptr; gpu_factories_.clear(); @@ -981,7 +984,16 @@ // to the browser process. main_message_loop_.reset(); - lazy_tls.Pointer()->Set(NULL); + lazy_tls.Pointer()->Set(nullptr); +} + +void RenderThreadImpl::AddConnectionFilters(MojoShellConnection* connection) { +#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kUseMusInRenderer)) { + CreateRenderWidgetWindowTreeClientFactory(connection); + } +#endif } bool RenderThreadImpl::Send(IPC::Message* msg) { @@ -1032,7 +1044,7 @@ } scoped_refptr<base::SingleThreadTaskRunner> -RenderThreadImpl::GetIOMessageLoopProxy() { +RenderThreadImpl::GetIOTaskRunner() { return ChildProcess::current()->io_task_runner(); } @@ -1504,8 +1516,8 @@ scoped_refptr<ContextProviderCommandBuffer> shared_context_provider = SharedMainThreadContextProvider(); if (!shared_context_provider) { - stream_texture_factory_ = NULL; - return NULL; + stream_texture_factory_ = nullptr; + return nullptr; } DCHECK(shared_context_provider->GetCommandBufferProxy()); DCHECK(shared_context_provider->GetCommandBufferProxy()->channel()); @@ -1672,7 +1684,7 @@ bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { base::ObserverListBase<RenderThreadObserver>::Iterator it(&observers_); RenderThreadObserver* observer; - while ((observer = it.GetNext()) != NULL) { + while ((observer = it.GetNext()) != nullptr) { if (observer->OnControlMessageReceived(msg)) return true; } @@ -1778,32 +1790,40 @@ // Recreate the channel if it has been lost. gpu_channel_->DestroyChannel(); - gpu_channel_ = NULL; + gpu_channel_ = nullptr; } - // Ask the browser for the channel name. - int client_id = 0; - IPC::ChannelHandle channel_handle; - gpu::GPUInfo gpu_info; - if (!Send(new ChildProcessHostMsg_EstablishGpuChannel( - cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) || + if (!IsRunningInMash()) { + int client_id = 0; + IPC::ChannelHandle channel_handle; + gpu::GPUInfo gpu_info; + // Ask the browser for the channel name. + if (!Send(new ChildProcessHostMsg_EstablishGpuChannel( + cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) || #if defined(OS_POSIX) - channel_handle.socket.fd == -1 || + channel_handle.socket.fd == -1 || #endif - channel_handle.name.empty()) { - // Otherwise cancel the connection. - return NULL; + channel_handle.name.empty()) { + // Otherwise cancel the connection. + return nullptr; + } + GetContentClient()->SetGpuInfo(gpu_info); + + // Cache some variables that are needed on the compositor thread for our + // implementation of GpuChannelHostFactory. + io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); + + gpu_channel_ = + gpu::GpuChannelHost::Create(this, client_id, gpu_info, channel_handle, + ChildProcess::current()->GetShutDownEvent(), + gpu_memory_buffer_manager()); + } else { +#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) + gpu_channel_ = ui::GpuService::GetInstance()->EstablishGpuChannelSync(); +#else + NOTREACHED(); +#endif } - - GetContentClient()->SetGpuInfo(gpu_info); - - // Cache some variables that are needed on the compositor thread for our - // implementation of GpuChannelHostFactory. - io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); - - gpu_channel_ = gpu::GpuChannelHost::Create( - this, client_id, gpu_info, channel_handle, - ChildProcess::current()->GetShutDownEvent(), gpu_memory_buffer_manager()); return gpu_channel_; } @@ -1819,10 +1839,9 @@ use_software = true; #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) - auto shell_connection = MojoShellConnection::GetForProcess(); + auto* shell_connection = MojoShellConnection::GetForProcess(); if (shell_connection && !use_software && command_line.HasSwitch(switches::kUseMusInRenderer)) { - ui::GpuService::Initialize(shell_connection->GetConnector()); RenderWidgetMusConnection* connection = RenderWidgetMusConnection::GetOrCreate(routing_id); return connection->CreateOutputSurface(); @@ -2055,7 +2074,7 @@ } scoped_refptr<base::SingleThreadTaskRunner> -RenderThreadImpl::GetFileThreadMessageLoopProxy() { +RenderThreadImpl::GetFileThreadTaskRunner() { DCHECK(message_loop()->task_runner()->BelongsToCurrentThread()); if (!file_thread_) { file_thread_.reset(new base::Thread("Renderer::FILE"));
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 477c555..19fb8087 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h
@@ -166,12 +166,15 @@ // changed. static void NotifyTimezoneChange(); + // ChildThreadImpl implementation: + void AddConnectionFilters(MojoShellConnection* connection) override; + // RenderThread implementation: bool Send(IPC::Message* msg) override; IPC::SyncChannel* GetChannel() override; std::string GetLocale() override; IPC::SyncMessageFilter* GetSyncMessageFilter() override; - scoped_refptr<base::SingleThreadTaskRunner> GetIOMessageLoopProxy() override; + scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; void AddRoute(int32_t routing_id, IPC::Listener* listener) override; void RemoveRoute(int32_t routing_id) override; int GenerateRoutingID() override; @@ -333,7 +336,7 @@ // Returns a SingleThreadTaskRunner instance corresponding to the message loop // of the thread on which file operations should be run. Must be called // on the renderer's main thread. - scoped_refptr<base::SingleThreadTaskRunner> GetFileThreadMessageLoopProxy(); + scoped_refptr<base::SingleThreadTaskRunner> GetFileThreadTaskRunner(); // Returns a SingleThreadTaskRunner instance corresponding to the message loop // of the thread on which media operations should be run. Must be called
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index f6b05b6..b80e70ca 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -1661,9 +1661,7 @@ if (edit_commands_.empty()) return false; - WebFrame* frame = webview()->focusedFrame(); - if (!frame) - return false; + WebLocalFrame* frame = webview()->focusedFrame(); EditCommands::iterator it = edit_commands_.begin(); EditCommands::iterator end = edit_commands_.end(); @@ -2751,12 +2749,11 @@ if (replacement_range.IsValid() && webview()) { // Select the text in |replacement_range|, it will then be replaced by // text added by the call to RenderWidget::OnImeSetComposition(). - if (WebLocalFrame* frame = webview()->focusedFrame()->toWebLocalFrame()) { - WebRange webrange = WebRange::fromDocumentRange( - frame, replacement_range.start(), replacement_range.length()); - if (!webrange.isNull()) - frame->selectRange(webrange); - } + WebLocalFrame* frame = webview()->focusedFrame(); + WebRange webrange = WebRange::fromDocumentRange( + frame, replacement_range.start(), replacement_range.length()); + if (!webrange.isNull()) + frame->selectRange(webrange); } RenderWidget::OnImeSetComposition(text, underlines, @@ -2780,12 +2777,11 @@ if (replacement_range.IsValid() && webview()) { // Select the text in |replacement_range|, it will then be replaced by // text added by the call to RenderWidget::OnImeConfirmComposition(). - if (WebLocalFrame* frame = webview()->focusedFrame()->toWebLocalFrame()) { - WebRange webrange = WebRange::fromDocumentRange( - frame, replacement_range.start(), replacement_range.length()); - if (!webrange.isNull()) - frame->selectRange(webrange); - } + WebLocalFrame* frame = webview()->focusedFrame(); + WebRange webrange = WebRange::fromDocumentRange( + frame, replacement_range.start(), replacement_range.length()); + if (!webrange.isNull()) + frame->selectRange(webrange); } RenderWidget::OnImeConfirmComposition(text, replacement_range, @@ -2853,9 +2849,7 @@ if (character_count == 0) return; - blink::WebFrame* frame = webview()->focusedFrame(); - if (!frame) - return; + blink::WebLocalFrame* frame = webview()->focusedFrame(); bounds_in_window->reserve(character_count); blink::WebRect webrect;
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc index 9a7a34d..2fb3aac 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -84,6 +84,7 @@ #include "media/blink/webcontentdecryptionmodule_impl.h" #include "media/filters/stream_parser_factory.h" #include "mojo/common/common_type_converters.h" +#include "services/shell/public/cpp/interface_provider.h" #include "storage/common/database/database_identifier.h" #include "storage/common/quota/quota_types.h" #include "third_party/WebKit/public/platform/BlameContext.h" @@ -269,7 +270,7 @@ thread_safe_sender_ = ChildThreadImpl::current()->thread_safe_sender(); quota_message_filter_ = ChildThreadImpl::current()->quota_message_filter(); blob_registry_.reset(new WebBlobRegistryImpl( - RenderThreadImpl::current()->GetIOMessageLoopProxy().get(), + RenderThreadImpl::current()->GetIOTaskRunner().get(), base::ThreadTaskRunnerHandle::Get(), thread_safe_sender_.get())); web_idb_factory_.reset(new WebIDBFactoryImpl(thread_safe_sender_.get())); web_database_observer_impl_.reset( @@ -935,7 +936,7 @@ WebMediaStreamTrack* track) { #if defined(ENABLE_WEBRTC) return CanvasCaptureHandler::CreateCanvasCaptureHandler( - size, frame_rate, RenderThread::Get()->GetIOMessageLoopProxy(), track); + size, frame_rate, RenderThread::Get()->GetIOTaskRunner(), track); #else return nullptr; #endif // defined(ENABLE_WEBRTC) @@ -951,8 +952,7 @@ DCHECK(web_media_player); AddVideoTrackToMediaStream( HtmlVideoElementCapturerSource::CreateFromWebMediaPlayerImpl( - web_media_player, - content::RenderThread::Get()->GetIOMessageLoopProxy()), + web_media_player, content::RenderThread::Get()->GetIOTaskRunner()), false, // is_remote false, // is_readonly web_media_stream);
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc index 7988b852..30d6abd6 100644 --- a/content/renderer/service_worker/service_worker_context_client.cc +++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -43,6 +43,8 @@ #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" #include "mojo/public/cpp/bindings/interface_request.h" +#include "services/shell/public/cpp/interface_provider.h" +#include "services/shell/public/cpp/interface_registry.h" #include "third_party/WebKit/public/platform/URLConversion.h" #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
diff --git a/content/renderer/service_worker/service_worker_type_util.cc b/content/renderer/service_worker/service_worker_type_util.cc index 35769af..d1dae819 100644 --- a/content/renderer/service_worker/service_worker_type_util.cc +++ b/content/renderer/service_worker/service_worker_type_util.cc
@@ -20,7 +20,7 @@ class HeaderVisitor : public blink::WebHTTPHeaderVisitor { public: - HeaderVisitor(ServiceWorkerHeaderMap* headers) : headers_(headers) {} + explicit HeaderVisitor(ServiceWorkerHeaderMap* headers) : headers_(headers) {} virtual ~HeaderVisitor() {} void visitHeader(const blink::WebString& name, @@ -35,7 +35,7 @@ } private: - ServiceWorkerHeaderMap* headers_; + ServiceWorkerHeaderMap* const headers_; }; std::unique_ptr<HeaderVisitor> MakeHeaderVisitor( @@ -49,7 +49,7 @@ const blink::WebServiceWorkerRequest& web_request, ServiceWorkerHeaderMap* headers) { DCHECK(headers); - DCHECK(!headers->size()); + DCHECK(headers->empty()); web_request.visitHTTPHeaderFields(MakeHeaderVisitor(headers).get()); } @@ -57,7 +57,7 @@ const blink::WebServiceWorkerResponse& web_response, ServiceWorkerHeaderMap* headers) { DCHECK(headers); - DCHECK(!headers->size()); + DCHECK(headers->empty()); web_response.visitHTTPHeaderFields(MakeHeaderVisitor(headers).get()); }
diff --git a/content/renderer/text_input_client_observer.cc b/content/renderer/text_input_client_observer.cc index 3c953ee..d738e546 100644 --- a/content/renderer/text_input_client_observer.cc +++ b/content/renderer/text_input_client_observer.cc
@@ -87,13 +87,10 @@ } else #endif { - blink::WebFrame* frame = webview()->focusedFrame(); - if (frame) { - blink::WebRect web_rect; - frame->firstRectForCharacterRange(range.start(), range.length(), - web_rect); - rect = web_rect; - } + blink::WebLocalFrame* frame = webview()->focusedFrame(); + blink::WebRect web_rect; + frame->firstRectForCharacterRange(range.start(), range.length(), web_rect); + rect = web_rect; } Send(new TextInputClientReplyMsg_GotFirstRectForRange(routing_id(), rect)); } @@ -102,11 +99,9 @@ #if defined(OS_MACOSX) blink::WebPoint baselinePoint; NSAttributedString* string = nil; - blink::WebLocalFrame* frame = webview()->focusedFrame()->toWebLocalFrame(); - if (frame) { - string = blink::WebSubstringUtil::attributedSubstringInRange( - frame, range.start(), range.length(), &baselinePoint); - } + blink::WebLocalFrame* frame = webview()->focusedFrame(); + string = blink::WebSubstringUtil::attributedSubstringInRange( + frame, range.start(), range.length(), &baselinePoint); std::unique_ptr<const mac::AttributedStringCoder::EncodedString> encoded( mac::AttributedStringCoder::Encode(string)); Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(),
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc index b97bd0ad..8e8c65b 100644 --- a/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc +++ b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc
@@ -8,23 +8,20 @@ #include "content/public/test/layouttest_support.h" #include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h" +#include "device/bluetooth/bluetooth_adapter_factory_wrapper.h" namespace content { // static void LayoutTestBluetoothFakeAdapterSetterImpl::Create( - int render_process_id, mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) { - new LayoutTestBluetoothFakeAdapterSetterImpl(render_process_id, - std::move(request)); + new LayoutTestBluetoothFakeAdapterSetterImpl(std::move(request)); } LayoutTestBluetoothFakeAdapterSetterImpl:: LayoutTestBluetoothFakeAdapterSetterImpl( - int render_process_id, mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) - : render_process_id_(render_process_id), - binding_(this, std::move(request)) {} + : binding_(this, std::move(request)) {} LayoutTestBluetoothFakeAdapterSetterImpl:: ~LayoutTestBluetoothFakeAdapterSetterImpl() {} @@ -32,9 +29,12 @@ void LayoutTestBluetoothFakeAdapterSetterImpl::Set( const mojo::String& adapter_name, const SetCallback& callback) { - SetBluetoothAdapter(render_process_id_, - LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter( - adapter_name)); + + SetTestBluetoothScanDuration(); + + device::BluetoothAdapterFactoryWrapper::Get().SetBluetoothAdapterForTesting( + LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(adapter_name)); + callback.Run(); }
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h index 199ecdb..978ea30 100644 --- a/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h +++ b/content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h
@@ -16,20 +16,16 @@ : public mojom::LayoutTestBluetoothFakeAdapterSetter { public: static void Create( - int render_process_id, mojom::LayoutTestBluetoothFakeAdapterSetterRequest request); private: LayoutTestBluetoothFakeAdapterSetterImpl( - int render_process_id, mojom::LayoutTestBluetoothFakeAdapterSetterRequest request); ~LayoutTestBluetoothFakeAdapterSetterImpl() override; void Set(const mojo::String& adapter_name, const SetCallback& callback) override; - int render_process_id_; - mojo::StrongBinding<LayoutTestBluetoothFakeAdapterSetter> binding_; DISALLOW_COPY_AND_ASSIGN(LayoutTestBluetoothFakeAdapterSetterImpl);
diff --git a/content/shell/browser/layout_test/layout_test_browser_context.cc b/content/shell/browser/layout_test/layout_test_browser_context.cc index ff55d445..e5adfbfb 100644 --- a/content/shell/browser/layout_test/layout_test_browser_context.cc +++ b/content/shell/browser/layout_test/layout_test_browser_context.cc
@@ -73,7 +73,7 @@ return new net::URLRequestFileJob( request, network_delegate, path, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); } }; @@ -96,8 +96,8 @@ "layout-test-mojom", make_linked_ptr(new MojomProtocolHandler))); return new LayoutTestURLRequestContextGetter( ignore_certificate_errors(), GetPath(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), net_log()); }
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc index 2b0d950..2542557 100644 --- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc +++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -69,7 +69,7 @@ partition->GetURLRequestContext())); host->GetInterfaceRegistry()->AddInterface(base::Bind( - &LayoutTestBluetoothFakeAdapterSetterImpl::Create, host->GetID())); + &LayoutTestBluetoothFakeAdapterSetterImpl::Create)); host->Send(new ShellViewMsg_SetWebKitSourceDir(GetWebKitRootDirFilePath())); }
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc index ebd220e6..a61a6c7 100644 --- a/content/shell/browser/shell_browser_context.cc +++ b/content/shell/browser/shell_browser_context.cc
@@ -132,8 +132,8 @@ URLRequestInterceptorScopedVector request_interceptors) { return new ShellURLRequestContextGetter( ignore_certificate_errors_, GetPath(), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), net_log_); }
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc index a0708972..c682de6 100644 --- a/content/shell/browser/shell_url_request_context_getter.cc +++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -173,7 +173,7 @@ net::CACHE_BACKEND_DEFAULT, #endif cache_path, 0, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))); + BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE))); net::HttpNetworkSession::Params network_session_params; network_session_params.cert_verifier = @@ -266,7 +266,7 @@ scoped_refptr<base::SingleThreadTaskRunner> ShellURLRequestContextGetter::GetNetworkTaskRunner() const { - return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); } net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
diff --git a/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt b/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt index bc37ba52..84f9dd7 100644 --- a/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt
@@ -1,5 +1,9 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ++ROLE_SYSTEM_COMBOBOX IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:inline +++++ROLE_SYSTEM_STATICTEXT name='autocomplete=inline' ++ROLE_SYSTEM_COMBOBOX IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:list +++++ROLE_SYSTEM_STATICTEXT name='autocomplete=list' ++ROLE_SYSTEM_COMBOBOX IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:both +++++ROLE_SYSTEM_STATICTEXT name='autocomplete=both' ++ROLE_SYSTEM_COMBOBOX +++++ROLE_SYSTEM_STATICTEXT name='autocomplete=none'
diff --git a/content/test/data/accessibility/aria/aria-searchbox-expected-mac.txt b/content/test/data/accessibility/aria/aria-searchbox-expected-mac.txt index fe4bf976..ad6b005 100644 --- a/content/test/data/accessibility/aria/aria-searchbox-expected-mac.txt +++ b/content/test/data/accessibility/aria/aria-searchbox-expected-mac.txt
@@ -1,2 +1,3 @@ AXWebArea AXRoleDescription='HTML content' ++AXTextField AXSubrole=AXSearchField AXRoleDescription='search text field' AXValue='ARIA role searchbox.' +++++AXStaticText AXRoleDescription='text' AXValue='ARIA role searchbox.'
diff --git a/content/test/data/accessibility/aria/aria-searchbox-expected-win.txt b/content/test/data/accessibility/aria/aria-searchbox-expected-win.txt index 279def2..2e47801 100644 --- a/content/test/data/accessibility/aria/aria-searchbox-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-searchbox-expected-win.txt
@@ -1,2 +1,3 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0>' n_selections=0 -++ROLE_SYSTEM_TEXT value='ARIA role searchbox.' FOCUSABLE xml-roles:searchbox ia2_hypertext='ARIA role searchbox.' caret_offset=0 n_selections=0 +++ROLE_SYSTEM_TEXT value='ARIA role searchbox.' FOCUSABLE xml-roles:searchbox ia2_hypertext='ARIA role searchbox.' n_selections=0 +++++ROLE_SYSTEM_STATICTEXT name='ARIA role searchbox.' ia2_hypertext='ARIA role searchbox.' n_selections=0
diff --git a/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-mac.txt b/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-mac.txt index fe4bf976..ad6b005 100644 --- a/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-mac.txt +++ b/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-mac.txt
@@ -1,2 +1,3 @@ AXWebArea AXRoleDescription='HTML content' ++AXTextField AXSubrole=AXSearchField AXRoleDescription='search text field' AXValue='ARIA role searchbox.' +++++AXStaticText AXRoleDescription='text' AXValue='ARIA role searchbox.'
diff --git a/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-win.txt b/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-win.txt index 57ea7b64..6d9618b 100644 --- a/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-win.txt
@@ -1,2 +1,3 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0>' caret_offset=1 n_selections=1 selection_start=0 selection_end=1 ++ROLE_SYSTEM_TEXT FOCUSABLE xml-roles:searchbox ia2_hypertext='ARIA role searchbox.' caret_offset=20 n_selections=1 selection_start=0 selection_end=20 +++++ROLE_SYSTEM_STATICTEXT name='ARIA role searchbox.' ia2_hypertext='ARIA role searchbox.' caret_offset=20 n_selections=1 selection_start=0 selection_end=20
diff --git a/content/test/data/accessibility/aria/aria-textbox-expected-mac.txt b/content/test/data/accessibility/aria/aria-textbox-expected-mac.txt index 0b404ce..e945e879 100644 --- a/content/test/data/accessibility/aria/aria-textbox-expected-mac.txt +++ b/content/test/data/accessibility/aria/aria-textbox-expected-mac.txt
@@ -1,3 +1,5 @@ AXWebArea AXRoleDescription='HTML content' ++AXTextField AXRoleDescription='text field' AXValue='TextBox1' +++++AXStaticText AXRoleDescription='text' AXValue='TextBox1' ++AXTextArea AXRoleDescription='text entry area' AXValue='TextBox2' +++++AXStaticText AXRoleDescription='text' AXValue='TextBox2'
diff --git a/content/test/data/accessibility/aria/aria-textbox-expected-win.txt b/content/test/data/accessibility/aria/aria-textbox-expected-win.txt index e63d5abd9..b3f994c 100644 --- a/content/test/data/accessibility/aria/aria-textbox-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-textbox-expected-win.txt
@@ -1,3 +1,5 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1>' n_selections=0 -++ROLE_SYSTEM_TEXT value='TextBox1' IA2_STATE_SINGLE_LINE xml-roles:textbox ia2_hypertext='TextBox1' caret_offset=0 n_selections=0 -++ROLE_SYSTEM_TEXT value='TextBox2' IA2_STATE_MULTI_LINE xml-roles:textbox ia2_hypertext='TextBox2' caret_offset=0 n_selections=0 +++ROLE_SYSTEM_TEXT value='TextBox1' IA2_STATE_SINGLE_LINE xml-roles:textbox ia2_hypertext='TextBox1' n_selections=0 +++++ROLE_SYSTEM_STATICTEXT name='TextBox1' ia2_hypertext='TextBox1' n_selections=0 +++ROLE_SYSTEM_TEXT value='TextBox2' IA2_STATE_MULTI_LINE xml-roles:textbox ia2_hypertext='TextBox2' n_selections=0 +++++ROLE_SYSTEM_STATICTEXT name='TextBox2' ia2_hypertext='TextBox2' n_selections=0
diff --git a/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-mac.txt b/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-mac.txt index 1b71f584..c7f3babd 100644 --- a/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-mac.txt +++ b/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-mac.txt
@@ -1,4 +1,9 @@ AXWebArea AXRoleDescription='HTML content' ++AXTextField AXRoleDescription='text field' AXValue='Single line.' +++++AXStaticText AXRoleDescription='text' AXValue='Single line.' ++AXTextArea AXRoleDescription='text entry area' AXValue='Multiple lines.' +++++AXStaticText AXRoleDescription='text' AXValue='Multiple' +++++AXUnknown AXRoleDescription='unknown' AXTitle=' +' +++++AXStaticText AXRoleDescription='text' AXValue='lines.'
diff --git a/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-win.txt b/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-win.txt index e3bd7d98..2129ae6 100644 --- a/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-win.txt
@@ -1,4 +1,10 @@ -ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1>' caret_offset=1 n_selections=1 selection_start=0 selection_end=1 -++ROLE_SYSTEM_TEXT IA2_STATE_SINGLE_LINE xml-roles:textbox ia2_hypertext='Single line.' caret_offset=0 n_selections=0 +ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1>' caret_offset=2 n_selections=1 selection_start=0 selection_end=2 +++ROLE_SYSTEM_TEXT IA2_STATE_SINGLE_LINE xml-roles:textbox ia2_hypertext='Single line.' n_selections=1 selection_start=0 selection_end=12 +++++ROLE_SYSTEM_STATICTEXT name='Single line.' ia2_hypertext='Single line.' n_selections=1 selection_start=0 selection_end=12 ++ROLE_SYSTEM_TEXT IA2_STATE_MULTI_LINE xml-roles:textbox ia2_hypertext='Multiple -lines.' caret_offset=0 n_selections=0 +lines.' caret_offset=8 n_selections=1 selection_start=0 selection_end=8 +++++ROLE_SYSTEM_STATICTEXT name='Multiple' ia2_hypertext='Multiple' caret_offset=8 n_selections=1 selection_start=0 selection_end=8 +++++ROLE_SYSTEM_WHITESPACE name=' +' ia2_hypertext=' +' n_selections=0 +++++ROLE_SYSTEM_STATICTEXT name='lines.' ia2_hypertext='lines.' n_selections=0
diff --git a/content/test/data/accessibility/html/input-datetime-expected-mac.txt b/content/test/data/accessibility/html/input-datetime-expected-mac.txt index aaa4951..fafee5e 100644 --- a/content/test/data/accessibility/html/input-datetime-expected-mac.txt +++ b/content/test/data/accessibility/html/input-datetime-expected-mac.txt
@@ -1,3 +1,5 @@ AXWebArea AXRoleDescription='HTML content' ++AXGroup AXRoleDescription='group' ++++AXTextField AXRoleDescription='text field' AXValue='1/1/2015 1:00AM' +++++++AXGroup AXRoleDescription='group' +++++++++AXStaticText AXRoleDescription='text' AXValue='1/1/2015 1:00AM'
diff --git a/content/test/data/accessibility/html/input-datetime-expected-win.txt b/content/test/data/accessibility/html/input-datetime-expected-win.txt index 2a6c4d6e..167c04d 100644 --- a/content/test/data/accessibility/html/input-datetime-expected-win.txt +++ b/content/test/data/accessibility/html/input-datetime-expected-win.txt
@@ -1,3 +1,5 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0>' ++IA2_ROLE_SECTION ia2_hypertext='<obj0>' ++++ROLE_SYSTEM_TEXT FOCUSABLE ia2_hypertext='1/1/2015 1:00AM' +++++++IA2_ROLE_SECTION ia2_hypertext='1/1/2015 1:00AM' +++++++++ROLE_SYSTEM_STATICTEXT name='1/1/2015 1:00AM' ia2_hypertext='1/1/2015 1:00AM'
diff --git a/content/test/data/gpu/webgl2_conformance_tests_output.json b/content/test/data/gpu/webgl2_conformance_tests_output.json new file mode 100644 index 0000000..2e7b312 --- /dev/null +++ b/content/test/data/gpu/webgl2_conformance_tests_output.json
@@ -0,0 +1,3353 @@ +{ + "failures": [], + "successes": [ + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_unpack_params", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_depth", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_depth_pbo", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_2d_array_00", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_2d_array_01", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_3d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_3d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_params", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_unpack_params", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_2d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_2d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_2d_02", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_02", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_03", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_04", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_depth_stencil", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_size", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_2d_array_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_2d_array_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_2d_array_02", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_02", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_03", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_depth_stencil", + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_size", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_align", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_depth", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_empty_tex", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_2d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_2d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_02", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_03", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_04", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_params", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_unpack_params", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_depth", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_2d_array_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_2d_array_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_3d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_3d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_params", + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_unpack_params", + "WebglConformance_deqp_functional_gles3_texturestatequery", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_r11_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_r11_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_rg11_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_rg11_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_r11_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_r11_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_rg11_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_rg11_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_rgba8_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_rgba8_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_srgb8_alpha8_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_srgb8_alpha8_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_punchthrough_alpha1_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_punchthrough_alpha1_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_punchthrough_alpha1_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_punchthrough_alpha1_pot", + "WebglConformance_deqp_functional_gles3_texturewrap_rgba8_npot", + "WebglConformance_deqp_functional_gles3_texturewrap_rgba8_pot", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_interleaved_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_interleaved_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_interleaved_triangles", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_separate_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_separate_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_separate_triangles", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_interleaved_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_interleaved_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_interleaved_triangles", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_separate_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_separate_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_array_separate_triangles", + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_interleaved_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_interleaved_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_interleaved_triangles", + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_separate_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_separate_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_separate_triangles", + "WebglConformance_deqp_functional_gles3_transformfeedback_interpolation_centroid", + "WebglConformance_deqp_functional_gles3_transformfeedback_interpolation_flat", + "WebglConformance_deqp_functional_gles3_transformfeedback_interpolation_smooth", + "WebglConformance_deqp_functional_gles3_transformfeedback_point_size", + "WebglConformance_deqp_functional_gles3_transformfeedback_position", + "WebglConformance_deqp_functional_gles3_transformfeedback_random_interleaved_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_random_interleaved_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_random_interleaved_triangles", + "WebglConformance_deqp_functional_gles3_transformfeedback_random_separate_lines", + "WebglConformance_deqp_functional_gles3_transformfeedback_random_separate_points", + "WebglConformance_deqp_functional_gles3_transformfeedback_random_separate_triangles", + "WebglConformance_deqp_functional_gles3_uniformapi_info_query", + "WebglConformance_deqp_functional_gles3_uniformapi_random", + "WebglConformance_deqp_functional_gles3_uniformapi_value_assigned", + "WebglConformance_deqp_functional_gles3_uniformapi_value_initial", + "WebglConformance_deqp_functional_gles3_uniformbuffers_instance_array_basic_type", + "WebglConformance_deqp_functional_gles3_uniformbuffers_multi_basic_types", + "WebglConformance_deqp_functional_gles3_uniformbuffers_multi_nested_struct", + "WebglConformance_deqp_functional_gles3_uniformbuffers_random", + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_basic_array", + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_basic_type", + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_nested_struct", + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_nested_struct_array", + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_struct", + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_struct_array", + "WebglConformance_deqp_functional_gles3_vertexarrayobject", + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_count", + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_output", + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_storage", + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_stride", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_first", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_normalize", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_offset", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_byte", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_float", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_half", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_int", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_int_2_10_10_10", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_short", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_byte", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_int", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_int_2_10_10_10", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_short", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_stride", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_dynamic_copy", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_dynamic_draw", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_dynamic_read", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_static_copy", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_static_draw", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_static_read", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_stream_copy", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_stream_draw", + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_stream_read", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_copyteximage2d", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_copytexsubimage2d", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_2d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_2d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_00", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_01", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_02", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_03", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_04", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_2d_array_00", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_2d_array_01", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_2d_array_02", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_02", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_03", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_04", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_2d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_2d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_2d_02", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_00", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_01", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_02", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_03", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_04", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_02", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_03", + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_04", + "WebglConformance_deqp_functional_gles3_texturespecification_random_teximage2d_2d", + "WebglConformance_deqp_functional_gles3_texturespecification_random_teximage2d_cube", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_align", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_depth", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_depth_pbo", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_2d_00", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_2d_01", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_00", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_01", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_02", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_03", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_04", + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_params", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_16", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_17", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_18", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_19", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_20", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_21", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_22", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_23", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_24", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_25", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_26", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_27", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_28", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_29", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_30", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_31", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_32", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_33", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_34", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_35", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_06", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_07", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_08", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_09", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_06", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_07", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_08", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_09", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_no_edges_visible", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_04", + "WebglConformance_deqp_functional_gles3_textureformat_compressed_2d", + "WebglConformance_deqp_functional_gles3_textureformat_compressed_cube", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_00", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_01", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_02", + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_03", + "WebglConformance_deqp_functional_gles3_textureformat_sized_depth_stencil", + "WebglConformance_deqp_functional_gles3_textureformat_unsized_2d", + "WebglConformance_deqp_functional_gles3_textureformat_unsized_2d_array", + "WebglConformance_deqp_functional_gles3_textureformat_unsized_3d", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_not_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_always", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_greater", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_greater_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_less", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_less_or_equal", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_never", + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_not_equal", + "WebglConformance_deqp_functional_gles3_shadermatrix_div_const", + "WebglConformance_deqp_functional_gles3_shadermatrix_div_dynamic", + "WebglConformance_deqp_functional_gles3_shadermatrix_div_uniform", + "WebglConformance_deqp_functional_gles3_shadermatrix_inverse", + "WebglConformance_deqp_functional_gles3_shadermatrix_matrixcompmult", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_assign", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_const_highp", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_const_lowp", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_const_mediump", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_dynamic_highp", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_dynamic_lowp", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_dynamic_mediump", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_uniform_highp", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_uniform_lowp", + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_uniform_mediump", + "WebglConformance_deqp_functional_gles3_shadermatrix_negation", + "WebglConformance_deqp_functional_gles3_shadermatrix_outerproduct", + "WebglConformance_deqp_functional_gles3_shadermatrix_post_decrement", + "WebglConformance_deqp_functional_gles3_shadermatrix_post_increment", + "WebglConformance_deqp_functional_gles3_shadermatrix_pre_decrement", + "WebglConformance_deqp_functional_gles3_shadermatrix_pre_increment", + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_assign", + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_const", + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_dynamic", + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_uniform", + "WebglConformance_deqp_functional_gles3_shadermatrix_transpose", + "WebglConformance_deqp_functional_gles3_shadermatrix_unary_addition", + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_00", + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_01", + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_02", + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_03", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_00", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_01", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_02", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_03", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_04", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_05", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_06", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_07", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_08", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_09", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_10", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_11", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_12", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_13", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_14", + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_15", + "WebglConformance_deqp_functional_gles3_shaderoperator_bool_compare", + "WebglConformance_deqp_functional_gles3_shaderoperator_common_fucntions", + "WebglConformance_deqp_functional_gles3_shaderoperator_exponential", + "WebglConformance_deqp_functional_gles3_shaderoperator_float_compare", + "WebglConformance_deqp_functional_gles3_shaderoperator_geometric", + "WebglConformance_deqp_functional_gles3_shaderoperator_int_compare", + "WebglConformance_deqp_functional_gles3_shaderoperator_selection", + "WebglConformance_deqp_functional_gles3_shaderoperator_sequence", + "WebglConformance_deqp_functional_gles3_shaderoperator_unary_operator_00", + "WebglConformance_deqp_functional_gles3_shaderoperator_unary_operator_01", + "WebglConformance_deqp_functional_gles3_shaderoperator_unary_operator_02", + "WebglConformance_deqp_functional_gles3_shaderpackingfunction", + "WebglConformance_deqp_functional_gles3_shaderprecision_float", + "WebglConformance_deqp_functional_gles3_shaderprecision_int", + "WebglConformance_deqp_functional_gles3_shaderprecision_uint", + "WebglConformance_deqp_functional_gles3_shaderstatequery", + "WebglConformance_deqp_functional_gles3_shaderstruct", + "WebglConformance_deqp_functional_gles3_shaderswitch", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texelfetch", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texelfetchoffset", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texture", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturegrad", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturegradoffset", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturelod", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturelodoffset", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureoffset", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureproj", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojgrad", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojgradoffset", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojlod", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojlodoffset", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojoffset", + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturesize", + "WebglConformance_deqp_functional_gles3_stringquery", + "WebglConformance_deqp_functional_gles3_sync", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_06", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_07", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_08", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_09", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_06", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_07", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_08", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_09", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_00", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_01", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_02", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_03", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_04", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_05", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_06", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_07", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_08", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_09", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_10", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_11", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_12", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_13", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_14", + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_15", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_attribs_gl_vertex_attrib", + "WebglConformance_conformance2_attribs_gl_vertex_attrib_i_render", + "WebglConformance_conformance2_attribs_gl_vertexattribipointer", + "WebglConformance_conformance2_attribs_gl_vertexattribipointer_offsets", + "WebglConformance_conformance2_buffers_bound_buffer_size_change_test", + "WebglConformance_conformance2_buffers_buffer_copying_contents", + "WebglConformance_conformance2_buffers_buffer_copying_restrictions", + "WebglConformance_conformance2_buffers_buffer_overflow_test", + "WebglConformance_conformance2_buffers_buffer_type_restrictions", + "WebglConformance_conformance2_buffers_getBufferSubData", + "WebglConformance_conformance2_buffers_uniform_buffers", + "WebglConformance_conformance2_context_constants_and_properties_2", + "WebglConformance_conformance2_context_context_attributes_depth_stencil_antialias_obeyed", + "WebglConformance_conformance2_context_context_type_test_2", + "WebglConformance_conformance2_context_methods_2", + "WebglConformance_conformance2_extensions_ext_color_buffer_float", + "WebglConformance_conformance2_extensions_promoted_extensions", + "WebglConformance_conformance2_extensions_promoted_extensions_in_shaders", + "WebglConformance_conformance2_glsl3_array_as_return_value", + "WebglConformance_conformance2_glsl3_array_assign", + "WebglConformance_conformance2_glsl3_array_assign_constructor", + "WebglConformance_conformance2_glsl3_array_complex_indexing", + "WebglConformance_conformance2_glsl3_array_equality", + "WebglConformance_conformance2_glsl3_array_in_complex_expression", + "WebglConformance_conformance2_glsl3_array_length_side_effects", + "WebglConformance_conformance2_glsl3_attrib_location_length_limits", + "WebglConformance_conformance2_glsl3_compare_structs_containing_arrays", + "WebglConformance_conformance2_glsl3_const_array_init", + "WebglConformance_conformance2_glsl3_forbidden_operators", + "WebglConformance_conformance2_glsl3_frag_depth", + "WebglConformance_conformance2_glsl3_invalid_default_precision", + "WebglConformance_conformance2_glsl3_loops_with_side_effects", + "WebglConformance_conformance2_glsl3_misplaced_version_directive", + "WebglConformance_conformance2_glsl3_sampler_no_precision", + "WebglConformance_conformance2_glsl3_sequence_operator_returns_non_constant", + "WebglConformance_conformance2_glsl3_shader_linking", + "WebglConformance_conformance2_glsl3_shader_with_1024_character_define", + "WebglConformance_conformance2_glsl3_shader_with_1024_character_identifier_frag", + "WebglConformance_conformance2_glsl3_shader_with_1025_character_define", + "WebglConformance_conformance2_glsl3_shader_with_1025_character_identifier_frag", + "WebglConformance_conformance2_glsl3_shader_with_invalid_characters", + "WebglConformance_conformance2_glsl3_short_circuiting_in_loop_condition", + "WebglConformance_conformance2_glsl3_texture_offset_out_of_range", + "WebglConformance_conformance2_glsl3_uniform_location_length_limits", + "WebglConformance_conformance2_glsl3_vector_dynamic_indexing", + "WebglConformance_conformance2_misc_expando_loss_2", + "WebglConformance_conformance2_misc_instanceof_test", + "WebglConformance_conformance2_misc_uninitialized_test_2", + "WebglConformance_conformance2_query_occlusion_query", + "WebglConformance_conformance2_query_query", + "WebglConformance_conformance2_reading_read_pixels_from_fbo_test", + "WebglConformance_conformance2_reading_read_pixels_into_pixel_pack_buffer", + "WebglConformance_conformance2_reading_read_pixels_pack_parameters", + "WebglConformance_conformance2_renderbuffers_framebuffer_object_attachment", + "WebglConformance_conformance2_renderbuffers_framebuffer_test", + "WebglConformance_conformance2_renderbuffers_framebuffer_texture_layer", + "WebglConformance_conformance2_renderbuffers_invalidate_framebuffer", + "WebglConformance_conformance2_renderbuffers_multisampled_renderbuffer_initialization", + "WebglConformance_conformance2_renderbuffers_readbuffer", + "WebglConformance_conformance2_rendering_draw_buffers", + "WebglConformance_conformance2_rendering_element_index_uint", + "WebglConformance_conformance2_rendering_framebuffer_completeness_unaffected", + "WebglConformance_conformance2_rendering_instanced_arrays", + "WebglConformance_conformance2_samplers_sampler_drawing_test", + "WebglConformance_conformance2_samplers_samplers", + "WebglConformance_conformance2_state_gl_enum_tests", + "WebglConformance_conformance2_state_gl_get_calls", + "WebglConformance_conformance2_state_gl_getstring", + "WebglConformance_conformance2_state_gl_object_get_calls", + "WebglConformance_conformance2_textures_canvas_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_canvas_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_canvas_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_canvas_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_data_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_data_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_video_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_video_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_video_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_video_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_video_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_video_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_video_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_video_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_video_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_video_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_video_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_video_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_video_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_video_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_video_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_video_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_video_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_video_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_video_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_video_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_video_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_video_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_video_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_video_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_video_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_video_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_video_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_data_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_image_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_image_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_image_tex_3d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_image_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_image_tex_3d_r16f_red_float", + "WebglConformance_conformance2_textures_image_tex_3d_r16f_red_half_float", + "WebglConformance_conformance2_textures_image_tex_3d_r32f_red_float", + "WebglConformance_conformance2_textures_image_tex_3d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rg16f_rg_float", + "WebglConformance_conformance2_textures_image_tex_3d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_image_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_image_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_image_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_image_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_image_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_image_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_image_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_misc_compressed_tex_image", + "WebglConformance_conformance2_textures_misc_copy_texture_image", + "WebglConformance_conformance2_textures_misc_gl_get_tex_parameter", + "WebglConformance_conformance2_textures_misc_mipmap_fbo", + "WebglConformance_conformance2_textures_misc_tex_3d_size_limit", + "WebglConformance_conformance2_textures_misc_tex_input_validation", + "WebglConformance_conformance2_textures_misc_tex_mipmap_levels", + "WebglConformance_conformance2_textures_misc_tex_new_formats", + "WebglConformance_conformance2_textures_misc_tex_storage_2d", + "WebglConformance_conformance2_textures_misc_tex_storage_and_subimage_3d", + "WebglConformance_conformance2_textures_misc_tex_storage_compressed_formats", + "WebglConformance_conformance2_textures_misc_tex_unpack_params", + "WebglConformance_conformance2_textures_misc_texel_fetch_undefined", + "WebglConformance_conformance2_textures_misc_texture_npot", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r11f_g11f_b10f_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r11f_g11f_b10f_rgb_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r16f_red_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r16f_red_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r32f_red_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r8_red_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_r8ui_red_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg16f_rg_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg16f_rg_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg32f_rg_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_svg_image_tex_2d_srgb8_rgb_unsigned_byte", + "WebglConformance_deqp_functional_gles3_fboinvalidate_format_02", + "WebglConformance_deqp_functional_gles3_fboinvalidate_sub", + "WebglConformance_deqp_functional_gles3_fboinvalidate_target", + "WebglConformance_deqp_functional_gles3_fboinvalidate_whole", + "WebglConformance_deqp_functional_gles3_fbomultisample_2_samples", + "WebglConformance_deqp_functional_gles3_fbomultisample_4_samples", + "WebglConformance_deqp_functional_gles3_fbomultisample_8_samples", + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_00", + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_01", + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_02", + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_03", + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_04", + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_05", + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_06", + "WebglConformance_deqp_functional_gles3_fborender_recreate_depth_stencil", + "WebglConformance_deqp_functional_gles3_fborender_resize_00", + "WebglConformance_deqp_functional_gles3_fborender_resize_01", + "WebglConformance_deqp_functional_gles3_fborender_resize_02", + "WebglConformance_deqp_functional_gles3_fborender_resize_03", + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_00", + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_01", + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_02", + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_clear", + "WebglConformance_deqp_functional_gles3_fborender_shared_depth_stencil", + "WebglConformance_deqp_functional_gles3_fborender_stencil_clear", + "WebglConformance_deqp_functional_gles3_fbostatequery", + "WebglConformance_deqp_functional_gles3_fbostencilbuffer", + "WebglConformance_deqp_functional_gles3_floatstatequery", + "WebglConformance_deqp_functional_gles3_fragdepth", + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_fixed", + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_float", + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_int", + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_uint", + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_fixed", + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_float", + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_int", + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_uint", + "WebglConformance_deqp_functional_gles3_fragmentoutput_random_00", + "WebglConformance_deqp_functional_gles3_fragmentoutput_random_01", + "WebglConformance_deqp_functional_gles3_fragmentoutput_random_02", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_00", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_01", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_02", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_03", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_04", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_05", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_06", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_07", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_08", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_09", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_10", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_11", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_12", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_13", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_14", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_15", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_16", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_17", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_18", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_19", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_20", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_21", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_22", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_23", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_24", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_25", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_26", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_27", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_28", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_29", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_30", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_31", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_32", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_33", + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_34", + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_00", + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_01", + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_02", + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_03", + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_04", + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_05", + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_06", + "WebglConformance_deqp_functional_gles3_framebufferblit_depth_stencil", + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_00", + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_01", + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_02", + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_03", + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_04", + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_05", + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_06", + "WebglConformance_deqp_functional_gles3_indexedstatequery", + "WebglConformance_deqp_functional_gles3_instancedrendering", + "WebglConformance_deqp_functional_gles3_integerstatequery", + "WebglConformance_deqp_functional_gles3_internalformatquery", + "WebglConformance_deqp_functional_gles3_lifetime", + "WebglConformance_deqp_functional_gles3_multisample", + "WebglConformance_deqp_functional_gles3_negativebufferapi", + "WebglConformance_deqp_functional_gles3_negativefragmentapi", + "WebglConformance_deqp_functional_gles3_negativeshaderapi", + "WebglConformance_deqp_functional_gles3_negativestateapi", + "WebglConformance_deqp_functional_gles3_negativetextureapi", + "WebglConformance_deqp_functional_gles3_negativevertexarrayapi", + "WebglConformance_deqp_functional_gles3_occlusionquery_conservative", + "WebglConformance_deqp_functional_gles3_occlusionquery_strict", + "WebglConformance_deqp_functional_gles3_pixelbufferobject", + "WebglConformance_deqp_functional_gles3_primitiverestart_00", + "WebglConformance_deqp_functional_gles3_primitiverestart_01", + "WebglConformance_deqp_functional_gles3_primitiverestart_02", + "WebglConformance_deqp_functional_gles3_primitiverestart_03", + "WebglConformance_deqp_functional_gles3_primitiverestart_04", + "WebglConformance_deqp_functional_gles3_primitiverestart_05", + "WebglConformance_deqp_functional_gles3_primitiverestart_06", + "WebglConformance_deqp_functional_gles3_primitiverestart_07", + "WebglConformance_deqp_functional_gles3_rasterizerdiscard", + "WebglConformance_deqp_functional_gles3_rbostatequery", + "WebglConformance_deqp_functional_gles3_readpixel", + "WebglConformance_deqp_functional_gles3_samplerobject", + "WebglConformance_deqp_functional_gles3_samplerstatequery", + "WebglConformance_deqp_functional_gles3_shaderapi", + "WebglConformance_deqp_functional_gles3_shaderbuiltinvar", + "WebglConformance_deqp_functional_gles3_shadercommonfunction", + "WebglConformance_deqp_functional_gles3_shaderderivate_dfdx", + "WebglConformance_deqp_functional_gles3_shaderderivate_dfdy", + "WebglConformance_deqp_functional_gles3_shaderderivate_fwidth", + "WebglConformance_deqp_functional_gles3_shaderindexing_mat_00", + "WebglConformance_deqp_functional_gles3_shaderindexing_mat_01", + "WebglConformance_deqp_functional_gles3_shaderindexing_mat_02", + "WebglConformance_deqp_functional_gles3_shaderindexing_tmp", + "WebglConformance_deqp_functional_gles3_shaderindexing_uniform", + "WebglConformance_deqp_functional_gles3_shaderindexing_varying", + "WebglConformance_deqp_functional_gles3_shaderindexing_vec2", + "WebglConformance_deqp_functional_gles3_shaderindexing_vec3", + "WebglConformance_deqp_functional_gles3_shaderindexing_vec4", + "WebglConformance_deqp_functional_gles3_shaderloop_do_while", + "WebglConformance_deqp_functional_gles3_shaderloop_for", + "WebglConformance_deqp_functional_gles3_shaderloop_while", + "WebglConformance_deqp_functional_gles3_shadermatrix_add_assign", + "WebglConformance_deqp_functional_gles3_shadermatrix_add_const", + "WebglConformance_deqp_functional_gles3_shadermatrix_add_dynamic", + "WebglConformance_deqp_functional_gles3_shadermatrix_add_uniform", + "WebglConformance_deqp_functional_gles3_shadermatrix_determinant", + "WebglConformance_deqp_functional_gles3_shadermatrix_div_assign", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg32f_rg_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg8_rg_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg8ui_rg_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb16f_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb16f_rgb_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb32f_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb565_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb565_rgb_unsigned_short_5_6_5", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb5_a1_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb8ui_rgb_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb9_e5_rgb_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb9_e5_rgb_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba16f_rgba_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba16f_rgba_half_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba32f_rgba_float", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba4_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba8ui_rgba_integer_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_srgb8_alpha8_rgba_unsigned_byte", + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_srgb8_rgb_unsigned_byte", + "WebglConformance_conformance2_transform_feedback_transform_feedback", + "WebglConformance_conformance2_vertex_arrays_vertex_array_object", + "WebglConformance_deqp_data_gles3_shaders_arrays", + "WebglConformance_deqp_data_gles3_shaders_conditionals", + "WebglConformance_deqp_data_gles3_shaders_constant_expressions", + "WebglConformance_deqp_data_gles3_shaders_constants", + "WebglConformance_deqp_data_gles3_shaders_conversions", + "WebglConformance_deqp_data_gles3_shaders_declarations", + "WebglConformance_deqp_data_gles3_shaders_fragdata", + "WebglConformance_deqp_data_gles3_shaders_functions", + "WebglConformance_deqp_data_gles3_shaders_invalid_texture_functions", + "WebglConformance_deqp_data_gles3_shaders_keywords", + "WebglConformance_deqp_data_gles3_shaders_linkage", + "WebglConformance_deqp_data_gles3_shaders_negative", + "WebglConformance_deqp_data_gles3_shaders_preprocessor", + "WebglConformance_deqp_data_gles3_shaders_qualification_order", + "WebglConformance_deqp_data_gles3_shaders_scoping", + "WebglConformance_deqp_data_gles3_shaders_switch", + "WebglConformance_deqp_data_gles3_shaders_swizzles", + "WebglConformance_deqp_framework_opengl_simplereference_referencecontext", + "WebglConformance_deqp_functional_gles3_attriblocation", + "WebglConformance_deqp_functional_gles3_booleanstatequery", + "WebglConformance_deqp_functional_gles3_buffercopy", + "WebglConformance_deqp_functional_gles3_bufferobjectquery", + "WebglConformance_deqp_functional_gles3_clipping", + "WebglConformance_deqp_functional_gles3_defaultvertexattribute", + "WebglConformance_deqp_functional_gles3_draw_draw_arrays", + "WebglConformance_deqp_functional_gles3_draw_draw_arrays_instanced", + "WebglConformance_deqp_functional_gles3_draw_draw_elements", + "WebglConformance_deqp_functional_gles3_draw_draw_elements_instanced", + "WebglConformance_deqp_functional_gles3_draw_draw_range_elements", + "WebglConformance_deqp_functional_gles3_draw_instancing", + "WebglConformance_deqp_functional_gles3_draw_random", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_blend", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_clear", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_00", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_01", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_02", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_03", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_04", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_05", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_00", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_01", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_02", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_03", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_04", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_05", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_00", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_01", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_02", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_03", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_04", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_05", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_00", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_01", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_02", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_03", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_04", + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_05", + "WebglConformance_deqp_functional_gles3_fbocompleteness", + "WebglConformance_deqp_functional_gles3_fbodepthbuffer", + "WebglConformance_deqp_functional_gles3_fboinvalidate_default", + "WebglConformance_deqp_functional_gles3_fboinvalidate_format_00", + "WebglConformance_deqp_functional_gles3_fboinvalidate_format_01" + ], + "times": { + "WebglConformance_conformance2_attribs_gl_vertex_attrib": 1.160248041152954, + "WebglConformance_conformance2_attribs_gl_vertex_attrib_i_render": 0.054814815521240234, + "WebglConformance_conformance2_attribs_gl_vertexattribipointer": 0.6236610412597656, + "WebglConformance_conformance2_attribs_gl_vertexattribipointer_offsets": 0.20173978805541992, + "WebglConformance_conformance2_buffers_bound_buffer_size_change_test": 0.04272198677062988, + "WebglConformance_conformance2_buffers_buffer_copying_contents": 0.19432497024536133, + "WebglConformance_conformance2_buffers_buffer_copying_restrictions": 0.3378000259399414, + "WebglConformance_conformance2_buffers_buffer_overflow_test": 0.0632929801940918, + "WebglConformance_conformance2_buffers_buffer_type_restrictions": 0.3946571350097656, + "WebglConformance_conformance2_buffers_getBufferSubData": 0.19742488861083984, + "WebglConformance_conformance2_buffers_uniform_buffers": 0.11513090133666992, + "WebglConformance_conformance2_context_constants_and_properties_2": 0.11805510520935059, + "WebglConformance_conformance2_context_context_attributes_depth_stencil_antialias_obeyed": 0.15145516395568848, + "WebglConformance_conformance2_context_context_type_test_2": 0.09630799293518066, + "WebglConformance_conformance2_context_methods_2": 0.044595956802368164, + "WebglConformance_conformance2_extensions_ext_color_buffer_float": 0.27977585792541504, + "WebglConformance_conformance2_extensions_promoted_extensions": 0.05168795585632324, + "WebglConformance_conformance2_extensions_promoted_extensions_in_shaders": 0.35594677925109863, + "WebglConformance_conformance2_glsl3_array_as_return_value": 0.17007994651794434, + "WebglConformance_conformance2_glsl3_array_assign": 0.16461515426635742, + "WebglConformance_conformance2_glsl3_array_assign_constructor": 0.2203359603881836, + "WebglConformance_conformance2_glsl3_array_complex_indexing": 0.1627349853515625, + "WebglConformance_conformance2_glsl3_array_equality": 0.19862794876098633, + "WebglConformance_conformance2_glsl3_array_in_complex_expression": 0.16943788528442383, + "WebglConformance_conformance2_glsl3_array_length_side_effects": 0.15153908729553223, + "WebglConformance_conformance2_glsl3_attrib_location_length_limits": 0.06228899955749512, + "WebglConformance_conformance2_glsl3_compare_structs_containing_arrays": 0.13542604446411133, + "WebglConformance_conformance2_glsl3_const_array_init": 0.17206120491027832, + "WebglConformance_conformance2_glsl3_forbidden_operators": 0.4015769958496094, + "WebglConformance_conformance2_glsl3_frag_depth": 0.09155702590942383, + "WebglConformance_conformance2_glsl3_invalid_default_precision": 0.13669705390930176, + "WebglConformance_conformance2_glsl3_loops_with_side_effects": 0.17060089111328125, + "WebglConformance_conformance2_glsl3_misplaced_version_directive": 0.14949607849121094, + "WebglConformance_conformance2_glsl3_sampler_no_precision": 0.24977421760559082, + "WebglConformance_conformance2_glsl3_sequence_operator_returns_non_constant": 0.16908907890319824, + "WebglConformance_conformance2_glsl3_shader_linking": 0.16067004203796387, + "WebglConformance_conformance2_glsl3_shader_with_1024_character_define": 0.16387295722961426, + "WebglConformance_conformance2_glsl3_shader_with_1024_character_identifier_frag": 0.1386258602142334, + "WebglConformance_conformance2_glsl3_shader_with_1025_character_define": 0.15246987342834473, + "WebglConformance_conformance2_glsl3_shader_with_1025_character_identifier_frag": 0.15033292770385742, + "WebglConformance_conformance2_glsl3_shader_with_invalid_characters": 0.14522385597229004, + "WebglConformance_conformance2_glsl3_short_circuiting_in_loop_condition": 0.2035219669342041, + "WebglConformance_conformance2_glsl3_texture_offset_out_of_range": 0.16559696197509766, + "WebglConformance_conformance2_glsl3_uniform_location_length_limits": 0.09119606018066406, + "WebglConformance_conformance2_glsl3_vector_dynamic_indexing": 0.32798004150390625, + "WebglConformance_conformance2_misc_expando_loss_2": 0.12457108497619629, + "WebglConformance_conformance2_misc_instanceof_test": 0.12552809715270996, + "WebglConformance_conformance2_misc_uninitialized_test_2": 12.263689994812012, + "WebglConformance_conformance2_query_occlusion_query": 1.8891379833221436, + "WebglConformance_conformance2_query_query": 0.08102297782897949, + "WebglConformance_conformance2_reading_read_pixels_from_fbo_test": 0.14690089225769043, + "WebglConformance_conformance2_reading_read_pixels_into_pixel_pack_buffer": 0.08968019485473633, + "WebglConformance_conformance2_reading_read_pixels_pack_parameters": 0.21393489837646484, + "WebglConformance_conformance2_renderbuffers_framebuffer_object_attachment": 0.08888578414916992, + "WebglConformance_conformance2_renderbuffers_framebuffer_test": 0.07663488388061523, + "WebglConformance_conformance2_renderbuffers_framebuffer_texture_layer": 0.05168485641479492, + "WebglConformance_conformance2_renderbuffers_invalidate_framebuffer": 0.1320347785949707, + "WebglConformance_conformance2_renderbuffers_multisampled_renderbuffer_initialization": 0.12763595581054688, + "WebglConformance_conformance2_renderbuffers_readbuffer": 0.0982210636138916, + "WebglConformance_conformance2_rendering_draw_buffers": 0.32090306282043457, + "WebglConformance_conformance2_rendering_element_index_uint": 0.16970300674438477, + "WebglConformance_conformance2_rendering_framebuffer_completeness_unaffected": 0.07156920433044434, + "WebglConformance_conformance2_rendering_instanced_arrays": 0.13492512702941895, + "WebglConformance_conformance2_samplers_sampler_drawing_test": 0.06663393974304199, + "WebglConformance_conformance2_samplers_samplers": 0.08651208877563477, + "WebglConformance_conformance2_state_gl_enum_tests": 0.11161303520202637, + "WebglConformance_conformance2_state_gl_get_calls": 0.059031009674072266, + "WebglConformance_conformance2_state_gl_getstring": 0.0496828556060791, + "WebglConformance_conformance2_state_gl_object_get_calls": 5.62001895904541, + "WebglConformance_conformance2_textures_canvas_tex_2d_r11f_g11f_b10f_rgb_float": 8.468577861785889, + "WebglConformance_conformance2_textures_canvas_tex_2d_r11f_g11f_b10f_rgb_half_float": 8.263348817825317, + "WebglConformance_conformance2_textures_canvas_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 8.058101892471313, + "WebglConformance_conformance2_textures_canvas_tex_2d_r16f_red_float": 8.035596132278442, + "WebglConformance_conformance2_textures_canvas_tex_2d_r16f_red_half_float": 7.974266052246094, + "WebglConformance_conformance2_textures_canvas_tex_2d_r32f_red_float": 8.243880987167358, + "WebglConformance_conformance2_textures_canvas_tex_2d_r8_red_unsigned_byte": 8.341361999511719, + "WebglConformance_conformance2_textures_canvas_tex_2d_r8ui_red_integer_unsigned_byte": 8.053264141082764, + "WebglConformance_conformance2_textures_canvas_tex_2d_rg16f_rg_float": 7.948693037033081, + "WebglConformance_conformance2_textures_canvas_tex_2d_rg16f_rg_half_float": 8.338834047317505, + "WebglConformance_conformance2_textures_canvas_tex_2d_rg32f_rg_float": 8.277929067611694, + "WebglConformance_conformance2_textures_canvas_tex_2d_rg8_rg_unsigned_byte": 8.04512882232666, + "WebglConformance_conformance2_textures_canvas_tex_2d_rg8ui_rg_integer_unsigned_byte": 8.319623947143555, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb16f_rgb_float": 8.173135042190552, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb16f_rgb_half_float": 7.926715135574341, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb32f_rgb_float": 8.132565975189209, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb565_rgb_unsigned_byte": 8.471606016159058, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 8.172631025314331, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb5_a1_rgba_unsigned_byte": 8.285593032836914, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 8.379431009292603, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb8_rgb_unsigned_byte": 8.43149185180664, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 8.235927104949951, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb9_e5_rgb_float": 8.10181999206543, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgb9_e5_rgb_half_float": 8.542604207992554, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba16f_rgba_float": 8.457021951675415, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba16f_rgba_half_float": 8.157425880432129, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba32f_rgba_float": 7.932903051376343, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba4_rgba_unsigned_byte": 8.016379833221436, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 8.072468042373657, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba8_rgba_unsigned_byte": 8.11157488822937, + "WebglConformance_conformance2_textures_canvas_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 8.052419185638428, + "WebglConformance_conformance2_textures_canvas_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 8.526966094970703, + "WebglConformance_conformance2_textures_canvas_tex_2d_srgb8_rgb_unsigned_byte": 8.156736850738525, + "WebglConformance_conformance2_textures_canvas_tex_3d_r11f_g11f_b10f_rgb_float": 3.9589831829071045, + "WebglConformance_conformance2_textures_canvas_tex_3d_r11f_g11f_b10f_rgb_half_float": 4.125036001205444, + "WebglConformance_conformance2_textures_canvas_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 4.155781984329224, + "WebglConformance_conformance2_textures_canvas_tex_3d_r16f_red_float": 4.171153783798218, + "WebglConformance_conformance2_textures_canvas_tex_3d_r16f_red_half_float": 4.201614141464233, + "WebglConformance_conformance2_textures_canvas_tex_3d_r32f_red_float": 4.08626389503479, + "WebglConformance_conformance2_textures_canvas_tex_3d_r8_red_unsigned_byte": 4.21409797668457, + "WebglConformance_conformance2_textures_canvas_tex_3d_r8ui_red_integer_unsigned_byte": 4.100230932235718, + "WebglConformance_conformance2_textures_canvas_tex_3d_rg16f_rg_float": 4.070652961730957, + "WebglConformance_conformance2_textures_canvas_tex_3d_rg16f_rg_half_float": 3.9678521156311035, + "WebglConformance_conformance2_textures_canvas_tex_3d_rg32f_rg_float": 3.9773831367492676, + "WebglConformance_conformance2_textures_canvas_tex_3d_rg8_rg_unsigned_byte": 4.121406078338623, + "WebglConformance_conformance2_textures_canvas_tex_3d_rg8ui_rg_integer_unsigned_byte": 4.2160868644714355, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb16f_rgb_float": 4.1992809772491455, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb16f_rgb_half_float": 4.1385908126831055, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb32f_rgb_float": 4.149560928344727, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb565_rgb_unsigned_byte": 4.146929979324341, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 3.984675168991089, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb5_a1_rgba_unsigned_byte": 4.001506805419922, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 4.22205114364624, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb8_rgb_unsigned_byte": 4.104623079299927, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 4.073738098144531, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb9_e5_rgb_float": 4.185451030731201, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgb9_e5_rgb_half_float": 4.153620004653931, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba16f_rgba_float": 4.160953044891357, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba16f_rgba_half_float": 4.165621995925903, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba32f_rgba_float": 4.057154893875122, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba4_rgba_unsigned_byte": 4.14611291885376, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 4.223361015319824, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba8_rgba_unsigned_byte": 3.975355863571167, + "WebglConformance_conformance2_textures_canvas_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 4.123146057128906, + "WebglConformance_conformance2_textures_canvas_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 3.9914140701293945, + "WebglConformance_conformance2_textures_canvas_tex_3d_srgb8_rgb_unsigned_byte": 4.130952835083008, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r11f_g11f_b10f_rgb_float": 0.18821191787719727, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.14675092697143555, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.16507601737976074, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r16f_red_float": 0.15757298469543457, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r16f_red_half_float": 0.15065383911132812, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r32f_red_float": 0.1455521583557129, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r8_red_unsigned_byte": 0.14071893692016602, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_r8ui_red_integer_unsigned_byte": 1.141265869140625, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg16f_rg_float": 0.17283296585083008, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg16f_rg_half_float": 0.1438429355621338, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg32f_rg_float": 0.14376091957092285, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg8_rg_unsigned_byte": 0.13993000984191895, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.1432030200958252, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb16f_rgb_float": 0.18300700187683105, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb16f_rgb_half_float": 0.13708019256591797, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb32f_rgb_float": 0.14497017860412598, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb565_rgb_unsigned_byte": 0.14088010787963867, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.949509859085083, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.17590808868408203, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.14580202102661133, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb8_rgb_unsigned_byte": 0.14715003967285156, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.13477492332458496, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb9_e5_rgb_float": 0.15856194496154785, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgb9_e5_rgb_half_float": 0.17174005508422852, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba16f_rgba_float": 0.17331290245056152, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba16f_rgba_half_float": 0.22301697731018066, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba32f_rgba_float": 0.16397786140441895, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba4_rgba_unsigned_byte": 0.14869308471679688, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.13836312294006348, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba8_rgba_unsigned_byte": 0.1407170295715332, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.13811802864074707, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.1464238166809082, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_2d_srgb8_rgb_unsigned_byte": 0.14923501014709473, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r11f_g11f_b10f_rgb_float": 0.14514589309692383, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.1379261016845703, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.14927911758422852, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r16f_red_float": 0.11992597579956055, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r16f_red_half_float": 0.14671111106872559, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r32f_red_float": 0.14516186714172363, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r8_red_unsigned_byte": 0.14204096794128418, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_r8ui_red_integer_unsigned_byte": 0.11645007133483887, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg16f_rg_float": 0.1380760669708252, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg16f_rg_half_float": 0.13958501815795898, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg32f_rg_float": 0.1432170867919922, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg8_rg_unsigned_byte": 0.1414170265197754, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.12511181831359863, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb16f_rgb_float": 0.1387009620666504, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb16f_rgb_half_float": 0.1437699794769287, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb32f_rgb_float": 0.16776323318481445, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb565_rgb_unsigned_byte": 0.13282513618469238, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.14671611785888672, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.1501319408416748, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.1224830150604248, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb8_rgb_unsigned_byte": 0.14616012573242188, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.14651703834533691, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb9_e5_rgb_float": 0.13912200927734375, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgb9_e5_rgb_half_float": 0.13540911674499512, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba16f_rgba_float": 0.1367189884185791, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba16f_rgba_half_float": 0.13960695266723633, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba32f_rgba_float": 0.13560891151428223, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba4_rgba_unsigned_byte": 0.1348741054534912, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.1418440341949463, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba8_rgba_unsigned_byte": 0.14274811744689941, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.14151692390441895, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.11732602119445801, + "WebglConformance_conformance2_textures_image_bitmap_from_blob_tex_3d_srgb8_rgb_unsigned_byte": 0.1377260684967041, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r11f_g11f_b10f_rgb_float": 0.4951438903808594, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.5308921337127686, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.4403350353240967, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r16f_red_float": 0.35013699531555176, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r16f_red_half_float": 0.39520883560180664, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r32f_red_float": 0.4093039035797119, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r8_red_unsigned_byte": 0.40679502487182617, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_r8ui_red_integer_unsigned_byte": 0.36989402770996094, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg16f_rg_float": 0.35991907119750977, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg16f_rg_half_float": 0.3756752014160156, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg32f_rg_float": 0.45510196685791016, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg8_rg_unsigned_byte": 0.40900397300720215, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.39672017097473145, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb16f_rgb_float": 0.4297370910644531, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb16f_rgb_half_float": 0.47144317626953125, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb32f_rgb_float": 0.4626798629760742, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb565_rgb_unsigned_byte": 0.3491551876068115, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.3424100875854492, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.34330296516418457, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.36380720138549805, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb8_rgb_unsigned_byte": 0.3742640018463135, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.39214301109313965, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb9_e5_rgb_float": 0.45339298248291016, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgb9_e5_rgb_half_float": 0.4800269603729248, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba16f_rgba_float": 0.6355841159820557, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba16f_rgba_half_float": 0.40839505195617676, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba32f_rgba_float": 0.7281148433685303, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba4_rgba_unsigned_byte": 0.2511749267578125, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.27012109756469727, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba8_rgba_unsigned_byte": 0.39826202392578125, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.3652009963989258, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.3513071537017822, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_2d_srgb8_rgb_unsigned_byte": 0.35723114013671875, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r11f_g11f_b10f_rgb_float": 0.2794981002807617, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.3091299533843994, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.28116321563720703, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r16f_red_float": 0.27414703369140625, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r16f_red_half_float": 0.26053690910339355, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r32f_red_float": 0.2550790309906006, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r8_red_unsigned_byte": 0.2585601806640625, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_r8ui_red_integer_unsigned_byte": 0.2570009231567383, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg16f_rg_float": 0.1567530632019043, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg16f_rg_half_float": 0.2809019088745117, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg32f_rg_float": 0.2872028350830078, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg8_rg_unsigned_byte": 0.22197604179382324, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.22420001029968262, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb16f_rgb_float": 0.27255892753601074, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb16f_rgb_half_float": 0.25577306747436523, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb32f_rgb_float": 0.25643205642700195, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb565_rgb_unsigned_byte": 0.28054118156433105, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.22672009468078613, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.22339797019958496, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.2570011615753174, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb8_rgb_unsigned_byte": 0.25308704376220703, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.2575218677520752, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb9_e5_rgb_float": 0.29003214836120605, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgb9_e5_rgb_half_float": 0.27959299087524414, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba16f_rgba_float": 0.3025670051574707, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba16f_rgba_half_float": 0.2560579776763916, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba32f_rgba_float": 0.1856238842010498, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba4_rgba_unsigned_byte": 0.24573898315429688, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.2538309097290039, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba8_rgba_unsigned_byte": 0.2801499366760254, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.2947580814361572, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.2504141330718994, + "WebglConformance_conformance2_textures_image_bitmap_from_canvas_tex_3d_srgb8_rgb_unsigned_byte": 0.28142690658569336, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r11f_g11f_b10f_rgb_float": 0.26267194747924805, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.28713393211364746, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.2582509517669678, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r16f_red_float": 0.2572309970855713, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r16f_red_half_float": 0.2639658451080322, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r32f_red_float": 0.19715094566345215, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r8_red_unsigned_byte": 0.25079917907714844, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_r8ui_red_integer_unsigned_byte": 0.27396202087402344, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg16f_rg_float": 0.2498481273651123, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg16f_rg_half_float": 0.24763917922973633, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg32f_rg_float": 0.26006197929382324, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg8_rg_unsigned_byte": 0.27222585678100586, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.2883889675140381, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb16f_rgb_float": 0.2460920810699463, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb16f_rgb_half_float": 0.2597630023956299, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb32f_rgb_float": 0.24477601051330566, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb565_rgb_unsigned_byte": 0.25116705894470215, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 5.267004013061523, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.2479569911956787, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.1964430809020996, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb8_rgb_unsigned_byte": 0.20703387260437012, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.21622610092163086, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb9_e5_rgb_float": 0.21782898902893066, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgb9_e5_rgb_half_float": 0.214400053024292, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba16f_rgba_float": 0.21625089645385742, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba16f_rgba_half_float": 0.12473416328430176, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba32f_rgba_float": 0.19277596473693848, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba4_rgba_unsigned_byte": 0.5058908462524414, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.19578790664672852, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba8_rgba_unsigned_byte": 0.21416497230529785, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.22524213790893555, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.19033312797546387, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_2d_srgb8_rgb_unsigned_byte": 0.21848416328430176, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r11f_g11f_b10f_rgb_float": 0.18040800094604492, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.15784001350402832, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.2090611457824707, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r16f_red_float": 0.15682291984558105, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r16f_red_half_float": 0.17452192306518555, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r32f_red_float": 0.19328808784484863, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r8_red_unsigned_byte": 0.17220687866210938, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_r8ui_red_integer_unsigned_byte": 0.16234707832336426, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg16f_rg_float": 0.20607399940490723, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg16f_rg_half_float": 0.15645980834960938, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg32f_rg_float": 0.11428499221801758, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg8_rg_unsigned_byte": 0.1823890209197998, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.18357586860656738, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb16f_rgb_float": 0.18003392219543457, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb16f_rgb_half_float": 0.158613920211792, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb32f_rgb_float": 0.1735079288482666, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb565_rgb_unsigned_byte": 0.19420981407165527, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.1677851676940918, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.16594409942626953, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.20577406883239746, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb8_rgb_unsigned_byte": 0.15931105613708496, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.16693592071533203, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb9_e5_rgb_float": 0.2051241397857666, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgb9_e5_rgb_half_float": 0.16107892990112305, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba16f_rgba_float": 0.17283201217651367, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba16f_rgba_half_float": 0.19469809532165527, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba32f_rgba_float": 0.1713719367980957, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba4_rgba_unsigned_byte": 0.1131751537322998, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.16378211975097656, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba8_rgba_unsigned_byte": 0.17239809036254883, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.19901204109191895, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.11598992347717285, + "WebglConformance_conformance2_textures_image_bitmap_from_image_bitmap_tex_3d_srgb8_rgb_unsigned_byte": 0.19571709632873535, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r11f_g11f_b10f_rgb_float": 0.20710301399230957, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.20112204551696777, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.2158219814300537, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r16f_red_float": 0.20018315315246582, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r16f_red_half_float": 0.2183699607849121, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r32f_red_float": 0.19557905197143555, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r8_red_unsigned_byte": 0.22237515449523926, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_r8ui_red_integer_unsigned_byte": 0.22006916999816895, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg16f_rg_float": 0.21320796012878418, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg16f_rg_half_float": 0.21750307083129883, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg32f_rg_float": 0.21694517135620117, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg8_rg_unsigned_byte": 0.2175920009613037, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.1228327751159668, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb16f_rgb_float": 0.22549796104431152, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb16f_rgb_half_float": 0.2517280578613281, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb32f_rgb_float": 0.2425689697265625, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb565_rgb_unsigned_byte": 0.21858000755310059, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.2486100196838379, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.19990301132202148, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.20539116859436035, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb8_rgb_unsigned_byte": 0.21688485145568848, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.21456599235534668, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb9_e5_rgb_float": 0.1926710605621338, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgb9_e5_rgb_half_float": 0.19388604164123535, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba16f_rgba_float": 0.21152710914611816, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba16f_rgba_half_float": 0.272597074508667, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba32f_rgba_float": 0.22463703155517578, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba4_rgba_unsigned_byte": 0.2534339427947998, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.19509506225585938, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba8_rgba_unsigned_byte": 0.13318490982055664, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.25657105445861816, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.2501840591430664, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_2d_srgb8_rgb_unsigned_byte": 0.24759292602539062, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r11f_g11f_b10f_rgb_float": 0.15774917602539062, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.30803799629211426, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.19402694702148438, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r16f_red_float": 0.16398906707763672, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r16f_red_half_float": 0.2111189365386963, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r32f_red_float": 0.15676307678222656, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r8_red_unsigned_byte": 0.17200994491577148, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_r8ui_red_integer_unsigned_byte": 0.1945810317993164, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg16f_rg_float": 0.1723480224609375, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg16f_rg_half_float": 0.16071701049804688, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg32f_rg_float": 0.2103588581085205, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg8_rg_unsigned_byte": 0.18391013145446777, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.18304204940795898, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb16f_rgb_float": 0.18173813819885254, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb16f_rgb_half_float": 0.19141602516174316, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb32f_rgb_float": 0.1733407974243164, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb565_rgb_unsigned_byte": 0.19274497032165527, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.17239809036254883, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.1618480682373047, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.2078418731689453, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb8_rgb_unsigned_byte": 0.18856310844421387, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.17874407768249512, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb9_e5_rgb_float": 0.18791794776916504, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgb9_e5_rgb_half_float": 0.17876911163330078, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba16f_rgba_float": 0.15789198875427246, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba16f_rgba_half_float": 0.20619988441467285, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba32f_rgba_float": 0.1926560401916504, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba4_rgba_unsigned_byte": 0.17365694046020508, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.1925508975982666, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba8_rgba_unsigned_byte": 0.17319798469543457, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.16071009635925293, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.20759797096252441, + "WebglConformance_conformance2_textures_image_bitmap_from_image_data_tex_3d_srgb8_rgb_unsigned_byte": 0.19132494926452637, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r11f_g11f_b10f_rgb_float": 0.1309349536895752, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.24340105056762695, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.2153770923614502, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r16f_red_float": 0.22008681297302246, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r16f_red_half_float": 0.26842617988586426, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r32f_red_float": 0.2576620578765869, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r8_red_unsigned_byte": 0.1918470859527588, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_r8ui_red_integer_unsigned_byte": 0.22626996040344238, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg16f_rg_float": 0.2233750820159912, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg16f_rg_half_float": 0.22697997093200684, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg32f_rg_float": 0.2353668212890625, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg8_rg_unsigned_byte": 0.2042407989501953, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.23104119300842285, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb16f_rgb_float": 0.21642398834228516, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb16f_rgb_half_float": 0.2523031234741211, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb32f_rgb_float": 0.2498769760131836, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb565_rgb_unsigned_byte": 0.19725608825683594, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.22075295448303223, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.22269201278686523, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.2079479694366455, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb8_rgb_unsigned_byte": 0.21613812446594238, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.21975088119506836, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb9_e5_rgb_float": 0.21890902519226074, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgb9_e5_rgb_half_float": 0.21509289741516113, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba16f_rgba_float": 0.21938014030456543, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba16f_rgba_half_float": 0.21353602409362793, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba32f_rgba_float": 0.21950602531433105, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba4_rgba_unsigned_byte": 1.3150990009307861, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.31422901153564453, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba8_rgba_unsigned_byte": 0.2501070499420166, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.21445512771606445, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.260861873626709, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_2d_srgb8_rgb_unsigned_byte": 0.15876507759094238, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r11f_g11f_b10f_rgb_float": 0.2621290683746338, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.23349285125732422, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.20358800888061523, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r16f_red_float": 0.18848514556884766, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r16f_red_half_float": 0.18475604057312012, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r32f_red_float": 0.19092583656311035, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r8_red_unsigned_byte": 0.11497306823730469, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_r8ui_red_integer_unsigned_byte": 0.2152409553527832, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg16f_rg_float": 0.18730711936950684, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg16f_rg_half_float": 0.14635896682739258, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg32f_rg_float": 0.18922114372253418, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg8_rg_unsigned_byte": 0.19174504280090332, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.19325900077819824, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb16f_rgb_float": 0.18868684768676758, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb16f_rgb_half_float": 0.19686293601989746, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb32f_rgb_float": 0.19475197792053223, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb565_rgb_unsigned_byte": 0.19187092781066895, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.2606210708618164, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.1432640552520752, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.1335740089416504, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb8_rgb_unsigned_byte": 0.18772602081298828, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.18403100967407227, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb9_e5_rgb_float": 0.19451904296875, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgb9_e5_rgb_half_float": 0.144927978515625, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba16f_rgba_float": 0.22134613990783691, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba16f_rgba_half_float": 0.18569016456604004, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba32f_rgba_float": 0.1968698501586914, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba4_rgba_unsigned_byte": 0.22359895706176758, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.19085693359375, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba8_rgba_unsigned_byte": 0.22127580642700195, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.219926118850708, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.19512701034545898, + "WebglConformance_conformance2_textures_image_bitmap_from_image_tex_3d_srgb8_rgb_unsigned_byte": 0.15272212028503418, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r11f_g11f_b10f_rgb_float": 0.1516268253326416, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.23447799682617188, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.1485440731048584, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r16f_red_float": 0.13907504081726074, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r16f_red_half_float": 0.1481800079345703, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r32f_red_float": 0.13999295234680176, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r8_red_unsigned_byte": 0.1336050033569336, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_r8ui_red_integer_unsigned_byte": 0.1361379623413086, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg16f_rg_float": 0.15423202514648438, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg16f_rg_half_float": 0.15252184867858887, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg32f_rg_float": 0.13353514671325684, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg8_rg_unsigned_byte": 0.14100289344787598, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.13219308853149414, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb16f_rgb_float": 0.13295507431030273, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb16f_rgb_half_float": 0.13836193084716797, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb32f_rgb_float": 0.13275480270385742, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb565_rgb_unsigned_byte": 0.12001419067382812, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.1372230052947998, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.13234400749206543, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.11642909049987793, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb8_rgb_unsigned_byte": 0.13330888748168945, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.13155698776245117, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb9_e5_rgb_float": 0.1372060775756836, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgb9_e5_rgb_half_float": 0.13223886489868164, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba16f_rgba_float": 0.1318199634552002, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba16f_rgba_half_float": 0.1318058967590332, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba32f_rgba_float": 0.13206005096435547, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba4_rgba_unsigned_byte": 0.7614731788635254, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.131087064743042, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba8_rgba_unsigned_byte": 0.13404607772827148, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.13019013404846191, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.13594293594360352, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_2d_srgb8_rgb_unsigned_byte": 0.5021090507507324, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r11f_g11f_b10f_rgb_float": 0.13204312324523926, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.13585996627807617, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.13185811042785645, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r16f_red_float": 0.12191915512084961, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r16f_red_half_float": 0.1339571475982666, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r32f_red_float": 0.13424992561340332, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r8_red_unsigned_byte": 0.1322190761566162, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_r8ui_red_integer_unsigned_byte": 0.13968610763549805, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg16f_rg_float": 0.13497304916381836, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg16f_rg_half_float": 0.13441109657287598, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg32f_rg_float": 0.13038110733032227, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg8_rg_unsigned_byte": 0.13310503959655762, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.1340961456298828, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb16f_rgb_float": 0.13169503211975098, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb16f_rgb_half_float": 0.13277411460876465, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb32f_rgb_float": 0.1389310359954834, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb565_rgb_unsigned_byte": 0.13823890686035156, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.13310503959655762, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.13239789009094238, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.13524699211120605, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb8_rgb_unsigned_byte": 0.13347697257995605, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.1160728931427002, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb9_e5_rgb_float": 0.1320478916168213, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgb9_e5_rgb_half_float": 0.14739489555358887, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba16f_rgba_float": 0.14219188690185547, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba16f_rgba_half_float": 0.15070199966430664, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba32f_rgba_float": 0.14587688446044922, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba4_rgba_unsigned_byte": 0.15053510665893555, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.14403486251831055, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba8_rgba_unsigned_byte": 0.15266704559326172, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.14057707786560059, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.144697904586792, + "WebglConformance_conformance2_textures_image_bitmap_from_video_tex_3d_srgb8_rgb_unsigned_byte": 0.15578508377075195, + "WebglConformance_conformance2_textures_image_data_tex_2d_r11f_g11f_b10f_rgb_float": 0.2611401081085205, + "WebglConformance_conformance2_textures_image_data_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.2876758575439453, + "WebglConformance_conformance2_textures_image_data_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.2610909938812256, + "WebglConformance_conformance2_textures_image_data_tex_2d_r16f_red_float": 0.28731203079223633, + "WebglConformance_conformance2_textures_image_data_tex_2d_r16f_red_half_float": 0.28713178634643555, + "WebglConformance_conformance2_textures_image_data_tex_2d_r32f_red_float": 0.31989192962646484, + "WebglConformance_conformance2_textures_image_data_tex_2d_r8_red_unsigned_byte": 0.2705719470977783, + "WebglConformance_conformance2_textures_image_data_tex_2d_r8ui_red_integer_unsigned_byte": 0.25380682945251465, + "WebglConformance_conformance2_textures_image_data_tex_2d_rg16f_rg_float": 0.2522721290588379, + "WebglConformance_conformance2_textures_image_data_tex_2d_rg16f_rg_half_float": 0.25835108757019043, + "WebglConformance_conformance2_textures_image_data_tex_2d_rg32f_rg_float": 0.25777602195739746, + "WebglConformance_conformance2_textures_image_data_tex_2d_rg8_rg_unsigned_byte": 0.35233283042907715, + "WebglConformance_conformance2_textures_image_data_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.27518796920776367, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb16f_rgb_float": 0.2520890235900879, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb16f_rgb_half_float": 0.2825329303741455, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb32f_rgb_float": 0.24575209617614746, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb565_rgb_unsigned_byte": 0.29141807556152344, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.3077549934387207, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.27610301971435547, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.3227880001068115, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb8_rgb_unsigned_byte": 0.30304384231567383, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.2592461109161377, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb9_e5_rgb_float": 0.3112671375274658, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgb9_e5_rgb_half_float": 0.2591719627380371, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba16f_rgba_float": 0.25591301918029785, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba16f_rgba_half_float": 0.2517838478088379, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba32f_rgba_float": 0.2605259418487549, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba4_rgba_unsigned_byte": 0.28210997581481934, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.2725648880004883, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba8_rgba_unsigned_byte": 0.28093791007995605, + "WebglConformance_conformance2_textures_image_data_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.2524139881134033, + "WebglConformance_conformance2_textures_image_data_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.25687193870544434, + "WebglConformance_conformance2_textures_image_data_tex_2d_srgb8_rgb_unsigned_byte": 0.2789320945739746, + "WebglConformance_conformance2_textures_image_data_tex_3d_r11f_g11f_b10f_rgb_float": 0.2639319896697998, + "WebglConformance_conformance2_textures_image_data_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.18288397789001465, + "WebglConformance_conformance2_textures_image_data_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.18843293190002441, + "WebglConformance_conformance2_textures_image_data_tex_3d_r16f_red_float": 0.20698809623718262, + "WebglConformance_conformance2_textures_image_data_tex_3d_r16f_red_half_float": 1.0460309982299805, + "WebglConformance_conformance2_textures_image_data_tex_3d_r32f_red_float": 0.24485111236572266, + "WebglConformance_conformance2_textures_image_data_tex_3d_r8_red_unsigned_byte": 0.18651604652404785, + "WebglConformance_conformance2_textures_image_data_tex_3d_r8ui_red_integer_unsigned_byte": 0.18452000617980957, + "WebglConformance_conformance2_textures_image_data_tex_3d_rg16f_rg_float": 0.25795912742614746, + "WebglConformance_conformance2_textures_image_data_tex_3d_rg16f_rg_half_float": 0.2009260654449463, + "WebglConformance_conformance2_textures_image_data_tex_3d_rg32f_rg_float": 0.18571901321411133, + "WebglConformance_conformance2_textures_image_data_tex_3d_rg8_rg_unsigned_byte": 0.18256807327270508, + "WebglConformance_conformance2_textures_image_data_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.18686389923095703, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb16f_rgb_float": 0.18337512016296387, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb16f_rgb_half_float": 0.18483710289001465, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb32f_rgb_float": 0.18576383590698242, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb565_rgb_unsigned_byte": 0.19263410568237305, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.19431614875793457, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.22267389297485352, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.18701982498168945, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb8_rgb_unsigned_byte": 0.19324898719787598, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.1954960823059082, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb9_e5_rgb_float": 0.22300982475280762, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgb9_e5_rgb_half_float": 0.1832261085510254, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba16f_rgba_float": 0.11980390548706055, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba16f_rgba_half_float": 0.18785691261291504, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba32f_rgba_float": 0.22495102882385254, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba4_rgba_unsigned_byte": 0.1879711151123047, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.18613004684448242, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba8_rgba_unsigned_byte": 0.22545886039733887, + "WebglConformance_conformance2_textures_image_data_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.18905210494995117, + "WebglConformance_conformance2_textures_image_data_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.17559123039245605, + "WebglConformance_conformance2_textures_image_data_tex_3d_srgb8_rgb_unsigned_byte": 0.2540011405944824, + "WebglConformance_conformance2_textures_image_tex_2d_r11f_g11f_b10f_rgb_float": 0.14692306518554688, + "WebglConformance_conformance2_textures_image_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.16777896881103516, + "WebglConformance_conformance2_textures_image_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.2851748466491699, + "WebglConformance_conformance2_textures_image_tex_2d_r16f_red_float": 0.16424012184143066, + "WebglConformance_conformance2_textures_image_tex_2d_r16f_red_half_float": 0.17304706573486328, + "WebglConformance_conformance2_textures_image_tex_2d_r32f_red_float": 0.16122913360595703, + "WebglConformance_conformance2_textures_image_tex_2d_r8_red_unsigned_byte": 0.23058605194091797, + "WebglConformance_conformance2_textures_image_tex_2d_r8ui_red_integer_unsigned_byte": 0.16839003562927246, + "WebglConformance_conformance2_textures_image_tex_2d_rg16f_rg_float": 0.16588091850280762, + "WebglConformance_conformance2_textures_image_tex_2d_rg16f_rg_half_float": 0.16715788841247559, + "WebglConformance_conformance2_textures_image_tex_2d_rg32f_rg_float": 0.1663050651550293, + "WebglConformance_conformance2_textures_image_tex_2d_rg8_rg_unsigned_byte": 0.16719698905944824, + "WebglConformance_conformance2_textures_image_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.1663670539855957, + "WebglConformance_conformance2_textures_image_tex_2d_rgb16f_rgb_float": 0.16728997230529785, + "WebglConformance_conformance2_textures_image_tex_2d_rgb16f_rgb_half_float": 0.16707611083984375, + "WebglConformance_conformance2_textures_image_tex_2d_rgb32f_rgb_float": 0.16602396965026855, + "WebglConformance_conformance2_textures_image_tex_2d_rgb565_rgb_unsigned_byte": 0.16445612907409668, + "WebglConformance_conformance2_textures_image_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.16846704483032227, + "WebglConformance_conformance2_textures_image_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.18622803688049316, + "WebglConformance_conformance2_textures_image_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.1669139862060547, + "WebglConformance_conformance2_textures_image_tex_2d_rgb8_rgb_unsigned_byte": 0.19685983657836914, + "WebglConformance_conformance2_textures_image_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.16672706604003906, + "WebglConformance_conformance2_textures_image_tex_2d_rgb9_e5_rgb_float": 0.19680380821228027, + "WebglConformance_conformance2_textures_image_tex_2d_rgb9_e5_rgb_half_float": 0.17119884490966797, + "WebglConformance_conformance2_textures_image_tex_2d_rgba16f_rgba_float": 0.16413402557373047, + "WebglConformance_conformance2_textures_image_tex_2d_rgba16f_rgba_half_float": 0.19661784172058105, + "WebglConformance_conformance2_textures_image_tex_2d_rgba32f_rgba_float": 0.2936370372772217, + "WebglConformance_conformance2_textures_image_tex_2d_rgba4_rgba_unsigned_byte": 0.1627199649810791, + "WebglConformance_conformance2_textures_image_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.16652703285217285, + "WebglConformance_conformance2_textures_image_tex_2d_rgba8_rgba_unsigned_byte": 0.20298194885253906, + "WebglConformance_conformance2_textures_image_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.16641688346862793, + "WebglConformance_conformance2_textures_image_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.16474103927612305, + "WebglConformance_conformance2_textures_image_tex_2d_srgb8_rgb_unsigned_byte": 0.19619011878967285, + "WebglConformance_conformance2_textures_image_tex_3d_r11f_g11f_b10f_rgb_float": 0.17582011222839355, + "WebglConformance_conformance2_textures_image_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.17489910125732422, + "WebglConformance_conformance2_textures_image_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.17158198356628418, + "WebglConformance_conformance2_textures_image_tex_3d_r16f_red_float": 0.16341280937194824, + "WebglConformance_conformance2_textures_image_tex_3d_r16f_red_half_float": 0.16879701614379883, + "WebglConformance_conformance2_textures_image_tex_3d_r32f_red_float": 0.16433215141296387, + "WebglConformance_conformance2_textures_image_tex_3d_r8_red_unsigned_byte": 0.13573789596557617, + "WebglConformance_conformance2_textures_image_tex_3d_r8ui_red_integer_unsigned_byte": 0.17357110977172852, + "WebglConformance_conformance2_textures_image_tex_3d_rg16f_rg_float": 0.21826601028442383, + "WebglConformance_conformance2_textures_image_tex_3d_rg16f_rg_half_float": 0.17424392700195312, + "WebglConformance_conformance2_textures_image_tex_3d_rg32f_rg_float": 0.17026710510253906, + "WebglConformance_conformance2_textures_image_tex_3d_rg8_rg_unsigned_byte": 0.19371294975280762, + "WebglConformance_conformance2_textures_image_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.1693727970123291, + "WebglConformance_conformance2_textures_image_tex_3d_rgb16f_rgb_float": 0.16544485092163086, + "WebglConformance_conformance2_textures_image_tex_3d_rgb16f_rgb_half_float": 0.19281578063964844, + "WebglConformance_conformance2_textures_image_tex_3d_rgb32f_rgb_float": 0.1852130889892578, + "WebglConformance_conformance2_textures_image_tex_3d_rgb565_rgb_unsigned_byte": 0.1820988655090332, + "WebglConformance_conformance2_textures_image_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.1835770606994629, + "WebglConformance_conformance2_textures_image_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.11734604835510254, + "WebglConformance_conformance2_textures_image_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.17037701606750488, + "WebglConformance_conformance2_textures_image_tex_3d_rgb8_rgb_unsigned_byte": 0.16588997840881348, + "WebglConformance_conformance2_textures_image_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.16808605194091797, + "WebglConformance_conformance2_textures_image_tex_3d_rgb9_e5_rgb_float": 0.16864609718322754, + "WebglConformance_conformance2_textures_image_tex_3d_rgb9_e5_rgb_half_float": 0.16551804542541504, + "WebglConformance_conformance2_textures_image_tex_3d_rgba16f_rgba_float": 0.12299704551696777, + "WebglConformance_conformance2_textures_image_tex_3d_rgba16f_rgba_half_float": 0.1889808177947998, + "WebglConformance_conformance2_textures_image_tex_3d_rgba32f_rgba_float": 0.16827106475830078, + "WebglConformance_conformance2_textures_image_tex_3d_rgba4_rgba_unsigned_byte": 0.1987929344177246, + "WebglConformance_conformance2_textures_image_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.265125036239624, + "WebglConformance_conformance2_textures_image_tex_3d_rgba8_rgba_unsigned_byte": 0.16846394538879395, + "WebglConformance_conformance2_textures_image_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.17113494873046875, + "WebglConformance_conformance2_textures_image_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.1730029582977295, + "WebglConformance_conformance2_textures_image_tex_3d_srgb8_rgb_unsigned_byte": 0.18721890449523926, + "WebglConformance_conformance2_textures_misc_compressed_tex_image": 0.0702672004699707, + "WebglConformance_conformance2_textures_misc_copy_texture_image": 0.3066380023956299, + "WebglConformance_conformance2_textures_misc_gl_get_tex_parameter": 0.12148904800415039, + "WebglConformance_conformance2_textures_misc_mipmap_fbo": 0.05061793327331543, + "WebglConformance_conformance2_textures_misc_tex_3d_size_limit": 0.13191795349121094, + "WebglConformance_conformance2_textures_misc_tex_input_validation": 0.214555025100708, + "WebglConformance_conformance2_textures_misc_tex_mipmap_levels": 0.10311102867126465, + "WebglConformance_conformance2_textures_misc_tex_new_formats": 0.3070859909057617, + "WebglConformance_conformance2_textures_misc_tex_storage_2d": 0.17699098587036133, + "WebglConformance_conformance2_textures_misc_tex_storage_and_subimage_3d": 0.06209897994995117, + "WebglConformance_conformance2_textures_misc_tex_storage_compressed_formats": 0.07881689071655273, + "WebglConformance_conformance2_textures_misc_tex_unpack_params": 2.3760581016540527, + "WebglConformance_conformance2_textures_misc_texel_fetch_undefined": 0.17957592010498047, + "WebglConformance_conformance2_textures_misc_texture_npot": 0.09428811073303223, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r11f_g11f_b10f_rgb_float": 0.16532492637634277, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r11f_g11f_b10f_rgb_half_float": 0.18488121032714844, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.1874241828918457, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r16f_red_float": 0.18940091133117676, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r16f_red_half_float": 0.19127511978149414, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r32f_red_float": 0.11601400375366211, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r8_red_unsigned_byte": 0.196821928024292, + "WebglConformance_conformance2_textures_svg_image_tex_2d_r8ui_red_integer_unsigned_byte": 0.18242096900939941, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg16f_rg_float": 0.1882801055908203, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg16f_rg_half_float": 0.17807388305664062, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg32f_rg_float": 0.18648195266723633, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg8_rg_unsigned_byte": 0.17998194694519043, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rg8ui_rg_integer_unsigned_byte": 0.18931293487548828, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb16f_rgb_float": 0.1896531581878662, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb16f_rgb_half_float": 0.133558988571167, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb32f_rgb_float": 0.19141507148742676, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb565_rgb_unsigned_byte": 0.17919492721557617, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 0.18561697006225586, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb5_a1_rgba_unsigned_byte": 0.1828010082244873, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.18064308166503906, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb8_rgb_unsigned_byte": 0.13229894638061523, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 0.18776798248291016, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb9_e5_rgb_float": 0.18274712562561035, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgb9_e5_rgb_half_float": 0.7131509780883789, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba16f_rgba_float": 0.1899099349975586, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba16f_rgba_half_float": 0.22981715202331543, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba32f_rgba_float": 0.21006298065185547, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba4_rgba_unsigned_byte": 0.19119596481323242, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 0.19474101066589355, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba8_rgba_unsigned_byte": 0.18921804428100586, + "WebglConformance_conformance2_textures_svg_image_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 0.18079900741577148, + "WebglConformance_conformance2_textures_svg_image_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 0.1878681182861328, + "WebglConformance_conformance2_textures_svg_image_tex_2d_srgb8_rgb_unsigned_byte": 0.19523978233337402, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r11f_g11f_b10f_rgb_float": 0.780656099319458, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r11f_g11f_b10f_rgb_half_float": 0.14974308013916016, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 0.19623684883117676, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r16f_red_float": 0.1521470546722412, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r16f_red_half_float": 0.14870810508728027, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r32f_red_float": 0.15310978889465332, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r8_red_unsigned_byte": 0.16593503952026367, + "WebglConformance_conformance2_textures_svg_image_tex_3d_r8ui_red_integer_unsigned_byte": 0.1793379783630371, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg16f_rg_float": 0.12782979011535645, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg16f_rg_half_float": 0.1590409278869629, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg32f_rg_float": 0.19630098342895508, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg8_rg_unsigned_byte": 0.15506792068481445, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rg8ui_rg_integer_unsigned_byte": 0.16672396659851074, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb16f_rgb_float": 0.16416311264038086, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb16f_rgb_half_float": 0.16735100746154785, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb32f_rgb_float": 0.1467139720916748, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb565_rgb_unsigned_byte": 0.1533970832824707, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 0.11322402954101562, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb5_a1_rgba_unsigned_byte": 0.14963507652282715, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 0.15038800239562988, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb8_rgb_unsigned_byte": 0.14974403381347656, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 0.18385791778564453, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb9_e5_rgb_float": 0.18259811401367188, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgb9_e5_rgb_half_float": 0.15029382705688477, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba16f_rgba_float": 0.1498579978942871, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba16f_rgba_half_float": 0.15039706230163574, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba32f_rgba_float": 0.14929509162902832, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba4_rgba_unsigned_byte": 0.1501171588897705, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 0.1836090087890625, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba8_rgba_unsigned_byte": 0.18256807327270508, + "WebglConformance_conformance2_textures_svg_image_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 0.15079998970031738, + "WebglConformance_conformance2_textures_svg_image_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 0.1499178409576416, + "WebglConformance_conformance2_textures_svg_image_tex_3d_srgb8_rgb_unsigned_byte": 0.15384817123413086, + "WebglConformance_conformance2_textures_video_tex_2d_r11f_g11f_b10f_rgb_float": 1.868138074874878, + "WebglConformance_conformance2_textures_video_tex_2d_r11f_g11f_b10f_rgb_half_float": 1.6931040287017822, + "WebglConformance_conformance2_textures_video_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 1.6706109046936035, + "WebglConformance_conformance2_textures_video_tex_2d_r16f_red_float": 1.667078971862793, + "WebglConformance_conformance2_textures_video_tex_2d_r16f_red_half_float": 1.6649999618530273, + "WebglConformance_conformance2_textures_video_tex_2d_r32f_red_float": 1.6739470958709717, + "WebglConformance_conformance2_textures_video_tex_2d_r8_red_unsigned_byte": 1.6833100318908691, + "WebglConformance_conformance2_textures_video_tex_2d_r8ui_red_integer_unsigned_byte": 1.6859488487243652, + "WebglConformance_conformance2_textures_video_tex_2d_rg16f_rg_float": 1.68454909324646, + "WebglConformance_conformance2_textures_video_tex_2d_rg16f_rg_half_float": 1.682035207748413, + "WebglConformance_conformance2_textures_video_tex_2d_rg32f_rg_float": 1.7219738960266113, + "WebglConformance_conformance2_textures_video_tex_2d_rg8_rg_unsigned_byte": 1.698997974395752, + "WebglConformance_conformance2_textures_video_tex_2d_rg8ui_rg_integer_unsigned_byte": 1.6917529106140137, + "WebglConformance_conformance2_textures_video_tex_2d_rgb16f_rgb_float": 1.8373661041259766, + "WebglConformance_conformance2_textures_video_tex_2d_rgb16f_rgb_half_float": 1.6751739978790283, + "WebglConformance_conformance2_textures_video_tex_2d_rgb32f_rgb_float": 1.840345859527588, + "WebglConformance_conformance2_textures_video_tex_2d_rgb565_rgb_unsigned_byte": 1.6742579936981201, + "WebglConformance_conformance2_textures_video_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 1.762566089630127, + "WebglConformance_conformance2_textures_video_tex_2d_rgb5_a1_rgba_unsigned_byte": 1.6805860996246338, + "WebglConformance_conformance2_textures_video_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 1.6834800243377686, + "WebglConformance_conformance2_textures_video_tex_2d_rgb8_rgb_unsigned_byte": 1.7718300819396973, + "WebglConformance_conformance2_textures_video_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 1.8798940181732178, + "WebglConformance_conformance2_textures_video_tex_2d_rgb9_e5_rgb_float": 1.6753978729248047, + "WebglConformance_conformance2_textures_video_tex_2d_rgb9_e5_rgb_half_float": 1.7003040313720703, + "WebglConformance_conformance2_textures_video_tex_2d_rgba16f_rgba_float": 1.840912103652954, + "WebglConformance_conformance2_textures_video_tex_2d_rgba16f_rgba_half_float": 1.681687831878662, + "WebglConformance_conformance2_textures_video_tex_2d_rgba32f_rgba_float": 1.7779078483581543, + "WebglConformance_conformance2_textures_video_tex_2d_rgba4_rgba_unsigned_byte": 1.6894850730895996, + "WebglConformance_conformance2_textures_video_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 1.7700579166412354, + "WebglConformance_conformance2_textures_video_tex_2d_rgba8_rgba_unsigned_byte": 1.7000219821929932, + "WebglConformance_conformance2_textures_video_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 1.6731889247894287, + "WebglConformance_conformance2_textures_video_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 1.8499729633331299, + "WebglConformance_conformance2_textures_video_tex_2d_srgb8_rgb_unsigned_byte": 1.68721604347229, + "WebglConformance_conformance2_textures_video_tex_3d_r11f_g11f_b10f_rgb_float": 1.762157917022705, + "WebglConformance_conformance2_textures_video_tex_3d_r11f_g11f_b10f_rgb_half_float": 1.6753740310668945, + "WebglConformance_conformance2_textures_video_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 1.6774370670318604, + "WebglConformance_conformance2_textures_video_tex_3d_r16f_red_float": 1.6767590045928955, + "WebglConformance_conformance2_textures_video_tex_3d_r16f_red_half_float": 1.6717441082000732, + "WebglConformance_conformance2_textures_video_tex_3d_r32f_red_float": 1.6757330894470215, + "WebglConformance_conformance2_textures_video_tex_3d_r8_red_unsigned_byte": 1.6720218658447266, + "WebglConformance_conformance2_textures_video_tex_3d_r8ui_red_integer_unsigned_byte": 1.6743321418762207, + "WebglConformance_conformance2_textures_video_tex_3d_rg16f_rg_float": 1.6770999431610107, + "WebglConformance_conformance2_textures_video_tex_3d_rg16f_rg_half_float": 1.6739180088043213, + "WebglConformance_conformance2_textures_video_tex_3d_rg32f_rg_float": 1.671694040298462, + "WebglConformance_conformance2_textures_video_tex_3d_rg8_rg_unsigned_byte": 1.6722099781036377, + "WebglConformance_conformance2_textures_video_tex_3d_rg8ui_rg_integer_unsigned_byte": 1.6856980323791504, + "WebglConformance_conformance2_textures_video_tex_3d_rgb16f_rgb_float": 1.7610740661621094, + "WebglConformance_conformance2_textures_video_tex_3d_rgb16f_rgb_half_float": 1.6744029521942139, + "WebglConformance_conformance2_textures_video_tex_3d_rgb32f_rgb_float": 1.758073091506958, + "WebglConformance_conformance2_textures_video_tex_3d_rgb565_rgb_unsigned_byte": 1.67649507522583, + "WebglConformance_conformance2_textures_video_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 1.6740870475769043, + "WebglConformance_conformance2_textures_video_tex_3d_rgb5_a1_rgba_unsigned_byte": 1.6744749546051025, + "WebglConformance_conformance2_textures_video_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 1.6734938621520996, + "WebglConformance_conformance2_textures_video_tex_3d_rgb8_rgb_unsigned_byte": 1.676724910736084, + "WebglConformance_conformance2_textures_video_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 1.7556769847869873, + "WebglConformance_conformance2_textures_video_tex_3d_rgb9_e5_rgb_float": 1.6778450012207031, + "WebglConformance_conformance2_textures_video_tex_3d_rgb9_e5_rgb_half_float": 1.6743850708007812, + "WebglConformance_conformance2_textures_video_tex_3d_rgba16f_rgba_float": 1.6739890575408936, + "WebglConformance_conformance2_textures_video_tex_3d_rgba16f_rgba_half_float": 1.6659488677978516, + "WebglConformance_conformance2_textures_video_tex_3d_rgba32f_rgba_float": 1.672584056854248, + "WebglConformance_conformance2_textures_video_tex_3d_rgba4_rgba_unsigned_byte": 1.683366060256958, + "WebglConformance_conformance2_textures_video_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 1.6693899631500244, + "WebglConformance_conformance2_textures_video_tex_3d_rgba8_rgba_unsigned_byte": 1.67228102684021, + "WebglConformance_conformance2_textures_video_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 1.6832120418548584, + "WebglConformance_conformance2_textures_video_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 1.6725668907165527, + "WebglConformance_conformance2_textures_video_tex_3d_srgb8_rgb_unsigned_byte": 1.6736030578613281, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r11f_g11f_b10f_rgb_float": 5.3979339599609375, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r11f_g11f_b10f_rgb_half_float": 5.488201141357422, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 5.480471134185791, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r16f_red_float": 5.397410869598389, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r16f_red_half_float": 5.48508095741272, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r32f_red_float": 5.478820085525513, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r8_red_unsigned_byte": 5.4759838581085205, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_r8ui_red_integer_unsigned_byte": 5.645738124847412, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg16f_rg_float": 5.4802210330963135, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg16f_rg_half_float": 5.4911439418792725, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg32f_rg_float": 5.628000020980835, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg8_rg_unsigned_byte": 5.492326974868774, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rg8ui_rg_integer_unsigned_byte": 5.6065919399261475, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb16f_rgb_float": 5.491950988769531, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb16f_rgb_half_float": 5.624084949493408, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb32f_rgb_float": 5.487442970275879, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb565_rgb_unsigned_byte": 5.628062963485718, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb565_rgb_unsigned_short_5_6_5": 5.490281105041504, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb5_a1_rgba_unsigned_byte": 5.636795997619629, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 5.607732057571411, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb8_rgb_unsigned_byte": 5.470227956771851, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb8ui_rgb_integer_unsigned_byte": 5.631090879440308, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb9_e5_rgb_float": 5.481398105621338, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgb9_e5_rgb_half_float": 5.484255075454712, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba16f_rgba_float": 5.662064075469971, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba16f_rgba_half_float": 5.484928846359253, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba32f_rgba_float": 5.485412120819092, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba4_rgba_unsigned_byte": 5.636765956878662, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba4_rgba_unsigned_short_4_4_4_4": 5.631310939788818, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba8_rgba_unsigned_byte": 5.629351854324341, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_rgba8ui_rgba_integer_unsigned_byte": 5.477173089981079, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_srgb8_alpha8_rgba_unsigned_byte": 5.483371019363403, + "WebglConformance_conformance2_textures_webgl_canvas_tex_2d_srgb8_rgb_unsigned_byte": 5.607601881027222, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r11f_g11f_b10f_rgb_float": 2.634645938873291, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r11f_g11f_b10f_rgb_half_float": 2.6366031169891357, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r11f_g11f_b10f_rgb_unsigned_int_10f_11f_11f_rev": 2.630496025085449, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r16f_red_float": 2.6346499919891357, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r16f_red_half_float": 2.6326370239257812, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r32f_red_float": 2.633171796798706, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r8_red_unsigned_byte": 2.7940120697021484, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_r8ui_red_integer_unsigned_byte": 2.5649828910827637, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg16f_rg_float": 2.5641980171203613, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg16f_rg_half_float": 2.776859998703003, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg32f_rg_float": 3.609997034072876, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg8_rg_unsigned_byte": 2.638331890106201, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rg8ui_rg_integer_unsigned_byte": 2.5932998657226562, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb16f_rgb_float": 2.5846450328826904, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb16f_rgb_half_float": 2.745795965194702, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb32f_rgb_float": 2.6509320735931396, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb565_rgb_unsigned_byte": 2.6313581466674805, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb565_rgb_unsigned_short_5_6_5": 2.6590638160705566, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb5_a1_rgba_unsigned_byte": 2.53767991065979, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb5_a1_rgba_unsigned_short_5_5_5_1": 2.5737521648406982, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb8_rgb_unsigned_byte": 2.5817251205444336, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb8ui_rgb_integer_unsigned_byte": 2.6547060012817383, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb9_e5_rgb_float": 2.6730380058288574, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgb9_e5_rgb_half_float": 2.744485855102539, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba16f_rgba_float": 2.627225875854492, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba16f_rgba_half_float": 2.6282479763031006, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba32f_rgba_float": 2.692445993423462, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba4_rgba_unsigned_byte": 2.6365320682525635, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba4_rgba_unsigned_short_4_4_4_4": 2.706562042236328, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba8_rgba_unsigned_byte": 2.646821975708008, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_rgba8ui_rgba_integer_unsigned_byte": 2.664306163787842, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_srgb8_alpha8_rgba_unsigned_byte": 2.6220099925994873, + "WebglConformance_conformance2_textures_webgl_canvas_tex_3d_srgb8_rgb_unsigned_byte": 2.6884260177612305, + "WebglConformance_conformance2_transform_feedback_transform_feedback": 0.7243630886077881, + "WebglConformance_conformance2_vertex_arrays_vertex_array_object": 0.12149190902709961, + "WebglConformance_deqp_data_gles3_shaders_arrays": 2.8146920204162598, + "WebglConformance_deqp_data_gles3_shaders_conditionals": 0.8956048488616943, + "WebglConformance_deqp_data_gles3_shaders_constant_expressions": 0.9544088840484619, + "WebglConformance_deqp_data_gles3_shaders_constants": 2.3715250492095947, + "WebglConformance_deqp_data_gles3_shaders_conversions": 41.90239214897156, + "WebglConformance_deqp_data_gles3_shaders_declarations": 0.8264920711517334, + "WebglConformance_deqp_data_gles3_shaders_fragdata": 0.1857149600982666, + "WebglConformance_deqp_data_gles3_shaders_functions": 6.486234188079834, + "WebglConformance_deqp_data_gles3_shaders_invalid_texture_functions": 1.5131630897521973, + "WebglConformance_deqp_data_gles3_shaders_keywords": 3.847454071044922, + "WebglConformance_deqp_data_gles3_shaders_linkage": 2.655787944793701, + "WebglConformance_deqp_data_gles3_shaders_negative": 0.2875669002532959, + "WebglConformance_deqp_data_gles3_shaders_preprocessor": 7.936439037322998, + "WebglConformance_deqp_data_gles3_shaders_qualification_order": 1.7779009342193604, + "WebglConformance_deqp_data_gles3_shaders_scoping": 1.5513439178466797, + "WebglConformance_deqp_data_gles3_shaders_switch": 0.7040181159973145, + "WebglConformance_deqp_data_gles3_shaders_swizzles": 19.942368984222412, + "WebglConformance_deqp_framework_opengl_simplereference_referencecontext": 1.4244909286499023, + "WebglConformance_deqp_functional_gles3_attriblocation": 3.532348155975342, + "WebglConformance_deqp_functional_gles3_booleanstatequery": 0.28084611892700195, + "WebglConformance_deqp_functional_gles3_buffercopy": 3.524149179458618, + "WebglConformance_deqp_functional_gles3_bufferobjectquery": 0.2940671443939209, + "WebglConformance_deqp_functional_gles3_builtinprecision_abs": 0.00673985481262207, + "WebglConformance_deqp_functional_gles3_builtinprecision_acos": 0.006718873977661133, + "WebglConformance_deqp_functional_gles3_builtinprecision_acosh": 0.006634950637817383, + "WebglConformance_deqp_functional_gles3_builtinprecision_add": 0.005081892013549805, + "WebglConformance_deqp_functional_gles3_builtinprecision_asin": 0.004806995391845703, + "WebglConformance_deqp_functional_gles3_builtinprecision_asinh": 0.004427909851074219, + "WebglConformance_deqp_functional_gles3_builtinprecision_atan": 0.0044629573822021484, + "WebglConformance_deqp_functional_gles3_builtinprecision_atan2": 0.004559993743896484, + "WebglConformance_deqp_functional_gles3_builtinprecision_atanh": 0.004666805267333984, + "WebglConformance_deqp_functional_gles3_builtinprecision_ceil": 0.004765987396240234, + "WebglConformance_deqp_functional_gles3_builtinprecision_clamp": 0.0047130584716796875, + "WebglConformance_deqp_functional_gles3_builtinprecision_cos": 0.004563808441162109, + "WebglConformance_deqp_functional_gles3_builtinprecision_cosh": 0.0044939517974853516, + "WebglConformance_deqp_functional_gles3_builtinprecision_cross": 0.004416942596435547, + "WebglConformance_deqp_functional_gles3_builtinprecision_degrees": 0.004394054412841797, + "WebglConformance_deqp_functional_gles3_builtinprecision_determinant": 0.004561901092529297, + "WebglConformance_deqp_functional_gles3_builtinprecision_distance": 0.005174160003662109, + "WebglConformance_deqp_functional_gles3_builtinprecision_div": 0.006285905838012695, + "WebglConformance_deqp_functional_gles3_builtinprecision_dot": 0.006350994110107422, + "WebglConformance_deqp_functional_gles3_builtinprecision_exp": 0.0050868988037109375, + "WebglConformance_deqp_functional_gles3_builtinprecision_exp2": 0.0045359134674072266, + "WebglConformance_deqp_functional_gles3_builtinprecision_faceforward": 0.0047760009765625, + "WebglConformance_deqp_functional_gles3_builtinprecision_floor": 0.005064964294433594, + "WebglConformance_deqp_functional_gles3_builtinprecision_fract": 0.005341053009033203, + "WebglConformance_deqp_functional_gles3_builtinprecision_inverse": 0.004818916320800781, + "WebglConformance_deqp_functional_gles3_builtinprecision_inversesqrt": 0.004405021667480469, + "WebglConformance_deqp_functional_gles3_builtinprecision_length": 0.00469207763671875, + "WebglConformance_deqp_functional_gles3_builtinprecision_log": 0.00440216064453125, + "WebglConformance_deqp_functional_gles3_builtinprecision_log2": 0.004682064056396484, + "WebglConformance_deqp_functional_gles3_builtinprecision_matrixcompmult": 0.0048749446868896484, + "WebglConformance_deqp_functional_gles3_builtinprecision_max": 0.004621982574462891, + "WebglConformance_deqp_functional_gles3_builtinprecision_min": 0.004481077194213867, + "WebglConformance_deqp_functional_gles3_builtinprecision_mix": 0.004415035247802734, + "WebglConformance_deqp_functional_gles3_builtinprecision_mod": 0.004431009292602539, + "WebglConformance_deqp_functional_gles3_builtinprecision_modf": 0.004380941390991211, + "WebglConformance_deqp_functional_gles3_builtinprecision_mul": 0.004227876663208008, + "WebglConformance_deqp_functional_gles3_builtinprecision_normalize": 0.0042078495025634766, + "WebglConformance_deqp_functional_gles3_builtinprecision_outerproduct": 0.004364967346191406, + "WebglConformance_deqp_functional_gles3_builtinprecision_pow": 0.004333972930908203, + "WebglConformance_deqp_functional_gles3_builtinprecision_radians": 0.004624128341674805, + "WebglConformance_deqp_functional_gles3_builtinprecision_reflect": 0.005897998809814453, + "WebglConformance_deqp_functional_gles3_builtinprecision_refract": 0.004601001739501953, + "WebglConformance_deqp_functional_gles3_builtinprecision_round": 0.003910064697265625, + "WebglConformance_deqp_functional_gles3_builtinprecision_roundeven": 0.003865957260131836, + "WebglConformance_deqp_functional_gles3_builtinprecision_sign": 0.004272937774658203, + "WebglConformance_deqp_functional_gles3_builtinprecision_sin": 0.004354000091552734, + "WebglConformance_deqp_functional_gles3_builtinprecision_sinh": 0.00436711311340332, + "WebglConformance_deqp_functional_gles3_builtinprecision_smoothstep": 0.004416942596435547, + "WebglConformance_deqp_functional_gles3_builtinprecision_sqrt": 0.004291057586669922, + "WebglConformance_deqp_functional_gles3_builtinprecision_step": 0.004351139068603516, + "WebglConformance_deqp_functional_gles3_builtinprecision_sub": 0.0046520233154296875, + "WebglConformance_deqp_functional_gles3_builtinprecision_tan": 0.004682064056396484, + "WebglConformance_deqp_functional_gles3_builtinprecision_tanh": 0.0044498443603515625, + "WebglConformance_deqp_functional_gles3_builtinprecision_transpose": 0.004285097122192383, + "WebglConformance_deqp_functional_gles3_builtinprecision_trunc": 0.0042459964752197266, + "WebglConformance_deqp_functional_gles3_clipping": 5.39811110496521, + "WebglConformance_deqp_functional_gles3_defaultvertexattribute": 9.332689046859741, + "WebglConformance_deqp_functional_gles3_draw_draw_arrays": 9.306015014648438, + "WebglConformance_deqp_functional_gles3_draw_draw_arrays_instanced": 11.143845081329346, + "WebglConformance_deqp_functional_gles3_draw_draw_elements": 7.547292947769165, + "WebglConformance_deqp_functional_gles3_draw_draw_elements_instanced": 8.492194175720215, + "WebglConformance_deqp_functional_gles3_draw_draw_range_elements": 4.380065202713013, + "WebglConformance_deqp_functional_gles3_draw_instancing": 0.6183938980102539, + "WebglConformance_deqp_functional_gles3_draw_random": 7.461213827133179, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_blend": 4.3209381103515625, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_clear": 6.141960859298706, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_00": 5.549246072769165, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_01": 5.348534107208252, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_02": 6.933295011520386, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_03": 5.5152268409729, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_04": 6.365502119064331, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2d_05": 4.729758024215698, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_00": 6.366581916809082, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_01": 6.154892921447754, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_02": 7.273509979248047, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_03": 6.427386999130249, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_04": 6.953101873397827, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex2darray_05": 5.446019887924194, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_00": 5.858039855957031, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_01": 5.8989880084991455, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_02": 6.695847034454346, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_03": 6.2680299282073975, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_04": 6.3805248737335205, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_tex3d_05": 4.993722915649414, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_00": 7.323343992233276, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_01": 7.201876878738403, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_02": 8.03031587600708, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_03": 6.386183023452759, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_04": 7.981621980667114, + "WebglConformance_deqp_functional_gles3_fbocolorbuffer_texcube_05": 5.998105049133301, + "WebglConformance_deqp_functional_gles3_fbocompleteness": 3.183634042739868, + "WebglConformance_deqp_functional_gles3_fbodepthbuffer": 5.554692983627319, + "WebglConformance_deqp_functional_gles3_fboinvalidate_default": 10.69734501838684, + "WebglConformance_deqp_functional_gles3_fboinvalidate_format_00": 4.554610013961792, + "WebglConformance_deqp_functional_gles3_fboinvalidate_format_01": 4.786983013153076, + "WebglConformance_deqp_functional_gles3_fboinvalidate_format_02": 7.89084792137146, + "WebglConformance_deqp_functional_gles3_fboinvalidate_sub": 7.223509073257446, + "WebglConformance_deqp_functional_gles3_fboinvalidate_target": 10.25032901763916, + "WebglConformance_deqp_functional_gles3_fboinvalidate_whole": 8.765208005905151, + "WebglConformance_deqp_functional_gles3_fbomultisample_2_samples": 9.07073712348938, + "WebglConformance_deqp_functional_gles3_fbomultisample_4_samples": 8.977743864059448, + "WebglConformance_deqp_functional_gles3_fbomultisample_8_samples": 9.270225048065186, + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_00": 4.983060836791992, + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_01": 4.897102117538452, + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_02": 4.2425689697265625, + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_03": 5.236394166946411, + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_04": 4.8049540519714355, + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_05": 5.035632848739624, + "WebglConformance_deqp_functional_gles3_fborender_recreate_color_06": 5.2805562019348145, + "WebglConformance_deqp_functional_gles3_fborender_recreate_depth_stencil": 5.792490005493164, + "WebglConformance_deqp_functional_gles3_fborender_resize_00": 4.411363124847412, + "WebglConformance_deqp_functional_gles3_fborender_resize_01": 4.185122966766357, + "WebglConformance_deqp_functional_gles3_fborender_resize_02": 4.548285961151123, + "WebglConformance_deqp_functional_gles3_fborender_resize_03": 8.617058992385864, + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_00": 5.8965630531311035, + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_01": 7.339829921722412, + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_02": 7.395855903625488, + "WebglConformance_deqp_functional_gles3_fborender_shared_colorbuffer_clear": 2.41119384765625, + "WebglConformance_deqp_functional_gles3_fborender_shared_depth_stencil": 4.67264199256897, + "WebglConformance_deqp_functional_gles3_fborender_stencil_clear": 1.7905490398406982, + "WebglConformance_deqp_functional_gles3_fbostatequery": 0.3060441017150879, + "WebglConformance_deqp_functional_gles3_fbostencilbuffer": 3.568441152572632, + "WebglConformance_deqp_functional_gles3_floatstatequery": 0.38611292839050293, + "WebglConformance_deqp_functional_gles3_fragdepth": 1.7108218669891357, + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_fixed": 3.957304000854492, + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_float": 6.178550958633423, + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_int": 5.975913047790527, + "WebglConformance_deqp_functional_gles3_fragmentoutput_array_uint": 6.304059982299805, + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_fixed": 2.5143840312957764, + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_float": 2.8853349685668945, + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_int": 2.947145938873291, + "WebglConformance_deqp_functional_gles3_fragmentoutput_basic_uint": 3.218545913696289, + "WebglConformance_deqp_functional_gles3_fragmentoutput_random_00": 5.110236883163452, + "WebglConformance_deqp_functional_gles3_fragmentoutput_random_01": 6.193571090698242, + "WebglConformance_deqp_functional_gles3_fragmentoutput_random_02": 5.706578969955444, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_00": 2.277459144592285, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_01": 2.582364082336426, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_02": 2.5268948078155518, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_03": 2.6897120475769043, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_04": 3.7454168796539307, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_05": 2.483238935470581, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_06": 2.7706120014190674, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_07": 4.318166971206665, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_08": 3.836258888244629, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_09": 2.4801790714263916, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_10": 3.831387996673584, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_11": 3.886381149291992, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_12": 3.976425886154175, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_13": 3.846410036087036, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_14": 2.2941808700561523, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_15": 2.6888160705566406, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_16": 2.2345049381256104, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_17": 2.496181011199951, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_18": 3.8828680515289307, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_19": 2.4562110900878906, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_20": 2.414591073989868, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_21": 2.4161388874053955, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_22": 2.6875789165496826, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_23": 2.2351438999176025, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_24": 2.400114059448242, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_25": 3.8820691108703613, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_26": 2.4169487953186035, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_27": 2.495630979537964, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_28": 3.807659864425659, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_29": 4.297852993011475, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_30": 4.145932912826538, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_31": 3.9990100860595703, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_32": 4.000207185745239, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_33": 3.8195738792419434, + "WebglConformance_deqp_functional_gles3_framebufferblit_conversion_34": 3.9328880310058594, + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_00": 4.543473958969116, + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_01": 5.358592987060547, + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_02": 2.959146022796631, + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_03": 4.162290096282959, + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_04": 10.328241109848022, + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_05": 4.360263109207153, + "WebglConformance_deqp_functional_gles3_framebufferblit_default_framebuffer_06": 5.341759920120239, + "WebglConformance_deqp_functional_gles3_framebufferblit_depth_stencil": 8.457659006118774, + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_00": 4.100430011749268, + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_01": 3.9190571308135986, + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_02": 4.051903963088989, + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_03": 2.2281739711761475, + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_04": 2.43831205368042, + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_05": 2.3330981731414795, + "WebglConformance_deqp_functional_gles3_framebufferblit_rect_06": 2.311915159225464, + "WebglConformance_deqp_functional_gles3_indexedstatequery": 0.1822819709777832, + "WebglConformance_deqp_functional_gles3_instancedrendering": 3.7526118755340576, + "WebglConformance_deqp_functional_gles3_integerstatequery": 1.1111431121826172, + "WebglConformance_deqp_functional_gles3_internalformatquery": 0.3813769817352295, + "WebglConformance_deqp_functional_gles3_lifetime": 0.7221260070800781, + "WebglConformance_deqp_functional_gles3_multisample": 3.3481709957122803, + "WebglConformance_deqp_functional_gles3_negativebufferapi": 0.38355088233947754, + "WebglConformance_deqp_functional_gles3_negativefragmentapi": 0.2855870723724365, + "WebglConformance_deqp_functional_gles3_negativeshaderapi": 0.502722978591919, + "WebglConformance_deqp_functional_gles3_negativestateapi": 0.5020020008087158, + "WebglConformance_deqp_functional_gles3_negativetextureapi": 2.3269529342651367, + "WebglConformance_deqp_functional_gles3_negativevertexarrayapi": 0.4995870590209961, + "WebglConformance_deqp_functional_gles3_occlusionquery_conservative": 15.700721979141235, + "WebglConformance_deqp_functional_gles3_occlusionquery_strict": 15.387969017028809, + "WebglConformance_deqp_functional_gles3_pixelbufferobject": 2.11263108253479, + "WebglConformance_deqp_functional_gles3_primitiverestart_00": 2.7545371055603027, + "WebglConformance_deqp_functional_gles3_primitiverestart_01": 2.7856550216674805, + "WebglConformance_deqp_functional_gles3_primitiverestart_02": 2.687217950820923, + "WebglConformance_deqp_functional_gles3_primitiverestart_03": 2.832811117172241, + "WebglConformance_deqp_functional_gles3_primitiverestart_04": 2.9586050510406494, + "WebglConformance_deqp_functional_gles3_primitiverestart_05": 2.8425610065460205, + "WebglConformance_deqp_functional_gles3_primitiverestart_06": 2.7497730255126953, + "WebglConformance_deqp_functional_gles3_primitiverestart_07": 2.911113977432251, + "WebglConformance_deqp_functional_gles3_rasterizerdiscard": 3.57169508934021, + "WebglConformance_deqp_functional_gles3_rbostatequery": 0.18597102165222168, + "WebglConformance_deqp_functional_gles3_readpixel": 0.9360699653625488, + "WebglConformance_deqp_functional_gles3_samplerobject": 2.4082460403442383, + "WebglConformance_deqp_functional_gles3_samplerstatequery": 0.30046701431274414, + "WebglConformance_deqp_functional_gles3_shaderapi": 0.39118289947509766, + "WebglConformance_deqp_functional_gles3_shaderbuiltinvar": 1.8726108074188232, + "WebglConformance_deqp_functional_gles3_shadercommonfunction": 7.30858302116394, + "WebglConformance_deqp_functional_gles3_shaderderivate_dfdx": 6.482972860336304, + "WebglConformance_deqp_functional_gles3_shaderderivate_dfdy": 6.457864999771118, + "WebglConformance_deqp_functional_gles3_shaderderivate_fwidth": 6.575088024139404, + "WebglConformance_deqp_functional_gles3_shaderindexing_mat_00": 8.275935173034668, + "WebglConformance_deqp_functional_gles3_shaderindexing_mat_01": 7.511631965637207, + "WebglConformance_deqp_functional_gles3_shaderindexing_mat_02": 13.287449836730957, + "WebglConformance_deqp_functional_gles3_shaderindexing_tmp": 8.781311988830566, + "WebglConformance_deqp_functional_gles3_shaderindexing_uniform": 2.4537150859832764, + "WebglConformance_deqp_functional_gles3_shaderindexing_varying": 5.15919303894043, + "WebglConformance_deqp_functional_gles3_shaderindexing_vec2": 5.326766014099121, + "WebglConformance_deqp_functional_gles3_shaderindexing_vec3": 5.429155111312866, + "WebglConformance_deqp_functional_gles3_shaderindexing_vec4": 5.413471937179565, + "WebglConformance_deqp_functional_gles3_shaderloop_do_while": 14.183014869689941, + "WebglConformance_deqp_functional_gles3_shaderloop_for": 13.296869039535522, + "WebglConformance_deqp_functional_gles3_shaderloop_while": 14.092014074325562, + "WebglConformance_deqp_functional_gles3_shadermatrix_add_assign": 14.687590837478638, + "WebglConformance_deqp_functional_gles3_shadermatrix_add_const": 11.702592134475708, + "WebglConformance_deqp_functional_gles3_shadermatrix_add_dynamic": 26.979609966278076, + "WebglConformance_deqp_functional_gles3_shadermatrix_add_uniform": 24.33062219619751, + "WebglConformance_deqp_functional_gles3_shadermatrix_determinant": 4.5550758838653564, + "WebglConformance_deqp_functional_gles3_shadermatrix_div_assign": 14.7256178855896, + "WebglConformance_deqp_functional_gles3_shadermatrix_div_const": 12.271740913391113, + "WebglConformance_deqp_functional_gles3_shadermatrix_div_dynamic": 26.77831196784973, + "WebglConformance_deqp_functional_gles3_shadermatrix_div_uniform": 24.719142198562622, + "WebglConformance_deqp_functional_gles3_shadermatrix_inverse": 14.979753017425537, + "WebglConformance_deqp_functional_gles3_shadermatrix_matrixcompmult": 14.948060989379883, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_assign": 5.970652103424072, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_const_highp": 13.737600088119507, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_const_lowp": 12.6511070728302, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_const_mediump": 12.88481593132019, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_dynamic_highp": 27.14858102798462, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_dynamic_lowp": 24.357805967330933, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_dynamic_mediump": 27.007256984710693, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_uniform_highp": 23.304633855819702, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_uniform_lowp": 24.650743007659912, + "WebglConformance_deqp_functional_gles3_shadermatrix_mul_uniform_mediump": 23.29057502746582, + "WebglConformance_deqp_functional_gles3_shadermatrix_negation": 13.426066875457764, + "WebglConformance_deqp_functional_gles3_shadermatrix_outerproduct": 16.976574182510376, + "WebglConformance_deqp_functional_gles3_shadermatrix_post_decrement": 14.898000955581665, + "WebglConformance_deqp_functional_gles3_shadermatrix_post_increment": 13.781353950500488, + "WebglConformance_deqp_functional_gles3_shadermatrix_pre_decrement": 16.837937116622925, + "WebglConformance_deqp_functional_gles3_shadermatrix_pre_increment": 17.766231060028076, + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_assign": 15.551084995269775, + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_const": 12.165487051010132, + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_dynamic": 26.53038001060486, + "WebglConformance_deqp_functional_gles3_shadermatrix_sub_uniform": 24.209354162216187, + "WebglConformance_deqp_functional_gles3_shadermatrix_transpose": 13.303424835205078, + "WebglConformance_deqp_functional_gles3_shadermatrix_unary_addition": 7.896199941635132, + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_00": 8.503473997116089, + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_01": 5.3961570262908936, + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_02": 5.888627052307129, + "WebglConformance_deqp_functional_gles3_shaderoperator_angle_and_trigonometry_03": 4.131123065948486, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_00": 24.009870052337646, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_01": 24.545944929122925, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_02": 14.065117120742798, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_03": 15.287338972091675, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_04": 19.247804164886475, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_05": 16.674847841262817, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_06": 18.717427968978882, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_07": 10.591984987258911, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_08": 10.942434072494507, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_09": 18.85030698776245, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_10": 17.545539140701294, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_11": 17.6035418510437, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_12": 9.747862815856934, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_13": 10.562811136245728, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_14": 19.60652804374695, + "WebglConformance_deqp_functional_gles3_shaderoperator_binary_operator_15": 20.111037969589233, + "WebglConformance_deqp_functional_gles3_shaderoperator_bool_compare": 3.190696954727173, + "WebglConformance_deqp_functional_gles3_shaderoperator_common_fucntions": 62.48674511909485, + "WebglConformance_deqp_functional_gles3_shaderoperator_exponential": 8.64211916923523, + "WebglConformance_deqp_functional_gles3_shaderoperator_float_compare": 11.400789976119995, + "WebglConformance_deqp_functional_gles3_shaderoperator_geometric": 9.982442140579224, + "WebglConformance_deqp_functional_gles3_shaderoperator_int_compare": 10.88718295097351, + "WebglConformance_deqp_functional_gles3_shaderoperator_selection": 7.776349067687988, + "WebglConformance_deqp_functional_gles3_shaderoperator_sequence": 6.842770099639893, + "WebglConformance_deqp_functional_gles3_shaderoperator_unary_operator_00": 11.90905499458313, + "WebglConformance_deqp_functional_gles3_shaderoperator_unary_operator_01": 22.284484148025513, + "WebglConformance_deqp_functional_gles3_shaderoperator_unary_operator_02": 22.043122053146362, + "WebglConformance_deqp_functional_gles3_shaderpackingfunction": 0.6111190319061279, + "WebglConformance_deqp_functional_gles3_shaderprecision_float": 10.695714950561523, + "WebglConformance_deqp_functional_gles3_shaderprecision_int": 8.130653142929077, + "WebglConformance_deqp_functional_gles3_shaderprecision_uint": 8.577091932296753, + "WebglConformance_deqp_functional_gles3_shaderstatequery": 0.6634960174560547, + "WebglConformance_deqp_functional_gles3_shaderstruct": 7.085648059844971, + "WebglConformance_deqp_functional_gles3_shaderswitch": 8.102806091308594, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texelfetch": 4.058672904968262, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texelfetchoffset": 3.1140310764312744, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texture": 9.849236011505127, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturegrad": 7.505535125732422, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturegradoffset": 5.562376022338867, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturelod": 6.770072937011719, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturelodoffset": 3.6478540897369385, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureoffset": 4.649861097335815, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureproj": 6.931664943695068, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojgrad": 3.917447090148926, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojgradoffset": 4.951875925064087, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojlod": 5.039863109588623, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojlodoffset": 4.840058088302612, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_textureprojoffset": 6.745934963226318, + "WebglConformance_deqp_functional_gles3_shadertexturefunction_texturesize": 20.05288314819336, + "WebglConformance_deqp_functional_gles3_stringquery": 0.1819310188293457, + "WebglConformance_deqp_functional_gles3_sync": 2.814849853515625, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_00": 3.8856420516967773, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_01": 4.141197919845581, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_02": 3.7506279945373535, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_03": 3.7989370822906494, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_04": 3.9233551025390625, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_combinations_05": 4.375475168228149, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_00": 2.177143096923828, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_01": 1.9993970394134521, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_02": 1.8033180236816406, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_03": 1.2598960399627686, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_04": 1.4139790534973145, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_05": 1.1986689567565918, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_06": 1.200531005859375, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_07": 1.2393829822540283, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_08": 1.8486568927764893, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_formats_09": 1.3546550273895264, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_00": 1.0510098934173584, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_01": 1.0566809177398682, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_02": 1.6555509567260742, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_03": 1.2297050952911377, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_array_sizes_04": 4.345541954040527, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_00": 2.0277979373931885, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_01": 1.9939301013946533, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_02": 1.7975430488586426, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_03": 1.8932130336761475, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_04": 1.9297130107879639, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_combinations_05": 1.955049991607666, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_00": 1.2918438911437988, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_01": 1.096095085144043, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_02": 0.8847460746765137, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_03": 0.7810559272766113, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_04": 0.8904950618743896, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_05": 0.8683278560638428, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_06": 0.8758590221405029, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_07": 0.783862829208374, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_08": 0.8796060085296631, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_formats_09": 0.888293981552124, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_00": 0.8981080055236816, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_01": 0.9115080833435059, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_02": 0.9042589664459229, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_03": 0.7774801254272461, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_04": 0.88897705078125, + "WebglConformance_deqp_functional_gles3_texturefiltering_2d_sizes_05": 0.906001091003418, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_00": 2.0151901245117188, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_01": 2.009922981262207, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_02": 2.042696952819824, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_03": 2.256009101867676, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_04": 2.2830810546875, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_05": 2.2456400394439697, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_06": 2.152132987976074, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_07": 2.4403600692749023, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_08": 2.2086479663848877, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_09": 2.304971933364868, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_10": 2.6040050983428955, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_11": 2.2596771717071533, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_12": 2.0904200077056885, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_13": 2.0853140354156494, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_14": 2.1135520935058594, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_15": 2.215487003326416, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_16": 2.560096025466919, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_17": 1.8311810493469238, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_18": 1.7400729656219482, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_19": 1.828233003616333, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_20": 1.7921431064605713, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_21": 1.8476860523223877, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_22": 2.25258207321167, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_23": 1.7933928966522217, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_24": 8.49216103553772, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_25": 8.642893075942993, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_26": 8.519834041595459, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_27": 8.671079874038696, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_28": 8.605698823928833, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_29": 8.557723045349121, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_30": 8.730631113052368, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_31": 9.261507987976074, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_32": 8.645172119140625, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_33": 8.92720890045166, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_34": 8.90277910232544, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_combinations_35": 8.61914610862732, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_00": 4.025996923446655, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_01": 3.847424030303955, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_02": 4.009451866149902, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_03": 3.0386040210723877, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_04": 3.0463719367980957, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_05": 2.5407731533050537, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_06": 2.7850210666656494, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_07": 2.6284611225128174, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_08": 3.1929800510406494, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_formats_09": 2.6640381813049316, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_00": 3.3725411891937256, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_01": 2.489064931869507, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_02": 3.1157748699188232, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_03": 2.223639965057373, + "WebglConformance_deqp_functional_gles3_texturefiltering_3d_sizes_04": 2.9944188594818115, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_00": 3.980707883834839, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_01": 5.013684988021851, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_02": 8.266286849975586, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_03": 8.316184043884277, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_04": 9.949055910110474, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_combinations_05": 13.901422023773193, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_00": 3.8154420852661133, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_01": 3.5513999462127686, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_02": 3.297950029373169, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_03": 3.4470880031585693, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_04": 3.498715877532959, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_05": 3.307435989379883, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_06": 3.2963860034942627, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_07": 3.296349048614502, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_08": 3.546555995941162, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_formats_09": 3.4800050258636475, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_no_edges_visible": 1.1981542110443115, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_00": 1.9844160079956055, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_01": 3.4157700538635254, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_02": 4.686953067779541, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_03": 1.8053419589996338, + "WebglConformance_deqp_functional_gles3_texturefiltering_cube_sizes_04": 3.2067317962646484, + "WebglConformance_deqp_functional_gles3_textureformat_compressed_2d": 0.7625398635864258, + "WebglConformance_deqp_functional_gles3_textureformat_compressed_cube": 2.337162971496582, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_00": 2.2442030906677246, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_01": 1.992159128189087, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_02": 2.1650960445404053, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_npot_03": 1.985888957977295, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_00": 2.6064350605010986, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_01": 2.3651609420776367, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_02": 2.5640900135040283, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_array_pot_03": 2.346122980117798, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_00": 0.6479768753051758, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_01": 0.6451878547668457, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_02": 0.59865403175354, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_npot_03": 0.6250908374786377, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_00": 0.9040811061859131, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_01": 0.9315412044525146, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_02": 0.933405876159668, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_2d_pot_03": 0.855567216873169, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_00": 1.766012191772461, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_01": 1.6402809619903564, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_02": 1.611985206604004, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_npot_03": 1.6369850635528564, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_00": 3.9046471118927, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_01": 3.5325698852539062, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_02": 3.569974184036255, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_3d_pot_03": 3.5478081703186035, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_00": 1.7771720886230469, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_01": 1.7845110893249512, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_02": 1.82023286819458, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_npot_03": 1.7235240936279297, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_00": 1.937596082687378, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_01": 1.9154329299926758, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_02": 1.9701259136199951, + "WebglConformance_deqp_functional_gles3_textureformat_sized_color_cube_pot_03": 1.8218469619750977, + "WebglConformance_deqp_functional_gles3_textureformat_sized_depth_stencil": 2.3222100734710693, + "WebglConformance_deqp_functional_gles3_textureformat_unsized_2d": 2.521376132965088, + "WebglConformance_deqp_functional_gles3_textureformat_unsized_2d_array": 2.7354109287261963, + "WebglConformance_deqp_functional_gles3_textureformat_unsized_3d": 3.206818103790283, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_always": 0.7689330577850342, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_equal": 1.7023329734802246, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_greater": 1.41190505027771, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_greater_or_equal": 1.5571110248565674, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_less": 1.514073133468628, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_less_or_equal": 1.4512438774108887, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_always": 0.8716931343078613, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_equal": 1.8264129161834717, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_greater": 2.2865939140319824, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_greater_or_equal": 2.4778130054473877, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_less": 2.5181028842926025, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_less_or_equal": 2.4636900424957275, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_never": 0.77640700340271, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_linear_not_equal": 1.8039178848266602, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_always": 0.7391331195831299, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_equal": 1.4487628936767578, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_greater": 1.7467939853668213, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_greater_or_equal": 1.652226209640503, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_less": 1.6197140216827393, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_less_or_equal": 1.7235398292541504, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_never": 0.7947149276733398, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_mipmap_nearest_not_equal": 1.4013950824737549, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_never": 0.7316839694976807, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_linear_not_equal": 1.681548833847046, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_always": 0.6265280246734619, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_equal": 0.606957197189331, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_greater": 0.6138639450073242, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_greater_or_equal": 0.5994350910186768, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_less": 0.6128759384155273, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_less_or_equal": 0.6038000583648682, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_always": 0.768963098526001, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_equal": 1.23164701461792, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_greater": 1.2506327629089355, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_greater_or_equal": 1.0638082027435303, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_less": 1.083932876586914, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_less_or_equal": 1.2301881313323975, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_never": 0.787247896194458, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_linear_not_equal": 1.2514891624450684, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_always": 0.7662160396575928, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_equal": 1.1392509937286377, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_greater": 1.202301025390625, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_greater_or_equal": 1.0582070350646973, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_less": 1.0307211875915527, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_less_or_equal": 1.1921470165252686, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_never": 0.761030912399292, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_mipmap_nearest_not_equal": 1.1705989837646484, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_never": 1.8078958988189697, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_array_nearest_not_equal": 0.9246580600738525, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_always": 0.895219087600708, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_equal": 1.6580150127410889, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_greater": 1.5487890243530273, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_greater_or_equal": 1.368642807006836, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_less": 1.4248199462890625, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_less_or_equal": 1.5290958881378174, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_always": 0.8995838165283203, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_equal": 2.776639938354492, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_greater": 2.3907811641693115, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_greater_or_equal": 3.095547914505005, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_less": 3.0276939868927, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_less_or_equal": 2.333411931991577, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_never": 0.7779989242553711, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_linear_not_equal": 2.641798973083496, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_always": 0.8884539604187012, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_equal": 1.5390639305114746, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_greater": 1.7734739780426025, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_greater_or_equal": 1.5888688564300537, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_less": 1.6527371406555176, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_less_or_equal": 1.734760046005249, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_never": 0.8116981983184814, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_mipmap_nearest_not_equal": 1.5435960292816162, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_never": 0.8502311706542969, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_linear_not_equal": 1.6921441555023193, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_always": 0.7759552001953125, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_equal": 0.7584421634674072, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_greater": 0.7681729793548584, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_greater_or_equal": 0.7666428089141846, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_less": 0.7660880088806152, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_less_or_equal": 0.7854769229888916, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_always": 0.7532670497894287, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_equal": 2.0916850566864014, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_greater": 1.3448808193206787, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_greater_or_equal": 1.9731309413909912, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_less": 1.993549108505249, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_less_or_equal": 1.352682113647461, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_never": 0.8805069923400879, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_linear_not_equal": 2.0821011066436768, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_always": 0.7454218864440918, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_equal": 1.2762770652770996, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_greater": 1.2992548942565918, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_greater_or_equal": 1.1066980361938477, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_less": 1.0830039978027344, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_less_or_equal": 1.270179033279419, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_never": 0.7805290222167969, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_mipmap_nearest_not_equal": 1.2101190090179443, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_never": 0.769340991973877, + "WebglConformance_deqp_functional_gles3_textureshadow_2d_nearest_not_equal": 0.7358779907226562, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_always": 2.6587698459625244, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_equal": 3.6118321418762207, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_greater": 3.7072601318359375, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_greater_or_equal": 3.9614338874816895, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_less": 3.961625099182129, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_less_or_equal": 3.578739881515503, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_always": 2.635024070739746, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_equal": 5.636764049530029, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_greater": 5.6672890186309814, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_greater_or_equal": 6.066984176635742, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_less": 5.960179805755615, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_less_or_equal": 5.663311004638672, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_never": 2.649538993835449, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_linear_not_equal": 5.402346849441528, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_always": 2.631162166595459, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_equal": 3.72222900390625, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_greater": 3.899364948272705, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_greater_or_equal": 4.35192084312439, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_less": 4.359889030456543, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_less_or_equal": 3.7314181327819824, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_never": 2.5341169834136963, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_mipmap_nearest_not_equal": 3.722393035888672, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_never": 2.3620519638061523, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_linear_not_equal": 4.019901990890503, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_always": 2.7873919010162354, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_equal": 2.6436080932617188, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_greater": 2.7621638774871826, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_greater_or_equal": 2.99514102935791, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_less": 2.7011477947235107, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_less_or_equal": 2.696269989013672, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_always": 2.7216339111328125, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_equal": 5.4009950160980225, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_greater": 5.067873001098633, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_greater_or_equal": 5.38177490234375, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_less": 5.369281053543091, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_less_or_equal": 5.223775148391724, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_never": 2.7670340538024902, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_linear_not_equal": 5.377205848693848, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_always": 2.483567953109741, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_equal": 3.4983930587768555, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_greater": 3.268691062927246, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_greater_or_equal": 3.7287650108337402, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_less": 3.701367139816284, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_less_or_equal": 3.241427183151245, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_never": 2.6273539066314697, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_mipmap_nearest_not_equal": 3.4196791648864746, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_never": 2.728973150253296, + "WebglConformance_deqp_functional_gles3_textureshadow_cube_nearest_not_equal": 2.7151858806610107, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_copyteximage2d": 6.929937124252319, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_copytexsubimage2d": 6.454279899597168, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_2d_00": 4.797389030456543, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_2d_01": 4.547410011291504, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_00": 5.918156862258911, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_01": 5.193629026412964, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_02": 5.5034379959106445, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_03": 5.19674015045166, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage2d_cube_04": 5.244808197021484, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_2d_array_00": 4.765398025512695, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_2d_array_01": 4.269311904907227, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_2d_array_02": 4.09131383895874, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_00": 3.5337371826171875, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_01": 3.2483460903167725, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_02": 3.5043821334838867, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_03": 3.2083280086517334, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_teximage3d_3d_04": 3.0353658199310303, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_2d_00": 3.766573905944824, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_2d_01": 3.1524360179901123, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_2d_02": 3.13623309135437, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_00": 5.516418933868408, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_01": 4.996368169784546, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_02": 5.493498086929321, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_03": 5.231528997421265, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage2d_cube_04": 4.852799892425537, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_00": 3.4847989082336426, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_01": 3.1528029441833496, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_02": 3.125143051147461, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_03": 2.8876678943634033, + "WebglConformance_deqp_functional_gles3_texturespecification_basic_texsubimage3d_04": 2.7986230850219727, + "WebglConformance_deqp_functional_gles3_texturespecification_random_teximage2d_2d": 2.6057870388031006, + "WebglConformance_deqp_functional_gles3_texturespecification_random_teximage2d_cube": 7.868346929550171, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_align": 3.5246009826660156, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_depth": 1.086810827255249, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_depth_pbo": 0.8697531223297119, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_2d_00": 1.775974988937378, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_2d_01": 1.8899970054626465, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_00": 4.188263893127441, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_01": 3.8116888999938965, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_02": 4.232367992401123, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_03": 3.8559279441833496, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_cube_04": 3.6244897842407227, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_pbo_params": 1.1272730827331543, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage2d_unpack_params": 1.9046509265899658, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_depth": 1.5084218978881836, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_depth_pbo": 1.1228418350219727, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_2d_array_00": 1.8686230182647705, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_2d_array_01": 1.7073140144348145, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_3d_00": 1.7855141162872314, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_3d_01": 1.6763410568237305, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_pbo_params": 1.1517059803009033, + "WebglConformance_deqp_functional_gles3_texturespecification_teximage3d_unpack_params": 1.101912021636963, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_2d_00": 4.214426040649414, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_2d_01": 3.726155996322632, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_2d_02": 3.8638830184936523, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_00": 4.437400817871094, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_01": 4.112107992172241, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_02": 4.393878936767578, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_03": 4.206325054168701, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_cube_04": 3.985718011856079, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_depth_stencil": 2.520869016647339, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage2d_format_size": 2.0702688694000244, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_2d_array_00": 2.3746562004089355, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_2d_array_01": 2.4292490482330322, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_2d_array_02": 2.2221291065216064, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_00": 5.044872999191284, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_01": 4.253213882446289, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_02": 4.5762779712677, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_3d_03": 4.595605134963989, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_depth_stencil": 0.7638809680938721, + "WebglConformance_deqp_functional_gles3_texturespecification_texstorage3d_format_size": 2.878913164138794, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_align": 5.6818389892578125, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_depth": 0.8587000370025635, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_empty_tex": 1.84208083152771, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_2d_00": 2.427462100982666, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_2d_01": 2.066457986831665, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_00": 4.630360841751099, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_01": 3.9832098484039307, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_02": 4.1424548625946045, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_03": 4.4122560024261475, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_cube_04": 3.9616079330444336, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_pbo_params": 1.8623440265655518, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage2d_unpack_params": 1.1694378852844238, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_depth": 1.164546012878418, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_2d_array_00": 3.682466983795166, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_2d_array_01": 2.991068124771118, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_3d_00": 3.9709179401397705, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_3d_01": 3.6388590335845947, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_pbo_params": 1.36531400680542, + "WebglConformance_deqp_functional_gles3_texturespecification_texsubimage3d_unpack_params": 1.4331300258636475, + "WebglConformance_deqp_functional_gles3_texturestatequery": 0.7165989875793457, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_r11_npot": 4.151244878768921, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_r11_pot": 4.064532041549683, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_rg11_npot": 4.759074926376343, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_rg11_pot": 4.54287314414978, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_r11_npot": 3.685091972351074, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_r11_pot": 3.522900104522705, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_rg11_npot": 3.7391490936279297, + "WebglConformance_deqp_functional_gles3_texturewrap_eac_signed_rg11_pot": 3.6115710735321045, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_rgba8_npot": 3.241507053375244, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_rgba8_pot": 3.065419912338257, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_srgb8_alpha8_npot": 4.137933015823364, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_eac_srgb8_alpha8_pot": 4.096816778182983, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_npot": 3.4034459590911865, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_pot": 3.4049081802368164, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_punchthrough_alpha1_npot": 3.455972909927368, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_rgb8_punchthrough_alpha1_pot": 3.237699031829834, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_npot": 3.9703609943389893, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_pot": 3.9471189975738525, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_punchthrough_alpha1_npot": 3.9557061195373535, + "WebglConformance_deqp_functional_gles3_texturewrap_etc2_srgb8_punchthrough_alpha1_pot": 3.856239080429077, + "WebglConformance_deqp_functional_gles3_texturewrap_rgba8_npot": 3.3364498615264893, + "WebglConformance_deqp_functional_gles3_texturewrap_rgba8_pot": 3.0272819995880127, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_interleaved_lines": 1.1333627700805664, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_interleaved_points": 1.166274070739746, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_interleaved_triangles": 1.1440179347991943, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_separate_lines": 1.0198910236358643, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_separate_points": 1.1318368911743164, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_element_separate_triangles": 1.1368908882141113, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_interleaved_lines": 22.120009899139404, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_interleaved_points": 23.544404983520508, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_interleaved_triangles": 23.529428005218506, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_separate_lines": 6.507735013961792, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_separate_points": 6.932921886444092, + "WebglConformance_deqp_functional_gles3_transformfeedback_array_separate_triangles": 7.052600145339966, + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_interleaved_lines": 21.809186935424805, + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_interleaved_points": 23.365673780441284, + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_interleaved_triangles": 22.707725048065186, + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_separate_lines": 14.517196893692017, + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_separate_points": 14.502156019210815, + "WebglConformance_deqp_functional_gles3_transformfeedback_basic_types_separate_triangles": 14.922502040863037, + "WebglConformance_deqp_functional_gles3_transformfeedback_interpolation_centroid": 6.824520826339722, + "WebglConformance_deqp_functional_gles3_transformfeedback_interpolation_flat": 6.87696385383606, + "WebglConformance_deqp_functional_gles3_transformfeedback_interpolation_smooth": 6.526522874832153, + "WebglConformance_deqp_functional_gles3_transformfeedback_point_size": 2.4509658813476562, + "WebglConformance_deqp_functional_gles3_transformfeedback_position": 2.36358904838562, + "WebglConformance_deqp_functional_gles3_transformfeedback_random_interleaved_lines": 3.7453489303588867, + "WebglConformance_deqp_functional_gles3_transformfeedback_random_interleaved_points": 3.771014928817749, + "WebglConformance_deqp_functional_gles3_transformfeedback_random_interleaved_triangles": 3.642688035964966, + "WebglConformance_deqp_functional_gles3_transformfeedback_random_separate_lines": 3.7574570178985596, + "WebglConformance_deqp_functional_gles3_transformfeedback_random_separate_points": 3.590749979019165, + "WebglConformance_deqp_functional_gles3_transformfeedback_random_separate_triangles": 3.7474300861358643, + "WebglConformance_deqp_functional_gles3_uniformapi_info_query": 9.692252159118652, + "WebglConformance_deqp_functional_gles3_uniformapi_random": 5.560962915420532, + "WebglConformance_deqp_functional_gles3_uniformapi_value_assigned": 18.346808195114136, + "WebglConformance_deqp_functional_gles3_uniformapi_value_initial": 9.78309416770935, + "WebglConformance_deqp_functional_gles3_uniformbuffers_instance_array_basic_type": 4.5720860958099365, + "WebglConformance_deqp_functional_gles3_uniformbuffers_multi_basic_types": 0.7380528450012207, + "WebglConformance_deqp_functional_gles3_uniformbuffers_multi_nested_struct": 1.1902389526367188, + "WebglConformance_deqp_functional_gles3_uniformbuffers_random": 29.392096042633057, + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_basic_array": 4.315842866897583, + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_basic_type": 8.324795007705688, + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_nested_struct": 1.6026229858398438, + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_nested_struct_array": 1.2146108150482178, + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_struct": 0.8879461288452148, + "WebglConformance_deqp_functional_gles3_uniformbuffers_single_struct_array": 2.3964428901672363, + "WebglConformance_deqp_functional_gles3_vertexarrayobject": 0.8973138332366943, + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_count": 9.29194712638855, + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_output": 44.906611919403076, + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_storage": 1.9798848628997803, + "WebglConformance_deqp_functional_gles3_vertexarrays_multiple_attributes_stride": 32.4768431186676, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_first": 33.633447885513306, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_normalize": 25.034193992614746, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_offset": 27.136090993881226, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_byte": 16.769001007080078, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_float": 10.99227499961853, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_half": 11.572394132614136, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_int": 17.846072912216187, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_int_2_10_10_10": 5.011259078979492, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_short": 18.53696298599243, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_byte": 17.74431800842285, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_int": 16.661643028259277, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_int_2_10_10_10": 4.037432909011841, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_output_type_unsigned_short": 17.922955989837646, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_stride": 23.053632974624634, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_dynamic_copy": 12.940428972244263, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_dynamic_draw": 13.086258172988892, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_dynamic_read": 12.302209854125977, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_static_copy": 12.414457082748413, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_static_draw": 12.08027195930481, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_static_read": 12.927170991897583, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_stream_copy": 13.481698036193848, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_stream_draw": 13.491968154907227, + "WebglConformance_deqp_functional_gles3_vertexarrays_single_attribute_usage_stream_read": 12.812244892120361 + }, + "valid": true +} \ No newline at end of file
diff --git a/content/test/gpu/gather_swarming_json_results.py b/content/test/gpu/gather_swarming_json_results.py new file mode 100755 index 0000000..159d4cb --- /dev/null +++ b/content/test/gpu/gather_swarming_json_results.py
@@ -0,0 +1,234 @@ +#!/usr/bin/env python +# 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. + +"""Script which gathers and merges the JSON results from multiple +swarming shards of a step on the waterfall. + +This is used to feed in the per-test times of previous runs of tests +to the browser_test_runner's sharding algorithm, to improve shard +distribution. +""" + +import argparse +import json +import os +import shutil +import subprocess +import sys +import tempfile +import urllib +import urllib2 + +SWARMING_SERVICE = 'https://chromium-swarm.appspot.com' + +THIS_DIR = os.path.dirname(os.path.abspath(__file__)) +SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(THIS_DIR))) +SWARMING_CLIENT_DIR = os.path.join(SRC_DIR, 'tools', 'swarming_client') + +class Swarming: + @staticmethod + def CheckAuth(): + output = subprocess.check_output([ + os.path.join(SWARMING_CLIENT_DIR, 'auth.py'), + 'check', + '--service', + SWARMING_SERVICE]) + if not output.startswith('user:'): + print 'Must run:' + print ' tools/swarming_client/auth.py login --service ' + \ + SWARMING_SERVICE + print 'and authenticate with @google.com credentials.' + sys.exit(1) + + @staticmethod + def Collect(taskIDs, output_dir, verbose): + cmd = [ + os.path.join(SWARMING_CLIENT_DIR, 'swarming.py'), + 'collect', + '-S', + SWARMING_SERVICE, + '--task-output-dir', + output_dir] + taskIDs + if verbose: + print 'Collecting Swarming results:' + print cmd + if verbose > 1: + # Print stdout from the collect command. + stdout = None + else: + fnull = open(os.devnull, 'w') + stdout = fnull + subprocess.check_call(cmd, stdout=stdout, stderr=subprocess.STDOUT) + + @staticmethod + def ExtractShardTaskIDs(urls): + SWARMING_URL = 'https://chromium-swarm.appspot.com/user/task/' + taskIDs = [] + for k,v in urls.iteritems(): + if not k.startswith('shard'): + raise Exception('Illegally formatted \'urls\' key %s' % k) + if not v.startswith(SWARMING_URL): + raise Exception('Illegally formatted \'urls\' value %s' % v) + taskIDs.append(v[len(SWARMING_URL):]) + return taskIDs + +class Waterfall: + def __init__(self, waterfall): + self._waterfall = waterfall + self.BASE_URL = 'http://build.chromium.org/p/' + self.BASE_JSON_BUILDERS_URL = self.BASE_URL + '%s/json/builders' + self.BASE_JSON_BUILDS_URL = self.BASE_JSON_BUILDERS_URL + '/%s/builds' + + def GetJsonFromUrl(self, url): + conn = urllib2.urlopen(url) + result = conn.read() + conn.close() + return json.loads(result) + + def GetBuildNumbersForBot(self, bot): + builds_json = self.GetJsonFromUrl( + self.BASE_JSON_BUILDS_URL % + (self._waterfall, urllib.quote(bot))) + build_numbers = [int(k) for k in builds_json.keys()] + build_numbers.sort() + return build_numbers + + def GetMostRecentlyCompletedBuildNumberForBot(self, bot): + builds = self.GetBuildNumbersForBot(bot) + return builds[len(builds) - 1] + + def GetJsonForBuild(self, bot, build): + return self.GetJsonFromUrl( + (self.BASE_JSON_BUILDS_URL + '/%d') % + (self._waterfall, urllib.quote(bot), build)) + + +def JsonLoadStrippingUnicode(file, **kwargs): + def StripUnicode(obj): + if isinstance(obj, unicode): + try: + return obj.encode('ascii') + except UnicodeEncodeError: + return obj + + if isinstance(obj, list): + return map(StripUnicode, obj) + + if isinstance(obj, dict): + new_obj = type(obj)( + (StripUnicode(k), StripUnicode(v)) for k, v in obj.iteritems() ) + return new_obj + + return obj + + return StripUnicode(json.load(file, **kwargs)) + + +def Merge(dest, src): + if isinstance(dest, list): + if not isinstance(src, list): + raise Exception('Both must be lists: ' + dest + ' and ' + src) + return dest + src + + if isinstance(dest, dict): + if not isinstance(src, dict): + raise Exception('Both must be dicts: ' + dest + ' and ' + src) + for k in src.iterkeys(): + if k not in dest: + dest[k] = src[k] + else: + dest[k] = Merge(dest[k], src[k]) + return dest + + return src + + +def main(): + rest_args = sys.argv[1:] + parser = argparse.ArgumentParser( + description='Gather JSON results from a run of a Swarming test.', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument('-v', '--verbose', action='count', default=0, + help='Enable verbose output (specify multiple times ' + 'for more output)') + parser.add_argument('--waterfall', type=str, default='chromium.gpu.fyi', + help='Which waterfall to examine') + parser.add_argument('--bot', type=str, default='Linux Release (NVIDIA)', + help='Which bot on the waterfall to examine') + parser.add_argument('--build', default=-1, type=int, + help='Which build to fetch (-1 means most recent)') + parser.add_argument('--step', type=str, default='webgl2_conformance_tests', + help='Which step to fetch (treated as a prefix)') + parser.add_argument('--output', type=str, default='output.json', + help='Name of output file') + parser.add_argument('--leak-temp-dir', action='store_true', default=False, + help='Deliberately leak temporary directory') + + options = parser.parse_args(rest_args) + + Swarming.CheckAuth() + + waterfall = Waterfall(options.waterfall) + build = options.build + if build < 0: + build = waterfall.GetMostRecentlyCompletedBuildNumberForBot(options.bot) + + build_json = waterfall.GetJsonForBuild(options.bot, build) + + if options.verbose: + print 'Fetching information from %s, bot %s, build %s' % ( + options.waterfall, options.bot, build) + + taskIDs = [] + for s in build_json['steps']: + if s['name'].startswith(options.step): + # Found the step. + # + # The Swarming shards happen to be listed in the 'urls' property + # of the step. Iterate down them. + if 'urls' not in s or not s['urls']: + # Note: we could also just download json.output if it exists. + print ('%s on waterfall %s, bot %s, build %s doesn\'t ' + 'look like a Swarmed task') % ( + s['name'], options.waterfall, options.bot, build) + return 1 + taskIDs = Swarming.ExtractShardTaskIDs(s['urls']) + if options.verbose: + print 'Found Swarming task IDs for step %s' % s['name'] + + break + if not taskIDs: + print 'Problem gathering the Swarming task IDs for %s' % options.step + return 1 + + # Collect the results. + tmpdir = tempfile.mkdtemp() + Swarming.Collect(taskIDs, tmpdir, options.verbose) + + # Shards' JSON outputs are in sequentially-numbered subdirectories + # of the output directory. + merged_json = None + for i in xrange(len(taskIDs)): + with open(os.path.join(tmpdir, str(i), 'output.json')) as f: + cur_json = JsonLoadStrippingUnicode(f) + if not merged_json: + merged_json = cur_json + else: + merged_json = Merge(merged_json, cur_json) + + with open(options.output, 'w') as f: + json.dump(merged_json, f, sort_keys=True, indent=2, + separators=(',', ': ')) + + if options.leak_temp_dir: + print 'Temporary directory: %s' % tmpdir + else: + shutil.rmtree(tmpdir) + + return 0 + + +if __name__ == "__main__": + sys.exit(main())
diff --git a/content/test/gpu/generate_buildbot_json.py b/content/test/gpu/generate_buildbot_json.py index 66196b6..61db377 100755 --- a/content/test/gpu/generate_buildbot_json.py +++ b/content/test/gpu/generate_buildbot_json.py
@@ -833,6 +833,12 @@ }, ], }, +} + +# These tests use Telemetry's new, simpler, browser_test_runner. +# Eventually all of the Telemetry based tests above will be ported to +# this harness, and the old harness will be deleted. +TELEMETRY_GPU_INTEGRATION_TESTS = { 'webgl_conformance': { 'tester_configs': [ { @@ -898,12 +904,6 @@ '--use-gl=angle', ], }, -} - -# These tests use Telemetry's new, simpler, browser_test_runner. -# Eventually all of the Telemetry based tests above will be ported to -# this harness, and the old harness will be deleted. -TELEMETRY_GPU_INTEGRATION_TESTS = { 'webgl2_conformance_tests': { 'tester_configs': [ { @@ -931,6 +931,11 @@ 'args': [ '--webgl-conformance-version=2.0.0', '--webgl2-only=true', + # The current working directory when run via isolate is + # out/Debug or out/Release. Reference this file relatively to + # it. + '--read-abbreviated-json-results-from=' + \ + '../../content/test/data/gpu/webgl2_conformance_tests_output.json', ], 'swarming': { # These tests currently take about an hour to run. Split them @@ -966,6 +971,11 @@ 'args': [ '--webgl-conformance-version=2.0.0', '--webgl2-only=true', + # The current working directory when run via isolate is + # out/Debug or out/Release. Reference this file relatively to + # it. + '--read-abbreviated-json-results-from=' + \ + '../../content/test/data/gpu/webgl2_conformance_tests_output.json', ], 'swarming': { # These tests currently take about an hour to run. Split them
diff --git a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py index 14ccb117..c110b67 100644 --- a/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py +++ b/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
@@ -100,8 +100,6 @@ # Windows 8 only. - self.Fail('conformance2/reading/read-pixels-from-fbo-test.html', - ['win8'], bug=483282) self.Flaky('deqp/functional/gles3/buffercopy.html', ['win8'], bug=587601) # Win / NVidia @@ -498,6 +496,7 @@ # Linux only. self.Fail('conformance2/glsl3/vector-dynamic-indexing.html', ['linux'], bug=483282) + self.Fail('deqp/functional/gles3/fbodepthbuffer.html', ['linux'], bug=483282)
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py index 53a2f39..c0d3c92 100644 --- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py +++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -536,14 +536,6 @@ # self.Fail('conformance/extensions/webgl-draw-buffers.html', # ['linux', ('intel', 0x412), 'opengl'], bug=586536) - - self.Skip('conformance/glsl/bugs/' + - 'global-invariant-does-not-leak-across-shaders.html', - bug=625363) - - # Fails on multiple platforms - self.Skip('deqp/data/gles2/shaders/preprocessor.html', bug=625363) - # OpenGL / NVIDIA failures self.Fail('conformance/attribs/gl-disabled-vertex-attrib.html', ['win', 'linux', 'nvidia', 'opengl'], bug=1007) # angle bug ID @@ -566,6 +558,8 @@ # Win NVIDIA failures self.Fail('deqp/data/gles2/shaders/functions.html', ['win', 'nvidia'], bug=478572) + self.Flaky('conformance/textures/misc/texture-npot-video.html', + ['win', 'nvidia'], bug=626524) # Win7 / Intel failures self.Fail('conformance/textures/misc/' + @@ -659,6 +653,8 @@ # AMD self.Flaky('conformance/more/functions/uniformi.html', ['linux', 'amd'], bug=550989) + self.Fail('conformance/textures/misc/tex-image-webgl.html', + ['linux', 'amd'], bug=626742) # AMD Radeon 6450 self.Fail('conformance/extensions/angle-instanced-arrays.html',
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc index cf56a43..55d825da 100644 --- a/content/test/layouttest_support.cc +++ b/content/test/layouttest_support.cc
@@ -17,7 +17,7 @@ #include "components/test_runner/test_common.h" #include "components/test_runner/web_frame_test_proxy.h" #include "components/test_runner/web_test_proxy.h" -#include "content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h" +#include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/common/gpu/client/context_provider_command_buffer.h" @@ -34,7 +34,6 @@ #include "content/renderer/render_view_impl.h" #include "content/renderer/renderer_blink_platform_impl.h" #include "content/shell/common/shell_switches.h" -#include "device/bluetooth/bluetooth_adapter.h" #include "gpu/ipc/service/image_transport_surface.h" #include "third_party/WebKit/public/platform/WebFloatRect.h" #include "third_party/WebKit/public/platform/WebGamepads.h" @@ -409,14 +408,8 @@ render_view->GetWidget()->SetDeviceColorProfileForTesting(color_profile); } -void SetBluetoothAdapter(int render_process_id, - scoped_refptr<device::BluetoothAdapter> adapter) { - RenderProcessHostImpl* render_process_host_impl = - static_cast<RenderProcessHostImpl*>( - RenderProcessHost::FromID(render_process_id)); - - render_process_host_impl->GetBluetoothAdapterFactoryWrapper() - ->SetBluetoothAdapterForTesting(std::move(adapter)); +void SetTestBluetoothScanDuration() { + BluetoothDeviceChooserController::SetTestScanDurationForTesting(); } void UseSynchronousResizeMode(RenderView* render_view, bool enable) {
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc index 47ae6f0..019da1c8 100644 --- a/content/test/test_blink_web_unit_test_support.cc +++ b/content/test/test_blink_web_unit_test_support.cc
@@ -121,7 +121,6 @@ blink::initialize(this); blink::setLayoutTestMode(true); - blink::WebRuntimeFeatures::enableApplicationCache(true); blink::WebRuntimeFeatures::enableDatabase(true); blink::WebRuntimeFeatures::enableNotifications(true); blink::WebRuntimeFeatures::enableTouch(true);
diff --git a/courgette/BUILD.gn b/courgette/BUILD.gn index 33c7e3a..8a9eeaf0 100644 --- a/courgette/BUILD.gn +++ b/courgette/BUILD.gn
@@ -127,6 +127,7 @@ "image_utils_unittest.cc", "label_manager_unittest.cc", "memory_allocator_unittest.cc", + "program_detector_unittest.cc", "rel32_finder_unittest.cc", "streams_unittest.cc", "third_party/bsdiff/bsdiff_search_unittest.cc",
diff --git a/courgette/courgette.gyp b/courgette/courgette.gyp index 040b1dd..2711d74 100644 --- a/courgette/courgette.gyp +++ b/courgette/courgette.gyp
@@ -125,6 +125,7 @@ 'image_utils_unittest.cc', 'label_manager_unittest.cc', 'memory_allocator_unittest.cc', + 'program_detector_unittest.cc', 'rel32_finder_unittest.cc', 'streams_unittest.cc', 'typedrva_unittest.cc',
diff --git a/courgette/disassembler.cc b/courgette/disassembler.cc index baa3b1f8..9407f6da 100644 --- a/courgette/disassembler.cc +++ b/courgette/disassembler.cc
@@ -33,9 +33,9 @@ return *it_ + 4 + Read32LittleEndian(translator_.RVAToPointer(*it_)); } -Disassembler::Disassembler(const void* start, size_t length) +Disassembler::Disassembler(const uint8_t* start, size_t length) : failure_reason_("uninitialized") { - start_ = reinterpret_cast<const uint8_t*>(start); + start_ = start; length_ = length; end_ = start_ + length_; };
diff --git a/courgette/disassembler.h b/courgette/disassembler.h index d84b11406..6a40e8738 100644 --- a/courgette/disassembler.h +++ b/courgette/disassembler.h
@@ -92,7 +92,7 @@ const uint8_t* end() const { return end_; } protected: - Disassembler(const void* start, size_t length); + Disassembler(const uint8_t* start, size_t length); bool Good(); bool Bad(const char *reason);
diff --git a/courgette/disassembler_elf_32.cc b/courgette/disassembler_elf_32.cc index febcdea..a6cb16fa 100644 --- a/courgette/disassembler_elf_32.cc +++ b/courgette/disassembler_elf_32.cc
@@ -43,14 +43,13 @@ return (*it_)->rva() + (*it_)->relative_target(); } -DisassemblerElf32::DisassemblerElf32(const void* start, size_t length) +DisassemblerElf32::DisassemblerElf32(const uint8_t* start, size_t length) : Disassembler(start, length), header_(nullptr), section_header_table_size_(0), program_header_table_(nullptr), program_header_table_size_(0), - default_string_section_(nullptr) { -} + default_string_section_(nullptr) {} RVA DisassemblerElf32::FileOffsetToRVA(FileOffset offset) const { // File offsets can be 64-bit values, but we are dealing with 32-bit @@ -216,6 +215,32 @@ return false; } +// static +bool DisassemblerElf32::QuickDetect(const uint8_t* start, + size_t length, + e_machine_values elf_em) { + if (length < sizeof(Elf32_Ehdr)) + return false; + + const Elf32_Ehdr* header = reinterpret_cast<const Elf32_Ehdr*>(start); + + // Have magic for ELF header? + if (header->e_ident[0] != 0x7f || header->e_ident[1] != 'E' || + header->e_ident[2] != 'L' || header->e_ident[3] != 'F') + return false; + + if (header->e_type != ET_EXEC && header->e_type != ET_DYN) + return false; + if (header->e_machine != elf_em) + return false; + if (header->e_version != 1) + return false; + if (header->e_shentsize != sizeof(Elf32_Shdr)) + return false; + + return true; +} + bool DisassemblerElf32::UpdateLength() { Elf32_Off result = 0;
diff --git a/courgette/disassembler_elf_32.h b/courgette/disassembler_elf_32.h index 6bcf1b8..f0961c0 100644 --- a/courgette/disassembler_elf_32.h +++ b/courgette/disassembler_elf_32.h
@@ -94,7 +94,7 @@ }; public: - DisassemblerElf32(const void* start, size_t length); + DisassemblerElf32(const uint8_t* start, size_t length); ~DisassemblerElf32() override { } @@ -121,6 +121,13 @@ } protected: + // Returns 'true' if an valid executable is detected using only quick checks. + // Derived classes should inject |elf_em| corresponding to their architecture, + // which will be checked against the detected one. + static bool QuickDetect(const uint8_t* start, + size_t length, + e_machine_values elf_em); + bool UpdateLength(); // Misc Section Helpers
diff --git a/courgette/disassembler_elf_32_arm.cc b/courgette/disassembler_elf_32_arm.cc index 3ea1008c..4106e283 100644 --- a/courgette/disassembler_elf_32_arm.cc +++ b/courgette/disassembler_elf_32_arm.cc
@@ -304,9 +304,8 @@ return program->EmitRel32ARM(c_op(), label, arm_op_, op_size()); } -DisassemblerElf32ARM::DisassemblerElf32ARM(const void* start, size_t length) - : DisassemblerElf32(start, length) { -} +DisassemblerElf32ARM::DisassemblerElf32ARM(const uint8_t* start, size_t length) + : DisassemblerElf32(start, length) {} // Convert an ELF relocation struction into an RVA. CheckBool DisassemblerElf32ARM::RelToRVA(Elf32_Rel rel, RVA* result) const {
diff --git a/courgette/disassembler_elf_32_arm.h b/courgette/disassembler_elf_32_arm.h index 83f5dc6..24b8aa8 100644 --- a/courgette/disassembler_elf_32_arm.h +++ b/courgette/disassembler_elf_32_arm.h
@@ -28,6 +28,11 @@ class DisassemblerElf32ARM : public DisassemblerElf32 { public: + // Returns true if a valid executable is detected using only quick checks. + static bool QuickDetect(const uint8_t* start, size_t length) { + return DisassemblerElf32::QuickDetect(start, length, EM_ARM); + } + class TypedRVAARM : public TypedRVA { public: TypedRVAARM(ARM_RVA type, RVA rva) : TypedRVA(rva), type_(type) { } @@ -47,7 +52,7 @@ const uint8_t* arm_op_; }; - DisassemblerElf32ARM(const void* start, size_t length); + DisassemblerElf32ARM(const uint8_t* start, size_t length); ~DisassemblerElf32ARM() override { }
diff --git a/courgette/disassembler_elf_32_x86.cc b/courgette/disassembler_elf_32_x86.cc index ee6e732..fc3c98c 100644 --- a/courgette/disassembler_elf_32_x86.cc +++ b/courgette/disassembler_elf_32_x86.cc
@@ -30,9 +30,8 @@ return 4; } -DisassemblerElf32X86::DisassemblerElf32X86(const void* start, size_t length) - : DisassemblerElf32(start, length) { -} +DisassemblerElf32X86::DisassemblerElf32X86(const uint8_t* start, size_t length) + : DisassemblerElf32(start, length) {} // Convert an ELF relocation struction into an RVA. CheckBool DisassemblerElf32X86::RelToRVA(Elf32_Rel rel, RVA* result) const {
diff --git a/courgette/disassembler_elf_32_x86.h b/courgette/disassembler_elf_32_x86.h index 706e6fe..bea7d78 100644 --- a/courgette/disassembler_elf_32_x86.h +++ b/courgette/disassembler_elf_32_x86.h
@@ -20,6 +20,11 @@ class DisassemblerElf32X86 : public DisassemblerElf32 { public: + // Returns true if a valid executable is detected using only quick checks. + static bool QuickDetect(const uint8_t* start, size_t length) { + return DisassemblerElf32::QuickDetect(start, length, EM_386); + } + class TypedRVAX86 : public TypedRVA { public: explicit TypedRVAX86(RVA rva) : TypedRVA(rva) { } @@ -32,7 +37,7 @@ uint16_t op_size() const override; }; - DisassemblerElf32X86(const void* start, size_t length); + DisassemblerElf32X86(const uint8_t* start, size_t length); ~DisassemblerElf32X86() override { }
diff --git a/courgette/disassembler_elf_32_x86_unittest.cc b/courgette/disassembler_elf_32_x86_unittest.cc index af8a540..29304219 100644 --- a/courgette/disassembler_elf_32_x86_unittest.cc +++ b/courgette/disassembler_elf_32_x86_unittest.cc
@@ -24,9 +24,9 @@ class TestDisassemblerElf32X86 : public DisassemblerElf32X86 { public: - TestDisassemblerElf32X86(const void* start, size_t length) - : DisassemblerElf32X86(start, length) { } - ~TestDisassemblerElf32X86() override { } + TestDisassemblerElf32X86(const uint8_t* start, size_t length) + : DisassemblerElf32X86(start, length) {} + ~TestDisassemblerElf32X86() override {} void TestSectionHeaderFileOffsetOrder() { std::vector<FileOffset> file_offsets; @@ -70,7 +70,8 @@ std::string file1 = FileContents(file_name); std::unique_ptr<TestDisassemblerElf32X86> disassembler( - new TestDisassemblerElf32X86(file1.c_str(), file1.length())); + new TestDisassemblerElf32X86( + reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length())); bool can_parse_header = disassembler->ParseHeader(); EXPECT_TRUE(can_parse_header);
diff --git a/courgette/disassembler_win32.cc b/courgette/disassembler_win32.cc index 029284e4..c039dd3 100644 --- a/courgette/disassembler_win32.cc +++ b/courgette/disassembler_win32.cc
@@ -19,7 +19,7 @@ namespace courgette { -DisassemblerWin32::DisassemblerWin32(const void* start, size_t length) +DisassemblerWin32::DisassemblerWin32(const uint8_t* start, size_t length) : Disassembler(start, length) {} RVA DisassemblerWin32::FileOffsetToRVA(FileOffset file_offset) const { @@ -338,6 +338,36 @@ return name; } +// static +bool DisassemblerWin32::QuickDetect(const uint8_t* start, + size_t length, + uint16_t magic) { + if (length < kOffsetOfFileAddressOfNewExeHeader + 4 /* size */) + return false; + + // Have 'MZ' magic for a DOS header? + if (start[0] != 'M' || start[1] != 'Z') + return false; + + FileOffset file_offset = static_cast<FileOffset>( + ReadU32(start, kOffsetOfFileAddressOfNewExeHeader)); + if (file_offset >= length || file_offset % 8 != 0) + return false; + const uint8_t* const pe_header = start + file_offset; + const size_t kMinPEHeaderSize = 4 /*signature*/ + kSizeOfCoffHeader; + if (pe_header <= start || pe_header + kMinPEHeaderSize >= start + length) + return false; + + const uint8_t* optional_header = pe_header + 4 + kSizeOfCoffHeader; + // Check we can read the magic. + if (optional_header + 2 >= start + length) + return false; + if (magic != ReadU16(optional_header, 0)) + return false; + + return true; +} + RvaVisitor* DisassemblerWin32::CreateAbs32TargetRvaVisitor() { return new RvaVisitor_Abs32(abs32_locations_, *this); }
diff --git a/courgette/disassembler_win32.h b/courgette/disassembler_win32.h index 42dc2fe..31b3263 100644 --- a/courgette/disassembler_win32.h +++ b/courgette/disassembler_win32.h
@@ -49,12 +49,17 @@ static std::string SectionName(const Section* section); protected: + // Returns true if a valid executable is detected using only quick checks. + // Derived classes should inject |magic| corresponding to their architecture, + // which will be checked against the detected one. + static bool QuickDetect(const uint8_t* start, size_t length, uint16_t magic); + // Disassembler interfaces. RvaVisitor* CreateAbs32TargetRvaVisitor() override; RvaVisitor* CreateRel32TargetRvaVisitor() override; void RemoveUnusedRel32Locations(AssemblyProgram* program) override; - DisassemblerWin32(const void* start, size_t length); + DisassemblerWin32(const uint8_t* start, size_t length); CheckBool ParseFile(AssemblyProgram* target) WARN_UNUSED_RESULT; bool ParseAbs32Relocs();
diff --git a/courgette/disassembler_win32_x64.cc b/courgette/disassembler_win32_x64.cc index d4ed28cd..c000d103 100644 --- a/courgette/disassembler_win32_x64.cc +++ b/courgette/disassembler_win32_x64.cc
@@ -18,7 +18,7 @@ namespace courgette { -DisassemblerWin32X64::DisassemblerWin32X64(const void* start, size_t length) +DisassemblerWin32X64::DisassemblerWin32X64(const uint8_t* start, size_t length) : DisassemblerWin32(start, length) {} RVA DisassemblerWin32X64::PointerToTargetRVA(const uint8_t* p) const {
diff --git a/courgette/disassembler_win32_x64.h b/courgette/disassembler_win32_x64.h index 5d8b4c2..8a0f6f8c 100644 --- a/courgette/disassembler_win32_x64.h +++ b/courgette/disassembler_win32_x64.h
@@ -19,7 +19,13 @@ class DisassemblerWin32X64 : public DisassemblerWin32 { public: - DisassemblerWin32X64(const void* start, size_t length); + // Returns true if a valid executable is detected using only quick checks. + static bool QuickDetect(const uint8_t* start, size_t length) { + return DisassemblerWin32::QuickDetect(start, length, + kImageNtOptionalHdr64Magic); + } + + DisassemblerWin32X64(const uint8_t* start, size_t length); ~DisassemblerWin32X64() override = default; // Disassembler interfaces.
diff --git a/courgette/disassembler_win32_x64_unittest.cc b/courgette/disassembler_win32_x64_unittest.cc index 691d553..718bfd0 100644 --- a/courgette/disassembler_win32_x64_unittest.cc +++ b/courgette/disassembler_win32_x64_unittest.cc
@@ -24,7 +24,8 @@ std::string file1 = FileContents("chrome64_1.exe"); std::unique_ptr<courgette::DisassemblerWin32X64> disassembler( - new courgette::DisassemblerWin32X64(file1.c_str(), file1.length())); + new courgette::DisassemblerWin32X64( + reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length())); bool can_parse_header = disassembler->ParseHeader(); EXPECT_TRUE(can_parse_header); @@ -65,7 +66,8 @@ std::string file1 = FileContents("setup1.exe"); std::unique_ptr<courgette::DisassemblerWin32X64> disassembler( - new courgette::DisassemblerWin32X64(file1.c_str(), file1.length())); + new courgette::DisassemblerWin32X64( + reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length())); bool can_parse_header = disassembler->ParseHeader(); EXPECT_FALSE(can_parse_header); @@ -80,7 +82,8 @@ std::string file1 = FileContents("en-US-64.dll"); std::unique_ptr<courgette::DisassemblerWin32X64> disassembler( - new courgette::DisassemblerWin32X64(file1.c_str(), file1.length())); + new courgette::DisassemblerWin32X64( + reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length())); bool can_parse_header = disassembler->ParseHeader(); EXPECT_FALSE(can_parse_header);
diff --git a/courgette/disassembler_win32_x86.cc b/courgette/disassembler_win32_x86.cc index 072113d..10f66ab 100644 --- a/courgette/disassembler_win32_x86.cc +++ b/courgette/disassembler_win32_x86.cc
@@ -17,7 +17,7 @@ namespace courgette { -DisassemblerWin32X86::DisassemblerWin32X86(const void* start, size_t length) +DisassemblerWin32X86::DisassemblerWin32X86(const uint8_t* start, size_t length) : DisassemblerWin32(start, length) {} RVA DisassemblerWin32X86::PointerToTargetRVA(const uint8_t* p) const {
diff --git a/courgette/disassembler_win32_x86.h b/courgette/disassembler_win32_x86.h index 6602f37ea..09fc888a0 100644 --- a/courgette/disassembler_win32_x86.h +++ b/courgette/disassembler_win32_x86.h
@@ -19,7 +19,13 @@ class DisassemblerWin32X86 : public DisassemblerWin32 { public: - DisassemblerWin32X86(const void* start, size_t length); + // Returns true if a valid executable is detected using only quick checks. + static bool QuickDetect(const uint8_t* start, size_t length) { + return DisassemblerWin32::QuickDetect(start, length, + kImageNtOptionalHdr32Magic); + } + + DisassemblerWin32X86(const uint8_t* start, size_t length); ~DisassemblerWin32X86() override = default; // Disassembler interfaces.
diff --git a/courgette/disassembler_win32_x86_unittest.cc b/courgette/disassembler_win32_x86_unittest.cc index 167feb42..d6c27e0 100644 --- a/courgette/disassembler_win32_x86_unittest.cc +++ b/courgette/disassembler_win32_x86_unittest.cc
@@ -24,7 +24,8 @@ std::string file1 = FileContents("setup1.exe"); std::unique_ptr<courgette::DisassemblerWin32X86> disassembler( - new courgette::DisassemblerWin32X86(file1.c_str(), file1.length())); + new courgette::DisassemblerWin32X86( + reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length())); bool can_parse_header = disassembler->ParseHeader(); EXPECT_TRUE(can_parse_header); @@ -65,7 +66,8 @@ std::string file1 = FileContents("pe-64.exe"); std::unique_ptr<courgette::DisassemblerWin32X86> disassembler( - new courgette::DisassemblerWin32X86(file1.c_str(), file1.length())); + new courgette::DisassemblerWin32X86( + reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length())); bool can_parse_header = disassembler->ParseHeader(); EXPECT_FALSE(can_parse_header); @@ -80,7 +82,8 @@ std::string file1 = FileContents("en-US.dll"); std::unique_ptr<courgette::DisassemblerWin32X86> disassembler( - new courgette::DisassemblerWin32X86(file1.c_str(), file1.length())); + new courgette::DisassemblerWin32X86( + reinterpret_cast<const uint8_t*>(file1.c_str()), file1.length())); bool can_parse_header = disassembler->ParseHeader(); EXPECT_FALSE(can_parse_header);
diff --git a/courgette/program_detector.cc b/courgette/program_detector.cc index 60b295f..71021cc3 100644 --- a/courgette/program_detector.cc +++ b/courgette/program_detector.cc
@@ -19,32 +19,36 @@ // Returns a new instance of Disassembler subclass if binary data given in // |buffer| and |length| matches a known binary format, otherwise null. -std::unique_ptr<Disassembler> DetectDisassembler(const void* buffer, +std::unique_ptr<Disassembler> DetectDisassembler(const uint8_t* buffer, size_t length) { std::unique_ptr<Disassembler> disassembler; - disassembler.reset(new DisassemblerWin32X86(buffer, length)); - if (disassembler->ParseHeader()) - return disassembler; - - disassembler.reset(new DisassemblerWin32X64(buffer, length)); - if (disassembler->ParseHeader()) - return disassembler; - - disassembler.reset(new DisassemblerElf32X86(buffer, length)); - if (disassembler->ParseHeader()) - return disassembler; - - disassembler.reset(new DisassemblerElf32ARM(buffer, length)); - if (disassembler->ParseHeader()) - return disassembler; - + if (DisassemblerWin32X86::QuickDetect(buffer, length)) { + disassembler.reset(new DisassemblerWin32X86(buffer, length)); + if (disassembler->ParseHeader()) + return disassembler; + } + if (DisassemblerWin32X64::QuickDetect(buffer, length)) { + disassembler.reset(new DisassemblerWin32X64(buffer, length)); + if (disassembler->ParseHeader()) + return disassembler; + } + if (DisassemblerElf32X86::QuickDetect(buffer, length)) { + disassembler.reset(new DisassemblerElf32X86(buffer, length)); + if (disassembler->ParseHeader()) + return disassembler; + } + if (DisassemblerElf32ARM::QuickDetect(buffer, length)) { + disassembler.reset(new DisassemblerElf32ARM(buffer, length)); + if (disassembler->ParseHeader()) + return disassembler; + } return nullptr; } } // namespace -Status DetectExecutableType(const void* buffer, +Status DetectExecutableType(const uint8_t* buffer, size_t length, ExecutableType* type, size_t* detected_length) { @@ -62,7 +66,7 @@ return C_OK; } -Status ParseDetectedExecutable(const void* buffer, +Status ParseDetectedExecutable(const uint8_t* buffer, size_t length, std::unique_ptr<AssemblyProgram>* output) { output->reset();
diff --git a/courgette/program_detector.h b/courgette/program_detector.h index 06f1da3..62f4dc9 100644 --- a/courgette/program_detector.h +++ b/courgette/program_detector.h
@@ -6,6 +6,7 @@ #define COURGETTE_PROGRAM_DETECTOR_H_ #include <stddef.h> +#include <stdint.h> #include <memory> @@ -23,11 +24,21 @@ // On failure: // Fills in |type| with UNKNOWN, |detected_length| with 0, and returns // C_INPUT_NOT_RECOGNIZED. -Status DetectExecutableType(const void* buffer, +Status DetectExecutableType(const uint8_t* buffer, size_t length, ExecutableType* type, size_t* detected_length); +// Same as above, takes void* instead. +// TODO(etiennep): Propagate "const uint8_t*" upwards. +inline Status DetectExecutableType(const void* buffer, + size_t length, + ExecutableType* type, + size_t* detected_length) { + return DetectExecutableType(reinterpret_cast<const uint8_t*>(buffer), length, + type, detected_length); +} + // Attempts to detect the type of executable, and parse it with the appropriate // tools. // On success: @@ -35,10 +46,20 @@ // C_OK. // On failure: // Returns an error status and assigns |*output| to null. -Status ParseDetectedExecutable(const void* buffer, +Status ParseDetectedExecutable(const uint8_t* buffer, size_t length, std::unique_ptr<AssemblyProgram>* output); +// Same as above, takes void* instead. +// TODO(etiennep): Propagate "const uint8_t*" upwards. +inline Status ParseDetectedExecutable( + const void* buffer, + size_t length, + std::unique_ptr<AssemblyProgram>* output) { + return ParseDetectedExecutable(reinterpret_cast<const uint8_t*>(buffer), + length, output); +} + } // namespace courgette #endif // COURGETTE_PROGRAM_DETECTOR_H_
diff --git a/courgette/program_detector_unittest.cc b/courgette/program_detector_unittest.cc new file mode 100644 index 0000000..d78f72ec --- /dev/null +++ b/courgette/program_detector_unittest.cc
@@ -0,0 +1,80 @@ +// 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 "courgette/program_detector.h" + +#include <string> + +#include "courgette/base_test_unittest.h" +#include "courgette/courgette.h" +#include "courgette/disassembler.h" +#include "courgette/disassembler_elf_32_arm.h" +#include "courgette/disassembler_elf_32_x86.h" +#include "courgette/disassembler_win32_x64.h" +#include "courgette/disassembler_win32_x86.h" + +namespace courgette { + +namespace { + +class ProgramDetectorTest : public BaseTest { + public: + void TestQuickDetect(const std::string& test_data, + ExecutableType expected_type) const; + void TestDetectDisassembler(const std::string& test_data, + ExecutableType expected_type) const; +}; + +void ProgramDetectorTest::TestQuickDetect(const std::string& test_data, + ExecutableType expected_type) const { + // QuickDetect() should return true only for the |expected_type|. + EXPECT_EQ(expected_type == EXE_WIN_32_X86, + DisassemblerWin32X86::QuickDetect( + reinterpret_cast<const uint8_t*>(test_data.data()), + test_data.size())); + EXPECT_EQ(expected_type == EXE_WIN_32_X64, + DisassemblerWin32X64::QuickDetect( + reinterpret_cast<const uint8_t*>(test_data.data()), + test_data.size())); + EXPECT_EQ(expected_type == EXE_ELF_32_X86, + DisassemblerElf32X86::QuickDetect( + reinterpret_cast<const uint8_t*>(test_data.data()), + test_data.size())); + EXPECT_EQ(expected_type == EXE_ELF_32_ARM, + DisassemblerElf32ARM::QuickDetect( + reinterpret_cast<const uint8_t*>(test_data.data()), + test_data.size())); +} + +void ProgramDetectorTest::TestDetectDisassembler( + const std::string& test_data, + ExecutableType expected_type) const { + ExecutableType detected_type = EXE_UNKNOWN; + size_t detected_length = 0; + DetectExecutableType(test_data.data(), test_data.size(), &detected_type, + &detected_length); + EXPECT_EQ(expected_type, detected_type); + EXPECT_EQ(test_data.size(), detected_length); +} + +TEST_F(ProgramDetectorTest, All) { + std::string win32_x86 = FileContents("setup1.exe"); + std::string win32_x64 = FileContents("chrome64_1.exe"); + std::string elf_32 = FileContents("elf-32-1"); + std::string elf_arm = FileContents("elf-armv7"); + + TestQuickDetect(win32_x86, EXE_WIN_32_X86); + TestQuickDetect(win32_x64, EXE_WIN_32_X64); + TestQuickDetect(elf_32, EXE_ELF_32_X86); + TestQuickDetect(elf_arm, EXE_ELF_32_ARM); + + TestDetectDisassembler(win32_x86, EXE_WIN_32_X86); + TestDetectDisassembler(win32_x64, EXE_WIN_32_X64); + TestDetectDisassembler(elf_32, EXE_ELF_32_X86); + TestDetectDisassembler(elf_arm, EXE_ELF_32_ARM); +} + +} // namespace + +} // namespace courgette
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn index d680148..96c7589 100644 --- a/device/bluetooth/BUILD.gn +++ b/device/bluetooth/BUILD.gn
@@ -32,6 +32,8 @@ "bluetooth_adapter_android.h", "bluetooth_adapter_factory.cc", "bluetooth_adapter_factory.h", + "bluetooth_adapter_factory_wrapper.cc", + "bluetooth_adapter_factory_wrapper.h", "bluetooth_adapter_mac.h", "bluetooth_adapter_mac.mm", "bluetooth_adapter_win.cc",
diff --git a/device/bluetooth/bluetooth.gyp b/device/bluetooth/bluetooth.gyp index 144a5a3..8adbde2 100644 --- a/device/bluetooth/bluetooth.gyp +++ b/device/bluetooth/bluetooth.gyp
@@ -34,6 +34,8 @@ 'bluetooth_adapter_android.h', 'bluetooth_adapter_factory.cc', 'bluetooth_adapter_factory.h', + 'bluetooth_adapter_factory_wrapper.cc', + 'bluetooth_adapter_factory_wrapper.h', 'bluetooth_adapter_mac.h', 'bluetooth_adapter_mac.mm', 'bluetooth_adapter_win.cc',
diff --git a/device/bluetooth/bluetooth_adapter_factory_wrapper.cc b/device/bluetooth/bluetooth_adapter_factory_wrapper.cc new file mode 100644 index 0000000..5031896 --- /dev/null +++ b/device/bluetooth/bluetooth_adapter_factory_wrapper.cc
@@ -0,0 +1,148 @@ +// 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 "device/bluetooth/bluetooth_adapter_factory_wrapper.h" + +#include <stddef.h> + +#include <utility> + +#include "base/bind.h" +#include "base/location.h" +#include "base/threading/thread_task_runner_handle.h" +#include "device/bluetooth/bluetooth_adapter_factory.h" + +namespace { + +static base::LazyInstance<device::BluetoothAdapterFactoryWrapper>::Leaky + g_singleton = LAZY_INSTANCE_INITIALIZER; + +} // namespace + +namespace device { + +BluetoothAdapterFactoryWrapper::~BluetoothAdapterFactoryWrapper() { + DCHECK(thread_checker_.CalledOnValidThread()); + // All observers should have been removed already. + DCHECK(adapter_observers_.empty()); + // Clear adapter. + set_adapter(scoped_refptr<BluetoothAdapter>()); +} + +// static +BluetoothAdapterFactoryWrapper& BluetoothAdapterFactoryWrapper::Get() { + return g_singleton.Get(); +} + +bool BluetoothAdapterFactoryWrapper::IsBluetoothAdapterAvailable() { + DCHECK(thread_checker_.CalledOnValidThread()); + return BluetoothAdapterFactory::IsBluetoothAdapterAvailable(); +} + +void BluetoothAdapterFactoryWrapper::AcquireAdapter( + BluetoothAdapter::Observer* observer, + const AcquireAdapterCallback& callback) { + DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK(!GetAdapter(observer)); + + AddAdapterObserver(observer); + if (adapter_.get()) { + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(callback, base::Unretained(adapter_.get()))); + return; + } + + DCHECK(BluetoothAdapterFactory::IsBluetoothAdapterAvailable()); + BluetoothAdapterFactory::GetAdapter( + base::Bind(&BluetoothAdapterFactoryWrapper::OnGetAdapter, + weak_ptr_factory_.GetWeakPtr(), callback)); +} + +void BluetoothAdapterFactoryWrapper::ReleaseAdapter( + BluetoothAdapter::Observer* observer) { + DCHECK(thread_checker_.CalledOnValidThread()); + if (!HasAdapter(observer)) { + return; + } + RemoveAdapterObserver(observer); + if (adapter_observers_.empty()) + set_adapter(scoped_refptr<BluetoothAdapter>()); +} + +BluetoothAdapter* BluetoothAdapterFactoryWrapper::GetAdapter( + BluetoothAdapter::Observer* observer) { + DCHECK(thread_checker_.CalledOnValidThread()); + if (HasAdapter(observer)) { + return adapter_.get(); + } + return nullptr; +} + +void BluetoothAdapterFactoryWrapper::SetBluetoothAdapterForTesting( + scoped_refptr<BluetoothAdapter> mock_adapter) { + DCHECK(thread_checker_.CalledOnValidThread()); + set_adapter(std::move(mock_adapter)); +} + +BluetoothAdapterFactoryWrapper::BluetoothAdapterFactoryWrapper() + : weak_ptr_factory_(this) { + DCHECK(thread_checker_.CalledOnValidThread()); +} + +void BluetoothAdapterFactoryWrapper::OnGetAdapter( + const AcquireAdapterCallback& continuation, + scoped_refptr<BluetoothAdapter> adapter) { + DCHECK(thread_checker_.CalledOnValidThread()); + + set_adapter(adapter); + continuation.Run(adapter_.get()); +} + +bool BluetoothAdapterFactoryWrapper::HasAdapter( + BluetoothAdapter::Observer* observer) { + DCHECK(thread_checker_.CalledOnValidThread()); + + return ContainsKey(adapter_observers_, observer); +} + +void BluetoothAdapterFactoryWrapper::AddAdapterObserver( + BluetoothAdapter::Observer* observer) { + DCHECK(thread_checker_.CalledOnValidThread()); + + auto iter = adapter_observers_.insert(observer); + DCHECK(iter.second); + if (adapter_) { + adapter_->AddObserver(observer); + } +} + +void BluetoothAdapterFactoryWrapper::RemoveAdapterObserver( + BluetoothAdapter::Observer* observer) { + DCHECK(thread_checker_.CalledOnValidThread()); + + size_t removed = adapter_observers_.erase(observer); + DCHECK(removed); + if (adapter_) { + adapter_->RemoveObserver(observer); + } +} + +void BluetoothAdapterFactoryWrapper::set_adapter( + scoped_refptr<BluetoothAdapter> adapter) { + DCHECK(thread_checker_.CalledOnValidThread()); + + if (adapter_.get()) { + for (BluetoothAdapter::Observer* observer : adapter_observers_) { + adapter_->RemoveObserver(observer); + } + } + adapter_ = adapter; + if (adapter_.get()) { + for (BluetoothAdapter::Observer* observer : adapter_observers_) { + adapter_->AddObserver(observer); + } + } +} + +} // namespace device
diff --git a/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h b/device/bluetooth/bluetooth_adapter_factory_wrapper.h similarity index 61% rename from content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h rename to device/bluetooth/bluetooth_adapter_factory_wrapper.h index 233802c..cf6839f 100644 --- a/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h +++ b/device/bluetooth/bluetooth_adapter_factory_wrapper.h
@@ -2,19 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_WRAPPER_H_ -#define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_WRAPPER_H_ +#ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_WRAPPER_H_ +#define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_WRAPPER_H_ #include <unordered_set> +#include "base/lazy_instance.h" #include "base/macros.h" -#include "base/time/time.h" -#include "content/common/content_export.h" +#include "base/threading/thread_checker.h" #include "device/bluetooth/bluetooth_adapter.h" +#include "device/bluetooth/bluetooth_export.h" -namespace content { - -class WebBluetoothServiceImpl; +namespace device { // Wrapper around BluetoothAdapterFactory that allows us to change // the underlying BluetoothAdapter object and have the observers @@ -22,14 +21,14 @@ // TODO(ortuno): Once there is no need to swap the adapter to change its // behavior observers should add/remove themselves to/from the adapter. // http://crbug.com/603291 -class CONTENT_EXPORT BluetoothAdapterFactoryWrapper final { +class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterFactoryWrapper { public: - typedef base::Callback<void(device::BluetoothAdapter*)> - AcquireAdapterCallback; + typedef base::Callback<void(BluetoothAdapter*)> AcquireAdapterCallback; - BluetoothAdapterFactoryWrapper(); ~BluetoothAdapterFactoryWrapper(); + static BluetoothAdapterFactoryWrapper& Get(); + // Returns true if the platform supports Bluetooth or if // SetBluetoothAdapterForTesting has been called. bool IsBluetoothAdapterAvailable(); @@ -38,52 +37,50 @@ // acquired the adapter in the past it adds |observer| as an observer to that // adapter, otherwise it gets a new adapter and adds |observer| to it. Runs // |callback| with the adapter |observer| has been added to. - void AcquireAdapter(device::BluetoothAdapter::Observer* observer, + void AcquireAdapter(BluetoothAdapter::Observer* observer, const AcquireAdapterCallback& callback); // Removes |observer| from the list of adapter observers if |observer| // has acquired the adapter in the past. If there are no more observers // it deletes the reference to the adapter. - void ReleaseAdapter(device::BluetoothAdapter::Observer* observer); + void ReleaseAdapter(BluetoothAdapter::Observer* observer); // Returns an adapter if |observer| has acquired an adapter in the past and // this instance holds a reference to an adapter. Otherwise returns nullptr. - device::BluetoothAdapter* GetAdapter( - device::BluetoothAdapter::Observer* observer); - - // The period of time a device discovery session should be active for. - // Returns 0 if SetBluetoothAdapterForTesting has been called. - base::TimeDelta GetScanDuration() { return scan_duration_; } + BluetoothAdapter* GetAdapter(BluetoothAdapter::Observer* observer); // Sets a new BluetoothAdapter to be returned by GetAdapter. When setting // a new adapter all observers from the old adapter are removed and added // to |mock_adapter|. void SetBluetoothAdapterForTesting( - scoped_refptr<device::BluetoothAdapter> mock_adapter); + scoped_refptr<BluetoothAdapter> mock_adapter); private: - void OnGetAdapter(const AcquireAdapterCallback& continuation, - scoped_refptr<device::BluetoothAdapter> adapter); + // friend LazyInstance to permit access to private constructor. + friend base::DefaultLazyInstanceTraits<BluetoothAdapterFactoryWrapper>; - bool HasAdapter(device::BluetoothAdapter::Observer* observer); - void AddAdapterObserver(device::BluetoothAdapter::Observer* observer); - void RemoveAdapterObserver(device::BluetoothAdapter::Observer* observer); + BluetoothAdapterFactoryWrapper(); + + void OnGetAdapter(const AcquireAdapterCallback& continuation, + scoped_refptr<BluetoothAdapter> adapter); + + bool HasAdapter(BluetoothAdapter::Observer* observer); + void AddAdapterObserver(BluetoothAdapter::Observer* observer); + void RemoveAdapterObserver(BluetoothAdapter::Observer* observer); // Sets |adapter_| to a BluetoothAdapter instance and register observers, // releasing references to previous |adapter_|. - void set_adapter(scoped_refptr<device::BluetoothAdapter> adapter); + void set_adapter(scoped_refptr<BluetoothAdapter> adapter); // A BluetoothAdapter instance representing an adapter of the system. - scoped_refptr<device::BluetoothAdapter> adapter_; + scoped_refptr<BluetoothAdapter> adapter_; // We keep a list of all observers so that when the adapter gets swapped, // we can remove all observers from the old adapter and add them to the // new adapter. - std::unordered_set<device::BluetoothAdapter::Observer*> adapter_observers_; + std::unordered_set<BluetoothAdapter::Observer*> adapter_observers_; - // This is 0 if SetBluetoothAdapterForTesting has been called. - base::TimeDelta scan_duration_; - - bool testing_; + // Should only be called on the UI thread. + base::ThreadChecker thread_checker_; // Weak pointer factory for generating 'this' pointers that might live longer // than we do. @@ -94,6 +91,6 @@ DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterFactoryWrapper); }; -} // namespace content +} // namespace device -#endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_WRAPPER_H_ +#endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_WRAPPER_H_
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc index fdaefe32..5dd4441 100644 --- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -583,6 +583,7 @@ if (property_name == properties->services_resolved.name() && properties->services_resolved.value()) { + device_bluez->UpdateGattServices(object_path); NotifyGattServicesDiscovered(device_bluez); }
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.cc b/device/bluetooth/bluez/bluetooth_device_bluez.cc index affe9ab..3cb677c 100644 --- a/device/bluetooth/bluez/bluetooth_device_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -156,9 +156,15 @@ weak_ptr_factory_(this) { bluez::BluezDBusManager::Get()->GetBluetoothGattServiceClient()->AddObserver( this); - bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->AddObserver(this); - InitializeGattServiceMap(); + // If GATT Services have already been discovered update the list of Gatt + // Services. + if (IsGattServicesDiscoveryComplete()) { + UpdateGattServices(object_path_); + } else { + VLOG(2) << "Gatt services have not been fully resolved for device " + << object_path_.value(); + } } BluetoothDeviceBlueZ::~BluetoothDeviceBlueZ() { @@ -166,8 +172,6 @@ ->GetBluetoothGattServiceClient() ->RemoveObserver(this); - bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->RemoveObserver( - this); // Copy the GATT services list here and clear the original so that when we // send GattServiceRemoved(), GetGattServices() returns no services. GattServiceMap gatt_services_swapped; @@ -581,30 +585,6 @@ return static_cast<BluetoothAdapterBlueZ*>(adapter_); } -void BluetoothDeviceBlueZ::DevicePropertyChanged( - const dbus::ObjectPath& object_path, - const std::string& property_name) { - if (object_path != object_path_) - return; - - bluez::BluetoothDeviceClient::Properties* properties = - bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( - object_path); - DCHECK(properties); - - if (property_name == properties->services_resolved.name() && - properties->services_resolved.value()) { - VLOG(3) << "All services were discovered for device: " - << object_path.value(); - - for (const auto iter : newly_discovered_gatt_services_) { - adapter()->NotifyGattDiscoveryComplete( - static_cast<BluetoothRemoteGattService*>(iter)); - } - newly_discovered_gatt_services_.clear(); - } -} - void BluetoothDeviceBlueZ::GattServiceAdded( const dbus::ObjectPath& object_path) { if (GetGattService(object_path.value())) { @@ -627,9 +607,6 @@ BluetoothRemoteGattServiceBlueZ* service = new BluetoothRemoteGattServiceBlueZ(adapter(), this, object_path); - newly_discovered_gatt_services_.push_back( - static_cast<BluetoothRemoteGattServiceBlueZ*>(service)); - gatt_services_.set(service->GetIdentifier(), std::unique_ptr<BluetoothRemoteGattService>(service)); DCHECK(service->object_path() == object_path); @@ -660,34 +637,43 @@ gatt_services_.take_and_erase(iter->first); DCHECK(adapter()); + discovery_complete_notified_.erase(service); adapter()->NotifyGattServiceRemoved(service); } -void BluetoothDeviceBlueZ::InitializeGattServiceMap() { - DCHECK(gatt_services_.empty()); - - if (!IsGattServicesDiscoveryComplete()) { - VLOG(2) << "Gatt services have not been fully resolved for device " - << object_path_.value(); +void BluetoothDeviceBlueZ::UpdateGattServices( + const dbus::ObjectPath& object_path) { + if (object_path != object_path_) { + // No need to update map if update is for a different device. return; } - VLOG(3) << "Initializing the list of GATT services associated with device " + DCHECK(IsGattServicesDiscoveryComplete()); + + VLOG(3) << "Updating the list of GATT services associated with device " << object_path_.value(); - // Add all known GATT services associated with the device. - const std::vector<dbus::ObjectPath> gatt_services = + const std::vector<dbus::ObjectPath> service_paths = bluez::BluezDBusManager::Get() ->GetBluetoothGattServiceClient() ->GetServices(); - for (const auto& it : gatt_services) - GattServiceAdded(it); + for (const auto& service_path : service_paths) { + // Add all previously unknown GATT services associated with the device. + GattServiceAdded(service_path); - // Notify on the discovery complete for each service which is found in the - // first discovery. - DCHECK(adapter()); - for (const auto& iter : gatt_services_) - adapter()->NotifyGattDiscoveryComplete(iter.second); + // If the service does not belong in this device, there is nothing left to + // do. + BluetoothRemoteGattService* service = GetGattService(service_path.value()); + if (service == nullptr) { + return; + } + + // Notify of GATT discovery complete if we haven't before. + auto notified_pair = discovery_complete_notified_.insert(service); + if (notified_pair.second) { + adapter()->NotifyGattDiscoveryComplete(service); + } + } } void BluetoothDeviceBlueZ::OnGetConnInfo(const ConnectionInfoCallback& callback,
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.h b/device/bluetooth/bluez/bluetooth_device_bluez.h index 41d67aa..d6e39628 100644 --- a/device/bluetooth/bluez/bluetooth_device_bluez.h +++ b/device/bluetooth/bluez/bluetooth_device_bluez.h
@@ -19,7 +19,6 @@ #include "device/bluetooth/bluetooth_device.h" #include "device/bluetooth/bluetooth_export.h" #include "device/bluetooth/bluez/bluetooth_service_record_bluez.h" -#include "device/bluetooth/dbus/bluetooth_device_client.h" #include "device/bluetooth/dbus/bluetooth_gatt_service_client.h" namespace device { @@ -40,7 +39,6 @@ // thread. class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ : public device::BluetoothDevice, - public bluez::BluetoothDeviceClient::Observer, public bluez::BluetoothGattServiceClient::Observer { public: using GetServiceRecordsCallback = @@ -139,18 +137,15 @@ scoped_refptr<device::BluetoothSocketThread> socket_thread); ~BluetoothDeviceBlueZ() override; - // bluez::BluetoothDeviceClient::Observer overrides - void DevicePropertyChanged(const dbus::ObjectPath& object_path, - const std::string& property_name) override; - // bluez::BluetoothGattServiceClient::Observer overrides void GattServiceAdded(const dbus::ObjectPath& object_path) override; void GattServiceRemoved(const dbus::ObjectPath& object_path) override; - // Called by the constructor to initialize the map of GATT services associated - // with this device and to invoke NotifyGattDiscoveryComplete() with each - // cached service. - void InitializeGattServiceMap(); + // Called once all services have been discovered. Invokes + // NotifyGattDiscoveryComplete() for services for which we haven't notified + // before e.g. if a services is exposed during construction but services + // haven't been resolved yet.. + void UpdateGattServices(const dbus::ObjectPath& object_path); // Called by dbus:: on completion of the D-Bus method call to get the // connection attributes of the current connection to the device. @@ -232,16 +227,15 @@ // RSSI and TX power. bool connection_monitor_started_; + // Keeps track of all services for which we've called + // NotifyGattDiscoveryComplete(). + std::unordered_set<device::BluetoothRemoteGattService*> + discovery_complete_notified_; + // UI thread task runner and socket thread object used to create sockets. scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; scoped_refptr<device::BluetoothSocketThread> socket_thread_; - // This vector temporarily caches the newly added services for later - // notification of discovery complete. Once DevicePropertyChange is invoked - // with a toggle of ServicesResolved property, the - // NotifyGattDiscoveryComplete() will be called with each service once. - std::vector<device::BluetoothRemoteGattService*> - newly_discovered_gatt_services_; // During pairing this is set to an object that we don't own, but on which // we can make method calls to request, display or confirm PIN Codes and
diff --git a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc index c5fa376..d385016 100644 --- a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc +++ b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
@@ -129,6 +129,74 @@ ASSERT_TRUE(adapter_->IsPresent()); } + void BatteryServiceShouldBeComplete(BluetoothDevice* device) { + ASSERT_TRUE(device); + ASSERT_GE(device->GetGattServices().size(), 1u); + + BluetoothRemoteGattService* service = device->GetGattService( + fake_bluetooth_gatt_service_client_->GetBatteryServicePath().value()); + + ASSERT_TRUE(service); + EXPECT_TRUE(service->IsPrimary()); + EXPECT_EQ(BluetoothUUID( + bluez::FakeBluetoothGattServiceClient::kBatteryServiceUUID), + service->GetUUID()); + EXPECT_EQ(service, device->GetGattService(service->GetIdentifier())); + } + + void HeartRateServiceShouldBeComplete(BluetoothDevice* device) { + ASSERT_TRUE(device); + ASSERT_GE(device->GetGattServices().size(), 1u); + + BluetoothRemoteGattService* service = device->GetGattService( + fake_bluetooth_gatt_service_client_->GetHeartRateServicePath().value()); + + ASSERT_TRUE(service); + EXPECT_TRUE(service->IsPrimary()); + EXPECT_EQ(BluetoothUUID( + bluez::FakeBluetoothGattServiceClient::kHeartRateServiceUUID), + service->GetUUID()); + EXPECT_EQ(service, device->GetGattService(service->GetIdentifier())); + EXPECT_EQ(3U, service->GetCharacteristics().size()); + + BluetoothRemoteGattCharacteristic* characteristic = + service->GetCharacteristic(fake_bluetooth_gatt_characteristic_client_ + ->GetBodySensorLocationPath() + .value()); + ASSERT_TRUE(characteristic); + EXPECT_EQ(BluetoothUUID(bluez::FakeBluetoothGattCharacteristicClient:: + kBodySensorLocationUUID), + characteristic->GetUUID()); + EXPECT_TRUE(characteristic->GetDescriptors().empty()); + + characteristic = + service->GetCharacteristic(fake_bluetooth_gatt_characteristic_client_ + ->GetHeartRateControlPointPath() + .value()); + ASSERT_TRUE(characteristic); + EXPECT_EQ(BluetoothUUID(bluez::FakeBluetoothGattCharacteristicClient:: + kHeartRateControlPointUUID), + characteristic->GetUUID()); + EXPECT_TRUE(characteristic->GetDescriptors().empty()); + + characteristic = + service->GetCharacteristic(fake_bluetooth_gatt_characteristic_client_ + ->GetHeartRateMeasurementPath() + .value()); + ASSERT_TRUE(characteristic); + EXPECT_EQ(BluetoothUUID(bluez::FakeBluetoothGattCharacteristicClient:: + kHeartRateMeasurementUUID), + characteristic->GetUUID()); + + ASSERT_EQ(1u, characteristic->GetDescriptors().size()); + + BluetoothRemoteGattDescriptor* descriptor = + characteristic->GetDescriptors()[0]; + EXPECT_EQ( + BluetoothRemoteGattDescriptor::ClientCharacteristicConfigurationUuid(), + descriptor->GetUUID()); + } + void AdapterCallback(scoped_refptr<BluetoothAdapter> adapter) { adapter_ = adapter; if (base::MessageLoop::current() && @@ -366,63 +434,40 @@ bluez::FakeBluetoothDeviceClient::kLowEnergyAddress)); } -TEST_F(BluetoothGattBlueZTest, DiscoveryCompleteForCachedGattService) { - // This tests if the notifications on service discovered complete are invoked - // with the cached services and added to the GATT service map of |device|. - TestBluetoothAdapterObserver observer(adapter_); +TEST_F(BluetoothGattBlueZTest, ServicesDiscoveredBeforeAdapterIsCreated) { + // Tests that all GATT objects are created for a device whose D-Bus objects + // were already exposed and for which services have been resolved. + adapter_ = NULL; + ASSERT_FALSE(device::BluetoothAdapterFactory::HasSharedInstanceForTesting()); - // Create the device and pre-expose the fake Heart Rate service. This will - // synchronously expose characteristics. - fake_bluetooth_device_client_->CreateDevice( - dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath), - dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kCachedLowEnergyPath)); - BluetoothDevice* device = - adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress); - ASSERT_TRUE(device); - - device::BluetoothRemoteGattService* service = device->GetGattServices()[0]; - EXPECT_EQ(1u, device->GetGattServices().size()); - EXPECT_EQ(1, observer.gatt_discovery_complete_count()); - EXPECT_EQ(device, service->GetDevice()); - EXPECT_EQ(service, device->GetGattService(service->GetIdentifier())); - EXPECT_EQ(3U, service->GetCharacteristics().size()); -} - -TEST_F(BluetoothGattBlueZTest, DiscoveryCompleteForNewGattService) { - TestBluetoothAdapterObserver observer(adapter_); - - // This tests the discovery complete notification on a newly-added GATT - // service. + // Create the fake D-Bus objects. fake_bluetooth_device_client_->CreateDevice( dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath), dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); - BluetoothDevice* device = - adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress); - ASSERT_TRUE(device); + bluez::FakeBluetoothDeviceClient::Properties* properties = + fake_bluetooth_device_client_->GetProperties( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); - EXPECT_EQ(0u, device->GetGattServices().size()); - EXPECT_EQ(0, observer.gatt_discovery_complete_count()); - - // Expose the fake Heart Rate service. This will asynchronously expose - // characteristics. fake_bluetooth_gatt_service_client_->ExposeHeartRateService( dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + while (!fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()) + base::RunLoop().RunUntilIdle(); + ASSERT_TRUE(fake_bluetooth_gatt_service_client_->IsHeartRateVisible()); + ASSERT_TRUE(fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()); - // Run the message loop so that the characteristics/descriptors appear. - base::MessageLoop::current()->Run(); + properties->services_resolved.ReplaceValue(true); - // The discovery completed event of a newly-added GATT service should not be - // fired until ServicesResolved property becomes true. And the new service - // will be added immediately to the GATT service map of |device|. - BluetoothRemoteGattService* service = device->GetGattServices()[0]; - EXPECT_EQ(1u, device->GetGattServices().size()); - EXPECT_EQ(1, observer.gatt_discovery_complete_count()); - EXPECT_EQ(device, service->GetDevice()); - EXPECT_EQ(service, device->GetGattService(service->GetIdentifier())); - EXPECT_EQ(3U, service->GetCharacteristics().size()); + // Create the adapter. This should create all the GATT objects. + GetAdapter(); + + BluetoothDevice* device = + adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress); + + EXPECT_TRUE(device->IsGattServicesDiscoveryComplete()); + HeartRateServiceShouldBeComplete(device); } -TEST_F(BluetoothGattBlueZTest, ServicesDiscovered) { +TEST_F(BluetoothGattBlueZTest, ServicesDiscoveredAfterAdapterIsCreated) { // Create a fake LE device. We store the device pointer here because this is a // test. It's unsafe to do this in production as the device might get deleted. fake_bluetooth_device_client_->CreateDevice( @@ -443,6 +488,8 @@ dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); // Run the message loop so that the characteristics/descriptors appear. base::MessageLoop::current()->Run(); + properties->services_resolved.ReplaceValue(true); + EXPECT_TRUE(device->IsGattServicesDiscoveryComplete()); EXPECT_EQ(1u, device->GetGattServices().size()); EXPECT_EQ(device, observer.last_device()); @@ -476,10 +523,160 @@ dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); // Run the message loop so that the characteristics/descriptors appear. base::MessageLoop::current()->Run(); + properties->services_resolved.ReplaceValue(true); + EXPECT_TRUE(device->IsGattServicesDiscoveryComplete()); EXPECT_EQ(1u, device->GetGattServices().size()); } +TEST_F(BluetoothGattBlueZTest, DiscoverCachedServices) { + // This unit test tests that all remote GATT objects are created for D-Bus + // objects that were already exposed and all relevant events have been + // dispatched. + adapter_ = NULL; + ASSERT_FALSE(device::BluetoothAdapterFactory::HasSharedInstanceForTesting()); + + // Create the fake D-Bus objects. + fake_bluetooth_device_client_->CreateDevice( + dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath), + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + bluez::FakeBluetoothDeviceClient::Properties* properties = + fake_bluetooth_device_client_->GetProperties( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + properties->services_resolved.ReplaceValue(false); + + fake_bluetooth_gatt_service_client_->ExposeHeartRateService( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + while (!fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()) + base::RunLoop().RunUntilIdle(); + ASSERT_TRUE(fake_bluetooth_gatt_service_client_->IsHeartRateVisible()); + ASSERT_TRUE(fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()); + + // Create the adapter. This should create all the GATT objects. + GetAdapter(); + TestBluetoothAdapterObserver observer(adapter_); + + // The device should exist but contain no cached services while the services + // haven't been resolved. + BluetoothDevice* device = + adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress); + + EXPECT_TRUE(device->GetGattServices().empty()); + + EXPECT_EQ(0, observer.gatt_services_discovered_count()); + EXPECT_EQ(0, observer.gatt_service_added_count()); + EXPECT_EQ(0, observer.gatt_discovery_complete_count()); + EXPECT_EQ(0, observer.gatt_characteristic_added_count()); + EXPECT_EQ(0, observer.gatt_descriptor_added_count()); + + properties->services_resolved.ReplaceValue(true); + + EXPECT_EQ(1, observer.gatt_services_discovered_count()); + EXPECT_EQ(1, observer.gatt_service_added_count()); + EXPECT_EQ(1, observer.gatt_discovery_complete_count()); + EXPECT_EQ(3, observer.gatt_characteristic_added_count()); + EXPECT_EQ(1, observer.gatt_descriptor_added_count()); + + HeartRateServiceShouldBeComplete(device); +} + +TEST_F(BluetoothGattBlueZTest, DiscoverNewServices) { + // This unit test tests that all remote GATT Objects are created for D-Bus + // objects that are newly exposed. + TestBluetoothAdapterObserver observer(adapter_); + + // Create the fake D-Bus objects. + fake_bluetooth_device_client_->CreateDevice( + dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath), + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + bluez::FakeBluetoothDeviceClient::Properties* properties = + fake_bluetooth_device_client_->GetProperties( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + + properties->services_resolved.ReplaceValue(false); + fake_bluetooth_gatt_service_client_->ExposeHeartRateService( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + while (!fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()) + base::RunLoop().RunUntilIdle(); + ASSERT_TRUE(fake_bluetooth_gatt_service_client_->IsHeartRateVisible()); + ASSERT_TRUE(fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()); + + // The device should exist and contain new services even though the services + // haven't been resolved. + BluetoothDevice* device = + adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress); + EXPECT_EQ(1u, device->GetGattServices().size()); + HeartRateServiceShouldBeComplete(device); + + EXPECT_EQ(0, observer.gatt_services_discovered_count()); + EXPECT_EQ(0, observer.gatt_discovery_complete_count()); + // The rest of the events are tested in the corresponding + // {GATTObject}AddedAndRemoved tests. + + properties->services_resolved.ReplaceValue(true); + + EXPECT_EQ(1, observer.gatt_services_discovered_count()); + EXPECT_EQ(1, observer.gatt_discovery_complete_count()); +} + +TEST_F(BluetoothGattBlueZTest, DiscoverCachedAndNewServices) { + // This unit test tests that all remote GATT objects are created for D-Bus + // objects that were already exposed and for new GATT Objects. + adapter_ = NULL; + ASSERT_FALSE(device::BluetoothAdapterFactory::HasSharedInstanceForTesting()); + + // Create the fake D-Bus objects. + fake_bluetooth_device_client_->CreateDevice( + dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath), + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + bluez::FakeBluetoothDeviceClient::Properties* properties = + fake_bluetooth_device_client_->GetProperties( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + properties->services_resolved.ReplaceValue(false); + + fake_bluetooth_gatt_service_client_->ExposeHeartRateService( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + while (!fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()) + base::RunLoop().RunUntilIdle(); + ASSERT_TRUE(fake_bluetooth_gatt_service_client_->IsHeartRateVisible()); + ASSERT_TRUE(fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()); + + // Create the adapter. This should create all the GATT objects. + GetAdapter(); + TestBluetoothAdapterObserver observer(adapter_); + + // The device should exist but contain no cached services while the services + // haven't been resolved. + BluetoothDevice* device = + adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress); + + EXPECT_EQ(0, observer.gatt_services_discovered_count()); + EXPECT_EQ(0, observer.gatt_discovery_complete_count()); + EXPECT_TRUE(device->GetGattServices().empty()); + + fake_bluetooth_gatt_service_client_->ExposeBatteryService( + dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); + ASSERT_TRUE(fake_bluetooth_gatt_service_client_->IsBatteryServiceVisible()); + + EXPECT_EQ(0, observer.gatt_services_discovered_count()); + EXPECT_EQ(0, observer.gatt_discovery_complete_count()); + EXPECT_EQ(1u, device->GetGattServices().size()); + + // A newly added service should be complete even if services haven't been + // resolved. + BatteryServiceShouldBeComplete(device); + + properties->services_resolved.ReplaceValue(true); + + EXPECT_EQ(1, observer.gatt_services_discovered_count()); + EXPECT_EQ(2, observer.gatt_discovery_complete_count()); + EXPECT_EQ(2u, device->GetGattServices().size()); + + // Now that services have been resolved both services should be present. + HeartRateServiceShouldBeComplete(device); + BatteryServiceShouldBeComplete(device); +} + TEST_F(BluetoothGattBlueZTest, GattCharacteristicAddedAndRemoved) { fake_bluetooth_device_client_->CreateDevice( dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath), @@ -638,76 +835,6 @@ EXPECT_EQ(descriptor->GetIdentifier(), observer.last_gatt_descriptor_id()); } -TEST_F(BluetoothGattBlueZTest, AdapterAddedAfterGattService) { - // This unit test tests that all remote GATT objects are created for D-Bus - // objects that were already exposed. - adapter_ = NULL; - ASSERT_FALSE(device::BluetoothAdapterFactory::HasSharedInstanceForTesting()); - - // Create the fake D-Bus objects. - fake_bluetooth_device_client_->CreateDevice( - dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath), - dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); - fake_bluetooth_gatt_service_client_->ExposeHeartRateService( - dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath)); - while (!fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()) - base::RunLoop().RunUntilIdle(); - ASSERT_TRUE(fake_bluetooth_gatt_service_client_->IsHeartRateVisible()); - ASSERT_TRUE(fake_bluetooth_gatt_characteristic_client_->IsHeartRateVisible()); - - // Create the adapter. This should create all the GATT objects. - GetAdapter(); - BluetoothDevice* device = - adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress); - ASSERT_TRUE(device); - EXPECT_EQ(1U, device->GetGattServices().size()); - - BluetoothRemoteGattService* service = device->GetGattServices()[0]; - ASSERT_TRUE(service); - EXPECT_TRUE(service->IsPrimary()); - EXPECT_EQ(BluetoothUUID( - bluez::FakeBluetoothGattServiceClient::kHeartRateServiceUUID), - service->GetUUID()); - EXPECT_EQ(service, device->GetGattServices()[0]); - EXPECT_EQ(service, device->GetGattService(service->GetIdentifier())); - EXPECT_EQ(3U, service->GetCharacteristics().size()); - - BluetoothRemoteGattCharacteristic* characteristic = - service->GetCharacteristic(fake_bluetooth_gatt_characteristic_client_ - ->GetBodySensorLocationPath() - .value()); - ASSERT_TRUE(characteristic); - EXPECT_EQ(BluetoothUUID(bluez::FakeBluetoothGattCharacteristicClient:: - kBodySensorLocationUUID), - characteristic->GetUUID()); - EXPECT_TRUE(characteristic->GetDescriptors().empty()); - - characteristic = service->GetCharacteristic( - fake_bluetooth_gatt_characteristic_client_->GetHeartRateControlPointPath() - .value()); - ASSERT_TRUE(characteristic); - EXPECT_EQ(BluetoothUUID(bluez::FakeBluetoothGattCharacteristicClient:: - kHeartRateControlPointUUID), - characteristic->GetUUID()); - EXPECT_TRUE(characteristic->GetDescriptors().empty()); - - characteristic = service->GetCharacteristic( - fake_bluetooth_gatt_characteristic_client_->GetHeartRateMeasurementPath() - .value()); - ASSERT_TRUE(characteristic); - EXPECT_EQ(BluetoothUUID(bluez::FakeBluetoothGattCharacteristicClient:: - kHeartRateMeasurementUUID), - characteristic->GetUUID()); - EXPECT_EQ(1U, characteristic->GetDescriptors().size()); - - BluetoothRemoteGattDescriptor* descriptor = - characteristic->GetDescriptors()[0]; - ASSERT_TRUE(descriptor); - EXPECT_EQ( - BluetoothRemoteGattDescriptor::ClientCharacteristicConfigurationUuid(), - descriptor->GetUUID()); -} - TEST_F(BluetoothGattBlueZTest, GattCharacteristicValue) { fake_bluetooth_device_client_->CreateDevice( dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath),
diff --git a/device/bluetooth/bluez/bluetooth_socket_bluez.cc b/device/bluetooth/bluez/bluetooth_socket_bluez.cc index a09e4f7..607fdff 100644 --- a/device/bluetooth/bluez/bluetooth_socket_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_socket_bluez.cc
@@ -399,7 +399,7 @@ VLOG(1) << profile_->object_path().value() << ": Cancel"; - if (!connection_request_queue_.size()) + if (connection_request_queue_.empty()) return; // If the front request is being accepted mark it as cancelled, otherwise
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.cc b/device/bluetooth/dbus/fake_bluetooth_device_client.cc index 2dcc3a3..278e79b7 100644 --- a/device/bluetooth/dbus/fake_bluetooth_device_client.cc +++ b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
@@ -253,15 +253,6 @@ const uint32_t FakeBluetoothDeviceClient::kConnectedTrustedNotPairedDeviceClass = 0x7a020c; -const char FakeBluetoothDeviceClient::kCachedLowEnergyPath[] = - "/fake/hci0/devF"; -const char FakeBluetoothDeviceClient::kCachedLowEnergyAddress[] = - "02:A5:11:0D:15:40"; -const char FakeBluetoothDeviceClient::kCachedLowEnergyName[] = - "Bluetooth 4.0 Heart Rate Monitor"; -const uint32_t FakeBluetoothDeviceClient::kCachedLowEnergyClass = - 0x000918; // Major class "Health", Minor class "Heart/Pulse Rate Monitor." - FakeBluetoothDeviceClient::Properties::Properties( const PropertyChangedCallback& callback) : BluetoothDeviceClient::Properties( @@ -435,6 +426,7 @@ static_cast<FakeBluetoothGattServiceClient*>( bluez::BluezDBusManager::Get()->GetBluetoothGattServiceClient()); gatt_service_client->ExposeHeartRateService(object_path); + properties->services_resolved.ReplaceValue(true); } AddInputDeviceIfNeeded(object_path, properties); @@ -743,6 +735,7 @@ properties->bluetooth_class.ReplaceValue(kLowEnergyClass); properties->name.ReplaceValue("Heart Rate Monitor"); properties->alias.ReplaceValue(kLowEnergyName); + properties->services_resolved.ReplaceValue(false); std::vector<std::string> uuids; uuids.push_back(FakeBluetoothGattServiceClient::kHeartRateServiceUUID); @@ -757,17 +750,6 @@ properties->paired.ReplaceValue(false); properties->name.ReplaceValue("Connected Pairable Device"); properties->alias.ReplaceValue(kConnectedTrustedNotPairedDeviceName); - } else if (device_path == dbus::ObjectPath(kCachedLowEnergyPath)) { - properties->address.ReplaceValue(kLowEnergyAddress); - properties->bluetooth_class.ReplaceValue(kLowEnergyClass); - properties->name.ReplaceValue("Heart Rate Monitor"); - properties->alias.ReplaceValue(kLowEnergyName); - properties->alias.ReplaceValue(kLowEnergyName); - properties->services_resolved.ReplaceValue(false); - - std::vector<std::string> uuids; - uuids.push_back(FakeBluetoothGattServiceClient::kHeartRateServiceUUID); - properties->uuids.ReplaceValue(uuids); } else { NOTREACHED(); } @@ -775,14 +757,6 @@ properties_map_.insert(std::make_pair(device_path, std::move(properties))); device_list_.push_back(device_path); - // After the new properties| is added to the map, expose the heart rate - // service to emulate the device with cached GATT services. - if (device_path == dbus::ObjectPath(kCachedLowEnergyPath)) { - static_cast<FakeBluetoothGattServiceClient*>( - bluez::BluezDBusManager::Get()->GetBluetoothGattServiceClient()) - ->ExposeHeartRateServiceWithoutDelay(device_path); - } - FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_, DeviceAdded(device_path)); }
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.h b/device/bluetooth/dbus/fake_bluetooth_device_client.h index 64a995be..282e87c 100644 --- a/device/bluetooth/dbus/fake_bluetooth_device_client.h +++ b/device/bluetooth/dbus/fake_bluetooth_device_client.h
@@ -253,11 +253,6 @@ static const char kConnectedTrustedNotPairedDeviceName[]; static const uint32_t kConnectedTrustedNotPairedDeviceClass; - static const char kCachedLowEnergyPath[]; - static const char kCachedLowEnergyAddress[]; - static const char kCachedLowEnergyName[]; - static const uint32_t kCachedLowEnergyClass; - private: // Property callback passed when we create Properties* structures. void OnPropertyChanged(const dbus::ObjectPath& object_path,
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc index 88922dc5..b32befc 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc
@@ -115,7 +115,7 @@ uint8_t value_byte = chrc_props->notifying.value() ? 0x01 : 0x00; const std::vector<uint8_t>& cur_value = properties->value.value(); - if (!cur_value.size() || cur_value[0] != value_byte) { + if (cur_value.empty() || cur_value[0] != value_byte) { std::vector<uint8_t> value = {value_byte, 0x00}; properties->value.ReplaceValue(value); }
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc index 12daa95..3c5591d 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc
@@ -19,8 +19,12 @@ // static const char FakeBluetoothGattServiceClient::kHeartRateServicePathComponent[] = "service0000"; +const char FakeBluetoothGattServiceClient::kBatteryServicePathComponent[] = + "service0001"; const char FakeBluetoothGattServiceClient::kHeartRateServiceUUID[] = "0000180d-0000-1000-8000-00805f9b34fb"; +const char FakeBluetoothGattServiceClient::kBatteryServiceUUID[] = + "0000180f-0000-1000-8000-00805f9b34fb"; FakeBluetoothGattServiceClient::Properties::Properties( const PropertyChangedCallback& callback) @@ -70,6 +74,10 @@ DCHECK(!heart_rate_service_path_.empty()); paths.push_back(dbus::ObjectPath(heart_rate_service_path_)); } + if (battery_service_properties_.get()) { + DCHECK(!battery_service_path_.empty()); + paths.push_back(dbus::ObjectPath(battery_service_path_)); + } return paths; } @@ -78,6 +86,8 @@ const dbus::ObjectPath& object_path) { if (object_path.value() == heart_rate_service_path_) return heart_rate_service_properties_.get(); + if (object_path.value() == battery_service_path_) + return battery_service_properties_.get(); return NULL; } @@ -98,19 +108,13 @@ heart_rate_service_properties_->device.ReplaceValue(device_path); heart_rate_service_properties_->primary.ReplaceValue(true); - NotifyServiceAdded(dbus::ObjectPath(heart_rate_service_path_)); + NotifyServiceAdded(GetHeartRateServicePath()); base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::Bind( &FakeBluetoothGattServiceClient::ExposeHeartRateCharacteristics, weak_ptr_factory_.GetWeakPtr())); - - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, - base::Bind( - &FakeBluetoothGattServiceClient::ToggleServicesResolvedProperty, - weak_ptr_factory_.GetWeakPtr(), device_path, true)); } void FakeBluetoothGattServiceClient::HideHeartRateService() { @@ -134,42 +138,44 @@ heart_rate_service_path_.clear(); } -void FakeBluetoothGattServiceClient::ExposeHeartRateServiceWithoutDelay( +void FakeBluetoothGattServiceClient::ExposeBatteryService( const dbus::ObjectPath& device_path) { - if (IsHeartRateVisible()) { - DCHECK(!heart_rate_service_path_.empty()); - VLOG(1) << "Fake Heart Rate Service already exposed."; + if (IsBatteryServiceVisible()) { + DCHECK(!battery_service_path_.empty()); + VLOG(1) << "Fake Battery Service already exposed."; return; } - VLOG(2) << "Exposing fake Heart Rate Service."; - heart_rate_service_path_ = - device_path.value() + "/" + kHeartRateServicePathComponent; - heart_rate_service_properties_.reset(new Properties(base::Bind( + + VLOG(2) << "Exposing fake Battery Service."; + battery_service_path_ = + device_path.value() + "/" + kBatteryServicePathComponent; + battery_service_properties_.reset(new Properties(base::Bind( &FakeBluetoothGattServiceClient::OnPropertyChanged, - base::Unretained(this), dbus::ObjectPath(heart_rate_service_path_)))); - heart_rate_service_properties_->uuid.ReplaceValue(kHeartRateServiceUUID); - heart_rate_service_properties_->device.ReplaceValue(device_path); - heart_rate_service_properties_->primary.ReplaceValue(true); + base::Unretained(this), dbus::ObjectPath(battery_service_path_)))); + battery_service_properties_->uuid.ReplaceValue(kBatteryServiceUUID); + battery_service_properties_->device.ReplaceValue(device_path); + battery_service_properties_->primary.ReplaceValue(true); - NotifyServiceAdded(dbus::ObjectPath(heart_rate_service_path_)); - - static_cast<FakeBluetoothGattCharacteristicClient*>( - bluez::BluezDBusManager::Get()->GetBluetoothGattCharacteristicClient()) - ->ExposeHeartRateCharacteristics( - dbus::ObjectPath(heart_rate_service_path_)); - - ToggleServicesResolvedProperty(device_path, true); + NotifyServiceAdded(GetBatteryServicePath()); } bool FakeBluetoothGattServiceClient::IsHeartRateVisible() const { return !!heart_rate_service_properties_.get(); } +bool FakeBluetoothGattServiceClient::IsBatteryServiceVisible() const { + return !!battery_service_properties_.get(); +} + dbus::ObjectPath FakeBluetoothGattServiceClient::GetHeartRateServicePath() const { return dbus::ObjectPath(heart_rate_service_path_); } +dbus::ObjectPath FakeBluetoothGattServiceClient::GetBatteryServicePath() const { + return dbus::ObjectPath(battery_service_path_); +} + void FakeBluetoothGattServiceClient::OnPropertyChanged( const dbus::ObjectPath& object_path, const std::string& property_name) { @@ -206,17 +212,4 @@ dbus::ObjectPath(heart_rate_service_path_)); } -void FakeBluetoothGattServiceClient::ToggleServicesResolvedProperty( - const dbus::ObjectPath& object_path, - bool resolved) { - DCHECK(object_path.IsValid()); - - VLOG(2) << "Toggle the ServicesResolved property to " << resolved - << " of device " << object_path.value(); - FakeBluetoothDeviceClient* device = static_cast<FakeBluetoothDeviceClient*>( - bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()); - // Notify on service discovery complete. - device->GetProperties(object_path)->services_resolved.ReplaceValue(true); -} - } // namespace bluez
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h index d56a35527..44ac42a8 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h
@@ -55,18 +55,24 @@ void ExposeHeartRateService(const dbus::ObjectPath& device_path); void HideHeartRateService(); - // Makes a service visible for device with object path |device_path| without - // delay. Note that only one instance of a specific service is simulated at a - // time, if the service is already visible. - void ExposeHeartRateServiceWithoutDelay(const dbus::ObjectPath& device_path); + // Makes a service visible for device with object path |device_path|. Note + // that only one instance of a specific service is simulated at a time. Hence, + // this method will fail, if the service is already visible. + void ExposeBatteryService(const dbus::ObjectPath& device_path); // Returns whether or not the Heart Rate Service is visible. bool IsHeartRateVisible() const; + // Returns whether or not the Battery Service is visible. + bool IsBatteryServiceVisible() const; // Returns the current object path of the visible Heart Rate service. If the // service is not visible, returns an invalid empty path. dbus::ObjectPath GetHeartRateServicePath() const; + // Returns the current object path of the visible Battery service. If the + // service is not visible, returns an invalid empty path. + dbus::ObjectPath GetBatteryServicePath() const; + // Final object path components and the corresponding UUIDs of the GATT // services that we emulate. Service paths are hierarchical to Bluetooth // device paths, so if the path component is "service0000", and the device @@ -75,6 +81,14 @@ static const char kHeartRateServicePathComponent[]; static const char kHeartRateServiceUUID[]; + // Final object path components and the corresponding UUIDs of the GATT + // services that we emulate. Service paths are hierarchical to Bluetooth + // device paths, so if the path component is "service0001", and the device + // path is "/org/foo/device0", the service path is + // "/org/foo/device0/service0001". + static const char kBatteryServicePathComponent[]; + static const char kBatteryServiceUUID[]; + private: // Property callback passed when we create Properties structures. void OnPropertyChanged(const dbus::ObjectPath& object_path, @@ -90,15 +104,12 @@ // time this method is called, then it does nothing. void ExposeHeartRateCharacteristics(); - // Toggles the ServicesResolved property for the device with |object_path|. - // This should be done after a service is fully discovered. - void ToggleServicesResolvedProperty(const dbus::ObjectPath& object_path, - bool resolved); - // Static properties we return. As long as a service is exposed, this will be // non-null. Otherwise it will be null. std::unique_ptr<Properties> heart_rate_service_properties_; + std::unique_ptr<Properties> battery_service_properties_; std::string heart_rate_service_path_; + std::string battery_service_path_; // List of observers interested in event notifications from us. base::ObserverList<Observer> observers_;
diff --git a/device/media_transfer_protocol/media_transfer_protocol_manager.h b/device/media_transfer_protocol/media_transfer_protocol_manager.h index 95ba1512..69ca16981 100644 --- a/device/media_transfer_protocol/media_transfer_protocol_manager.h +++ b/device/media_transfer_protocol/media_transfer_protocol_manager.h
@@ -176,7 +176,7 @@ // On Linux, |task_runner| specifies the task runner to process asynchronous // operations. // On ChromeOS, |task_runner| should just be set to NULL because ChromeOS - // already has a dedicated message loop proxy. + // already has a dedicated task runner. static MediaTransferProtocolManager* Initialize( scoped_refptr<base::SequencedTaskRunner> task_runner); };
diff --git a/extensions/browser/api/api_resource_manager.h b/extensions/browser/api/api_resource_manager.h index 89e5bb3..02cae3a2 100644 --- a/extensions/browser/api/api_resource_manager.h +++ b/extensions/browser/api/api_resource_manager.h
@@ -45,7 +45,7 @@ } static scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() { - return content::BrowserThread::GetMessageLoopProxyForThread(T::kThreadId); + return content::BrowserThread::GetTaskRunnerForThread(T::kThreadId); } };
diff --git a/extensions/browser/api/declarative/declarative_api.cc b/extensions/browser/api/declarative/declarative_api.cc index 5ac56a4..a0354663 100644 --- a/extensions/browser/api/declarative/declarative_api.cc +++ b/extensions/browser/api/declarative/declarative_api.cc
@@ -156,7 +156,7 @@ SendResponse(success); } else { scoped_refptr<base::SingleThreadTaskRunner> thread_task_runner = - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( rules_registry_->owner_thread()); base::PostTaskAndReplyWithResult( thread_task_runner.get(), FROM_HERE,
diff --git a/extensions/browser/api/execute_code_function.h b/extensions/browser/api/execute_code_function.h index d7d965f..a483e13 100644 --- a/extensions/browser/api/execute_code_function.h +++ b/extensions/browser/api/execute_code_function.h
@@ -5,6 +5,7 @@ #ifndef EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ +#include "base/macros.h" #include "extensions/browser/extension_function.h" #include "extensions/browser/script_executor.h" #include "extensions/common/api/extension_types.h" @@ -45,9 +46,7 @@ const std::string& data); const HostID& host_id() const { return host_id_; } - void set_host_id(HostID host_id) { - host_id_ = host_id; - } + void set_host_id(const HostID& host_id) { host_id_ = host_id; } // The injection details. std::unique_ptr<api::extension_types::InjectDetails> details_; @@ -78,6 +77,8 @@ // The ID of the injection host. HostID host_id_; + + DISALLOW_COPY_AND_ASSIGN(ExecuteCodeFunction); }; } // namespace extensions
diff --git a/extensions/browser/api/guest_view/extension_view/extension_view_internal_api.cc b/extensions/browser/api/guest_view/extension_view/extension_view_internal_api.cc index 727824f..5e15ed6 100644 --- a/extensions/browser/api/guest_view/extension_view/extension_view_internal_api.cc +++ b/extensions/browser/api/guest_view/extension_view/extension_view_internal_api.cc
@@ -36,7 +36,7 @@ // Checks the validity of |src|, including that it follows the chrome extension // scheme and that its extension ID is valid. // Returns true if |src| is valid. -bool IsSrcValid(GURL src) { +bool IsSrcValid(const GURL& src) { // Check if src is valid and matches the extension scheme. if (!src.is_valid() || !src.SchemeIs(kExtensionScheme)) return false;
diff --git a/extensions/browser/api/idle/idle_manager.cc b/extensions/browser/api/idle/idle_manager.cc index 7122b6ba..715c98a 100644 --- a/extensions/browser/api/idle/idle_manager.cc +++ b/extensions/browser/api/idle/idle_manager.cc
@@ -170,7 +170,7 @@ } } -void IdleManager::QueryState(int threshold, QueryStateCallback notify) { +void IdleManager::QueryState(int threshold, const QueryStateCallback& notify) { DCHECK(thread_checker_.CalledOnValidThread()); idle_time_provider_->CalculateIdleState(threshold, notify); }
diff --git a/extensions/browser/api/idle/idle_manager.h b/extensions/browser/api/idle/idle_manager.h index 770dcc06..d8ff5a03 100644 --- a/extensions/browser/api/idle/idle_manager.h +++ b/extensions/browser/api/idle/idle_manager.h
@@ -89,7 +89,7 @@ void OnListenerAdded(const EventListenerInfo& details) override; void OnListenerRemoved(const EventListenerInfo& details) override; - void QueryState(int threshold, QueryStateCallback notify); + void QueryState(int threshold, const QueryStateCallback& notify); void SetThreshold(const std::string& extension_id, int threshold); static std::unique_ptr<base::StringValue> CreateIdleValue( ui::IdleState idle_state);
diff --git a/extensions/browser/api/networking_private/networking_private_linux.cc b/extensions/browser/api/networking_private/networking_private_linux.cc index fe119c5..fdff188 100644 --- a/extensions/browser/api/networking_private/networking_private_linux.cc +++ b/extensions/browser/api/networking_private/networking_private_linux.cc
@@ -985,7 +985,7 @@ } bool NetworkingPrivateLinux::GetConnectedAccessPoint( - dbus::ObjectPath device_path, + const dbus::ObjectPath& device_path, dbus::ObjectPath* access_point_path) { AssertOnDBusThread(); dbus::MethodCall method_call(DBUS_INTERFACE_PROPERTIES,
diff --git a/extensions/browser/api/networking_private/networking_private_linux.h b/extensions/browser/api/networking_private/networking_private_linux.h index 39e93bd2..aedd4d5 100644 --- a/extensions/browser/api/networking_private/networking_private_linux.h +++ b/extensions/browser/api/networking_private/networking_private_linux.h
@@ -218,7 +218,7 @@ // all active connections then checks if the device matches the requested // device, then gets the access point associated with the connection. // Returns false if there is an error getting the connected access point. - bool GetConnectedAccessPoint(dbus::ObjectPath device_path, + bool GetConnectedAccessPoint(const dbus::ObjectPath& device_path, dbus::ObjectPath* access_point_path); // Given a path to an active connection gets the path to the device
diff --git a/extensions/browser/api/power/power_api.cc b/extensions/browser/api/power/power_api.cc index 62cb736..9272bfc 100644 --- a/extensions/browser/api/power/power_api.cc +++ b/extensions/browser/api/power/power_api.cc
@@ -82,7 +82,7 @@ } void PowerAPI::SetCreateBlockerFunctionForTesting( - CreateBlockerFunction function) { + const CreateBlockerFunction& function) { create_blocker_function_ = !function.is_null() ? function : base::Bind(&CreatePowerSaveBlocker); } @@ -127,9 +127,9 @@ create_blocker_function_.Run( type, device::PowerSaveBlocker::kReasonOther, kPowerSaveBlockerDescription, - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE))); power_save_blocker_.swap(new_blocker); current_level_ = new_level;
diff --git a/extensions/browser/api/power/power_api.h b/extensions/browser/api/power/power_api.h index 73db136..b9d972d 100644 --- a/extensions/browser/api/power/power_api.h +++ b/extensions/browser/api/power/power_api.h
@@ -76,7 +76,8 @@ // Replaces the function that will be called to create PowerSaveBlocker // objects. Passing an empty callback will revert to the default. - void SetCreateBlockerFunctionForTesting(CreateBlockerFunction function); + void SetCreateBlockerFunctionForTesting( + const CreateBlockerFunction& function); // Overridden from extensions::ExtensionRegistryObserver. void OnExtensionUnloaded(content::BrowserContext* browser_context,
diff --git a/extensions/browser/api/serial/serial_apitest.cc b/extensions/browser/api/serial/serial_apitest.cc index d0e9b588..59f0412 100644 --- a/extensions/browser/api/serial/serial_apitest.cc +++ b/extensions/browser/api/serial/serial_apitest.cc
@@ -136,7 +136,7 @@ mojo::InterfaceRequest<device::serial::SerialService> request) { auto io_handler_factory = base::Bind(&FakeEchoSerialIoHandler::Create); auto* connection_factory = new device::SerialConnectionFactory( - io_handler_factory, content::BrowserThread::GetMessageLoopProxyForThread( + io_handler_factory, content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO)); std::unique_ptr<device::SerialDeviceEnumerator> device_enumerator( new FakeSerialDeviceEnumerator);
diff --git a/extensions/browser/api/serial/serial_connection.cc b/extensions/browser/api/serial/serial_connection.cc index fcb5dd8..da75595 100644 --- a/extensions/browser/api/serial/serial_connection.cc +++ b/extensions/browser/api/serial/serial_connection.cc
@@ -167,9 +167,9 @@ send_timeout_(0), paused_(false), io_handler_(device::SerialIoHandler::Create( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI))) { DCHECK_CURRENTLY_ON(BrowserThread::IO); }
diff --git a/extensions/browser/api/serial/serial_service_factory.cc b/extensions/browser/api/serial/serial_service_factory.cc index 10abe15..0094ab8 100644 --- a/extensions/browser/api/serial/serial_service_factory.cc +++ b/extensions/browser/api/serial/serial_service_factory.cc
@@ -23,11 +23,11 @@ return; } device::SerialServiceImpl::CreateOnMessageLoop( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI), std::move(request)); }
diff --git a/extensions/browser/api/socket/udp_socket.cc b/extensions/browser/api/socket/udp_socket.cc index a5b9245..e659574 100644 --- a/extensions/browser/api/socket/udp_socket.cc +++ b/extensions/browser/api/socket/udp_socket.cc
@@ -46,7 +46,7 @@ // UDP API only connects to the first address received from DNS so // connection may not work even if other addresses are reachable. - net::IPEndPoint ip_end_point = address.front(); + const net::IPEndPoint& ip_end_point = address.front(); result = socket_.Open(ip_end_point.GetFamily()); if (result != net::OK) break;
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc index 3e050b88..5e27be4d 100644 --- a/extensions/browser/api/web_request/web_request_api.cc +++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -397,28 +397,10 @@ // Comparator to work with std::set. bool operator<(const EventListener& that) const { - if (extension_id != that.extension_id) - return extension_id < that.extension_id; - - if (sub_event_name != that.sub_event_name) - return sub_event_name < that.sub_event_name; - - if (web_view_instance_id != that.web_view_instance_id) - return web_view_instance_id < that.web_view_instance_id; - - if (web_view_instance_id == 0) { - // Do not filter by process ID for non-webviews, because this comparator - // is also used to find and remove an event listener when an extension is - // unloaded. At this point, the event listener cannot be mapped back to - // the original process, so 0 is used instead of the actual process ID. - if (embedder_process_id == 0 || that.embedder_process_id == 0) - return false; - } - - if (embedder_process_id != that.embedder_process_id) - return embedder_process_id < that.embedder_process_id; - - return false; + return std::tie(extension_id, sub_event_name, web_view_instance_id, + embedder_process_id) < + std::tie(that.extension_id, that.sub_event_name, + that.web_view_instance_id, that.embedder_process_id); } EventListener() @@ -1147,6 +1129,12 @@ return true; } +int ExtensionWebRequestEventRouter::GetListenerCountForTesting( + void* browser_context, + const std::string& event_name) { + return listeners_[browser_context][event_name].size(); +} + void ExtensionWebRequestEventRouter::RemoveEventListener( void* browser_context, const std::string& extension_id, @@ -1156,14 +1144,23 @@ std::string event_name = EventRouter::GetBaseEventName(sub_event_name); DCHECK(IsWebRequestEvent(event_name)); + std::set<EventListener>& event_listeners = + listeners_[browser_context][event_name]; + EventListener listener; listener.extension_id = extension_id; listener.sub_event_name = sub_event_name; - listener.embedder_process_id = embedder_process_id; - listener.web_view_instance_id = web_view_instance_id; - std::set<EventListener>& event_listeners = - listeners_[browser_context][event_name]; + if (web_view_instance_id != 0) { + listener.embedder_process_id = embedder_process_id; + listener.web_view_instance_id = web_view_instance_id; + } else { + for (const EventListener& l : event_listeners) { + if (l.extension_id == extension_id && l.sub_event_name == sub_event_name) + listener.embedder_process_id = l.embedder_process_id; + } + } + // It's possible for AddEventListener to fail asynchronously. In that case, // the renderer believes the listener exists, while the browser does not. // Ignore a RemoveEventListener in that case. @@ -1171,16 +1168,6 @@ if (it == event_listeners.end()) return; -#if defined(OS_WIN) - // Debugging https://crbug.com/589735 - // Please post crash reports at the following lines to the above issue. - unsigned event_listener_count = event_listeners.count(listener); - CHECK_GE(event_listener_count, 0u); - CHECK_GE(event_listener_count, 1u); - CHECK_LE(event_listener_count, 2u); - CHECK_EQ(event_listener_count, 1u); - CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); -#endif // OS_WIN CHECK_EQ(event_listeners.count(listener), 1u) << "extension=" << extension_id << " event=" << event_name;
diff --git a/extensions/browser/api/web_request/web_request_api.h b/extensions/browser/api/web_request/web_request_api.h index c830faf8..ff9def33 100644 --- a/extensions/browser/api/web_request/web_request_api.h +++ b/extensions/browser/api/web_request/web_request_api.h
@@ -274,6 +274,10 @@ int web_view_instance_id, base::WeakPtr<IPC::Sender> ipc_sender); + // Get the number of listeners - for testing only. + int GetListenerCountForTesting(void* browser_context, + const std::string& event_name); + // Removes the listener for the given sub-event. void RemoveEventListener( void* browser_context,
diff --git a/extensions/browser/extension_event_histogram_value.h b/extensions/browser/extension_event_histogram_value.h index c4eed8f..1dd3a0f 100644 --- a/extensions/browser/extension_event_histogram_value.h +++ b/extensions/browser/extension_event_histogram_value.h
@@ -85,8 +85,8 @@ CONTEXT_MENUS_INTERNAL_ON_CLICKED, CONTEXT_MENUS_ON_CLICKED, COOKIES_ON_CHANGED, - COPRESENCE_ON_MESSAGES_RECEIVED, - COPRESENCE_ON_STATUS_UPDATED, + DELETED_COPRESENCE_ON_MESSAGES_RECEIVED, + DELETED_COPRESENCE_ON_STATUS_UPDATED, COPRESENCE_PRIVATE_ON_CONFIG_AUDIO, COPRESENCE_PRIVATE_ON_DECODE_SAMPLES_REQUEST, COPRESENCE_PRIVATE_ON_ENCODE_TOKEN_REQUEST,
diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h index 8443f20..94156c9 100644 --- a/extensions/browser/extension_function_histogram_value.h +++ b/extensions/browser/extension_function_histogram_value.h
@@ -926,8 +926,8 @@ COPRESENCEPRIVATE_SENDSAMPLES, COPRESENCEPRIVATE_SENDDETECT, COPRESENCEPRIVATE_SENDINITIALIZED, - COPRESENCE_EXECUTE, - COPRESENCE_SETAPIKEY, + DELETED_COPRESENCE_EXECUTE, + DELETED_COPRESENCE_SETAPIKEY, FILESYSTEM_OBSERVEDIRECTORY, FILESYSTEM_UNOBSERVEENTRY, FILESYSTEM_GETOBSERVEDENTRIES, @@ -968,7 +968,7 @@ USB_GETUSERSELECTEDDEVICES, INPUTMETHODPRIVATE_GETINPUTMETHODCONFIG, WALLPAPERPRIVATE_GETSYNCSETTING, - COPRESENCE_SETAUTHTOKEN, + DELETED_COPRESENCE_SETAUTHTOKEN, CAST_CHANNEL_SETAUTHORITYKEYS, HOTWORDPRIVATE_STARTTRAINING, HOTWORDPRIVATE_FINALIZESPEAKERMODEL,
diff --git a/extensions/browser/extension_icon_image.cc b/extensions/browser/extension_icon_image.cc index 2cd317d3..fc0bc0d 100644 --- a/extensions/browser/extension_icon_image.cc +++ b/extensions/browser/extension_icon_image.cc
@@ -220,7 +220,7 @@ if (image->isNull()) return; - gfx::ImageSkiaRep rep = image->GetRepresentation(scale); + const gfx::ImageSkiaRep& rep = image->GetRepresentation(scale); DCHECK(!rep.is_null()); DCHECK_EQ(scale, rep.scale());
diff --git a/extensions/browser/sandboxed_unpacker.cc b/extensions/browser/sandboxed_unpacker.cc index e0ae028..1407e6e 100644 --- a/extensions/browser/sandboxed_unpacker.cc +++ b/extensions/browser/sandboxed_unpacker.cc
@@ -211,7 +211,7 @@ SandboxedUnpackerClient::SandboxedUnpackerClient() : RefCountedDeleteOnMessageLoop<SandboxedUnpackerClient>( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI)) { DCHECK_CURRENTLY_ON(BrowserThread::UI); }
diff --git a/extensions/browser/state_store.cc b/extensions/browser/state_store.cc index 44ab08b9..e313337 100644 --- a/extensions/browser/state_store.cc +++ b/extensions/browser/state_store.cc
@@ -42,7 +42,7 @@ // Queues up a task for invoking once we're ready. Invokes immediately if // we're already ready. - void InvokeWhenReady(base::Closure task); + void InvokeWhenReady(const base::Closure& task); // Marks us ready, and invokes all pending tasks. void SetReady(); @@ -55,7 +55,7 @@ std::vector<base::Closure> pending_tasks_; }; -void StateStore::DelayedTaskQueue::InvokeWhenReady(base::Closure task) { +void StateStore::DelayedTaskQueue::InvokeWhenReady(const base::Closure& task) { if (ready_) { task.Run(); } else {
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc index 66cc2ee..123fb307 100644 --- a/extensions/browser/updater/extension_downloader.cc +++ b/extensions/browser/updater/extension_downloader.cc
@@ -748,7 +748,7 @@ // processed in memory, so it is fetched into a string. if (fetch->id != kBlacklistAppID) { extension_fetcher_->SaveResponseToTemporaryFile( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); } if (fetch->credentials == ExtensionFetch::CREDENTIALS_OAUTH2_TOKEN &&
diff --git a/extensions/browser/updater/safe_manifest_parser.cc b/extensions/browser/updater/safe_manifest_parser.cc index 05c75a95..3bc3aee0 100644 --- a/extensions/browser/updater/safe_manifest_parser.cc +++ b/extensions/browser/updater/safe_manifest_parser.cc
@@ -45,8 +45,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::IO); content::UtilityProcessHost* host = content::UtilityProcessHost::Create( - this, - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get()); + this, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI).get()); host->SetName( l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_MANIFEST_PARSER_NAME)); host->Send(new ExtensionUtilityMsg_ParseUpdateManifest(xml_));
diff --git a/extensions/browser/updater/update_service.cc b/extensions/browser/updater/update_service.cc index d356f59f..64bdae1 100644 --- a/extensions/browser/updater/update_service.cc +++ b/extensions/browser/updater/update_service.cc
@@ -48,7 +48,8 @@ update_client_->SendUninstallPing(id, version, reason); } -void UpdateService::StartUpdateCheck(std::vector<std::string> extension_ids) { +void UpdateService::StartUpdateCheck( + const std::vector<std::string>& extension_ids) { if (!update_client_) return; update_client_->Update(extension_ids, base::Bind(&UpdateDataProvider::GetData,
diff --git a/extensions/browser/updater/update_service.h b/extensions/browser/updater/update_service.h index c4c4d77..77af0464 100644 --- a/extensions/browser/updater/update_service.h +++ b/extensions/browser/updater/update_service.h
@@ -48,7 +48,7 @@ // updates available, they will be downloaded, checked for integrity, // unpacked, and then passed off to the ExtensionSystem::InstallUpdate method // for install completion. - void StartUpdateCheck(std::vector<std::string> extension_ids); + void StartUpdateCheck(const std::vector<std::string>& extension_ids); private: friend class UpdateServiceFactory;
diff --git a/extensions/browser/verified_contents.cc b/extensions/browser/verified_contents.cc index 9fdae10..b8acb9c 100644 --- a/extensions/browser/verified_contents.cc +++ b/extensions/browser/verified_contents.cc
@@ -44,8 +44,8 @@ // Helper function to iterate over a list of dictionaries, returning the // dictionary that has |key| -> |value| in it, if any, or NULL. DictionaryValue* FindDictionaryWithValue(const ListValue* list, - std::string key, - std::string value) { + const std::string& key, + const std::string& value) { for (const auto& i : *list) { DictionaryValue* dictionary; if (!i->GetAsDictionary(&dictionary))
diff --git a/extensions/common/api/_manifest_features.json b/extensions/common/api/_manifest_features.json index ba922f6..841f4b1 100644 --- a/extensions/common/api/_manifest_features.json +++ b/extensions/common/api/_manifest_features.json
@@ -127,10 +127,6 @@ // app.content_security_policy whitelist). "extension_types": ["extension", "legacy_packaged_app"] }, - "copresence" : { - "channel": "stable", - "extension_types": "all" - }, "current_locale": { "channel": "stable", "extension_types": "all"
diff --git a/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc b/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc index fa970cec..c7b1774 100644 --- a/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc +++ b/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc
@@ -84,7 +84,7 @@ }; static testing::AssertionResult CheckFormat( - std::multiset<CheckFormatEntry> permissions, + const std::multiset<CheckFormatEntry>& permissions, const std::string& json) { std::unique_ptr<SocketsManifestPermission> permission( PermissionFromJSON(json));
diff --git a/extensions/common/extension_resource_unittest.cc b/extensions/common/extension_resource_unittest.cc index fb974d9..097793f 100644 --- a/extensions/common/extension_resource_unittest.cc +++ b/extensions/common/extension_resource_unittest.cc
@@ -149,7 +149,7 @@ std::string extension_id = crx_file::id_util::GenerateId("test"); ExtensionResource resource(extension_id, temp.path(), base::FilePath().AppendASCII(filename)); - base::FilePath resolved_path = resource.GetFilePath(); + const base::FilePath& resolved_path = resource.GetFilePath(); base::FilePath expected_path; // Expect default path only, since fallback logic is disabled.
diff --git a/extensions/common/features/base_feature_provider.cc b/extensions/common/features/base_feature_provider.cc index 710a827..40065ff0 100644 --- a/extensions/common/features/base_feature_provider.cc +++ b/extensions/common/features/base_feature_provider.cc
@@ -180,7 +180,7 @@ const FeatureMap::const_iterator first_child = features_.lower_bound(prefix); // All children have names before (parent.name() + ('.'+1)). - ++prefix[prefix.size() - 1]; + ++prefix.back(); const FeatureMap::const_iterator after_children = features_.lower_bound(prefix);
diff --git a/extensions/common/features/simple_feature.cc b/extensions/common/features/simple_feature.cc index 9abc1b4..8833fb23 100644 --- a/extensions/common/features/simple_feature.cc +++ b/extensions/common/features/simple_feature.cc
@@ -306,7 +306,7 @@ for (base::DictionaryValue::Iterator it(*dictionary); !it.IsAtEnd(); it.Advance()) { - std::string key = it.key(); + const std::string& key = it.key(); const base::Value* value = &it.value(); if (key == "matches") { ParseURLPatterns(dictionary, "matches", &matches_);
diff --git a/extensions/common/manifest_constants.cc b/extensions/common/manifest_constants.cc index 3f784e40..8d6be3af 100644 --- a/extensions/common/manifest_constants.cc +++ b/extensions/common/manifest_constants.cc
@@ -29,7 +29,6 @@ const char kContentScripts[] = "content_scripts"; const char kContentSecurityPolicy[] = "content_security_policy"; const char kConvertedFromUserScript[] = "converted_from_user_script"; -const char kCopresence[] = "copresence"; const char kCss[] = "css"; const char kCtrlKey[] = "ctrlKey"; const char kCurrentLocale[] = "current_locale"; @@ -344,9 +343,6 @@ "Invalid value for 'content_scripts'."; const char kInvalidContentSecurityPolicy[] = "Invalid value for 'content_security_policy'."; -const char kInvalidCopresenceConfig[] = "Invalid value for 'copresence'."; -const char kInvalidCopresenceApiKey[] = - "copresence.api_key must not be empty."; const char kInvalidCSPInsecureValue[] = "Ignored insecure CSP value \"*\" in directive '*'."; const char kInvalidCSPMissingSecureSrc[] =
diff --git a/extensions/common/manifest_constants.h b/extensions/common/manifest_constants.h index c7e6d21..64ac2fd 100644 --- a/extensions/common/manifest_constants.h +++ b/extensions/common/manifest_constants.h
@@ -33,7 +33,6 @@ extern const char kContentScripts[]; extern const char kContentSecurityPolicy[]; extern const char kConvertedFromUserScript[]; -extern const char kCopresence[]; extern const char kCss[]; extern const char kCtrlKey[]; extern const char kCurrentLocale[]; @@ -295,8 +294,6 @@ extern const char kInvalidContentScript[]; extern const char kInvalidContentScriptsList[]; extern const char kInvalidContentSecurityPolicy[]; -extern const char kInvalidCopresenceConfig[]; -extern const char kInvalidCopresenceApiKey[]; extern const char kInvalidCSPInsecureValue[]; extern const char kInvalidCSPMissingSecureSrc[]; extern const char kInvalidCss[];
diff --git a/extensions/common/manifest_handlers/webview_info.h b/extensions/common/manifest_handlers/webview_info.h index 117354f..5deb897 100644 --- a/extensions/common/manifest_handlers/webview_info.h +++ b/extensions/common/manifest_handlers/webview_info.h
@@ -29,7 +29,7 @@ const std::string& relative_path); // Define out of line constructor/destructor to please Clang. - WebviewInfo(const std::string& extension_id); + explicit WebviewInfo(const std::string& extension_id); ~WebviewInfo() override; void AddPartitionItem(std::unique_ptr<PartitionItem> item);
diff --git a/extensions/common/manifest_test.cc b/extensions/common/manifest_test.cc index 2a43ed8e..6a966e6 100644 --- a/extensions/common/manifest_test.cc +++ b/extensions/common/manifest_test.cc
@@ -91,7 +91,8 @@ } base::DictionaryValue* ManifestTest::ManifestData::GetManifest( - base::FilePath test_data_dir, std::string* error) const { + const base::FilePath& test_data_dir, + std::string* error) const { if (manifest_) return manifest_;
diff --git a/extensions/common/manifest_test.h b/extensions/common/manifest_test.h index be6a5ff..347c610 100644 --- a/extensions/common/manifest_test.h +++ b/extensions/common/manifest_test.h
@@ -53,7 +53,7 @@ const std::string& name() const { return name_; }; - base::DictionaryValue* GetManifest(base::FilePath manifest_path, + base::DictionaryValue* GetManifest(const base::FilePath& manifest_path, std::string* error) const; private:
diff --git a/extensions/common/permissions/api_permission.h b/extensions/common/permissions/api_permission.h index 47aa5430..f41255f 100644 --- a/extensions/common/permissions/api_permission.h +++ b/extensions/common/permissions/api_permission.h
@@ -79,7 +79,7 @@ kContentSettings, kContextMenus, kCookie, - kCopresence, + kDeletedCopresence, kCopresencePrivate, kCryptotokenPrivate, kDataReductionProxy,
diff --git a/extensions/common/permissions/api_permission_set.h b/extensions/common/permissions/api_permission_set.h index e64d519c0..3b2c2f8 100644 --- a/extensions/common/permissions/api_permission_set.h +++ b/extensions/common/permissions/api_permission_set.h
@@ -162,7 +162,7 @@ const_iterator end() const { return permissions_.end(); } private: - PermissionIDSet(const std::set<PermissionID>& permissions); + explicit PermissionIDSet(const std::set<PermissionID>& permissions); std::set<PermissionID> permissions_; };
diff --git a/extensions/common/permissions/base_set_operators.h b/extensions/common/permissions/base_set_operators.h index ffe0323..4bc0c4b 100644 --- a/extensions/common/permissions/base_set_operators.h +++ b/extensions/common/permissions/base_set_operators.h
@@ -74,9 +74,7 @@ "U ptr must implicitly convert to T ptr"); } - BaseSetOperators(const T& set) { - this->operator=(set); - } + explicit BaseSetOperators(const T& set) { this->operator=(set); } ~BaseSetOperators() {}
diff --git a/extensions/common/permissions/permissions_data.h b/extensions/common/permissions/permissions_data.h index 681a7ee..3b87e79 100644 --- a/extensions/common/permissions/permissions_data.h +++ b/extensions/common/permissions/permissions_data.h
@@ -64,7 +64,7 @@ static void SetPolicyDelegate(PolicyDelegate* delegate); - PermissionsData(const Extension* extension); + explicit PermissionsData(const Extension* extension); virtual ~PermissionsData(); // Returns true if the extension is a COMPONENT extension or is on the
diff --git a/extensions/common/switches.cc b/extensions/common/switches.cc index 793f1b4..399e9fb 100644 --- a/extensions/common/switches.cc +++ b/extensions/common/switches.cc
@@ -56,11 +56,10 @@ // Enables tab for desktop sharing. const char kDisableTabForDesktopShare[] = "disable-tab-for-desktop-share"; -const char kEnableTabForDesktopShare[] = "enable-tab-for-desktop-share"; -// Disable old UI for desktop capture picker window. -const char kDisableDesktopCapturePickerOldUI[] = - "disable-desktop-capture-picker-old-ui"; +// Disable new UI for desktop capture picker window. +const char kDisableDesktopCapturePickerNewUI[] = + "disable-desktop-capture-picker-new-ui"; // Allows the ErrorConsole to collect runtime and manifest errors, and display // them in the chrome:extensions page.
diff --git a/extensions/common/switches.h b/extensions/common/switches.h index 72067619..f9f3cad 100644 --- a/extensions/common/switches.h +++ b/extensions/common/switches.h
@@ -14,7 +14,7 @@ extern const char kAllowHTTPBackgroundPage[]; extern const char kAllowLegacyExtensionManifests[]; extern const char kDisableDesktopCaptureAudio[]; -extern const char kDisableDesktopCapturePickerOldUI[]; +extern const char kDisableDesktopCapturePickerNewUI[]; extern const char kDisableTabForDesktopShare[]; extern const char kEmbeddedExtensionOptions[]; extern const char kEnableAppsShowOnFirstPaint[]; @@ -25,7 +25,6 @@ extern const char kEnableMojoSerialService[]; extern const char kEnableOverrideBookmarksUI[]; extern const char kEnableBLEAdvertising[]; -extern const char kEnableTabForDesktopShare[]; extern const char kErrorConsole[]; extern const char kExtensionActionRedesign[]; extern const char kExtensionProcess[];
diff --git a/extensions/renderer/api/display_source/wifi_display/wifi_display_media_manager.cc b/extensions/renderer/api/display_source/wifi_display/wifi_display_media_manager.cc index a65f6547..7358146 100644 --- a/extensions/renderer/api/display_source/wifi_display/wifi_display_media_manager.cc +++ b/extensions/renderer/api/display_source/wifi_display/wifi_display_media_manager.cc
@@ -88,16 +88,16 @@ const std::string& sink_ip_address, content::ServiceRegistry* service_registry, const ErrorCallback& error_callback) - : video_track_(video_track), - audio_track_(audio_track), - service_registry_(service_registry), - sink_ip_address_(sink_ip_address), - player_(nullptr), - io_task_runner_(content::RenderThread::Get()->GetIOMessageLoopProxy()), - error_callback_(error_callback), - is_playing_(false), - is_initialized_(false), - weak_factory_(this) { + : video_track_(video_track), + audio_track_(audio_track), + service_registry_(service_registry), + sink_ip_address_(sink_ip_address), + player_(nullptr), + io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()), + error_callback_(error_callback), + is_playing_(false), + is_initialized_(false), + weak_factory_(this) { DCHECK(!video_track.isNull() || !audio_track.isNull()); DCHECK(service_registry_); DCHECK(!error_callback_.is_null());
diff --git a/extensions/shell/browser/shell_browser_context.cc b/extensions/shell/browser/shell_browser_context.cc index f4ac6fc..87be8ced 100644 --- a/extensions/shell/browser/shell_browser_context.cc +++ b/extensions/shell/browser/shell_browser_context.cc
@@ -68,9 +68,9 @@ set_url_request_context_getter(new ShellURLRequestContextGetter( this, IgnoreCertificateErrors(), GetPath(), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), protocol_handlers, std::move(request_interceptors), nullptr /* net_log */, extension_info_map));
diff --git a/extensions/shell/browser/shell_browser_main_parts.cc b/extensions/shell/browser/shell_browser_main_parts.cc index e636fa0b9..2f6e283 100644 --- a/extensions/shell/browser/shell_browser_main_parts.cc +++ b/extensions/shell/browser/shell_browser_main_parts.cc
@@ -206,8 +206,7 @@ // Track the task so it can be canceled if app_shell shuts down very quickly, // such as in browser tests. task_tracker_.PostTask( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), - FROM_HERE, + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), FROM_HERE, base::Bind(nacl::NaClProcessHost::EarlyStartup)); #endif
diff --git a/extensions/shell/browser/shell_device_client.cc b/extensions/shell/browser/shell_device_client.cc index 857e2a4f..81dabf4c 100644 --- a/extensions/shell/browser/shell_device_client.cc +++ b/extensions/shell/browser/shell_device_client.cc
@@ -22,7 +22,7 @@ if (!usb_service_) { usb_service_ = device::UsbService::Create( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); } return usb_service_.get(); } @@ -31,7 +31,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!hid_service_) { hid_service_ = device::HidService::Create( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); } return hid_service_.get(); }
diff --git a/google_apis/drive/drive_api_parser.cc b/google_apis/drive/drive_api_parser.cc index 572b38b4..6383c2a 100644 --- a/google_apis/drive/drive_api_parser.cc +++ b/google_apis/drive/drive_api_parser.cc
@@ -133,7 +133,6 @@ // Parent Resource // https://developers.google.com/drive/v2/reference/parents const char kParentReferenceKind[] = "drive#parentReference"; -const char kParentLink[] = "parentLink"; // File Resource // https://developers.google.com/drive/v2/reference/files @@ -402,9 +401,6 @@ void ParentReference::RegisterJSONConverter( base::JSONValueConverter<ParentReference>* converter) { converter->RegisterStringField(kId, &ParentReference::file_id_); - converter->RegisterCustomField<GURL>(kParentLink, - &ParentReference::parent_link_, - GetGURLFromString); } // static
diff --git a/google_apis/drive/drive_api_parser.h b/google_apis/drive/drive_api_parser.h index d3f84f0..6d7110b 100644 --- a/google_apis/drive/drive_api_parser.h +++ b/google_apis/drive/drive_api_parser.h
@@ -338,13 +338,7 @@ // Returns the file id of the reference. const std::string& file_id() const { return file_id_; } - // Returns the URL for the parent in Drive. - const GURL& parent_link() const { return parent_link_; } - void set_file_id(const std::string& file_id) { file_id_ = file_id; } - void set_parent_link(const GURL& parent_link) { - parent_link_ = parent_link; - } private: // Parses and initializes data members from content of |value|. @@ -352,7 +346,6 @@ bool Parse(const base::Value& value); std::string file_id_; - GURL parent_link_; }; // FileLabels represents labels for file or folder.
diff --git a/google_apis/drive/drive_api_parser_unittest.cc b/google_apis/drive/drive_api_parser_unittest.cc index 70ae96e..a51018a 100644 --- a/google_apis/drive/drive_api_parser_unittest.cc +++ b/google_apis/drive/drive_api_parser_unittest.cc
@@ -152,9 +152,6 @@ ASSERT_EQ(1U, file1.parents().size()); EXPECT_EQ("0B4v7G8yEYAWHYW1OcExsUVZLABC", file1.parents()[0].file_id()); - EXPECT_EQ(GURL("https://www.googleapis.com/drive/v2/files/" - "0B4v7G8yEYAWHYW1OcExsUVZLABC"), - file1.parents()[0].parent_link()); EXPECT_EQ("d41d8cd98f00b204e9800998ecf8427e", file1.md5_checksum()); EXPECT_EQ(1000U, file1.file_size());
diff --git a/google_apis/drive/drive_api_requests.cc b/google_apis/drive/drive_api_requests.cc index d1b9b1f..307e541 100644 --- a/google_apis/drive/drive_api_requests.cc +++ b/google_apis/drive/drive_api_requests.cc
@@ -219,10 +219,9 @@ if (content_type_piece.empty()) return false; if (content_type_piece[0] == '"') { - if (content_type_piece.size() <= 2 || - content_type_piece[content_type_piece.size() - 1] != '"') { + if (content_type_piece.size() <= 2 || content_type_piece.back() != '"') return false; - } + content_type_piece = content_type_piece.substr(1, content_type_piece.size() - 2); }
diff --git a/google_apis/drive/time_util.cc b/google_apis/drive/time_util.cc index cf2b453..5a559cc 100644 --- a/google_apis/drive/time_util.cc +++ b/google_apis/drive/time_util.cc
@@ -64,7 +64,7 @@ // Parses timezone suffix on the time part if available. { std::vector<base::StringPiece> parts; - if (time_and_tz[time_and_tz.size() - 1] == 'Z') { + if (time_and_tz.back() == 'Z') { // Timezone is 'Z' (UTC) has_timezone = true; offset_to_utc_in_minutes = 0;
diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc index 583494b3..ce62f1f1 100644 --- a/google_apis/gaia/fake_gaia.cc +++ b/google_apis/gaia/fake_gaia.cc
@@ -85,7 +85,7 @@ continue; std::string value = name_value[1]; - if (value.size() && value[value.size() - 1] == ';') + if (value.size() && value.back() == ';') value = value.substr(0, value.size() -1); result.insert(std::make_pair(name_value[0], value));
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt index 7af2e7f..93af3d9 100644 --- a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt +++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt
@@ -31,10 +31,6 @@ READ_WRITE_CHROMIUM 0x78F2 - Accepted by the <param> parameter of GetImageivCHROMIUM: - - GL_GPU_MEMORY_BUFFER_ID 0x78FD - New Procedures and Functions GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width, @@ -63,12 +59,6 @@ copyTexSubImage2D) will perform paramter validation as if the internal format were RGB. - void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data) - - When the parameter GL_GPU_MEMORY_BUFFER_ID is passed as <param>, returns the - id of the GpuMemoryBuffer associated with <image_id>. If the image does not - exist, or is not associated with a GpuMemoryBuffer, returns -1. - Errors None. @@ -81,4 +71,3 @@ 9/29/2014 Documented the extension. 4/12/2016 Added details of OS X RGB workaround. - 5/25/2016 Added the GetImageivCHROMIUM function.
diff --git a/gpu/GLES2/gl2chromium_autogen.h b/gpu/GLES2/gl2chromium_autogen.h index ac8d9f3e..404d4dca 100644 --- a/gpu/GLES2/gl2chromium_autogen.h +++ b/gpu/GLES2/gl2chromium_autogen.h
@@ -290,7 +290,6 @@ #define glDestroyImageCHROMIUM GLES2_GET_FUN(DestroyImageCHROMIUM) #define glCreateGpuMemoryBufferImageCHROMIUM \ GLES2_GET_FUN(CreateGpuMemoryBufferImageCHROMIUM) -#define glGetImageivCHROMIUM GLES2_GET_FUN(GetImageivCHROMIUM) #define glDescheduleUntilFinishedCHROMIUM \ GLES2_GET_FUN(DescheduleUntilFinishedCHROMIUM) #define glGetTranslatedShaderSourceANGLE \
diff --git a/gpu/GLES2/gl2extchromium.h b/gpu/GLES2/gl2extchromium.h index 5eddb080..f0ef149 100644 --- a/gpu/GLES2/gl2extchromium.h +++ b/gpu/GLES2/gl2extchromium.h
@@ -114,30 +114,18 @@ #define GL_RGB_YCBCR_420V_CHROMIUM 0x78FC #endif -#ifndef GL_GPU_MEMORY_BUFFER_ID -#define GL_GPU_MEMORY_BUFFER_ID 0x78FD -#endif - #ifdef GL_GLEXT_PROTOTYPES GL_APICALL GLuint GL_APIENTRY glCreateGpuMemoryBufferImageCHROMIUM( GLsizei width, GLsizei height, GLenum internalformat, GLenum usage); - -GL_APICALL void GL_APIENTRY glGetImageivCHROMIUM( - GLuint image_id, - GLenum param, - GLint* data); #endif typedef GLuint(GL_APIENTRYP PFNGLCREATEGPUMEMORYBUFFERIMAGECHROMIUMPROC)( GLsizei width, GLsizei height, GLenum internalformat, GLenum usage); -typedef GLint(GL_APIENTRYP PFNGLGETIMAGEIVCHROMIUMPROC)( - GLuint image_id, - GLenum param); #endif /* GL_CHROMIUM_gpu_memory_buffer_image */ /* GL_CHROMIUM_deschedule */
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 6ce5b3c..8ec4d1f 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -2673,16 +2673,6 @@ 'chromium': True, 'trace_level': 1, }, - 'GetImageivCHROMIUM': { - 'type': 'Manual', - 'cmd_args': 'GLuint image_id, GLenum param, GLint* data', - 'client_test': False, - 'gen_cmd': False, - 'expectation': False, - 'extension': "CHROMIUM_gpu_memory_buffer_image", - 'chromium': True, - 'trace_level': 1, - }, 'DescheduleUntilFinishedCHROMIUM': { 'type': 'Custom', 'decoder_func': 'DoDescheduleUntilFinishedCHROMIUM',
diff --git a/gpu/command_buffer/client/client_test_helper.h b/gpu/command_buffer/client/client_test_helper.h index fa9e402..3b85773 100644 --- a/gpu/command_buffer/client/client_test_helper.h +++ b/gpu/command_buffer/client/client_test_helper.h
@@ -109,7 +109,6 @@ size_t height, unsigned internalformat, unsigned usage)); - MOCK_METHOD1(GetImageGpuMemoryBufferId, int32_t(unsigned image_id)); MOCK_METHOD2(SignalQuery, void(uint32_t query, const base::Closure& callback)); MOCK_METHOD1(CreateStreamTexture, uint32_t(uint32_t));
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h index 638e5a2..136c12e 100644 --- a/gpu/command_buffer/client/gles2_c_lib_autogen.h +++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -1316,11 +1316,6 @@ return gles2::GetGLContext()->CreateGpuMemoryBufferImageCHROMIUM( width, height, internalformat, usage); } -void GL_APIENTRY GLES2GetImageivCHROMIUM(GLuint image_id, - GLenum param, - GLint* data) { - gles2::GetGLContext()->GetImageivCHROMIUM(image_id, param, data); -} void GL_APIENTRY GLES2DescheduleUntilFinishedCHROMIUM() { gles2::GetGLContext()->DescheduleUntilFinishedCHROMIUM(); } @@ -2705,10 +2700,6 @@ glCreateGpuMemoryBufferImageCHROMIUM), }, { - "glGetImageivCHROMIUM", - reinterpret_cast<GLES2FunctionPointer>(glGetImageivCHROMIUM), - }, - { "glDescheduleUntilFinishedCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( glDescheduleUntilFinishedCHROMIUM),
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 585845f..6b8dba20 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -6083,21 +6083,6 @@ return image_id; } -void GLES2Implementation::GetImageivCHROMIUM(GLuint image_id, - GLenum param, - GLint* data) { - GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] GetImageivCHROMIUM(" << image_id - << ", " << GLES2Util::GetStringImageInternalFormat(param) - << ")"); - if (param != GL_GPU_MEMORY_BUFFER_ID) { - SetGLError(GL_INVALID_VALUE, "GetImageivCHROMIUM", "param"); - *data = -1; - return; - } - *data = gpu_control_->GetImageGpuMemoryBufferId(image_id); -} - bool GLES2Implementation::ValidateSize(const char* func, GLsizeiptr size) { if (size < 0) { SetGLError(GL_INVALID_VALUE, func, "size < 0");
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h index 4b2bf77b..5849c0a6 100644 --- a/gpu/command_buffer/client/gles2_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -913,8 +913,6 @@ GLenum internalformat, GLenum usage) override; -void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data) override; - void DescheduleUntilFinishedCHROMIUM() override; void GetTranslatedShaderSourceANGLE(GLuint shader,
diff --git a/gpu/command_buffer/client/gles2_interface_autogen.h b/gpu/command_buffer/client/gles2_interface_autogen.h index 25e9504..9084c164 100644 --- a/gpu/command_buffer/client/gles2_interface_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_autogen.h
@@ -676,7 +676,6 @@ GLsizei height, GLenum internalformat, GLenum usage) = 0; -virtual void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data) = 0; virtual void DescheduleUntilFinishedCHROMIUM() = 0; virtual void GetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize,
diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h index 7c80487..69e864d 100644 --- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -655,7 +655,6 @@ GLsizei height, GLenum internalformat, GLenum usage) override; -void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data) override; void DescheduleUntilFinishedCHROMIUM() override; void GetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize,
diff --git a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h index 98ca2f69..d1b6746 100644 --- a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
@@ -902,9 +902,6 @@ GLenum /* usage */) { return 0; } -void GLES2InterfaceStub::GetImageivCHROMIUM(GLuint /* image_id */, - GLenum /* param */, - GLint* /* data */) {} void GLES2InterfaceStub::DescheduleUntilFinishedCHROMIUM() {} void GLES2InterfaceStub::GetTranslatedShaderSourceANGLE(GLuint /* shader */, GLsizei /* bufsize */,
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h index cea717fc..28ff4850 100644 --- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -655,7 +655,6 @@ GLsizei height, GLenum internalformat, GLenum usage) override; -void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data) override; void DescheduleUntilFinishedCHROMIUM() override; void GetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize,
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h index 75dbcc3..22961d9 100644 --- a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
@@ -1917,13 +1917,6 @@ usage); } -void GLES2TraceImplementation::GetImageivCHROMIUM(GLuint image_id, - GLenum param, - GLint* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetImageivCHROMIUM"); - gl_->GetImageivCHROMIUM(image_id, param, data); -} - void GLES2TraceImplementation::DescheduleUntilFinishedCHROMIUM() { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DescheduleUntilFinishedCHROMIUM");
diff --git a/gpu/command_buffer/client/gpu_control.h b/gpu/command_buffer/client/gpu_control.h index 15e68e1..813d5630 100644 --- a/gpu/command_buffer/client/gpu_control.h +++ b/gpu/command_buffer/client/gpu_control.h
@@ -59,11 +59,6 @@ unsigned internalformat, unsigned usage) = 0; - // Returns the id of the GpuMemoryBuffer associated with the given image. If - // the image doesn't exist, or isn't associated with a GpuMemoryBuffer, - // returns -1. - virtual int32_t GetImageGpuMemoryBufferId(unsigned image_id) = 0; - // Runs |callback| when a query created via glCreateQueryEXT() has cleared // passed the glEndQueryEXT() point. virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0;
diff --git a/gpu/command_buffer/client/program_info_manager.cc b/gpu/command_buffer/client/program_info_manager.cc index 106e069..d16251d 100644 --- a/gpu/command_buffer/client/program_info_manager.cc +++ b/gpu/command_buffer/client/program_info_manager.cc
@@ -21,7 +21,7 @@ return static_cast<T>(static_cast<const void*>(p)); } -} // namespace anonymous +} // namespace namespace gpu { namespace gles2 { @@ -42,7 +42,7 @@ : size(_size), type(_type), name(_name) { - is_array = (!name.empty() && name[name.size() - 1] == ']'); + is_array = (!name.empty() && name.back() == ']'); DCHECK(!(size > 1 && !is_array)); }
diff --git a/gpu/command_buffer/cmd_buffer_functions.txt b/gpu/command_buffer/cmd_buffer_functions.txt index 5d2a909c..9b791df 100644 --- a/gpu/command_buffer/cmd_buffer_functions.txt +++ b/gpu/command_buffer/cmd_buffer_functions.txt
@@ -276,7 +276,6 @@ GL_APICALL GLuint GL_APIENTRY glCreateImageCHROMIUM (ClientBuffer buffer, GLsizei width, GLsizei height, GLenum internalformat); GL_APICALL void GL_APIENTRY glDestroyImageCHROMIUM (GLuint image_id); GL_APICALL GLuint GL_APIENTRY glCreateGpuMemoryBufferImageCHROMIUM (GLsizei width, GLsizei height, GLenum internalformat, GLenum usage); -GL_APICALL void GL_APIENTRY glGetImageivCHROMIUM (GLuint image_id, GLenum param, GLint* data); GL_APICALL void GL_APIENTRY glDescheduleUntilFinishedCHROMIUM (void); GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLidShader shader, GLsizeiNotNegative bufsize, GLsizeiOptional* length, char* source); GL_APICALL void GL_APIENTRY glPostSubBufferCHROMIUM (GLint x, GLint y, GLint width, GLint height);
diff --git a/gpu/command_buffer/command_buffer.gyp b/gpu/command_buffer/command_buffer.gyp index f8a45ef..0a640521 100644 --- a/gpu/command_buffer/command_buffer.gyp +++ b/gpu/command_buffer/command_buffer.gyp
@@ -26,5 +26,34 @@ ], }, ], + 'conditions': [ + ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', { + 'targets': [ + { + 'target_name': 'gles2_utils_win64', + 'type': '<(component)', + 'variables': { + 'gles2_utils_target': 1, + }, + 'dependencies': [ + '../../base/base.gyp:base_win64', + '../../ui/gfx/gfx.gyp:gfx_geometry_win64', + '../../third_party/khronos/khronos.gyp:khronos_headers', + ], + 'export_dependent_settings': [ + '../../base/base.gyp:base_win64', + ], + 'defines': [ + '<@(nacl_win64_defines)', + ], + 'configurations': { + 'Common_Base': { + 'msvs_target_platform': 'x64', + }, + }, + }, + ], + }], + ], }
diff --git a/gpu/command_buffer/command_buffer_nacl.gyp b/gpu/command_buffer/command_buffer_nacl.gyp index e0589996..7cebd52 100644 --- a/gpu/command_buffer/command_buffer_nacl.gyp +++ b/gpu/command_buffer/command_buffer_nacl.gyp
@@ -29,6 +29,7 @@ 'dependencies': [ '../../base/base_nacl.gyp:base_nacl', '../../base/base_nacl.gyp:base_nacl_nonsfi', + '../../ui/gfx/gfx_nacl.gyp:gfx_geometry_nacl', '../../third_party/khronos/khronos.gyp:khronos_headers', ], },
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc index 871439725..b68bb0b 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils.cc +++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -5,14 +5,16 @@ // This file is here so other GLES2 related files can have a common set of // includes where appropriate. -#include <sstream> +#include "gpu/command_buffer/common/gles2_cmd_utils.h" + #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <GLES2/gl2extchromium.h> #include <GLES3/gl3.h> +#include <sstream> + #include "base/numerics/safe_math.h" -#include "gpu/command_buffer/common/gles2_cmd_utils.h" namespace gpu { namespace gles2 { @@ -27,7 +29,7 @@ kInvalidFrameBufferOperation = (1 << 4), kContextLost = (1 << 5) }; -} +} // namespace gl_error_bit int GLES2Util::GLGetNumValuesReturned(int id) const { switch (id) { @@ -1454,10 +1456,9 @@ std::string GLES2Util::GetStringEnum(uint32_t value) { const EnumToString* entry = enum_to_string_table_; const EnumToString* end = entry + enum_to_string_table_len_; - for (;entry < end; ++entry) { - if (value == entry->value) { + for (; entry < end; ++entry) { + if (value == entry->value) return entry->name; - } } std::stringstream ss; ss.fill('0'); @@ -1492,7 +1493,7 @@ GLSLArrayName::GLSLArrayName(const std::string& name) : element_index_(-1) { if (name.size() < 4) return; - if (name[name.size() - 1] != ']') + if (name.back() != ']') return; size_t open_pos = name.find_last_of('[');
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 51f7f5b..25d7a165 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -655,9 +655,6 @@ 0x78FC, "GL_RGB_YCBCR_420V_CHROMIUM", }, { - 0x78FD, "GL_GPU_MEMORY_BUFFER_ID", - }, - { 0x8, "GL_CA_LAYER_EDGE_TOP_CHROMIUM", }, {
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index dafa6ca..413e11d 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc
@@ -1044,6 +1044,8 @@ } } + bool have_es3_occlusion_query = + gl_version_info_->IsAtLeastGLES(3, 0); bool have_ext_occlusion_query_boolean = extensions.Contains("GL_EXT_occlusion_query_boolean"); bool have_arb_occlusion_query2 = @@ -1051,10 +1053,13 @@ bool have_arb_occlusion_query = extensions.Contains("GL_ARB_occlusion_query"); - if (have_ext_occlusion_query_boolean || + if (have_es3_occlusion_query || + have_ext_occlusion_query_boolean || have_arb_occlusion_query2 || have_arb_occlusion_query) { - AddExtensionString("GL_EXT_occlusion_query_boolean"); + if (context_type_ == CONTEXT_TYPE_OPENGLES2) { + AddExtensionString("GL_EXT_occlusion_query_boolean"); + } feature_flags_.occlusion_query_boolean = true; feature_flags_.use_arb_occlusion_query2_for_occlusion_query_boolean = !have_ext_occlusion_query_boolean && have_arb_occlusion_query2;
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index dafe9d3..28ec470c 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -1191,8 +1191,10 @@ TEST_P(FeatureInfoTest, InitializeEXT_occlusion_query_boolean) { SetupInitExpectations("GL_EXT_occlusion_query_boolean"); - EXPECT_THAT(info_->extensions(), - HasSubstr("GL_EXT_occlusion_query_boolean")); + if (GetContextType() == CONTEXT_TYPE_OPENGLES2) { + EXPECT_THAT(info_->extensions(), + HasSubstr("GL_EXT_occlusion_query_boolean")); + } EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); EXPECT_FALSE(info_->feature_flags( ).use_arb_occlusion_query2_for_occlusion_query_boolean); @@ -1202,8 +1204,10 @@ TEST_P(FeatureInfoTest, InitializeARB_occlusion_query) { SetupInitExpectations("GL_ARB_occlusion_query"); - EXPECT_THAT(info_->extensions(), - HasSubstr("GL_EXT_occlusion_query_boolean")); + if (GetContextType() == CONTEXT_TYPE_OPENGLES2) { + EXPECT_THAT(info_->extensions(), + HasSubstr("GL_EXT_occlusion_query_boolean")); + } EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); EXPECT_FALSE(info_->feature_flags( ).use_arb_occlusion_query2_for_occlusion_query_boolean); @@ -1213,8 +1217,10 @@ TEST_P(FeatureInfoTest, InitializeARB_occlusion_query2) { SetupInitExpectations("GL_ARB_occlusion_query2 GL_ARB_occlusion_query2"); - EXPECT_THAT(info_->extensions(), - HasSubstr("GL_EXT_occlusion_query_boolean")); + if (GetContextType() == CONTEXT_TYPE_OPENGLES2) { + EXPECT_THAT(info_->extensions(), + HasSubstr("GL_EXT_occlusion_query_boolean")); + } EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); EXPECT_TRUE(info_->feature_flags( ).use_arb_occlusion_query2_for_occlusion_query_boolean); @@ -1222,6 +1228,15 @@ ).use_arb_occlusion_query_for_occlusion_query_boolean); } +TEST_P(FeatureInfoTest, InitializeGLES3_occlusion_query_boolean) { + SetupInitExpectationsWithGLVersion("", "", "OpenGL ES 3.0"); + if (GetContextType() == CONTEXT_TYPE_OPENGLES2) { + EXPECT_THAT(info_->extensions(), + HasSubstr("GL_EXT_occlusion_query_boolean")); + } + EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); +} + TEST_P(FeatureInfoTest, InitializeOES_vertex_array_object) { SetupInitExpectations("GL_OES_vertex_array_object"); EXPECT_THAT(info_->extensions(),
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc index 4c2776d..6b763b6 100644 --- a/gpu/command_buffer/service/gl_context_virtual.cc +++ b/gpu/command_buffer/service/gl_context_virtual.cc
@@ -25,22 +25,7 @@ bool GLContextVirtual::Initialize(gl::GLSurface* compatible_surface, gl::GpuPreference gpu_preference) { SetGLStateRestorer(new GLStateRestorerImpl(decoder_)); - - // Virtual contexts obviously can't make a context that is compatible - // with the surface (the context already exists), but we do need to - // make a context current for SetupForVirtualization() below. - if (!IsCurrent(compatible_surface)) { - if (!shared_context_->MakeCurrent(compatible_surface)) { - // This is likely an error. The real context should be made as - // compatible with all required surfaces when it was created. - LOG(ERROR) << "Failed MakeCurrent(compatible_surface)"; - return false; - } - } - - shared_context_->SetupForVirtualization(); - shared_context_->MakeVirtuallyCurrent(this, compatible_surface); - return true; + return shared_context_->MakeVirtuallyCurrent(this, compatible_surface); } void GLContextVirtual::Destroy() {
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 10014934..1cf65b1 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -215,7 +215,6 @@ context_->SetGLVersionString(normalized_init.gl_version.c_str()); context_->GLContextStubWithExtensions::MakeCurrent(surface_.get()); - gl::GLSurfaceTestSupport::InitializeDynamicMockBindings(context_.get()); TestHelper::SetupContextGroupInitExpectations( gl_.get(),
diff --git a/gpu/command_buffer/service/gpu_service_test.cc b/gpu/command_buffer/service/gpu_service_test.cc index 753a8af3..b1608eb 100644 --- a/gpu/command_buffer/service/gpu_service_test.cc +++ b/gpu/command_buffer/service/gpu_service_test.cc
@@ -37,7 +37,6 @@ context_->SetGLVersionString(gl_version); surface_ = new gl::GLSurfaceStub; context_->MakeCurrent(surface_.get()); - gl::GLSurfaceTestSupport::InitializeDynamicMockBindings(context_.get()); ran_setup_ = true; }
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc index edc7f4f..ad0a5558 100644 --- a/gpu/command_buffer/service/in_process_command_buffer.cc +++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -684,9 +684,6 @@ DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat( internalformat, gpu_memory_buffer->GetFormat())); - DCHECK(image_gmb_ids_map_.find(new_id) == image_gmb_ids_map_.end()); - image_gmb_ids_map_[new_id] = gpu_memory_buffer->GetId().id; - // This handle is owned by the GPU thread and must be passed to it or it // will leak. In otherwords, do not early out on error between here and the // queuing of the CreateImage task below. @@ -791,10 +788,6 @@ void InProcessCommandBuffer::DestroyImage(int32_t id) { CheckSequencedThread(); - auto it = image_gmb_ids_map_.find(id); - if (it != image_gmb_ids_map_.end()) - image_gmb_ids_map_.erase(it); - QueueTask(base::Bind(&InProcessCommandBuffer::DestroyImageOnGpuThread, base::Unretained(this), id)); @@ -833,14 +826,6 @@ return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); } -int32_t InProcessCommandBuffer::GetImageGpuMemoryBufferId(unsigned image_id) { - CheckSequencedThread(); - auto it = image_gmb_ids_map_.find(image_id); - if (it != image_gmb_ids_map_.end()) - return it->second; - return -1; -} - void InProcessCommandBuffer::FenceSyncReleaseOnGpuThread(uint64_t release) { DCHECK(!sync_point_client_->client_state()->IsFenceSyncReleased(release)); gles2::MailboxManager* mailbox_manager =
diff --git a/gpu/command_buffer/service/in_process_command_buffer.h b/gpu/command_buffer/service/in_process_command_buffer.h index 78fb199..626d6db 100644 --- a/gpu/command_buffer/service/in_process_command_buffer.h +++ b/gpu/command_buffer/service/in_process_command_buffer.h
@@ -115,7 +115,6 @@ size_t height, unsigned internalformat, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query_id, const base::Closure& callback) override; void SetLock(base::Lock*) override; void EnsureWorkVisible() override; @@ -272,9 +271,6 @@ // the client thread. std::unique_ptr<base::SequenceChecker> sequence_checker_; - // A map from image id to GpuMemoryBuffer id. - std::map<int32_t, int32_t> image_gmb_ids_map_; - base::WeakPtr<InProcessCommandBuffer> client_thread_weak_ptr_; base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; base::WeakPtrFactory<InProcessCommandBuffer> client_thread_weak_ptr_factory_; @@ -310,7 +306,6 @@ scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; scoped_refptr<gpu::gles2::FramebufferCompletenessCache> framebuffer_completeness_cache_; - DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); };
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc index 8afa0b13f..fa72a021 100644 --- a/gpu/command_buffer/service/program_manager.cc +++ b/gpu/command_buffer/service/program_manager.cc
@@ -59,7 +59,7 @@ const std::string& name, int* element_index, std::string* new_name) { DCHECK(element_index); DCHECK(new_name); - if (name.size() < 3 || name[name.size() - 1] != ']') { + if (name.size() < 3 || name.back() != ']') { *element_index = 0; *new_name = name; return true; @@ -1649,7 +1649,6 @@ *conflicting_name = name; return true; } - } return false; }
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc index 455301b..aad304c 100644 --- a/gpu/command_buffer/tests/gl_manager.cc +++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -147,6 +147,7 @@ return IOSurfaceGetWidthOfPlane(iosurface_, plane); } gfx::GpuMemoryBufferId GetId() const override { + NOTREACHED(); return gfx::GpuMemoryBufferId(0); } gfx::GpuMemoryBufferHandle GetHandle() const override { @@ -520,7 +521,6 @@ gfx::Size size(width, height); scoped_refptr<gl::GLImage> gl_image; - int gmb_id = -1; #if defined(OS_MACOSX) if (use_iosurface_memory_buffers_) { IOSurfaceGpuMemoryBuffer* gpu_memory_buffer = @@ -533,7 +533,6 @@ return -1; } gl_image = image; - gmb_id = gpu_memory_buffer->GetId().id; } #endif // defined(OS_MACOSX) if (!gl_image) { @@ -554,12 +553,6 @@ gpu::gles2::ImageManager* image_manager = decoder_->GetImageManager(); DCHECK(image_manager); image_manager->AddImage(gl_image.get(), new_id); - - if (gmb_id != -1) { - DCHECK(image_gmb_ids_map_.find(new_id) == image_gmb_ids_map_.end()); - image_gmb_ids_map_[new_id] = gmb_id; - } - return new_id; } @@ -573,18 +566,7 @@ return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); } -int32_t GLManager::GetImageGpuMemoryBufferId(unsigned image_id) { - auto it = image_gmb_ids_map_.find(image_id); - if (it != image_gmb_ids_map_.end()) - return it->second; - return -1; -} - void GLManager::DestroyImage(int32_t id) { - auto it = image_gmb_ids_map_.find(id); - if (it != image_gmb_ids_map_.end()) - image_gmb_ids_map_.erase(it); - gpu::gles2::ImageManager* image_manager = decoder_->GetImageManager(); DCHECK(image_manager); image_manager->RemoveImage(id);
diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h index 1c8175b..4dff34d7 100644 --- a/gpu/command_buffer/tests/gl_manager.h +++ b/gpu/command_buffer/tests/gl_manager.h
@@ -137,7 +137,6 @@ size_t height, unsigned internalformat, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query, const base::Closure& callback) override; void SetLock(base::Lock*) override; void EnsureWorkVisible() override; @@ -186,9 +185,6 @@ bool use_iosurface_memory_buffers_ = false; - // A map from image id to GpuMemoryBuffer id. - std::map<int32_t, int32_t> image_gmb_ids_map_; - // Used on Android to virtualize GL for all contexts. static int use_count_; static scoped_refptr<gl::GLShareGroup>* base_share_group_;
diff --git a/gpu/command_buffer_traits.gypi b/gpu/command_buffer_traits.gypi index 6be45451..1008638 100644 --- a/gpu/command_buffer_traits.gypi +++ b/gpu/command_buffer_traits.gypi
@@ -7,6 +7,8 @@ '../base/base.gyp:base', '../ipc/ipc.gyp:ipc', '../third_party/khronos/khronos.gyp:khronos_headers', + '../ui/gfx/ipc/geometry/gfx_ipc_geometry.gyp:gfx_ipc_geometry', + 'command_buffer/command_buffer.gyp:gles2_utils', ], 'include_dirs': [ '..', @@ -26,6 +28,8 @@ 'dependencies!': [ '../base/base.gyp:base', '../ipc/ipc.gyp:ipc', + '../ui/gfx/ipc/geometry/gfx_ipc_geometry.gyp:gfx_ipc_geometry', + 'command_buffer/command_buffer.gyp:gles2_utils', ], }], ['OS=="android"', {
diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc index 5561d32f..752003fe 100644 --- a/gpu/config/gpu_control_list.cc +++ b/gpu/config/gpu_control_list.cc
@@ -38,7 +38,7 @@ // If the splitter is '-', we assume it's a date with format "mm-dd-yyyy"; // we split it into the order of "yyyy", "mm", "dd". if (splitter == '-') { - std::string year = (*version)[version->size() - 1]; + std::string year = version->back(); for (int i = version->size() - 1; i > 0; --i) { (*version)[i] = (*version)[i - 1]; } @@ -125,7 +125,7 @@ const char kOp[] = "op"; -} // namespace anonymous +} // namespace GpuControlList::VersionInfo::VersionInfo( const std::string& version_op,
diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc index df4f2fe..1893e206 100644 --- a/gpu/config/software_rendering_list_json.cc +++ b/gpu/config/software_rendering_list_json.cc
@@ -18,7 +18,7 @@ { "name": "software rendering list", // Please update the version number whenever you change this file. - "version": "11.3", + "version": "11.4", "entries": [ { "id": 1, @@ -254,8 +254,12 @@ }, "exceptions": [ { - "gl_vendor": "Vivante Corporation", + "gl_vendor": "Vivante Corporation", "gl_renderer": "Vivante GC1000" + }, + { + "gl_vendor": "ARM", + "gl_renderer": "Mali-4.*" } ], "features": [
diff --git a/gpu/gles2_conform_support/egl/context.cc b/gpu/gles2_conform_support/egl/context.cc index 4d7a609..7993e19 100644 --- a/gpu/gles2_conform_support/egl/context.cc +++ b/gpu/gles2_conform_support/egl/context.cc
@@ -181,11 +181,6 @@ return -1; } -int32_t Context::GetImageGpuMemoryBufferId(unsigned image_id) { - NOTIMPLEMENTED(); - return -1; -} - void Context::SignalQuery(uint32_t query, const base::Closure& callback) { NOTIMPLEMENTED(); }
diff --git a/gpu/gles2_conform_support/egl/context.h b/gpu/gles2_conform_support/egl/context.h index bc3ad75..341b5c0 100644 --- a/gpu/gles2_conform_support/egl/context.h +++ b/gpu/gles2_conform_support/egl/context.h
@@ -68,7 +68,6 @@ size_t height, unsigned internalformat, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query, const base::Closure& callback) override; void SetLock(base::Lock*) override; void EnsureWorkVisible() override;
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index f7b73b4..45a6bac0 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp
@@ -911,31 +911,8 @@ 'dependencies': [ '../base/base.gyp:base_win64', '../ipc/ipc.gyp:ipc_win64', - 'command_buffer_common_win64', - ], - 'defines': [ - '<@(nacl_win64_defines)', - 'GPU_IMPLEMENTATION', - ], - 'configurations': { - 'Common_Base': { - 'msvs_target_platform': 'x64', - }, - }, - }, - { - 'target_name': 'gpu_ipc_common_win64', - 'type': 'static_library', - 'variables': { - 'nacl_win64_target': 1, - }, - 'includes': [ - 'command_buffer_traits.gypi', - 'gpu_ipc_common.gypi', - ], - 'dependencies': [ - '../base/base.gyp:base_win64', - '../ipc/ipc.gyp:ipc_win64', + '../ui/gfx/ipc/geometry/gfx_ipc_geometry.gyp:gfx_ipc_geometry_win64', + 'command_buffer/command_buffer.gyp:gles2_utils_win64', 'command_buffer_common_win64', ], 'defines': [
diff --git a/gpu/gpu_nacl.gyp b/gpu/gpu_nacl.gyp index faf1cac6..4bc64f0 100644 --- a/gpu/gpu_nacl.gyp +++ b/gpu/gpu_nacl.gyp
@@ -122,6 +122,7 @@ 'dependencies': [ '../base/base_nacl.gyp:base_nacl', '../base/base_nacl.gyp:base_nacl_nonsfi', + '../ui/gfx/ipc/geometry/gfx_ipc_geometry_nacl.gyp:gfx_ipc_geometry_nacl', 'command_buffer_common_nacl', ], },
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.cc b/gpu/ipc/client/command_buffer_proxy_impl.cc index 9c1ec56..faf69b980 100644 --- a/gpu/ipc/client/command_buffer_proxy_impl.cc +++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -455,9 +455,6 @@ gpu_memory_buffer_manager->GpuMemoryBufferFromClientBuffer(buffer); DCHECK(gpu_memory_buffer); - DCHECK(image_gmb_map_.find(new_id) == image_gmb_map_.end()); - image_gmb_map_[new_id].gpu_memory_buffer_id = gpu_memory_buffer->GetId().id; - // This handle is owned by the GPU process and must be passed to it or it // will leak. In otherwords, do not early out on error between here and the // sending of the CreateImage IPC below. @@ -511,9 +508,6 @@ if (last_state_.error != gpu::error::kNoError) return; - auto it = image_gmb_map_.find(id); - if (it != image_gmb_map_.end()) - image_gmb_map_.erase(it); Send(new GpuCommandBufferMsg_DestroyImage(route_id_, id)); } @@ -533,19 +527,9 @@ int32_t result = CreateImage(buffer->AsClientBuffer(), width, height, internal_format); - if (result != -1) - image_gmb_map_[result].owned_gpu_memory_buffer = std::move(buffer); return result; } -int32_t CommandBufferProxyImpl::GetImageGpuMemoryBufferId(unsigned image_id) { - CheckLock(); - auto it = image_gmb_map_.find(image_id); - if (it != image_gmb_map_.end()) - return it->second.gpu_memory_buffer_id; - return -1; -} - uint32_t CommandBufferProxyImpl::CreateStreamTexture(uint32_t texture_id) { CheckLock(); if (last_state_.error != gpu::error::kNoError) @@ -873,10 +857,4 @@ gpu_control_client_->OnGpuControlLostContext(); } -CommandBufferProxyImpl::ImageInfo::ImageInfo() {} -CommandBufferProxyImpl::ImageInfo::~ImageInfo() {} -CommandBufferProxyImpl::ImageInfo::ImageInfo(ImageInfo&& other) = default; -CommandBufferProxyImpl::ImageInfo& CommandBufferProxyImpl::ImageInfo::operator=( - ImageInfo&& other) = default; - } // namespace gpu
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.h b/gpu/ipc/client/command_buffer_proxy_impl.h index bdc7bc8..1c60dea 100644 --- a/gpu/ipc/client/command_buffer_proxy_impl.h +++ b/gpu/ipc/client/command_buffer_proxy_impl.h
@@ -121,7 +121,6 @@ size_t height, unsigned internal_format, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query, const base::Closure& callback) override; void SetLock(base::Lock* lock) override; void EnsureWorkVisible() override; @@ -294,20 +293,6 @@ SwapBuffersCompletionCallback swap_buffers_completion_callback_; UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; - // |gpu_memory_buffer_id| will always contain a valid (not -1) id. - // If the GpuMemoryBuffer was created through this class, then - // |owned_gpu_memory_buffer| will also be not null. - struct ImageInfo { - ImageInfo(); - ~ImageInfo(); - ImageInfo(ImageInfo&& other); - ImageInfo& operator=(ImageInfo&& other); - int32_t gpu_memory_buffer_id = -1; - std::unique_ptr<gfx::GpuMemoryBuffer> owned_gpu_memory_buffer; - }; - // A map from image id to ImageInfo. - std::map<int32_t, ImageInfo> image_gmb_map_; - base::WeakPtr<CommandBufferProxyImpl> weak_this_; scoped_refptr<base::SequencedTaskRunner> callback_thread_;
diff --git a/gpu/ipc/common/BUILD.gn b/gpu/ipc/common/BUILD.gn index 0962b0b..a22105f8 100644 --- a/gpu/ipc/common/BUILD.gn +++ b/gpu/ipc/common/BUILD.gn
@@ -53,6 +53,7 @@ deps = [ "//base", + "//gpu/command_buffer/common:gles2_utils", "//ui/gfx/ipc", "//ui/gfx/ipc/geometry", ]
diff --git a/gpu/ipc/common/gpu_command_buffer_traits_multi.h b/gpu/ipc/common/gpu_command_buffer_traits_multi.h index 4994e42..2b893b4a3 100644 --- a/gpu/ipc/common/gpu_command_buffer_traits_multi.h +++ b/gpu/ipc/common/gpu_command_buffer_traits_multi.h
@@ -6,9 +6,12 @@ #include "gpu/command_buffer/common/capabilities.h" #include "gpu/command_buffer/common/constants.h" +#include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/gpu_export.h" #include "ipc/ipc_message_utils.h" #include "ipc/param_traits_macros.h" +#include "ui/gfx/ipc/geometry/gfx_param_traits.h" +#include "ui/gl/gpu_preference.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT GPU_EXPORT @@ -18,6 +21,9 @@ gpu::CommandBufferNamespace, gpu::CommandBufferNamespace::INVALID, gpu::CommandBufferNamespace::NUM_COMMAND_BUFFER_NAMESPACES - 1) +IPC_ENUM_TRAITS_MAX_VALUE(gl::GpuPreference, gl::GpuPreferenceLast) +IPC_ENUM_TRAITS_MAX_VALUE(gpu::gles2::ContextType, + gpu::gles2::CONTEXT_TYPE_LAST) IPC_STRUCT_TRAITS_BEGIN(gpu::Capabilities::ShaderPrecision) IPC_STRUCT_TRAITS_MEMBER(min_range) @@ -120,3 +126,22 @@ IPC_STRUCT_TRAITS_MEMBER(major_version) IPC_STRUCT_TRAITS_MEMBER(minor_version) IPC_STRUCT_TRAITS_END() + +IPC_STRUCT_TRAITS_BEGIN(gpu::gles2::ContextCreationAttribHelper) + IPC_STRUCT_TRAITS_MEMBER(offscreen_framebuffer_size) + IPC_STRUCT_TRAITS_MEMBER(gpu_preference) + IPC_STRUCT_TRAITS_MEMBER(alpha_size) + IPC_STRUCT_TRAITS_MEMBER(blue_size) + IPC_STRUCT_TRAITS_MEMBER(green_size) + IPC_STRUCT_TRAITS_MEMBER(red_size) + IPC_STRUCT_TRAITS_MEMBER(depth_size) + IPC_STRUCT_TRAITS_MEMBER(stencil_size) + IPC_STRUCT_TRAITS_MEMBER(samples) + IPC_STRUCT_TRAITS_MEMBER(sample_buffers) + IPC_STRUCT_TRAITS_MEMBER(buffer_preserved) + IPC_STRUCT_TRAITS_MEMBER(bind_generates_resource) + IPC_STRUCT_TRAITS_MEMBER(fail_if_major_perf_caveat) + IPC_STRUCT_TRAITS_MEMBER(lose_context_when_out_of_memory) + IPC_STRUCT_TRAITS_MEMBER(context_type) + IPC_STRUCT_TRAITS_MEMBER(should_use_native_gmb_for_backbuffer) +IPC_STRUCT_TRAITS_END()
diff --git a/gpu/ipc/common/gpu_param_traits_macros.h b/gpu/ipc/common/gpu_param_traits_macros.h index 971c38f..c8ad990 100644 --- a/gpu/ipc/common/gpu_param_traits_macros.h +++ b/gpu/ipc/common/gpu_param_traits_macros.h
@@ -6,7 +6,6 @@ #define GPU_IPC_COMMON_GPU_PARAM_TRAITS_MACROS_H_ #include "gpu/command_buffer/common/constants.h" -#include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/command_buffer/common/gpu_memory_allocation.h" #include "gpu/config/gpu_info.h" #include "gpu/gpu_export.h" @@ -14,7 +13,6 @@ #include "ipc/ipc_message_macros.h" #include "ui/gfx/ipc/geometry/gfx_param_traits.h" #include "ui/gfx/ipc/gfx_param_traits.h" -#include "ui/gl/gpu_preference.h" #include "url/ipc/url_param_traits.h" #undef IPC_MESSAGE_EXPORT @@ -39,7 +37,6 @@ IPC_STRUCT_TRAITS_MEMBER(max_framerate_denominator) IPC_STRUCT_TRAITS_END() -IPC_ENUM_TRAITS_MAX_VALUE(gl::GpuPreference, gl::GpuPreferenceLast) IPC_ENUM_TRAITS_MAX_VALUE(gpu::GpuStreamPriority, gpu::GpuStreamPriority::LAST) IPC_ENUM_TRAITS_MAX_VALUE(gpu::MemoryAllocation::PriorityCutoff, gpu::MemoryAllocation::CUTOFF_LAST) @@ -51,8 +48,6 @@ IPC_ENUM_TRAITS_MIN_MAX_VALUE(gpu::VideoCodecProfile, gpu::VIDEO_CODEC_PROFILE_MIN, gpu::VIDEO_CODEC_PROFILE_MAX) -IPC_ENUM_TRAITS_MAX_VALUE(gpu::gles2::ContextType, - gpu::gles2::CONTEXT_TYPE_LAST) IPC_STRUCT_TRAITS_BEGIN(gpu::DxDiagNode) IPC_STRUCT_TRAITS_MEMBER(values) @@ -113,24 +108,4 @@ IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(gpu::gles2::ContextCreationAttribHelper) - IPC_STRUCT_TRAITS_MEMBER(offscreen_framebuffer_size) - IPC_STRUCT_TRAITS_MEMBER(gpu_preference) - IPC_STRUCT_TRAITS_MEMBER(alpha_size) - IPC_STRUCT_TRAITS_MEMBER(blue_size) - IPC_STRUCT_TRAITS_MEMBER(green_size) - IPC_STRUCT_TRAITS_MEMBER(red_size) - IPC_STRUCT_TRAITS_MEMBER(depth_size) - IPC_STRUCT_TRAITS_MEMBER(stencil_size) - IPC_STRUCT_TRAITS_MEMBER(samples) - IPC_STRUCT_TRAITS_MEMBER(sample_buffers) - IPC_STRUCT_TRAITS_MEMBER(buffer_preserved) - IPC_STRUCT_TRAITS_MEMBER(bind_generates_resource) - IPC_STRUCT_TRAITS_MEMBER(fail_if_major_perf_caveat) - IPC_STRUCT_TRAITS_MEMBER(lose_context_when_out_of_memory) - IPC_STRUCT_TRAITS_MEMBER(context_type) - IPC_STRUCT_TRAITS_MEMBER(should_use_native_gmb_for_backbuffer) -IPC_STRUCT_TRAITS_END() - - #endif // GPU_IPC_COMMON_GPU_PARAM_TRAITS_MACROS_H_
diff --git a/gpu/ipc/service/gpu_channel_unittest.cc b/gpu/ipc/service/gpu_channel_unittest.cc index 4ac67f67..e41df434 100644 --- a/gpu/ipc/service/gpu_channel_unittest.cc +++ b/gpu/ipc/service/gpu_channel_unittest.cc
@@ -118,23 +118,12 @@ .Times(AnyNumber()) .WillRepeatedly(Return(GL_FRAMEBUFFER_COMPLETE)); - // Dynamic bindings must be set up for the GLES2DecoderImpl, which requires - // a GLContext. Use a GLContextStub which does nothing but call through to - // our |gl_interface| above. - stub_context_ = new gl::GLContextStub; - stub_surface_ = new gl::GLSurfaceStub; - stub_context_->MakeCurrent(stub_surface_.get()); - gl::GLSurfaceTestSupport::InitializeDynamicMockBindings( - stub_context_.get()); - GpuChannelTestCommon::SetUp(); } void TearDown() override { GpuChannelTestCommon::TearDown(); - stub_context_ = nullptr; - stub_surface_ = nullptr; gl::MockGLInterface::SetGLInterface(nullptr); gl::init::ClearGLBindings(); gl_interface_ = nullptr; @@ -192,8 +181,6 @@ private: base::TestMessageLoop message_loop_; std::unique_ptr<gl::MockGLInterface> gl_interface_; - scoped_refptr<gl::GLContextStub> stub_context_; - scoped_refptr<gl::GLSurfaceStub> stub_surface_; }; #if defined(OS_WIN)
diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc index 98431430..abb2217 100644 --- a/gpu/perftests/texture_upload_perftest.cc +++ b/gpu/perftests/texture_upload_perftest.cc
@@ -408,7 +408,7 @@ for (int i = 0; i < kUploadPerfWarmupRuns + kUploadPerfTestRuns; ++i) { GenerateTextureData(size, GLFormatBytePerPixel(format), i + 1, &pixels); auto run = UploadAndDraw(texture_id, size, pixels, format, subimage); - if (i < kUploadPerfWarmupRuns || !run.size()) { + if (i < kUploadPerfWarmupRuns || run.empty()) { continue; } successful_runs++;
diff --git a/gpu/tools/compositor_model_bench/compositor_model_bench.cc b/gpu/tools/compositor_model_bench/compositor_model_bench.cc index dca35a7..2cf79d0 100644 --- a/gpu/tools/compositor_model_bench/compositor_model_bench.cc +++ b/gpu/tools/compositor_model_bench/compositor_model_bench.cc
@@ -105,7 +105,7 @@ } void Run() { - if (!sims_remaining_.size()) { + if (sims_remaining_.empty()) { LOG(WARNING) << "No configuration files loaded."; return; } @@ -321,7 +321,7 @@ } } - if (!sims_remaining_.size()) { + if (sims_remaining_.empty()) { DumpOutput(); base::MessageLoop::current()->QuitWhenIdle(); return false;
diff --git a/headless/lib/browser/headless_browser_context_impl.cc b/headless/lib/browser/headless_browser_context_impl.cc index ed018805..76bc2c25d 100644 --- a/headless/lib/browser/headless_browser_context_impl.cc +++ b/headless/lib/browser/headless_browser_context_impl.cc
@@ -152,9 +152,9 @@ content::URLRequestInterceptorScopedVector request_interceptors) { scoped_refptr<HeadlessURLRequestContextGetter> url_request_context_getter( new HeadlessURLRequestContextGetter( - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), - content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE), protocol_handlers, std::move(protocol_handlers_), std::move(request_interceptors), options()));
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc index 04ce85f..e81e1a3 100644 --- a/headless/lib/browser/headless_browser_impl.cc +++ b/headless/lib/browser/headless_browser_impl.cc
@@ -87,13 +87,13 @@ scoped_refptr<base::SingleThreadTaskRunner> HeadlessBrowserImpl::BrowserMainThread() const { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::UI); } scoped_refptr<base::SingleThreadTaskRunner> HeadlessBrowserImpl::BrowserFileThread() const { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::FILE); }
diff --git a/headless/lib/browser/headless_url_request_context_getter.cc b/headless/lib/browser/headless_url_request_context_getter.cc index d253e5c..07b0438c 100644 --- a/headless/lib/browser/headless_url_request_context_getter.cc +++ b/headless/lib/browser/headless_url_request_context_getter.cc
@@ -67,9 +67,8 @@ // TODO(skyostil): Make these configurable. builder.set_data_enabled(true); builder.set_file_enabled(true); - builder.SetFileTaskRunner( - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::FILE)); + builder.SetFileTaskRunner(content::BrowserThread::GetTaskRunnerForThread( + content::BrowserThread::FILE)); if (!proxy_server_.IsEmpty()) { builder.set_proxy_service( net::ProxyService::CreateFixed(proxy_server_.ToString())); @@ -108,7 +107,7 @@ scoped_refptr<base::SingleThreadTaskRunner> HeadlessURLRequestContextGetter::GetNetworkTaskRunner() const { - return content::BrowserThread::GetMessageLoopProxyForThread( + return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO); }
diff --git a/headless/public/util/error_reporter.cc b/headless/public/util/error_reporter.cc index 54c0758..88722d7b 100644 --- a/headless/public/util/error_reporter.cc +++ b/headless/public/util/error_reporter.cc
@@ -24,7 +24,7 @@ void ErrorReporter::SetName(const char* name) { DCHECK(!path_.empty()); - path_[path_.size() - 1] = name; + path_.back() = name; } void ErrorReporter::AddError(base::StringPiece description) {
diff --git a/infra/config/cq.cfg b/infra/config/cq.cfg index 841960b8..c3076bc 100644 --- a/infra/config/cq.cfg +++ b/infra/config/cq.cfg
@@ -65,14 +65,10 @@ builders { name: "ios-simulator" } builders { name: "ios-simulator-gn" } builders { name: "mac_chromium_compile_dbg_ng" } - builders { - name: "mac_chromium_gyp_rel" - experiment_percentage: 10 - } builders { name: "mac_chromium_rel_ng" } builders { name: "mac_chromium_10.10_rel_ng" - experiment_percentage: 100 + experiment_percentage: 50 } } buckets {
diff --git a/ios/build/bots/chromium.fyi/ClangToTiOS.json b/ios/build/bots/chromium.fyi/ClangToTiOS.json index 5af1ebed..efc3707 100644 --- a/ios/build/bots/chromium.fyi/ClangToTiOS.json +++ b/ios/build/bots/chromium.fyi/ClangToTiOS.json
@@ -6,15 +6,18 @@ "Clang tip-of-tree builder for iOS." ], "xcode version": "7.0", - "GYP_DEFINES": { - "chromium_ios_signing": "0", - "clang_use_chrome_plugins": "0", - "target_subarch": "arm32", - "werror": "" - }, + "GYP_DEFINES": [ + "OS=ios", + "chromium_ios_signing=0", + "component=static_library", + "clang_use_chrome_plugins=0", + "target_subarch=arm32", + "werror=" + ], "env": { "LLVM_FORCE_HEAD_REVISION": "YES" }, + "mb_type": "gyp", "compiler": "ninja", "configuration": "Release", "sdk": "iphoneos9.0",
diff --git a/ios/build/bots/chromium.fyi/EarlGreyiOS.json b/ios/build/bots/chromium.fyi/EarlGreyiOS.json index 140cf03..52238af 100644 --- a/ios/build/bots/chromium.fyi/EarlGreyiOS.json +++ b/ios/build/bots/chromium.fyi/EarlGreyiOS.json
@@ -7,10 +7,15 @@ "Tests run on iPhone 5s (64-bit)." ], "xcode version": "7.0", - "GYP_DEFINES": { - "chromium_ios_signing": "0", - "target_subarch": "64" - }, + "GYP_DEFINES": [ + "OS=ios", + "chromium_ios_signing=0", + "component=static_library", + "use_goma=1", + "gomadir=$(goma_dir)", + "target_subarch=arm64" + ], + "mb_type": "gyp", "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator9.0",
diff --git a/ios/build/bots/chromium.mac/ios-device-gn.json b/ios/build/bots/chromium.mac/ios-device-gn.json index 2b73b4c..70716e0 100644 --- a/ios/build/bots/chromium.mac/ios-device-gn.json +++ b/ios/build/bots/chromium.mac/ios-device-gn.json
@@ -4,14 +4,17 @@ "smut" ], "comments": [ - "GN + Ninja fat binary builder." + "GN + Ninja 32-bit builder." ], "xcode version": "7.0", - "GYP_DEFINES": { - "chromium_ios_signing": "0", - "target_subarch": "both", - "use_goma": "1" - }, + "GYP_DEFINES": [ + "OS=ios", + "chromium_ios_signing=0", + "component=static_library", + "use_goma=1", + "gomadir=$(goma_dir)", + "target_subarch=arm32" + ], "gn_args": [ "ios_enable_code_signing=false", "target_cpu=\"arm\"",
diff --git a/ios/build/bots/chromium.mac/ios-device.json b/ios/build/bots/chromium.mac/ios-device.json index 350f9d7..61632bb4 100644 --- a/ios/build/bots/chromium.mac/ios-device.json +++ b/ios/build/bots/chromium.mac/ios-device.json
@@ -6,10 +6,15 @@ "Builder for 32-bit devices." ], "xcode version": "7.0", - "GYP_DEFINES": { - "chromium_ios_signing": "0", - "target_subarch": "arm32" - }, + "GYP_DEFINES": [ + "OS=ios", + "chromium_ios_signing=0", + "component=static_library", + "use_goma=1", + "gomadir=$(goma_dir)", + "target_subarch=arm32" + ], + "mb_type": "gyp", "compiler": "ninja", "configuration": "Release", "sdk": "iphoneos9.0",
diff --git a/ios/build/bots/chromium.mac/ios-simulator-gn.json b/ios/build/bots/chromium.mac/ios-simulator-gn.json index e62ed39..c2075e6 100644 --- a/ios/build/bots/chromium.mac/ios-simulator-gn.json +++ b/ios/build/bots/chromium.mac/ios-simulator-gn.json
@@ -7,11 +7,13 @@ "GN + Ninja simulator build." ], "xcode version": "7.0", - "GYP_DEFINES": { - "chromium_ios_signing": "0", - "gomadir": "$(goma_dir)", - "use_goma": "1" - }, + "GYP_DEFINES": [ + "OS=ios", + "chromium_ios_signing=0", + "component=static_library", + "use_goma=1", + "gomadir=$(goma_dir)" + ], "gn_args": [ "target_os=\"ios\"", "target_cpu=\"x64\"",
diff --git a/ios/build/bots/chromium.mac/ios-simulator.json b/ios/build/bots/chromium.mac/ios-simulator.json index c1b8f44..f32ce9d8 100644 --- a/ios/build/bots/chromium.mac/ios-simulator.json +++ b/ios/build/bots/chromium.mac/ios-simulator.json
@@ -7,10 +7,15 @@ "Tests run on iPhone 5s (64-bit) and iPad Retina (32-bit)." ], "xcode version": "7.0", - "GYP_DEFINES": { - "chromium_ios_signing": "0", - "target_subarch": "both" - }, + "GYP_DEFINES": [ + "OS=ios", + "chromium_ios_signing=0", + "component=static_library", + "use_goma=1", + "gomadir=$(goma_dir)", + "target_subarch=both" + ], + "mb_type": "gyp", "compiler": "ninja", "configuration": "Debug", "sdk": "iphonesimulator9.0",
diff --git a/ios/chrome/browser/ios_chrome_io_thread.mm b/ios/chrome/browser/ios_chrome_io_thread.mm index 97721b6..22fc9c5 100644 --- a/ios/chrome/browser/ios_chrome_io_thread.mm +++ b/ios/chrome/browser/ios_chrome_io_thread.mm
@@ -396,7 +396,7 @@ quic_user_agent_id.push_back(' '); quic_user_agent_id.append(web::BuildOSCpuInfo()); - network_session_configurator::ParseFieldTrials(true, true, quic_user_agent_id, + network_session_configurator::ParseFieldTrials(true, quic_user_agent_id, ¶ms_); const version_info::Channel channel = ::GetChannel(); if (channel == version_info::Channel::UNKNOWN ||
diff --git a/ios/chrome/browser/net/ios_chrome_url_request_context_getter.h b/ios/chrome/browser/net/ios_chrome_url_request_context_getter.h index 9e8cc8f..c1205259 100644 --- a/ios/chrome/browser/net/ios_chrome_url_request_context_getter.h +++ b/ios/chrome/browser/net/ios_chrome_url_request_context_getter.h
@@ -30,7 +30,7 @@ // Note that GetURLRequestContext() can only be called from the IO // thread (it will assert otherwise). - // GetIOMessageLoopProxy however can be called from any thread. + // GetIOTaskRunner however can be called from any thread. // // net::URLRequestContextGetter implementation. net::URLRequestContext* GetURLRequestContext() override;
diff --git a/ios/crnet/CrNet.h b/ios/crnet/CrNet.h index 01b0916..0be9b776 100644 --- a/ios/crnet/CrNet.h +++ b/ios/crnet/CrNet.h
@@ -50,7 +50,11 @@ // Installs CrNet. Once installed, CrNet intercepts and handles all // NSURLConnection and NSURLRequests issued by the app, including UIWebView page -// loads. +// loads. It is recommended to call this method on the application main thread. +// If the method is called on any thread other than the main one, the method +// will internally try to execute synchronously using the main GCD queue. +// Please make sure that the main thread is not blocked by a job +// that calls this method; otherwise, a deadlock can occur. + (void)install; // Installs CrNet into an NSURLSession, passed in by the caller. Note that this
diff --git a/ios/crnet/CrNet.mm b/ios/crnet/CrNet.mm index 72cee6e..f040e25 100644 --- a/ios/crnet/CrNet.mm +++ b/ios/crnet/CrNet.mm
@@ -59,7 +59,13 @@ + (void)install { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ + if (![NSThread isMainThread]) { + dispatch_sync(dispatch_get_main_queue(), ^(void) { + [self installInternal]; + }); + } else { [self installInternal]; + } }); }
diff --git a/ios/crnet/crnet_environment.mm b/ios/crnet/crnet_environment.mm index c4daef8..e098cef 100644 --- a/ios/crnet/crnet_environment.mm +++ b/ios/crnet/crnet_environment.mm
@@ -11,12 +11,14 @@ #include "base/at_exit.h" #include "base/atomicops.h" #include "base/command_line.h" +#include "base/feature_list.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/i18n/icu_util.h" #include "base/json/json_writer.h" #include "base/mac/bind_objc_block.h" +#include "base/mac/bundle_locations.h" #include "base/mac/foundation_util.h" #include "base/mac/scoped_block.h" #include "base/macros.h" @@ -152,6 +154,10 @@ if (!g_at_exit_) g_at_exit_ = new base::AtExitManager; + // Change the framework bundle to the bundle that contain CrNet framework. + // By default the framework bundle is set equal to the main (app) bundle. + NSBundle* frameworkBundle = [NSBundle bundleForClass:CrNet.class]; + base::mac::SetOverrideFrameworkBundle(frameworkBundle); #if !BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES) CHECK(base::i18n::InitializeICU()); #endif @@ -352,12 +358,14 @@ void CrNetEnvironment::InitializeOnNetworkThread() { DCHECK(network_io_thread_->task_runner()->BelongsToCurrentThread()); + base::FeatureList::InitializeInstance(std::string(), std::string()); ConfigureSdchOnNetworkThread(); + // Use the framework bundle to search for resources. + NSBundle* frameworkBundle = base::mac::FrameworkBundle(); NSString* bundlePath = - [[NSBundle mainBundle] pathForResource:@"crnet_resources" - ofType:@"bundle"]; + [frameworkBundle pathForResource:@"crnet_resources" ofType:@"bundle"]; NSBundle* bundle = [NSBundle bundleWithPath:bundlePath]; NSString* acceptableLanguages = NSLocalizedStringWithDefaultValue( @"IDS_ACCEPT_LANGUAGES", @@ -422,6 +430,9 @@ net::HttpNetworkSession::Params params; params.host_resolver = main_context_->host_resolver(); params.cert_verifier = main_context_->cert_verifier(); + params.cert_transparency_verifier = + main_context_->cert_transparency_verifier(); + params.ct_policy_enforcer = main_context_->ct_policy_enforcer(); params.channel_id_service = main_context_->channel_id_service(); params.transport_security_state = main_context_->transport_security_state(); params.proxy_service = main_context_->proxy_service(); @@ -429,7 +440,6 @@ params.http_auth_handler_factory = main_context_->http_auth_handler_factory(); params.http_server_properties = main_context_->http_server_properties(); params.net_log = main_context_->net_log(); - params.enable_spdy31 = spdy_enabled(); params.enable_http2 = spdy_enabled(); params.enable_quic = quic_enabled();
diff --git a/ios/provider/ios_provider_chrome.gyp b/ios/provider/ios_provider_chrome.gyp index 79ee2c5..41b03d6 100644 --- a/ios/provider/ios_provider_chrome.gyp +++ b/ios/provider/ios_provider_chrome.gyp
@@ -51,6 +51,10 @@ 'target_name': 'ios_provider_chrome_browser_test_support', 'type': 'static_library', 'sources': [ + '../public/provider/chrome/browser/signin/fake_chrome_identity.h', + '../public/provider/chrome/browser/signin/fake_chrome_identity.mm', + '../public/provider/chrome/browser/signin/fake_chrome_identity_service.h', + '../public/provider/chrome/browser/signin/fake_chrome_identity_service.mm', '../public/provider/chrome/browser/test_chrome_browser_provider.h', '../public/provider/chrome/browser/test_chrome_browser_provider.mm', '../public/provider/chrome/browser/test_chrome_provider_initializer.h', @@ -61,6 +65,7 @@ 'dependencies': [ '../../base/base.gyp:base', '../../components/components.gyp:signin_ios_browser_test_support', + '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest', 'ios_provider_chrome_browser', ],
diff --git a/ios/public/provider/chrome/browser/BUILD.gn b/ios/public/provider/chrome/browser/BUILD.gn index 3a5323e0..5a163fad 100644 --- a/ios/public/provider/chrome/browser/BUILD.gn +++ b/ios/public/provider/chrome/browser/BUILD.gn
@@ -44,6 +44,10 @@ testonly = true sources = [ + "signin/fake_chrome_identity.h", + "signin/fake_chrome_identity.mm", + "signin/fake_chrome_identity_service.h", + "signin/fake_chrome_identity_service.mm", "test_chrome_browser_provider.h", "test_chrome_browser_provider.mm", "test_chrome_provider_initializer.h", @@ -56,6 +60,7 @@ ":browser", "//base", "//components/signin/ios/browser:test_support", + "//testing/gmock", "//testing/gtest", ] }
diff --git a/ios/public/provider/chrome/browser/signin/fake_chrome_identity.h b/ios/public/provider/chrome/browser/signin/fake_chrome_identity.h new file mode 100644 index 0000000..df4345b --- /dev/null +++ b/ios/public/provider/chrome/browser/signin/fake_chrome_identity.h
@@ -0,0 +1,21 @@ +// 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_H_ +#define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_H_ + +#import "ios/public/provider/chrome/browser/signin/chrome_identity.h" + +// A fake ChromeIdentity used for testing. +@interface FakeChromeIdentity : ChromeIdentity + +// Returns an autoreleased ChromeIdentity based on |email|, |gaiaID| and |name|. +// The |hashedGaiaID| property will be derived from |name|. ++ (FakeChromeIdentity*)identityWithEmail:(NSString*)email + gaiaID:(NSString*)gaiaID + name:(NSString*)name; + +@end + +#endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_H_
diff --git a/ios/public/provider/chrome/browser/signin/fake_chrome_identity.mm b/ios/public/provider/chrome/browser/signin/fake_chrome_identity.mm new file mode 100644 index 0000000..9cf89972 --- /dev/null +++ b/ios/public/provider/chrome/browser/signin/fake_chrome_identity.mm
@@ -0,0 +1,54 @@ +// 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. + +#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h" + +#import "base/mac/scoped_nsobject.h" + +@implementation FakeChromeIdentity { + base::scoped_nsobject<NSString> _userEmail; + base::scoped_nsobject<NSString> _gaiaID; + base::scoped_nsobject<NSString> _userFullName; + base::scoped_nsobject<NSString> _hashedGaiaID; +} + ++ (FakeChromeIdentity*)identityWithEmail:(NSString*)email + gaiaID:(NSString*)gaiaID + name:(NSString*)name { + return + [[[FakeChromeIdentity alloc] initWithEmail:email gaiaID:gaiaID name:name] + autorelease]; +} + +- (instancetype)initWithEmail:(NSString*)email + gaiaID:(NSString*)gaiaID + name:(NSString*)name { + self = [super init]; + if (self) { + _userEmail.reset([email copy]); + _gaiaID.reset([gaiaID copy]); + _userFullName.reset([name copy]); + _hashedGaiaID.reset( + [[NSString stringWithFormat:@"%@_hashID", name] retain]); + } + return self; +} + +- (NSString*)userEmail { + return _userEmail; +} + +- (NSString*)gaiaID { + return _gaiaID; +} + +- (NSString*)userFullName { + return _userFullName; +} + +- (NSString*)hashedGaiaID { + return _hashedGaiaID; +} + +@end
diff --git a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h new file mode 100644 index 0000000..dbec6dc --- /dev/null +++ b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h
@@ -0,0 +1,64 @@ +// 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H_ +#define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H_ + +#include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" + +#include "base/mac/scoped_nsobject.h" +#include "testing/gmock/include/gmock/gmock.h" + +@class NSMutableArray; + +namespace ios { + +// A fake ChromeIdentityService used for testing. +class FakeChromeIdentityService : public ChromeIdentityService { + public: + FakeChromeIdentityService(); + ~FakeChromeIdentityService(); + + // Convenience method that returns the instance of + // |FakeChromeIdentityService| from the ChromeBrowserProvider. + static FakeChromeIdentityService* GetInstanceFromChromeProvider(); + + // ChromeIdentityService implementation. + bool IsValidIdentity(ChromeIdentity* identity) const override; + ChromeIdentity* GetIdentityWithGaiaID( + const std::string& gaia_id) const override; + bool HasIdentities() const override; + NSArray* GetAllIdentities() const override; + NSArray* GetAllIdentitiesSortedForDisplay() const override; + void ForgetIdentity(ChromeIdentity* identity, + ForgetIdentityCallback callback) override; + + MOCK_METHOD5(GetAccessToken, + void(ChromeIdentity* identity, + const std::string& client_id, + const std::string& client_secret, + const std::set<std::string>& scopes, + const ios::AccessTokenCallback& callback)); + + MOCK_METHOD1(GetMDMDeviceStatus, + ios::MDMDeviceStatus(NSDictionary* user_info)); + + MOCK_METHOD3(HandleMDMNotification, + bool(ChromeIdentity* identity, + NSDictionary* user_info, + ios::MDMStatusCallback callback)); + + // Adds the identities given their name. + void AddIdentities(NSArray* identitiesNames); + + // Adds |identity| to the available identities. + void AddIdentity(ChromeIdentity* identity); + + private: + base::scoped_nsobject<NSMutableArray> identities_; +}; + +} // namespace ios + +#endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H_
diff --git a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm new file mode 100644 index 0000000..c8bcb946 --- /dev/null +++ b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
@@ -0,0 +1,90 @@ +// 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. + +#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h" + +#import <Foundation/Foundation.h> + +#include "base/strings/sys_string_conversions.h" +#include "ios/public/provider/chrome/browser/chrome_browser_provider.h" +#import "ios/public/provider/chrome/browser/signin/fake_chrome_identity.h" + +namespace ios { + +NSString* const kIdentityEmailFormat = @"%@@foo.com"; +NSString* const kIdentityGaiaIDFormat = @"%@ID"; + +FakeChromeIdentityService::FakeChromeIdentityService() + : identities_([[NSMutableArray alloc] init]) {} + +FakeChromeIdentityService::~FakeChromeIdentityService() {} + +// static +FakeChromeIdentityService* +FakeChromeIdentityService::GetInstanceFromChromeProvider() { + return static_cast<ios::FakeChromeIdentityService*>( + ios::GetChromeBrowserProvider()->GetChromeIdentityService()); +} + +bool FakeChromeIdentityService::IsValidIdentity( + ChromeIdentity* identity) const { + return [identities_ indexOfObject:identity] != NSNotFound; +} + +ChromeIdentity* FakeChromeIdentityService::GetIdentityWithGaiaID( + const std::string& gaia_id) const { + NSString* gaiaID = base::SysUTF8ToNSString(gaia_id); + NSUInteger index = + [identities_ indexOfObjectPassingTest:^BOOL(ChromeIdentity* obj, + NSUInteger, BOOL* stop) { + return [[obj gaiaID] isEqualToString:gaiaID]; + }]; + if (index == NSNotFound) { + return nil; + } + return [identities_ objectAtIndex:index]; +} + +bool FakeChromeIdentityService::HasIdentities() const { + return [identities_ count] > 0; +} + +NSArray* FakeChromeIdentityService::GetAllIdentities() const { + return identities_; +} + +NSArray* FakeChromeIdentityService::GetAllIdentitiesSortedForDisplay() const { + return identities_; +} + +void FakeChromeIdentityService::ForgetIdentity( + ChromeIdentity* identity, + ForgetIdentityCallback callback) { + [identities_ removeObject:identity]; + FireIdentityListChanged(); + if (callback) { + // Forgetting an identity is normally an asynchronous operation (that + // require some network calls), this is replicated here by dispatching it. + dispatch_async(dispatch_get_main_queue(), ^{ + callback(nil); + }); + } +} + +void FakeChromeIdentityService::AddIdentities(NSArray* identitiesNames) { + for (NSString* name in identitiesNames) { + NSString* email = [NSString stringWithFormat:kIdentityEmailFormat, name]; + NSString* gaiaID = [NSString stringWithFormat:kIdentityGaiaIDFormat, name]; + [identities_ addObject:[FakeChromeIdentity identityWithEmail:email + gaiaID:gaiaID + name:name]]; + } +} + +void FakeChromeIdentityService::AddIdentity(ChromeIdentity* identity) { + [identities_ addObject:identity]; + FireIdentityListChanged(); +} + +} // namespace ios
diff --git a/ios/public/provider/chrome/browser/test_chrome_browser_provider.mm b/ios/public/provider/chrome/browser/test_chrome_browser_provider.mm index 4c69680..f25e37a 100644 --- a/ios/public/provider/chrome/browser/test_chrome_browser_provider.mm +++ b/ios/public/provider/chrome/browser/test_chrome_browser_provider.mm
@@ -5,13 +5,13 @@ #include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h" #include "base/logging.h" -#include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" +#include "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h" #import "ios/public/provider/chrome/browser/test_updatable_resource_provider.h" namespace ios { TestChromeBrowserProvider::TestChromeBrowserProvider() - : chrome_identity_service_(new ios::ChromeIdentityService), + : chrome_identity_service_(new ios::FakeChromeIdentityService), test_updatable_resource_provider_(new TestUpdatableResourceProvider) {} TestChromeBrowserProvider::~TestChromeBrowserProvider() {}
diff --git a/ios/web/net/request_tracker_impl.mm b/ios/web/net/request_tracker_impl.mm index b33c0f6..d49ba430 100644 --- a/ios/web/net/request_tracker_impl.mm +++ b/ios/web/net/request_tracker_impl.mm
@@ -812,7 +812,7 @@ if (is_closing_) return; - if (!counts_.size()) + if (counts_.empty()) return; // Nothing yet to notify. if (!page_url_.SchemeIsCryptographic())
diff --git a/ios/web/web_state/ui/crw_web_controller_unittest.mm b/ios/web/web_state/ui/crw_web_controller_unittest.mm index 58705256..35973de 100644 --- a/ios/web/web_state/ui/crw_web_controller_unittest.mm +++ b/ios/web/web_state/ui/crw_web_controller_unittest.mm
@@ -688,6 +688,12 @@ // Tests that geolocation dialog is suppressed for DIALOG_POLICY_SUPPRESS. TEST_F(CRWWebControllerPageDialogOpenPolicyTest, SuppressGeolocation) { + // TODO(crbug.com/626688): The geolocation APIs require HTTPS on iOS 10. Find + // a way to trigger a geolocation prompt from this test. + if (base::ios::IsRunningOnIOS10OrLater()) { + return; + } + [[web_delegate_mock() expect] webControllerDidSuppressDialog:web_controller()]; [web_controller() setShouldSuppressDialogs:YES]; @@ -757,7 +763,8 @@ // TODO(iOS): Flaky on the bots. crbug/493427 TEST_F(CRWWebControllerPageScrollStateTest, FLAKY_SetPageDisplayStateWithUserScalableEnabled) { - web::PageZoomState zoom_state(1.0, 10.0, 1.0); + web::PageZoomState zoom_state(1.0, 5.0, 1.0); + LoadHtml(GetHTMLForZoomState(zoom_state, PAGE_SCALABILITY_ENABLED)); WaitForZoomRendering(web_controller(), zoom_state); @@ -767,7 +774,7 @@ CreateTestPageDisplayState(CGPointMake(1.0, 1.0), // scroll offset 3.0, // relative zoom scale 1.0, // original minimum zoom scale - 10.0, // original maximum zoom scale + 5.0, // original maximum zoom scale 1.0)); // original zoom scale [web_controller() restoreStateFromHistory];
diff --git a/jingle/glue/proxy_resolving_client_socket.cc b/jingle/glue/proxy_resolving_client_socket.cc index 91adcb2c..4b931cd24 100644 --- a/jingle/glue/proxy_resolving_client_socket.cc +++ b/jingle/glue/proxy_resolving_client_socket.cc
@@ -88,7 +88,6 @@ reference_params->testing_fixed_http_port; session_params.testing_fixed_https_port = reference_params->testing_fixed_https_port; - session_params.enable_spdy31 = reference_params->enable_spdy31; session_params.enable_http2 = reference_params->enable_http2; session_params.enable_http2_alternative_service_with_different_host = reference_params->enable_http2_alternative_service_with_different_host;
diff --git a/media/PRESUBMIT.py b/media/PRESUBMIT.py index 02bd02b..830c3fc 100644 --- a/media/PRESUBMIT.py +++ b/media/PRESUBMIT.py
@@ -77,29 +77,6 @@ return [] -def _CheckForMessageLoopProxy(input_api, output_api): - """Make sure media code only uses MessageLoopProxy for accessing the current - loop.""" - - message_loop_proxy_re = input_api.re.compile( - r'\bMessageLoopProxy(?!::current\(\))') - - problems = [] - for f in input_api.AffectedSourceFiles(_FilterFile): - for line_number, line in f.ChangedContents(): - if message_loop_proxy_re.search(line): - problems.append('%s:%d' % (f.LocalPath(), line_number)) - - if problems: - return [output_api.PresubmitError( - 'MessageLoopProxy should only be used for accessing the current loop.\n' - 'Use the TaskRunner interfaces instead as they are more explicit about\n' - 'the run-time characteristics. In most cases, SingleThreadTaskRunner\n' - 'is a drop-in replacement for MessageLoopProxy.', problems)] - - return [] - - def _CheckForHistogramOffByOne(input_api, output_api): """Make sure histogram enum maxes are used properly""" @@ -193,7 +170,6 @@ def _CheckChange(input_api, output_api): results = [] results.extend(_CheckForUseOfWrongClock(input_api, output_api)) - results.extend(_CheckForMessageLoopProxy(input_api, output_api)) results.extend(_CheckPassByValue(input_api, output_api)) results.extend(_CheckForHistogramOffByOne(input_api, output_api)) results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc index cbcd5ed..3f87c8e 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc
@@ -387,10 +387,13 @@ // We have seen cases where active input audio is not closed down properly // at browser shutdown. AudioInputController::Close() is called but tasks // in AudioInputController::DoClose() are not executed. Hence, input streams - // might remain even at this late state. + // might remain even at this late state. |low_latency_input_streams_| will be + // modified during the call to stream->Close(), so we can't iterate over it + // here. Instead iterate over a copy. // TODO(henrika): figure out the real cause why streams are not closed // properly by the AIC for all cases and then remove this loop. - for (auto* stream : low_latency_input_streams_) { + auto low_latency_input_streams_copy = low_latency_input_streams_; + for (auto* stream : low_latency_input_streams_copy) { LOG(WARNING) << "Closing existing audio input stream at destruction"; // Prevents active Core Audio callbacks to use possibly invalid objects // in its OnData() callback.
diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc index ba72fdb..0ea3fb9 100644 --- a/media/capture/video/video_capture_device_unittest.cc +++ b/media/capture/video/video_capture_device_unittest.cc
@@ -75,7 +75,7 @@ namespace media { namespace { -class MockClient : public VideoCaptureDevice::Client { +class MockVideoCaptureClient : public VideoCaptureDevice::Client { public: MOCK_METHOD0(DoReserveOutputBuffer, void(void)); MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void)); @@ -86,7 +86,8 @@ const std::string& reason)); MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void)); - explicit MockClient(base::Callback<void(const VideoCaptureFormat&)> frame_cb) + explicit MockVideoCaptureClient( + base::Callback<void(const VideoCaptureFormat&)> frame_cb) : main_thread_(base::ThreadTaskRunnerHandle::Get()), frame_cb_(frame_cb) {} @@ -159,9 +160,9 @@ VideoCaptureDeviceTest() : loop_(new base::MessageLoop()), - client_( - new MockClient(base::Bind(&VideoCaptureDeviceTest::OnFrameCaptured, - base::Unretained(this)))), + video_capture_client_(new MockVideoCaptureClient( + base::Bind(&VideoCaptureDeviceTest::OnFrameCaptured, + base::Unretained(this)))), video_capture_device_factory_(VideoCaptureDeviceFactory::CreateFactory( base::ThreadTaskRunnerHandle::Get())) { device_enumeration_listener_ = new DeviceEnumerationListener(); @@ -175,13 +176,14 @@ #if defined(OS_MACOSX) AVFoundationGlue::InitializeAVFoundation(); #endif - EXPECT_CALL(*client_, DoReserveOutputBuffer()).Times(0); - EXPECT_CALL(*client_, DoOnIncomingCapturedBuffer()).Times(0); - EXPECT_CALL(*client_, DoOnIncomingCapturedVideoFrame()).Times(0); + EXPECT_CALL(*video_capture_client_, DoReserveOutputBuffer()).Times(0); + EXPECT_CALL(*video_capture_client_, DoOnIncomingCapturedBuffer()).Times(0); + EXPECT_CALL(*video_capture_client_, DoOnIncomingCapturedVideoFrame()) + .Times(0); } void ResetWithNewClient() { - client_.reset(new MockClient(base::Bind( + video_capture_client_.reset(new MockVideoCaptureClient(base::Bind( &VideoCaptureDeviceTest::OnFrameCaptured, base::Unretained(this)))); } @@ -255,7 +257,7 @@ std::unique_ptr<VideoCaptureDevice::Names> names_; std::unique_ptr<base::MessageLoop> loop_; std::unique_ptr<base::RunLoop> run_loop_; - std::unique_ptr<MockClient> client_; + std::unique_ptr<MockVideoCaptureClient> video_capture_client_; scoped_refptr<DeviceEnumerationListener> device_enumeration_listener_; VideoCaptureFormat last_format_; std::unique_ptr<VideoCaptureDeviceFactory> video_capture_device_factory_; @@ -289,13 +291,13 @@ #else // The presence of the actual device is only checked on AllocateAndStart() // and not on creation. - EXPECT_CALL(*client_, OnError(_, _)).Times(1); + EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(1); VideoCaptureParams capture_params; capture_params.requested_format.frame_size.SetSize(640, 480); capture_params.requested_format.frame_rate = 30; capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420; - device->AllocateAndStart(capture_params, std::move(client_)); + device->AllocateAndStart(capture_params, std::move(video_capture_client_)); device->StopAndDeAllocate(); #endif } @@ -318,14 +320,14 @@ ASSERT_TRUE(device); DVLOG(1) << names_->front().id(); - EXPECT_CALL(*client_, OnError(_, _)).Times(0); + EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0); VideoCaptureParams capture_params; capture_params.requested_format.frame_size.SetSize(width, height); capture_params.requested_format.frame_rate = 30.0f; capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420; - device->AllocateAndStart(capture_params, std::move(client_)); + device->AllocateAndStart(capture_params, std::move(video_capture_client_)); // Get captured video frames. WaitForCapturedFrame(); EXPECT_EQ(last_format().frame_size.width(), width); @@ -353,7 +355,7 @@ video_capture_device_factory_->Create(names_->front())); ASSERT_TRUE(device); - EXPECT_CALL(*client_, OnError(_, _)).Times(0); + EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0); const gfx::Size input_size(640, 480); VideoCaptureParams capture_params; @@ -361,7 +363,7 @@ capture_params.requested_format.frame_rate = 35; capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420; - device->AllocateAndStart(capture_params, std::move(client_)); + device->AllocateAndStart(capture_params, std::move(video_capture_client_)); WaitForCapturedFrame(); device->StopAndDeAllocate(); EXPECT_EQ(last_format().frame_size.width(), input_size.width()); @@ -393,7 +395,7 @@ capture_params.requested_format.frame_size = resolution; capture_params.requested_format.frame_rate = 30; capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420; - device->AllocateAndStart(capture_params, std::move(client_)); + device->AllocateAndStart(capture_params, std::move(video_capture_client_)); device->StopAndDeAllocate(); } @@ -407,7 +409,7 @@ std::unique_ptr<VideoCaptureDevice> device( video_capture_device_factory_->Create(names_->front())); - device->AllocateAndStart(capture_params, std::move(client_)); + device->AllocateAndStart(capture_params, std::move(video_capture_client_)); WaitForCapturedFrame(); device->StopAndDeAllocate(); device.reset(); @@ -425,13 +427,13 @@ video_capture_device_factory_->Create(names_->front())); ASSERT_TRUE(device); - EXPECT_CALL(*client_, OnError(_, _)).Times(0); + EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0); VideoCaptureParams capture_params; capture_params.requested_format.frame_size.SetSize(640, 480); capture_params.requested_format.frame_rate = 30; capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420; - device->AllocateAndStart(capture_params, std::move(client_)); + device->AllocateAndStart(capture_params, std::move(video_capture_client_)); // Get captured video frames. WaitForCapturedFrame(); EXPECT_EQ(last_format().frame_size.width(), 640); @@ -460,13 +462,13 @@ video_capture_device_factory_->Create(*name)); ASSERT_TRUE(device); - EXPECT_CALL(*client_, OnError(_, _)).Times(0); + EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0); VideoCaptureParams capture_params; capture_params.requested_format.frame_size.SetSize(1280, 720); capture_params.requested_format.frame_rate = 30; capture_params.requested_format.pixel_format = PIXEL_FORMAT_MJPEG; - device->AllocateAndStart(capture_params, std::move(client_)); + device->AllocateAndStart(capture_params, std::move(video_capture_client_)); // Get captured video frames. WaitForCapturedFrame(); // Verify we get MJPEG from the device. Not all devices can capture 1280x720
diff --git a/media/gpu/dxva_picture_buffer_win.cc b/media/gpu/dxva_picture_buffer_win.cc index ff4d4ad..c547f59 100644 --- a/media/gpu/dxva_picture_buffer_win.cc +++ b/media/gpu/dxva_picture_buffer_win.cc
@@ -15,10 +15,19 @@ namespace media { +namespace { + +void LogDXVAError(int line) { + LOG(ERROR) << "Error in dxva_picture_buffer_win.cc on line " << line; +} + +} // namespace + #define RETURN_ON_FAILURE(result, log, ret) \ do { \ if (!(result)) { \ DLOG(ERROR) << log; \ + LogDXVAError(__LINE__); \ return ret; \ } \ } while (0)
diff --git a/media/gpu/dxva_video_decode_accelerator_win.cc b/media/gpu/dxva_video_decode_accelerator_win.cc index 0c74f4e..7a91934f 100644 --- a/media/gpu/dxva_video_decode_accelerator_win.cc +++ b/media/gpu/dxva_video_decode_accelerator_win.cc
@@ -218,6 +218,11 @@ DISALLOW_COPY_AND_ASSIGN(MediaBufferScopedPointer); }; +void LogDXVAError(int line) { + LOG(ERROR) << "Error in dxva_video_decode_accelerator_win.cc on line " + << line; +} + } // namespace namespace media { @@ -234,6 +239,7 @@ do { \ if (!(result)) { \ DLOG(ERROR) << log; \ + LogDXVAError(__LINE__); \ return ret; \ } \ } while (0) @@ -246,6 +252,7 @@ do { \ if (!(result)) { \ DVLOG(1) << log; \ + LogDXVAError(__LINE__); \ StopOnError(error_code); \ return ret; \ } \
diff --git a/media/gpu/vt_video_encode_accelerator_mac.cc b/media/gpu/vt_video_encode_accelerator_mac.cc index e38efd11..32d1b8ab 100644 --- a/media/gpu/vt_video_encode_accelerator_mac.cc +++ b/media/gpu/vt_video_encode_accelerator_mac.cc
@@ -6,7 +6,6 @@ #include <memory> -#include "base/mac/mac_util.h" #include "base/threading/thread_task_runner_handle.h" #include "media/base/mac/coremedia_glue.h" #include "media/base/mac/corevideo_glue.h" @@ -106,11 +105,6 @@ DLOG(ERROR) << "Failed creating VideoToolbox glue."; return profiles; } - if (!base::mac::IsOSMavericksOrLater()) { - DLOG(ERROR) << "VideoToolbox hardware encoder is supported on Mac OS 10.9 " - "and later."; - return profiles; - } const bool rv = CreateCompressionSession( video_toolbox::DictionaryWithKeysAndValues(nullptr, nullptr, 0), gfx::Size(kDefaultResolutionWidth, kDefaultResolutionHeight), true); @@ -158,11 +152,6 @@ DLOG(ERROR) << "Failed creating VideoToolbox glue."; return false; } - if (!base::mac::IsOSMavericksOrLater()) { - DLOG(ERROR) << "VideoToolbox hardware encoder is supported on Mac OS 10.9 " - "and later."; - return false; - } client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); client_ = client_ptr_factory_->GetWeakPtr();
diff --git a/media/mojo/clients/mojo_renderer.cc b/media/mojo/clients/mojo_renderer.cc index 94b2a57..95ee0c6 100644 --- a/media/mojo/clients/mojo_renderer.cc +++ b/media/mojo/clients/mojo_renderer.cc
@@ -11,6 +11,7 @@ #include "base/location.h" #include "base/single_thread_task_runner.h" #include "media/base/demuxer_stream_provider.h" +#include "media/base/pipeline_status.h" #include "media/base/renderer_client.h" #include "media/base/video_renderer_sink.h" #include "media/mojo/clients/mojo_demuxer_stream_impl.h" @@ -239,6 +240,18 @@ client_->OnVideoOpacityChange(opaque); } +void MojoRenderer::OnStatisticsUpdate(const PipelineStatistics& stats) { + DVLOG(3) << __FUNCTION__; + DCHECK(task_runner_->BelongsToCurrentThread()); + client_->OnStatisticsUpdate(stats); +} + +void MojoRenderer::OnWaitingForDecryptionKey() { + DVLOG(1) << __FUNCTION__; + DCHECK(task_runner_->BelongsToCurrentThread()); + client_->OnWaitingForDecryptionKey(); +} + void MojoRenderer::OnConnectionError() { DVLOG(1) << __FUNCTION__; DCHECK(task_runner_->BelongsToCurrentThread());
diff --git a/media/mojo/clients/mojo_renderer.h b/media/mojo/clients/mojo_renderer.h index 44cad75..9bc09f0e 100644 --- a/media/mojo/clients/mojo_renderer.h +++ b/media/mojo/clients/mojo_renderer.h
@@ -65,6 +65,8 @@ void OnError() override; void OnVideoNaturalSizeChange(const gfx::Size& size) override; void OnVideoOpacityChange(bool opaque) override; + void OnWaitingForDecryptionKey() override; + void OnStatisticsUpdate(const PipelineStatistics& stats) override; // Binds |remote_renderer_| to the mojo message pipe. Can be called multiple // times. If an error occurs during connection, OnConnectionError will be
diff --git a/media/mojo/common/OWNERS b/media/mojo/common/OWNERS index a166098..2de9f87 100644 --- a/media/mojo/common/OWNERS +++ b/media/mojo/common/OWNERS
@@ -1,2 +1,4 @@ +per-file *_struct_traits*.*=set noparent +per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS per-file *_type_converter*.*=set noparent per-file *_type_converter*.*=file://ipc/SECURITY_OWNERS
diff --git a/media/mojo/common/pipeline_statistics_struct_traits.h b/media/mojo/common/pipeline_statistics_struct_traits.h new file mode 100644 index 0000000..ed64a86 --- /dev/null +++ b/media/mojo/common/pipeline_statistics_struct_traits.h
@@ -0,0 +1,49 @@ +// 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 MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ +#define MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ + +#include "media/base/pipeline_status.h" +#include "media/mojo/interfaces/media_types.mojom.h" + +namespace mojo { + +template <> +struct StructTraits<media::mojom::PipelineStatistics, + media::PipelineStatistics> { + static uint64_t audio_bytes_decoded(const media::PipelineStatistics& input) { + return input.audio_bytes_decoded; + } + static uint64_t video_bytes_decoded(const media::PipelineStatistics& input) { + return input.video_bytes_decoded; + } + static uint32_t video_frames_decoded(const media::PipelineStatistics& input) { + return input.video_frames_decoded; + } + static uint32_t video_frames_dropped(const media::PipelineStatistics& input) { + return input.video_frames_dropped; + } + static int64_t audio_memory_usage(const media::PipelineStatistics& input) { + return input.audio_memory_usage; + } + static int64_t video_memory_usage(const media::PipelineStatistics& input) { + return input.video_memory_usage; + } + + static bool Read(media::mojom::PipelineStatisticsDataView data, + media::PipelineStatistics* output) { + output->audio_bytes_decoded = data.audio_bytes_decoded(); + output->video_bytes_decoded = data.video_bytes_decoded(); + output->video_frames_decoded = data.video_frames_decoded(); + output->video_frames_dropped = data.video_frames_dropped(); + output->audio_memory_usage = data.audio_memory_usage(); + output->video_memory_usage = data.video_memory_usage(); + return true; + } +}; + +} // namespace mojo + +#endif // MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ \ No newline at end of file
diff --git a/media/mojo/interfaces/media_types.mojom b/media/mojo/interfaces/media_types.mojom index bef1de3..5f9a4f0 100644 --- a/media/mojo/interfaces/media_types.mojom +++ b/media/mojo/interfaces/media_types.mojom
@@ -336,3 +336,12 @@ uint64 u_offset; uint64 v_offset; }; + +struct PipelineStatistics { + uint64 audio_bytes_decoded; + uint64 video_bytes_decoded; + uint32 video_frames_decoded; + uint32 video_frames_dropped; + int64 audio_memory_usage; + int64 video_memory_usage; +}; \ No newline at end of file
diff --git a/media/mojo/interfaces/pipeline_statistics.typemap b/media/mojo/interfaces/pipeline_statistics.typemap new file mode 100644 index 0000000..b705844 --- /dev/null +++ b/media/mojo/interfaces/pipeline_statistics.typemap
@@ -0,0 +1,8 @@ +# 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. + +mojom = "//media/mojo/interfaces/media_types.mojom" +public_headers = [ "//media/base/pipeline_status.h" ] +traits_headers = [ "//media/mojo/common/pipeline_statistics_struct_traits.h" ] +type_mappings = [ "media.mojom.PipelineStatistics=media::PipelineStatistics" ]
diff --git a/media/mojo/interfaces/renderer.mojom b/media/mojo/interfaces/renderer.mojom index 16267c4..de144411 100644 --- a/media/mojo/interfaces/renderer.mojom +++ b/media/mojo/interfaces/renderer.mojom
@@ -59,4 +59,12 @@ // Executed for the first video frame and whenever opacity changes. OnVideoOpacityChange(bool opaque); + + // Called periodically to pass statistics to the web player. See + // media_types.mojom. + OnStatisticsUpdate(PipelineStatistics stats); + + // Called when the remote renderering service is waiting on the decryption + // key. + OnWaitingForDecryptionKey(); };
diff --git a/media/mojo/interfaces/typemaps.gni b/media/mojo/interfaces/typemaps.gni index bfa079e0..54f9f0e 100644 --- a/media/mojo/interfaces/typemaps.gni +++ b/media/mojo/interfaces/typemaps.gni
@@ -2,4 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -typemaps = [ "//media/mojo/interfaces/audio_parameters.typemap" ] +typemaps = [ + "//media/mojo/interfaces/audio_parameters.typemap", + "//media/mojo/interfaces/pipeline_statistics.typemap", +]
diff --git a/media/mojo/services/media_mojo_unittest.cc b/media/mojo/services/media_mojo_unittest.cc index e9079e6..6553dd8c 100644 --- a/media/mojo/services/media_mojo_unittest.cc +++ b/media/mojo/services/media_mojo_unittest.cc
@@ -49,6 +49,9 @@ MOCK_METHOD0(OnError, void()); MOCK_METHOD1(OnVideoOpacityChange, void(bool opaque)); MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size& size)); + MOCK_METHOD1(OnStatisticsUpdate, + void(const media::PipelineStatistics& stats)); + MOCK_METHOD0(OnWaitingForDecryptionKey, void()); private: DISALLOW_COPY_AND_ASSIGN(MockRendererClient);
diff --git a/media/mojo/services/mojo_renderer_service.cc b/media/mojo/services/mojo_renderer_service.cc index 5d75037..6b7e0f7 100644 --- a/media/mojo/services/mojo_renderer_service.cc +++ b/media/mojo/services/mojo_renderer_service.cc
@@ -115,7 +115,8 @@ } void MojoRendererService::OnStatisticsUpdate(const PipelineStatistics& stats) { - // TODO(alokp): Plumb the event to mojom::RendererClient. crbug/585287 + DVLOG(3) << __FUNCTION__; + client_->OnStatisticsUpdate(stats); } void MojoRendererService::OnBufferingStateChange(BufferingState state) { @@ -124,7 +125,8 @@ } void MojoRendererService::OnWaitingForDecryptionKey() { - // TODO(alokp): Plumb the event to mojom::RendererClient. crbug/585287 + DVLOG(1) << __FUNCTION__; + client_->OnWaitingForDecryptionKey(); } void MojoRendererService::OnVideoNaturalSizeChange(const gfx::Size& size) {
diff --git a/mojo/public/cpp/bindings/lib/serialization.h b/mojo/public/cpp/bindings/lib/serialization.h index 5274adf..6d7dd8e 100644 --- a/mojo/public/cpp/bindings/lib/serialization.h +++ b/mojo/public/cpp/bindings/lib/serialization.h
@@ -67,7 +67,7 @@ } template <typename MojomType, typename DataArrayType, typename UserType> -bool StructDeserializeImpl(DataArrayType input, UserType* output) { +bool StructDeserializeImpl(const DataArrayType& input, UserType* output) { static_assert(BelongsTo<MojomType, MojomTypeCategory::STRUCT>::value, "Unexpected type."); using DataType = typename MojomType::Struct::Data_; @@ -75,7 +75,10 @@ if (input.is_null()) return false; - void* input_buffer = input.empty() ? nullptr : &input.front(); + void* input_buffer = + input.empty() + ? nullptr + : const_cast<void*>(reinterpret_cast<const void*>(&input.front())); // Please see comments in StructSerializeImpl. bool need_copy = !IsAligned(input_buffer);
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl index 1c4d9f7..98ae23c 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
@@ -62,11 +62,11 @@ } template <typename UserType> - static bool Deserialize({{serialization_result_type}} input, + static bool Deserialize(const {{serialization_result_type}}& input, UserType* output) { return mojo::internal::StructDeserializeImpl< {{struct.name}}Ptr, {{serialization_result_type}}>( - std::move(input), output); + input, output); } {#--- Struct members #}
diff --git a/net/cert/cert_verify_proc_win.cc b/net/cert/cert_verify_proc_win.cc index 226c359f..a264796 100644 --- a/net/cert/cert_verify_proc_win.cc +++ b/net/cert/cert_verify_proc_win.cc
@@ -949,8 +949,8 @@ // By default, use the default HCERTCHAINENGINE (aka HCCE_CURRENT_USER). When // running tests, use a dynamic HCERTCHAINENGINE. All of the status and cache // of verified certificates and chains is tied to the HCERTCHAINENGINE. As - // each invocation may have changed the set of known roots, invalid the cache - // between runs. + // each invocation may have changed the set of known roots, invalidate the + // cache between runs. // // This is not the most efficient means of doing so; it's possible to mark the // Root store used by TestRootCerts as changed, via CertControlStore with the
diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc index 26f9773..3c1f859 100644 --- a/net/cert/ev_root_ca_metadata.cc +++ b/net/cert/ev_root_ca_metadata.cc
@@ -25,7 +25,7 @@ // Raw metadata. struct EVMetadata { // kMaxOIDsPerCA is the number of OIDs that we can support per root CA. At - // least one CA has different EV policies for businuss vs government + // least one CA has different EV policies for business vs government // entities and, in the case of cross-signing, we might need to list another // CA's policy OID under the cross-signing root. static const size_t kMaxOIDsPerCA = 2; @@ -48,8 +48,7 @@ 0x30, 0x50, 0xba, 0x9e, 0xa8, 0x7e, 0xfe, 0x9a, 0xce, 0x3c}}, { // AC Camerfirma uses the last two arcs to track how the private key - // is - // managed - the effective verification policy is the same. + // is managed - the effective verification policy is the same. "1.3.6.1.4.1.17326.10.14.2.1.2", "1.3.6.1.4.1.17326.10.14.2.2.2", }, }, @@ -60,8 +59,7 @@ 0xc7, 0x52, 0xa1, 0x2c, 0x5b, 0x29, 0xf6, 0xd6, 0xaa, 0x0c}}, { // AC Camerfirma uses the last two arcs to track how the private key - // is - // managed - the effective verification policy is the same. + // is managed - the effective verification policy is the same. "1.3.6.1.4.1.17326.10.8.12.1.2", "1.3.6.1.4.1.17326.10.8.12.2.2", }, },
diff --git a/net/cert/internal/verify_certificate_chain.cc b/net/cert/internal/verify_certificate_chain.cc index baef57a..ee379fd 100644 --- a/net/cert/internal/verify_certificate_chain.cc +++ b/net/cert/internal/verify_certificate_chain.cc
@@ -169,7 +169,7 @@ } // This function corresponds to RFC 5280 section 6.1.4's "Preparation for -// Certificate i+1" procedure. |cert| is expected to be an intermediary. +// Certificate i+1" procedure. |cert| is expected to be an intermediate. WARN_UNUSED_RESULT bool PrepareForNextCertificate( const ParsedCertificate& cert, size_t* max_path_length_ptr, @@ -211,7 +211,7 @@ // choose to reject all version 1 and version 2 intermediate // certificates.) // - // This code implicitly rejects non version 3 intermediaries, since they + // This code implicitly rejects non version 3 intermediates, since they // can't contain a BasicConstraints extension. if (!cert.has_basic_constraints() || !cert.basic_constraints().is_ca) return false;
diff --git a/net/cert/internal/verify_certificate_chain_typed_unittest.h b/net/cert/internal/verify_certificate_chain_typed_unittest.h index 1ddd464..b4990a3 100644 --- a/net/cert/internal/verify_certificate_chain_typed_unittest.h +++ b/net/cert/internal/verify_certificate_chain_typed_unittest.h
@@ -118,38 +118,38 @@ TYPED_TEST_CASE_P(VerifyCertificateChainSingleRootTest); -TYPED_TEST_P(VerifyCertificateChainSingleRootTest, TargetAndIntermediary) { - this->RunTest("target-and-intermediary.pem"); +TYPED_TEST_P(VerifyCertificateChainSingleRootTest, TargetAndIntermediate) { + this->RunTest("target-and-intermediate.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, - IntermediaryLacksBasicConstraints) { - this->RunTest("intermediary-lacks-basic-constraints.pem"); + IntermediateLacksBasicConstraints) { + this->RunTest("intermediate-lacks-basic-constraints.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, - IntermediaryBasicConstraintsCaFalse) { - this->RunTest("intermediary-basic-constraints-ca-false.pem"); + IntermediateBasicConstraintsCaFalse) { + this->RunTest("intermediate-basic-constraints-ca-false.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, - IntermediaryBasicConstraintsNotCritical) { - this->RunTest("intermediary-basic-constraints-not-critical.pem"); + IntermediateBasicConstraintsNotCritical) { + this->RunTest("intermediate-basic-constraints-not-critical.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, - IntermediaryLacksSigningKeyUsage) { - this->RunTest("intermediary-lacks-signing-key-usage.pem"); + IntermediateLacksSigningKeyUsage) { + this->RunTest("intermediate-lacks-signing-key-usage.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, - IntermediaryUnknownCriticalExtension) { - this->RunTest("intermediary-unknown-critical-extension.pem"); + IntermediateUnknownCriticalExtension) { + this->RunTest("intermediate-unknown-critical-extension.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, - IntermediaryUnknownNonCriticalExtension) { - this->RunTest("intermediary-unknown-non-critical-extension.pem"); + IntermediateUnknownNonCriticalExtension) { + this->RunTest("intermediate-unknown-non-critical-extension.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, @@ -166,8 +166,8 @@ this->RunTest("target-signed-with-md5.pem"); } -TYPED_TEST_P(VerifyCertificateChainSingleRootTest, IntermediarySignedWithMd5) { - this->RunTest("intermediary-signed-with-md5.pem"); +TYPED_TEST_P(VerifyCertificateChainSingleRootTest, IntermediateSignedWithMd5) { + this->RunTest("intermediate-signed-with-md5.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, TargetWrongSignature) { @@ -182,8 +182,8 @@ this->RunTest("target-signed-using-ecdsa.pem"); } -TYPED_TEST_P(VerifyCertificateChainSingleRootTest, ExpiredIntermediary) { - this->RunTest("expired-intermediary.pem"); +TYPED_TEST_P(VerifyCertificateChainSingleRootTest, ExpiredIntermediate) { + this->RunTest("expired-intermediate.pem"); } TYPED_TEST_P(VerifyCertificateChainSingleRootTest, ExpiredTarget) { @@ -255,21 +255,21 @@ // ordinal not in range, like "March 39, 2016" are rejected. REGISTER_TYPED_TEST_CASE_P(VerifyCertificateChainSingleRootTest, - TargetAndIntermediary, - IntermediaryLacksBasicConstraints, - IntermediaryBasicConstraintsCaFalse, - IntermediaryBasicConstraintsNotCritical, - IntermediaryLacksSigningKeyUsage, - IntermediaryUnknownCriticalExtension, - IntermediaryUnknownNonCriticalExtension, + TargetAndIntermediate, + IntermediateLacksBasicConstraints, + IntermediateBasicConstraintsCaFalse, + IntermediateBasicConstraintsNotCritical, + IntermediateLacksSigningKeyUsage, + IntermediateUnknownCriticalExtension, + IntermediateUnknownNonCriticalExtension, ViolatesBasicConstraintsPathlen0, BasicConstraintsPathlen0SelfIssued, TargetSignedWithMd5, - IntermediarySignedWithMd5, + IntermediateSignedWithMd5, TargetWrongSignature, TargetSignedBy512bitRsa, TargetSignedUsingEcdsa, - ExpiredIntermediary, + ExpiredIntermediate, ExpiredTarget, ExpiredTargetNotBefore, ExpiredRoot,
diff --git a/net/cert/merkle_audit_proof.cc b/net/cert/merkle_audit_proof.cc index eef237e..675485b 100644 --- a/net/cert/merkle_audit_proof.cc +++ b/net/cert/merkle_audit_proof.cc
@@ -30,10 +30,9 @@ MerkleAuditProof::MerkleAuditProof() {} -MerkleAuditProof::MerkleAuditProof(const std::string& log_id, - uint64_t leaf_index, +MerkleAuditProof::MerkleAuditProof(uint64_t leaf_index, const std::vector<std::string>& audit_path) - : log_id(log_id), leaf_index(leaf_index), nodes(audit_path) {} + : leaf_index(leaf_index), nodes(audit_path) {} MerkleAuditProof::~MerkleAuditProof() {}
diff --git a/net/cert/merkle_audit_proof.h b/net/cert/merkle_audit_proof.h index 2f6fdb9..b214891 100644 --- a/net/cert/merkle_audit_proof.h +++ b/net/cert/merkle_audit_proof.h
@@ -25,14 +25,10 @@ // Audit proof for a Merkle tree leaf, as defined in section 2.1.1. of RFC6962. struct NET_EXPORT MerkleAuditProof { MerkleAuditProof(); - MerkleAuditProof(const std::string& log_id, - uint64_t leaf_index, + MerkleAuditProof(uint64_t leaf_index, const std::vector<std::string>& audit_path); ~MerkleAuditProof(); - // The origin of this proof. - std::string log_id; - // Index of the tree leaf in the log. uint64_t leaf_index = 0;
diff --git a/net/cert/merkle_tree_leaf.cc b/net/cert/merkle_tree_leaf.cc index 21e28144..5dfe08e 100644 --- a/net/cert/merkle_tree_leaf.cc +++ b/net/cert/merkle_tree_leaf.cc
@@ -15,9 +15,13 @@ MerkleTreeLeaf::MerkleTreeLeaf() {} -MerkleTreeLeaf::~MerkleTreeLeaf() {} +MerkleTreeLeaf::MerkleTreeLeaf(const MerkleTreeLeaf& other) = default; -bool Hash(const MerkleTreeLeaf& tree_leaf, std::string* out) { +MerkleTreeLeaf::MerkleTreeLeaf(MerkleTreeLeaf&&) = default; + +MerkleTreeLeaf::~MerkleTreeLeaf() = default; + +bool HashMerkleTreeLeaf(const MerkleTreeLeaf& tree_leaf, std::string* out) { // Prepend 0 byte as per RFC 6962, section-2.1 std::string leaf_in_tls_format("\x00", 1); if (!EncodeTreeLeaf(tree_leaf, &leaf_in_tls_format)) @@ -44,7 +48,6 @@ } } - merkle_tree_leaf->log_id = sct->log_id; merkle_tree_leaf->timestamp = sct->timestamp; merkle_tree_leaf->extensions = sct->extensions; return true;
diff --git a/net/cert/merkle_tree_leaf.h b/net/cert/merkle_tree_leaf.h index 8f314f5..21217bb6 100644 --- a/net/cert/merkle_tree_leaf.h +++ b/net/cert/merkle_tree_leaf.h
@@ -19,15 +19,25 @@ namespace ct { // Represents a MerkleTreeLeaf as defined in RFC6962, section 3.4. -// Has all the data as the MerkleTreeLeaf defined in the RFC, arranged -// slightly differently. +// The goal of this struct is to represent the Merkle tree entry such that +// all details are easily accessible and a leaf hash can be easily calculated +// for the entry. +// +// As such, it has all the data as the MerkleTreeLeaf defined in the RFC, +// but it is not identical to the structure in the RFC for the following +// reasons: +// * The version is implicit - it is only used for V1 leaves currently. +// * the leaf_type is also implicit: There's exactly one leaf type and no +// new types are planned. +// * The timestamped_entry's |timestamp| and |extensions| fields are directly +// accessible. +// * The timestamped_entry's entry_type can be deduced from |log_entry|.type struct NET_EXPORT MerkleTreeLeaf { MerkleTreeLeaf(); + MerkleTreeLeaf(const MerkleTreeLeaf& other); + MerkleTreeLeaf(MerkleTreeLeaf&&); ~MerkleTreeLeaf(); - // The log id this leaf belongs to. - std::string log_id; - // Certificate / Precertificate and indication of entry type. LogEntry log_entry; @@ -38,13 +48,19 @@ std::string extensions; }; +// Given a |cert| and an |sct| for that certificate, constructs the +// representation of this entry in the Merkle tree by filling in +// |merkle_tree_leaf|. +// Returns false if it failed to construct the |merkle_tree_leaf|. NET_EXPORT bool GetMerkleTreeLeaf(const X509Certificate* cert, const SignedCertificateTimestamp* sct, MerkleTreeLeaf* merkle_tree_leaf); -// Sets |*out| to the hash of the Merkle |tree_leaf|, as defined in RFC6962. -// Returns true if the hash was generated, false if an error occurred. -NET_EXPORT bool Hash(const MerkleTreeLeaf& tree_leaf, std::string* out); +// Sets |*out| to the hash of the Merkle |tree_leaf|, as defined in RFC6962, +// section 3.4. Returns true if the hash was generated, false if an error +// occurred. +NET_EXPORT bool HashMerkleTreeLeaf(const MerkleTreeLeaf& tree_leaf, + std::string* out); } // namespace ct
diff --git a/net/cert/merkle_tree_leaf_unittest.cc b/net/cert/merkle_tree_leaf_unittest.cc index 42d6ad47..29c4c18 100644 --- a/net/cert/merkle_tree_leaf_unittest.cc +++ b/net/cert/merkle_tree_leaf_unittest.cc
@@ -75,7 +75,6 @@ MerkleTreeLeaf leaf; ASSERT_TRUE(GetMerkleTreeLeaf(test_cert_.get(), x509_sct_.get(), &leaf)); - EXPECT_EQ(x509_sct_->log_id, leaf.log_id); EXPECT_EQ(LogEntry::LOG_ENTRY_TYPE_X509, leaf.log_entry.type); EXPECT_FALSE(leaf.log_entry.leaf_certificate.empty()); EXPECT_TRUE(leaf.log_entry.tbs_certificate.empty()); @@ -89,7 +88,6 @@ ASSERT_TRUE( GetMerkleTreeLeaf(test_precert_.get(), precert_sct_.get(), &leaf)); - EXPECT_EQ(precert_sct_->log_id, leaf.log_id); EXPECT_EQ(LogEntry::LOG_ENTRY_TYPE_PRECERT, leaf.log_entry.type); EXPECT_FALSE(leaf.log_entry.tbs_certificate.empty()); EXPECT_TRUE(leaf.log_entry.leaf_certificate.empty()); @@ -114,7 +112,7 @@ ct::GetX509CertTreeLeaf(&leaf); std::string hash; - ASSERT_TRUE(Hash(leaf, &hash)); + ASSERT_TRUE(HashMerkleTreeLeaf(leaf, &hash)); EXPECT_THAT(hash, HexEq("452da788b3b8d15872ff0bb0777354b2a7f1c1887b5633201e76" "2ba5a4b143fc")); } @@ -124,7 +122,7 @@ ct::GetPrecertTreeLeaf(&leaf); std::string hash; - ASSERT_TRUE(Hash(leaf, &hash)); + ASSERT_TRUE(HashMerkleTreeLeaf(leaf, &hash)); EXPECT_THAT(hash, HexEq("257ae85f08810445511e35e33f7aee99ee19407971e35e95822b" "bf42a74be223")); }
diff --git a/net/data/cert_issuer_source_aia_unittest/generate-certs.py b/net/data/cert_issuer_source_aia_unittest/generate-certs.py index 534d498..e854c13 100755 --- a/net/data/cert_issuer_source_aia_unittest/generate-certs.py +++ b/net/data/cert_issuer_source_aia_unittest/generate-certs.py
@@ -15,39 +15,39 @@ root = common.create_self_signed_root_certificate('Root') -# Intermediary certificates. All have the same subject and key. -i_base = common.create_intermediary_certificate('I', root) +# Intermediate certificates. All have the same subject and key. +i_base = common.create_intermediate_certificate('I', root) common.write_string_to_file(i_base.get_cert_pem(), 'i.pem') -i2 = common.create_intermediary_certificate('I', root) +i2 = common.create_intermediate_certificate('I', root) i2.set_key_path(i_base.get_key_path()) common.write_string_to_file(i2.get_cert_pem(), 'i2.pem') -i3 = common.create_intermediary_certificate('I', root) +i3 = common.create_intermediate_certificate('I', root) i3.set_key_path(i_base.get_key_path()) common.write_string_to_file(i3.get_cert_pem(), 'i3.pem') -# More Intermediary certificates, which are just to generate the proper config +# More Intermediate certificates, which are just to generate the proper config # files so the target certs will have the desired Authority Information Access # values. These ones aren't saved to files. -i_no_aia = common.create_intermediary_certificate('I', root) +i_no_aia = common.create_intermediate_certificate('I', root) i_no_aia.set_key_path(i_base.get_key_path()) section = i_no_aia.config.get_section('signing_ca_ext') section.set_property('authorityInfoAccess', None) -i_two_aia = common.create_intermediary_certificate('I', root) +i_two_aia = common.create_intermediate_certificate('I', root) i_two_aia.set_key_path(i_base.get_key_path()) section = i_two_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') -i_three_aia = common.create_intermediary_certificate('I', root) +i_three_aia = common.create_intermediate_certificate('I', root) i_three_aia.set_key_path(i_base.get_key_path()) section = i_three_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') section.set_property('caIssuers;URI.2', 'http://url-for-aia3/I3.foo') -i_six_aia = common.create_intermediary_certificate('I', root) +i_six_aia = common.create_intermediate_certificate('I', root) i_six_aia.set_key_path(i_base.get_key_path()) section = i_six_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') @@ -56,23 +56,23 @@ section.set_property('caIssuers;URI.4', 'http://url-for-aia5/I5.foo') section.set_property('caIssuers;URI.5', 'http://url-for-aia6/I6.foo') -i_file_aia = common.create_intermediary_certificate('I', root) +i_file_aia = common.create_intermediate_certificate('I', root) i_file_aia.set_key_path(i_base.get_key_path()) section = i_file_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'file:///dev/null') -i_invalid_url_aia = common.create_intermediary_certificate('I', root) +i_invalid_url_aia = common.create_intermediate_certificate('I', root) i_invalid_url_aia.set_key_path(i_base.get_key_path()) section = i_invalid_url_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'foobar') -i_file_and_http_aia = common.create_intermediary_certificate('I', root) +i_file_and_http_aia = common.create_intermediate_certificate('I', root) i_file_and_http_aia.set_key_path(i_base.get_key_path()) section = i_file_and_http_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'file:///dev/null') section.set_property('caIssuers;URI.1', 'http://url-for-aia2/I2.foo') -i_invalid_and_http_aia = common.create_intermediary_certificate('I', root) +i_invalid_and_http_aia = common.create_intermediate_certificate('I', root) i_invalid_and_http_aia.set_key_path(i_base.get_key_path()) section = i_invalid_and_http_aia.config.get_section('issuer_info') section.set_property('caIssuers;URI.0', 'foobar')
diff --git a/net/data/cert_issuer_source_static_unittest/generate-certs.py b/net/data/cert_issuer_source_static_unittest/generate-certs.py index c67cc81..e15fd91 100755 --- a/net/data/cert_issuer_source_static_unittest/generate-certs.py +++ b/net/data/cert_issuer_source_static_unittest/generate-certs.py
@@ -47,16 +47,16 @@ write_cert_to_file(root, 'root.pem') -# Intermediary certificates -i1_1 = common.create_intermediary_certificate('I1', root) +# Intermediate certificates +i1_1 = common.create_intermediate_certificate('I1', root) write_cert_to_file(i1_1, 'i1_1.pem') # same name (after normalization), different key -i1_2 = common.create_intermediary_certificate('i1', root) +i1_2 = common.create_intermediate_certificate('i1', root) write_cert_to_file(i1_2, 'i1_2.pem') # different name -i2 = common.create_intermediary_certificate('I2', root) +i2 = common.create_intermediate_certificate('I2', root) write_cert_to_file(i2, 'i2.pem')
diff --git a/net/data/verify_certificate_chain_unittest/README b/net/data/verify_certificate_chain_unittest/README index 11cc4cb..5c7019d 100644 --- a/net/data/verify_certificate_chain_unittest/README +++ b/net/data/verify_certificate_chain_unittest/README
@@ -24,6 +24,6 @@ The input file is a PEM file with blocks for: * The trust store - * The certificate chain (target certificate and all intermediaries) + * The certificate chain (target certificate and all intermediates) * The timestamp to use when verifying * The expected result of verification (success or fail)
diff --git a/net/data/verify_certificate_chain_unittest/basic-constraints-pathlen-0-self-issued.pem b/net/data/verify_certificate_chain_unittest/basic-constraints-pathlen-0-self-issued.pem index 5ed112630..53f7de92 100644 --- a/net/data/verify_certificate_chain_unittest/basic-constraints-pathlen-0-self-issued.pem +++ b/net/data/verify_certificate_chain_unittest/basic-constraints-pathlen-0-self-issued.pem
@@ -1,6 +1,6 @@ [Created by: generate-basic-constraints-pathlen-0-self-issued.py] -Certificate chain with 2 intermediaries. The first intermediary has a basic +Certificate chain with 2 intermediates. The first intermediate has a basic constraints path length of 0. The second one is self-issued so does not count against the path length. @@ -9,7 +9,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,80 +18,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:cc:d5:1f:2f:97:16:d6:23:ca:d5:a1:c1:97:42: - 2b:7e:3e:7f:45:44:70:b9:8d:81:76:be:b4:69:56: - 78:a9:14:10:69:ad:60:8e:ed:80:b2:a2:f9:85:d6: - fe:4c:81:d0:30:8e:c8:75:48:29:48:b9:ad:9f:a9: - 83:b6:4f:c7:ba:40:f9:d5:66:9f:f9:51:48:72:0d: - 95:38:65:da:41:8a:91:4a:e1:34:d6:1c:a0:0b:ee: - 4d:07:69:0c:74:87:58:79:1b:e5:7b:51:ae:19:36: - b2:6a:a6:89:81:30:bd:51:c1:7f:99:86:63:78:48: - a6:8e:74:f6:5f:cc:fb:3f:12:ac:2e:e7:a8:75:15: - b7:5b:37:dd:ce:54:68:ae:0d:ad:80:13:b5:d7:06: - 98:39:a9:67:f9:fb:c1:7f:e0:f6:6b:14:f3:d3:b4: - f4:33:2c:41:9e:69:63:de:b3:f9:cd:4e:f8:58:98: - dd:6f:9b:9a:b7:82:19:c1:01:c9:2d:fb:d3:5a:48: - 5f:e4:e5:c5:6e:5f:b1:3b:31:49:65:f0:0d:46:a5: - 33:fb:57:23:fc:ca:17:51:72:fc:5a:f7:7c:44:74: - 24:3b:cc:54:2c:e3:d4:8b:e9:9c:13:da:78:58:a1: - d8:00:19:30:ee:3d:29:fb:2b:7a:79:b8:69:f2:3b: - d3:19 + 00:ce:da:bc:23:ea:7f:3b:c7:c0:83:35:31:8c:8a: + d4:32:e0:e8:ff:6e:80:4c:38:d5:60:3c:cf:dc:bb: + 6a:76:d6:7a:4b:03:29:21:5b:4c:51:8d:2d:82:7c: + 65:8f:c0:ca:c4:07:57:63:29:81:19:63:06:09:4d: + 91:c0:22:c6:29:ec:79:e7:e5:f1:aa:22:52:0b:73: + 8d:60:ef:47:bb:f6:b7:7a:5a:87:c0:d4:2c:ac:95: + a2:17:6f:31:19:cc:92:ca:ca:b0:e3:74:b3:a5:26: + 06:fd:ba:28:3d:1a:69:9d:d3:b5:da:f5:98:22:ed: + da:60:29:92:ec:df:76:98:7b:2b:4b:47:ca:65:32: + 09:24:4c:27:be:3c:94:c1:45:f6:f7:67:72:62:62: + 60:e4:82:fe:74:fe:b1:7b:bd:4c:24:36:7d:0c:4d: + 1d:b1:91:58:6b:01:ba:89:3a:e3:60:86:e4:68:1e: + 7a:28:7c:4c:a4:c2:50:73:fa:2e:21:62:71:36:6b: + 82:50:c2:12:3c:f0:70:83:ed:98:7c:f0:16:08:81: + d8:b3:4e:85:4b:31:a5:ce:ed:89:82:01:4f:c6:ca: + b3:29:0d:fb:e7:54:79:84:51:d6:ef:ef:98:6c:c6: + 66:8c:2c:d5:33:9d:37:37:8d:f2:f2:36:66:ac:1d: + f1:01 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 6D:49:C7:0A:DE:44:7C:B7:07:ED:87:EF:41:DE:5D:12:91:28:3D:1C + A4:2C:1E:6A:EA:E4:DB:1A:EA:98:3A:F3:38:7B:5D:F4:8F:24:DA:3A X509v3 Authority Key Identifier: - keyid:31:9F:A3:DB:EA:90:94:EB:3D:93:39:9F:BA:8A:05:7E:2C:94:23:9B + keyid:8C:6F:A0:45:A9:77:60:30:97:AA:87:1F:96:34:1D:3B:7A:C6:40:5E Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 34:51:df:38:e9:c2:df:c6:2c:01:00:7e:a1:4b:5e:d1:43:8a: - d7:4e:ff:49:5d:17:e7:bd:e2:3c:cd:43:63:4d:a9:05:97:bf: - 76:e2:8d:90:d2:dd:ea:6b:4c:e3:1e:c1:7b:8b:35:5a:24:cc: - d8:b2:9a:12:07:d2:66:fa:fd:3c:79:b4:a7:d7:cb:69:af:07: - f7:9d:66:34:ee:ed:22:1f:7d:58:9e:e1:49:90:88:95:1e:27: - 2a:3d:dc:a9:b9:1d:2b:1f:88:b9:0c:89:a1:bc:dd:25:97:b9: - 32:0e:02:86:fa:a3:2c:cd:8e:29:e5:68:12:3b:5b:bf:0e:cc: - 25:ad:06:ef:77:26:d7:b4:84:cf:ba:00:55:c4:f0:95:39:88: - ff:22:f8:a5:89:8a:d2:31:aa:e7:98:76:02:19:bd:04:bc:5c: - 26:be:5e:eb:96:2b:f6:a2:cf:13:3e:a1:82:92:63:c0:13:bc: - b6:f9:06:fb:77:c3:0f:cd:39:b1:af:43:b5:9d:fc:64:d4:bd: - d0:81:5c:06:fb:8b:0e:c5:59:0b:07:d6:a7:8b:a9:8e:b3:6b: - f5:ed:9b:ea:ea:f7:6f:ea:2b:02:df:62:92:ae:98:fb:45:ca: - bc:1c:6b:eb:6d:33:e3:0e:32:0f:0d:e3:7f:5c:ef:e3:1b:c2: - f6:fc:99:a4 + 51:ba:35:03:2c:20:55:1a:24:3e:11:c6:13:29:e3:98:58:fa: + 09:b7:3b:47:45:4a:32:c5:85:3a:64:d9:d3:ff:f8:fb:f8:eb: + 1d:88:22:29:b9:38:31:8f:de:12:da:c9:c3:93:de:5a:4e:25: + 89:11:8b:a9:0c:3a:1f:ce:0b:8a:0b:ec:e4:e6:4b:b6:c9:ae: + 63:0e:89:72:64:ee:9c:fd:1a:88:59:49:96:0c:0f:14:db:be: + 5e:37:02:2e:af:f0:da:04:c0:29:e5:3a:96:b2:a4:6b:cc:a6: + be:63:5a:d2:61:58:23:96:fe:15:a5:2a:46:15:5d:13:76:0a: + 07:59:b9:ed:41:79:db:c7:1b:a9:6d:99:d1:3e:1c:93:97:c8: + b7:40:6e:4b:d0:31:d6:7b:e3:9d:c8:f9:04:0d:1c:d7:f8:d4: + a8:85:ba:be:90:95:7c:b3:d7:85:74:14:fd:50:6e:93:80:96: + fe:09:24:83:b7:f8:f2:08:bc:c2:1a:b3:92:af:0e:a9:d6:32: + 0f:a0:86:fc:f7:95:6d:5b:07:a6:83:0d:2b:67:05:c1:2f:90: + a0:b0:02:ba:57:64:10:97:52:d8:67:ff:39:c0:3c:d0:c7:90: + 76:2f:e0:42:37:ec:50:85:55:78:1e:34:88:63:4f:73:d0:7b: + 7d:d1:20:85 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM1R8v -lxbWI8rVocGXQit+Pn9FRHC5jYF2vrRpVnipFBBprWCO7YCyovmF1v5MgdAwjsh1 -SClIua2fqYO2T8e6QPnVZp/5UUhyDZU4ZdpBipFK4TTWHKAL7k0HaQx0h1h5G+V7 -Ua4ZNrJqpomBML1RwX+ZhmN4SKaOdPZfzPs/Eqwu56h1FbdbN93OVGiuDa2AE7XX -Bpg5qWf5+8F/4PZrFPPTtPQzLEGeaWPes/nNTvhYmN1vm5q3ghnBAckt+9NaSF/k -5cVuX7E7MUll8A1GpTP7VyP8yhdRcvxa93xEdCQ7zFQs49SL6ZwT2nhYodgAGTDu -PSn7K3p5uGnyO9MZAgMBAAGjgekwgeYwHQYDVR0OBBYEFG1JxwreRHy3B+2H70He -XRKRKD0cMB8GA1UdIwQYMBaAFDGfo9vqkJTrPZM5n7qKBX4slCObMD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDO2rwj +6n87x8CDNTGMitQy4Oj/boBMONVgPM/cu2p21npLAykhW0xRjS2CfGWPwMrEB1dj +KYEZYwYJTZHAIsYp7Hnn5fGqIlILc41g70e79rd6WofA1CyslaIXbzEZzJLKyrDj +dLOlJgb9uig9Gmmd07Xa9Zgi7dpgKZLs33aYeytLR8plMgkkTCe+PJTBRfb3Z3Ji +YmDkgv50/rF7vUwkNn0MTR2xkVhrAbqJOuNghuRoHnoofEykwlBz+i4hYnE2a4JQ +whI88HCD7Zh88BYIgdizToVLMaXO7YmCAU/GyrMpDfvnVHmEUdbv75hsxmaMLNUz +nTc3jfLyNmasHfEBAgMBAAGjgekwgeYwHQYDVR0OBBYEFKQsHmrq5Nsa6pg68zh7 +XfSPJNo6MB8GA1UdIwQYMBaAFIxvoEWpd2Awl6qHH5Y0HTt6xkBeMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEANFHfOOnC38YsAQB+oUte -0UOK107/SV0X573iPM1DY02pBZe/duKNkNLd6mtM4x7Be4s1WiTM2LKaEgfSZvr9 -PHm0p9fLaa8H951mNO7tIh99WJ7hSZCIlR4nKj3cqbkdKx+IuQyJobzdJZe5Mg4C -hvqjLM2OKeVoEjtbvw7MJa0G73cm17SEz7oAVcTwlTmI/yL4pYmK0jGq55h2Ahm9 -BLxcJr5e65Yr9qLPEz6hgpJjwBO8tvkG+3fDD805sa9DtZ38ZNS90IFcBvuLDsVZ -CwfWp4upjrNr9e2b6ur3b+orAt9ikq6Y+0XKvBxr620z4w4yDw3jf1zv4xvC9vyZ -pA== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAUbo1AywgVRokPhHGEynj +mFj6Cbc7R0VKMsWFOmTZ0//4+/jrHYgiKbk4MY/eEtrJw5PeWk4liRGLqQw6H84L +igvs5OZLtsmuYw6JcmTunP0aiFlJlgwPFNu+XjcCLq/w2gTAKeU6lrKka8ymvmNa +0mFYI5b+FaUqRhVdE3YKB1m57UF528cbqW2Z0T4ck5fIt0BuS9Ax1nvjncj5BA0c +1/jUqIW6vpCVfLPXhXQU/VBuk4CW/gkkg7f48gi8whqzkq8OqdYyD6CG/PeVbVsH +poMNK2cFwS+QoLACuldkEJdS2Gf/OcA80MeQdi/gQjfsUIVVeB40iGNPc9B7fdEg +hQ== -----END CERTIFICATE----- Certificate: @@ -99,88 +99,88 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:e6:56:91:e6:27:53:a1:d7:64:56:d8:c8:57:b7: - 55:7c:89:a2:b4:9d:ab:72:f0:bc:03:35:16:53:77: - 7e:ef:bf:0b:f5:91:d5:de:ae:bb:ae:ae:3a:53:00: - ec:80:3b:a0:2b:d3:6a:ae:0c:d0:4c:a1:24:b2:b4: - 77:de:ad:81:0f:70:f8:f4:dc:f8:c7:6e:f8:54:29: - 84:3a:b8:83:f4:95:22:80:ae:71:b0:dd:4e:ba:82: - 87:80:d1:c7:f3:ad:a7:45:c5:db:47:3c:8e:84:31: - bc:c6:bd:29:77:70:39:78:f4:3b:5e:ae:8f:d9:44: - 6b:1a:1d:cb:f9:7b:84:14:7c:5b:b8:82:3c:ed:47: - 16:c6:4e:2b:75:5a:1b:b4:5d:0c:0a:2f:55:b6:48: - 87:a1:25:a2:a9:5b:e4:a8:f9:bc:70:24:92:07:7f: - 5b:94:83:3b:44:78:65:cb:62:0c:30:fa:cf:f1:f7: - 20:9e:76:c8:52:78:8b:f8:30:62:f0:66:28:8a:7f: - ba:74:12:f8:05:ef:29:d8:17:cb:8a:95:61:fc:af: - 58:d2:e2:86:d7:8c:fb:3b:56:28:8d:e4:d9:27:48: - b6:c1:fc:9a:4e:d4:24:b8:68:c3:32:5d:65:30:6e: - a3:9e:b9:bf:6e:a7:3b:b4:3d:2e:5d:13:a1:28:4e: - a4:0d + 00:b6:ad:89:87:ed:48:f8:65:a1:8e:48:22:2d:af: + 1e:0c:0b:e0:4c:5c:7a:0d:25:c1:a4:91:9a:b3:cc: + 1f:78:07:40:c7:05:97:71:d2:94:bc:ce:0c:27:b2: + c9:57:7a:44:49:32:26:02:72:c6:f3:f7:18:ca:35: + 2c:25:ba:17:a4:a4:68:92:ea:68:d8:50:17:21:65: + 2e:94:db:56:47:96:53:c8:d3:96:c0:34:55:12:8d: + a1:0c:2d:dd:f9:3c:34:78:5a:ee:32:63:e3:34:8c: + 44:4c:67:c4:c4:31:42:35:ba:07:6e:70:c3:9e:73: + da:dc:08:1c:2f:d4:c6:32:42:62:67:55:ac:f4:4a: + a1:29:cf:ba:c3:2a:74:b3:e6:eb:a8:df:c8:79:0e: + 86:55:1d:dd:c4:61:63:f1:39:ca:ae:0b:a0:d4:81: + 69:69:6b:ca:72:9a:79:9b:eb:d0:b4:0a:63:b5:ec: + dc:a0:ce:5f:10:e3:e7:1c:f5:71:3e:01:8e:09:fc: + cc:80:92:ed:92:7e:68:ac:2d:9f:49:63:56:0e:61: + a6:44:75:99:14:68:97:24:42:a1:16:47:1d:c9:42: + 1f:74:d2:f3:7e:11:4b:b0:7b:73:5f:20:5d:3a:e4: + 74:71:34:25:d3:2d:77:9c:5f:06:4d:f7:15:fc:74: + 24:a1 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 31:9F:A3:DB:EA:90:94:EB:3D:93:39:9F:BA:8A:05:7E:2C:94:23:9B + 8C:6F:A0:45:A9:77:60:30:97:AA:87:1F:96:34:1D:3B:7A:C6:40:5E X509v3 Authority Key Identifier: - keyid:73:4C:95:45:4C:3B:F6:7E:7B:92:30:C9:AC:30:51:E7:7D:21:D2:BF + keyid:BD:54:1F:A6:8B:24:E6:BD:59:FD:50:9F:2B:A8:54:7F:F2:7B:B1:3E Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Certificate Sign, CRL Sign X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 Signature Algorithm: sha256WithRSAEncryption - 0d:7d:a3:df:40:cd:02:79:b5:69:5d:c5:a7:eb:bc:87:95:c3: - 17:fc:73:dd:59:a8:c2:d3:67:71:15:09:7a:9b:f8:01:5d:a0: - d2:a3:e5:37:1d:f5:f3:2c:fd:8d:8e:e7:6c:ca:01:2a:83:a8: - 00:c9:65:26:8e:ab:0b:13:91:9c:00:9a:a3:60:44:8c:82:0f: - 04:1e:74:b1:c6:4f:a6:da:37:70:16:35:03:92:f2:04:ab:c8: - 21:97:a8:b4:e3:bf:bf:67:9e:ce:c3:24:df:6a:cc:43:d6:ea: - 59:89:b7:3e:1c:de:ed:ab:99:ec:26:60:3b:b7:84:4b:e0:1a: - b7:be:6d:20:7b:f4:88:a2:bf:95:3f:6e:7a:fa:ea:e1:55:72: - 88:ae:67:b3:13:1a:3a:1f:07:16:1d:84:fd:e5:e3:1e:90:ec: - dc:d2:ce:73:c0:50:19:69:10:dc:c7:db:91:46:f4:50:52:87: - 94:6e:ce:ef:a6:20:57:d2:ad:36:95:1e:94:7f:a3:8f:d9:0d: - 99:dd:8f:e3:2a:b2:2b:69:a0:f7:26:4e:cd:f2:f1:cf:05:14: - 31:3d:aa:71:01:dd:42:24:19:62:5c:00:1b:98:ac:7d:45:f2: - e6:14:dd:2e:10:06:74:39:61:6d:b9:3c:68:c1:e7:3d:b6:3d: - e1:75:c9:fd + 8b:7a:66:86:f1:9f:ae:f1:75:5b:70:2c:c7:d9:97:29:08:f7: + b8:8a:6b:98:b8:81:eb:e9:99:bc:63:55:ab:b1:09:7b:06:f2: + 39:be:5c:7d:2f:ab:30:9b:11:dc:79:d3:67:e0:20:70:9f:01: + 2c:da:35:59:e1:2b:f6:1d:15:94:cd:12:db:99:05:89:69:a8: + 03:09:99:1b:e4:42:3d:55:f5:0d:92:78:1d:4b:99:0f:c4:ca: + 3a:bb:c5:33:d4:5c:bd:8e:24:81:db:51:1d:22:6f:1b:89:3d: + ea:a0:7d:e0:b3:ee:9b:eb:c4:48:b3:ad:7d:68:4a:a6:64:ec: + 08:d4:0d:28:3a:65:9e:cc:e4:42:35:95:48:87:e4:85:01:57: + 6e:f2:60:cf:50:1e:ca:7f:d8:c4:fa:60:ee:b0:94:52:2e:b6: + e6:e4:45:d0:b6:8c:e1:c0:34:7c:6f:ee:ad:a2:a3:e0:a1:fa: + 2e:5f:27:b5:c2:26:20:46:19:b7:a8:5a:c1:1d:8f:ab:42:1e: + 40:cf:ab:4c:ce:10:54:55:d3:10:af:32:14:80:b7:34:bb:72: + 96:97:df:40:a7:70:f2:be:47:43:be:83:2f:a9:47:e8:ce:50: + ee:e4:8e:a1:ff:fd:28:13:7d:ba:7e:ca:35:5d:67:e3:8e:0e: + 31:0f:b4:8f -----BEGIN CERTIFICATE----- MIIDiDCCAnCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjAXMRUwEwYD -VQQDDAxJbnRlcm1lZGlhcnkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB -AQDmVpHmJ1Oh12RW2MhXt1V8iaK0naty8LwDNRZTd37vvwv1kdXerruurjpTAOyA -O6Ar02quDNBMoSSytHferYEPcPj03PjHbvhUKYQ6uIP0lSKArnGw3U66goeA0cfz -radFxdtHPI6EMbzGvSl3cDl49Dtero/ZRGsaHcv5e4QUfFu4gjztRxbGTit1Whu0 -XQwKL1W2SIehJaKpW+So+bxwJJIHf1uUgztEeGXLYgww+s/x9yCedshSeIv4MGLw -ZiiKf7p0EvgF7ynYF8uKlWH8r1jS4obXjPs7ViiN5NknSLbB/JpO1CS4aMMyXWUw -bqOeub9upzu0PS5dE6EoTqQNAgMBAAGjgd4wgdswHQYDVR0OBBYEFDGfo9vqkJTr -PZM5n7qKBX4slCObMB8GA1UdIwQYMBaAFHNMlUVMO/Z+e5IwyawwUed9IdK/MD8G +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjAXMRUwEwYD +VQQDDAxJbnRlcm1lZGlhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +AQC2rYmH7Uj4ZaGOSCItrx4MC+BMXHoNJcGkkZqzzB94B0DHBZdx0pS8zgwnsslX +ekRJMiYCcsbz9xjKNSwluhekpGiS6mjYUBchZS6U21ZHllPI05bANFUSjaEMLd35 +PDR4Wu4yY+M0jERMZ8TEMUI1ugducMOec9rcCBwv1MYyQmJnVaz0SqEpz7rDKnSz +5uuo38h5DoZVHd3EYWPxOcquC6DUgWlpa8pymnmb69C0CmO17Nygzl8Q4+cc9XE+ +AY4J/MyAku2SfmisLZ9JY1YOYaZEdZkUaJckQqEWRx3JQh900vN+EUuwe3NfIF06 +5HRxNCXTLXecXwZN9xX8dCShAgMBAAGjgd4wgdswHQYDVR0OBBYEFIxvoEWpd2Aw +l6qHH5Y0HTt6xkBeMB8GA1UdIwQYMBaAFL1UH6aLJOa9Wf1QnyuoVH/ye7E+MD8G CCsGAQUFBwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0lu -dGVybWVkaWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3It -Y3JsL0ludGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQI -MAYBAf8CAQAwDQYJKoZIhvcNAQELBQADggEBAA19o99AzQJ5tWldxafrvIeVwxf8 -c91ZqMLTZ3EVCXqb+AFdoNKj5Tcd9fMs/Y2O52zKASqDqADJZSaOqwsTkZwAmqNg -RIyCDwQedLHGT6baN3AWNQOS8gSryCGXqLTjv79nns7DJN9qzEPW6lmJtz4c3u2r -mewmYDu3hEvgGre+bSB79Iiiv5U/bnr66uFVcoiuZ7MTGjofBxYdhP3l4x6Q7NzS -znPAUBlpENzH25FG9FBSh5Ruzu+mIFfSrTaVHpR/o4/ZDZndj+MqsitpoPcmTs3y -8c8FFDE9qnEB3UIkGWJcABuYrH1F8uYU3S4QBnQ5YW25PGjB5z22PeF1yf0= +dGVybWVkaWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3It +Y3JsL0ludGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQI +MAYBAf8CAQAwDQYJKoZIhvcNAQELBQADggEBAIt6Zobxn67xdVtwLMfZlykI97iK +a5i4gevpmbxjVauxCXsG8jm+XH0vqzCbEdx502fgIHCfASzaNVnhK/YdFZTNEtuZ +BYlpqAMJmRvkQj1V9Q2SeB1LmQ/Eyjq7xTPUXL2OJIHbUR0ibxuJPeqgfeCz7pvr +xEizrX1oSqZk7AjUDSg6ZZ7M5EI1lUiH5IUBV27yYM9QHsp/2MT6YO6wlFIutubk +RdC2jOHANHxv7q2io+Ch+i5fJ7XCJiBGGbeoWsEdj6tCHkDPq0zOEFRV0xCvMhSA +tzS7cpaX30CncPK+R0O+gy+pR+jOUO7kjqH//SgTfbp+yjVdZ+OODjEPtI8= -----END CERTIFICATE----- Certificate: @@ -192,35 +192,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c9:30:53:c1:b9:0f:27:7a:39:3d:39:c4:a3:7c: - 96:bb:0e:e4:d9:fd:10:76:98:36:62:fc:33:7c:02: - 47:6c:6f:2e:d2:61:aa:d5:e3:86:67:a2:ef:93:a3: - fd:15:83:1c:27:90:f3:81:4a:41:f2:e6:e6:be:26: - 9a:b0:77:1d:e5:8a:97:2d:a7:87:6b:80:49:26:0e: - da:48:36:ba:eb:71:6a:cb:b4:82:66:42:fd:58:5f: - bc:c9:18:30:ee:2f:0c:28:81:e7:36:b9:76:da:55: - 8c:7a:cf:a9:1f:04:c6:6e:42:ea:d3:83:c6:8d:04: - 26:9e:11:8a:c6:cd:25:c7:4a:58:d1:98:86:b5:37: - 9c:3e:68:2e:17:4d:81:85:f3:d4:7d:65:e7:0f:86: - 8a:c9:d0:2d:fc:4f:c7:40:2a:ef:48:ab:2e:4c:2e: - b6:1c:81:4e:73:73:e9:cc:d4:ef:94:b1:17:2c:70: - 64:b0:4c:ad:87:cf:45:13:c2:67:46:d1:c6:b3:61: - 8d:77:af:4f:1c:b6:4f:b6:d9:2b:3c:4c:5f:72:23: - 77:c7:85:65:1d:85:48:28:06:34:b4:f0:bd:a9:76: - 7a:65:60:59:d6:f6:26:f6:85:99:7b:84:16:5e:91: - 8d:f9:90:b8:75:d3:4a:77:6a:1f:f8:ed:66:67:22: - 64:4b + 00:9e:e2:7c:00:e0:00:2f:08:6e:14:3a:5f:e0:de: + 0a:c0:4d:af:11:e7:87:5b:6a:b8:d9:0e:c0:86:bb: + f2:aa:2f:7d:c0:81:ee:58:36:2b:e7:61:57:45:4b: + 2c:0d:12:71:f2:ce:ee:bb:28:30:40:fc:d9:f4:9b: + 91:72:0b:99:e0:af:83:84:18:f1:17:c9:fb:ca:56: + 67:89:08:05:39:13:a2:48:7f:95:33:3d:ae:b9:c2: + 9d:4a:94:7c:b5:f0:b3:0c:a7:ba:ac:78:a3:06:7b: + 2a:11:00:02:bf:b5:05:c4:82:70:c4:57:6e:4f:19: + 51:84:0e:f5:26:04:f9:4d:64:7b:59:97:b1:97:a1: + 28:f0:86:07:5b:53:5d:42:fb:ee:c0:a8:9b:ce:f2: + f4:eb:e5:9e:fa:81:a1:c0:5c:46:b5:80:a5:9a:8d: + 31:7d:0b:c3:b9:cb:1d:92:62:66:42:fd:e9:d1:f2: + 45:e2:a5:aa:ea:f8:01:2b:16:7f:1c:38:c2:8c:66: + 24:0c:d3:83:c6:da:b5:17:a5:1f:bd:47:73:53:68: + 5b:7b:d5:b4:25:b7:48:3c:c5:25:42:5f:e9:84:90: + 64:e9:e2:cb:27:0a:43:d8:f0:36:16:39:db:46:e5: + fa:8f:67:db:ba:d6:2c:05:a4:43:dd:1b:d7:29:ac: + f1:63 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 73:4C:95:45:4C:3B:F6:7E:7B:92:30:C9:AC:30:51:E7:7D:21:D2:BF + BD:54:1F:A6:8B:24:E6:BD:59:FD:50:9F:2B:A8:54:7F:F2:7B:B1:3E X509v3 Authority Key Identifier: - keyid:DE:10:87:7A:48:75:9E:50:89:F1:AE:40:E0:BF:BA:5F:D8:63:77:9B + keyid:1A:ED:F5:14:E8:2E:82:B7:0E:5A:25:9D:2F:88:BE:43:75:E1:76:F9 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -235,41 +235,41 @@ X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 Signature Algorithm: sha256WithRSAEncryption - 3f:40:c5:c8:06:d9:35:27:63:63:e7:9c:08:1d:ee:ef:e3:b6: - 11:a7:a2:4f:b0:bf:8b:14:2f:16:6f:47:f5:0b:d8:3d:98:7a: - 03:7d:30:0c:85:11:80:a6:ff:fc:99:dd:a0:31:d6:fb:bf:4f: - 09:49:64:ca:8a:34:3d:56:c3:72:b0:08:e2:b8:12:95:1e:70: - 4f:3f:5b:1e:70:6f:06:f0:78:77:90:3b:d1:54:83:f2:b1:8e: - 7e:25:d3:f7:21:66:8b:a9:c4:f7:f6:bb:a9:7a:3b:e0:99:4c: - 94:b7:45:3a:fe:61:74:0a:70:de:a0:d6:c1:c4:dd:59:0e:cc: - 81:d1:ad:da:99:1d:83:b3:e2:3a:7b:8f:5c:3a:25:52:3e:40: - 5a:96:00:71:e6:f3:5d:9c:6a:54:be:0f:24:8e:8b:3a:14:37: - 6a:72:0b:41:e6:06:d1:b2:3d:f9:a2:bb:d7:6e:f1:ac:70:08: - 62:e7:f2:82:df:fb:85:e4:99:b9:cf:84:9a:34:55:e5:e8:39: - a9:e7:e3:79:54:07:c9:6b:1d:33:aa:30:d3:ea:7b:32:07:0f: - 23:34:10:fa:58:17:ad:e0:62:c8:ce:d6:0f:db:34:0c:a3:a9: - f9:09:05:c6:25:d9:ce:e5:52:0a:5c:8a:f3:c9:44:72:45:71: - 6d:5c:fc:d1 + cc:05:72:82:a4:23:cc:ad:29:af:c0:b7:b5:25:d8:0d:a0:7e: + 6e:38:bd:7d:5a:6e:39:a9:c0:1c:c6:21:89:74:b1:83:9e:46: + 55:5a:e7:c5:ae:d7:e0:6f:c5:f5:95:a2:17:69:02:30:8a:9b: + 46:6e:43:b4:ba:2c:34:5b:55:fc:12:90:38:2b:16:94:56:10: + 4a:09:14:e3:77:ca:12:aa:12:30:60:06:ac:7a:fa:92:ed:1f: + d7:b3:08:83:c4:e7:a8:00:f0:fc:02:aa:9e:0d:f1:fa:0e:3a: + 17:05:9f:a0:2d:45:d3:78:2b:49:93:fa:c0:2b:e4:e2:77:07: + e5:8c:00:a4:89:c0:25:17:6d:3a:a9:4b:db:f5:f6:d6:e3:4f: + 5f:50:1d:3c:d9:00:69:9c:b5:ee:3f:cc:8b:ae:61:8d:c4:57: + d4:76:f0:97:2f:0c:a2:13:1a:29:1b:98:05:56:89:f8:55:b9: + 56:d2:11:d2:b7:dc:aa:24:88:a9:6c:2c:af:9e:85:8a:b1:c5: + 4d:8f:6f:36:b6:b7:60:cc:42:ee:fc:14:75:3c:25:b2:99:fb: + 36:86:54:f5:27:df:06:09:32:94:c9:84:43:83:6e:09:14:2d: + 61:2c:d5:8e:7f:ae:a0:21:ed:f4:52:ec:2c:a8:98:dc:85:1e: + 30:61:23:b5 -----BEGIN CERTIFICATE----- MIIDcDCCAligAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyTBTwbkP -J3o5PTnEo3yWuw7k2f0Qdpg2YvwzfAJHbG8u0mGq1eOGZ6Lvk6P9FYMcJ5DzgUpB -8ubmviaasHcd5YqXLaeHa4BJJg7aSDa663Fqy7SCZkL9WF+8yRgw7i8MKIHnNrl2 -2lWMes+pHwTGbkLq04PGjQQmnhGKxs0lx0pY0ZiGtTecPmguF02BhfPUfWXnD4aK -ydAt/E/HQCrvSKsuTC62HIFOc3PpzNTvlLEXLHBksEyth89FE8JnRtHGs2GNd69P -HLZPttkrPExfciN3x4VlHYVIKAY0tPC9qXZ6ZWBZ1vYm9oWZe4QWXpGN+ZC4ddNK -d2of+O1mZyJkSwIDAQABo4HOMIHLMB0GA1UdDgQWBBRzTJVFTDv2fnuSMMmsMFHn -fSHSvzAfBgNVHSMEGDAWgBTeEId6SHWeUInxrkDgv7pf2GN3mzA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnuJ8AOAA +LwhuFDpf4N4KwE2vEeeHW2q42Q7Ahrvyqi99wIHuWDYr52FXRUssDRJx8s7uuygw +QPzZ9JuRcguZ4K+DhBjxF8n7ylZniQgFOROiSH+VMz2uucKdSpR8tfCzDKe6rHij +BnsqEQACv7UFxIJwxFduTxlRhA71JgT5TWR7WZexl6Eo8IYHW1NdQvvuwKibzvL0 +6+We+oGhwFxGtYClmo0xfQvDucsdkmJmQv3p0fJF4qWq6vgBKxZ/HDjCjGYkDNOD +xtq1F6UfvUdzU2hbe9W0JbdIPMUlQl/phJBk6eLLJwpD2PA2FjnbRuX6j2fbutYs +BaRD3RvXKazxYwIDAQABo4HOMIHLMB0GA1UdDgQWBBS9VB+miyTmvVn9UJ8rqFR/ +8nuxPjAfBgNVHSMEGDAWgBQa7fUU6C6Ctw5aJZ0viL5DdeF2+TA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwDQYJKoZIhvcNAQELBQAD -ggEBAD9AxcgG2TUnY2PnnAgd7u/jthGnok+wv4sULxZvR/UL2D2YegN9MAyFEYCm -//yZ3aAx1vu/TwlJZMqKND1Ww3KwCOK4EpUecE8/Wx5wbwbweHeQO9FUg/Kxjn4l -0/chZoupxPf2u6l6O+CZTJS3RTr+YXQKcN6g1sHE3VkOzIHRrdqZHYOz4jp7j1w6 -JVI+QFqWAHHm812calS+DySOizoUN2pyC0HmBtGyPfmiu9du8axwCGLn8oLf+4Xk -mbnPhJo0VeXoOann43lUB8lrHTOqMNPqezIHDyM0EPpYF63gYsjO1g/bNAyjqfkJ -BcYl2c7lUgpcivPJRHJFcW1c/NE= +ggEBAMwFcoKkI8ytKa/At7Ul2A2gfm44vX1abjmpwBzGIYl0sYOeRlVa58Wu1+Bv +xfWVohdpAjCKm0ZuQ7S6LDRbVfwSkDgrFpRWEEoJFON3yhKqEjBgBqx6+pLtH9ez +CIPE56gA8PwCqp4N8foOOhcFn6AtRdN4K0mT+sAr5OJ3B+WMAKSJwCUXbTqpS9v1 +9tbjT19QHTzZAGmcte4/zIuuYY3EV9R28JcvDKITGikbmAVWifhVuVbSEdK33Kok +iKlsLK+ehYqxxU2Pbza2t2DMQu78FHU8JbKZ+zaGVPUn3wYJMpTJhEODbgkULWEs +1Y5/rqAh7fRS7CyomNyFHjBhI7U= -----END CERTIFICATE----- Certificate: @@ -286,30 +286,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a8:11:83:b7:cc:88:e9:4c:69:28:ad:6a:95:83: - 6a:1c:28:52:d2:02:21:00:93:f0:82:8e:fc:b8:fb: - b9:44:e2:43:e9:fe:3f:7e:0c:01:a6:9f:12:fc:09: - fc:66:44:03:b4:66:78:3c:36:05:37:00:6e:87:54: - ff:61:95:ab:37:88:a0:6e:f7:8f:c2:ea:8d:e5:bf: - 4c:21:21:1d:74:22:dd:93:52:b3:66:d7:97:33:b9: - cb:ab:8e:38:59:52:e7:f0:5c:09:50:ad:c9:e0:e1: - 18:d7:cc:4a:d7:2b:41:cd:91:8c:a2:b0:25:d6:6c: - d2:7d:e8:fa:20:3f:c8:aa:15:b9:77:b6:da:ac:86: - f8:21:52:2e:f9:e7:b6:d5:65:fd:23:ba:2f:5b:1b: - c6:62:76:00:f1:74:4b:e2:d9:9a:d3:67:03:71:d4: - 93:af:93:4d:4f:82:da:1c:ba:a5:a9:0f:25:6b:54: - dd:63:8c:3e:34:75:32:9e:c8:99:44:fd:f0:47:6d: - 98:45:3c:75:b5:ac:0b:eb:d6:30:6a:a1:6c:67:14: - ee:62:72:93:fe:bc:4c:e8:10:a2:3c:66:33:1c:49: - e8:dc:2f:c9:a4:64:17:88:a0:1c:a4:b0:ff:9c:8f: - c4:c6:18:1d:0c:55:62:a9:3b:f6:bc:53:16:62:82: - 49:c5 + 00:e3:4b:ce:a5:cb:b1:d2:1e:51:45:de:74:b2:98: + c6:35:8a:93:f3:07:cf:90:e9:e2:13:d4:2d:da:6d: + 1f:17:ba:d4:24:8f:f1:ba:3e:62:75:1f:6f:23:69: + e3:eb:c6:b3:37:e2:fa:7a:70:a9:f2:c1:ae:b5:bf: + 3d:12:b5:66:05:24:8e:0f:85:a4:4f:b9:bb:d0:d4: + 7a:86:fd:57:be:fa:c3:dc:bc:db:ba:04:19:b4:4d: + 3e:30:a0:cd:6e:07:a6:31:d5:e0:47:c4:c9:d3:2e: + 91:78:3a:22:3a:4e:7d:8a:d3:94:90:1f:57:b8:c3: + f3:6d:44:06:28:99:d4:eb:7e:98:3a:2d:3b:49:04: + 54:41:0c:50:ff:8b:ea:5e:31:a7:b1:c0:76:cd:22: + 09:e6:6c:d8:19:fb:34:eb:50:c5:f5:0f:76:86:6a: + d5:ce:75:bd:5f:fc:8f:e3:97:6d:20:fb:d5:c0:0e: + cd:18:fd:7c:f9:43:c8:74:24:2f:dc:82:57:b6:4e: + 6b:a3:d2:77:17:28:27:42:9e:b1:94:49:24:a5:84: + 34:fc:4b:9a:0b:84:cc:08:52:08:18:23:ee:72:02: + 95:64:e9:4f:f6:f0:09:c5:8d:a4:84:21:99:e8:9a: + d3:df:d5:c3:2d:3c:ee:0c:11:22:eb:a7:7d:6c:32: + 05:31 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - DE:10:87:7A:48:75:9E:50:89:F1:AE:40:E0:BF:BA:5F:D8:63:77:9B + 1A:ED:F5:14:E8:2E:82:B7:0E:5A:25:9D:2F:88:BE:43:75:E1:76:F9 X509v3 Authority Key Identifier: - keyid:DE:10:87:7A:48:75:9E:50:89:F1:AE:40:E0:BF:BA:5F:D8:63:77:9B + keyid:1A:ED:F5:14:E8:2E:82:B7:0E:5A:25:9D:2F:88:BE:43:75:E1:76:F9 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -324,41 +324,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 27:c0:50:82:2b:1b:71:84:c6:12:ea:45:ed:21:b8:fd:7c:08: - 68:ec:de:4a:1b:98:3b:ce:e9:a1:9e:42:9a:e0:f4:e2:09:a6: - 5c:98:33:16:5b:65:6b:fc:b9:9b:26:90:e1:86:58:1f:0a:7e: - 7e:0d:7d:4e:0e:8b:93:04:b9:84:f0:e8:a3:7f:34:e2:ab:f5: - d5:bb:46:b7:df:a0:3a:81:8c:56:48:02:95:8f:06:cb:f2:cd: - 2a:39:c6:12:5a:9d:62:e9:a9:49:55:4d:e9:17:c2:97:3d:81: - 12:76:d8:68:18:f6:7e:a6:c4:52:a9:85:4c:83:38:94:2b:df: - dd:39:bb:cf:e1:9e:4e:e1:a0:eb:63:8a:c0:6e:99:01:65:78: - b5:ca:ab:2a:90:86:c5:5e:53:62:57:89:14:c1:41:8f:e6:9a: - 60:97:e4:5c:5b:fa:28:9c:9f:e3:55:ed:42:36:b6:d0:8d:f3: - 0c:cf:6e:87:38:aa:98:91:a9:1f:48:2a:c7:27:49:04:d6:d6: - f8:33:c9:d0:e2:b7:87:00:9a:1f:63:af:5b:ac:70:7e:96:9f: - b0:3b:e5:a3:f8:04:b6:f8:2c:38:54:21:06:51:33:32:78:80: - 17:59:83:95:66:65:1d:b5:5b:f2:1b:3e:6d:9e:98:c2:09:f3: - ec:52:20:5b + 02:89:3f:e5:42:09:a5:9a:63:2f:54:2d:67:51:ab:bf:e0:9e: + 5c:76:a0:fb:19:f2:49:74:c6:65:ac:46:48:de:b8:52:58:60: + ee:6f:0b:04:dd:b8:b1:89:a1:cb:db:1e:28:5f:20:fb:d3:ef: + 8f:5c:28:a5:02:f6:13:7e:20:9a:e9:cd:9a:91:b0:00:2f:3c: + 6c:3e:84:3b:b2:33:4f:8b:b3:3f:62:6d:d5:f9:89:f5:c3:63: + 37:52:7b:4f:a3:20:e4:eb:25:bb:c0:a0:f9:d1:e8:d0:fa:53: + 55:d4:1f:2c:d5:e2:2e:b0:fe:4c:95:c9:9c:0d:99:24:af:b5: + f7:c8:ff:dc:f4:63:bd:bd:65:97:a1:b9:26:d8:51:d6:96:65: + f7:c7:6a:32:ec:23:59:37:8c:53:30:d6:f6:93:70:76:c3:8a: + 3d:5e:74:13:59:36:d7:0d:18:75:06:e5:1f:fc:c0:aa:b4:c8: + 93:0a:4c:f0:fc:d0:e9:1e:23:7e:6e:17:86:c7:1f:8e:a3:5a: + 12:82:8f:35:a3:d2:69:b2:f8:9d:7a:88:75:e6:84:05:ea:34: + 1e:e0:0c:bc:e9:6e:f3:37:eb:5d:08:a2:fb:d8:d2:69:5d:f8: + ab:8a:4b:23:0c:9e:6a:44:83:16:7a:94:65:b3:dd:61:1c:28: + 31:1f:75:f1 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKgRg7fMiOlMaSitapWD -ahwoUtICIQCT8IKO/Lj7uUTiQ+n+P34MAaafEvwJ/GZEA7RmeDw2BTcAbodU/2GV -qzeIoG73j8LqjeW/TCEhHXQi3ZNSs2bXlzO5y6uOOFlS5/BcCVCtyeDhGNfMStcr -Qc2RjKKwJdZs0n3o+iA/yKoVuXe22qyG+CFSLvnnttVl/SO6L1sbxmJ2APF0S+LZ -mtNnA3HUk6+TTU+C2hy6pakPJWtU3WOMPjR1Mp7ImUT98EdtmEU8dbWsC+vWMGqh -bGcU7mJyk/68TOgQojxmMxxJ6NwvyaRkF4igHKSw/5yPxMYYHQxVYqk79rxTFmKC -ScUCAwEAAaOByzCByDAdBgNVHQ4EFgQU3hCHekh1nlCJ8a5A4L+6X9hjd5swHwYD -VR0jBBgwFoAU3hCHekh1nlCJ8a5A4L+6X9hjd5swNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAONLzqXLsdIeUUXedLKY +xjWKk/MHz5Dp4hPULdptHxe61CSP8bo+YnUfbyNp4+vGszfi+npwqfLBrrW/PRK1 +ZgUkjg+FpE+5u9DUeob9V776w9y827oEGbRNPjCgzW4HpjHV4EfEydMukXg6IjpO +fYrTlJAfV7jD821EBiiZ1Ot+mDotO0kEVEEMUP+L6l4xp7HAds0iCeZs2Bn7NOtQ +xfUPdoZq1c51vV/8j+OXbSD71cAOzRj9fPlDyHQkL9yCV7ZOa6PSdxcoJ0KesZRJ +JKWENPxLmguEzAhSCBgj7nIClWTpT/bwCcWNpIQhmeia09/Vwy087gwRIuunfWwy +BTECAwEAAaOByzCByDAdBgNVHQ4EFgQUGu31FOgugrcOWiWdL4i+Q3XhdvkwHwYD +VR0jBBgwFoAUGu31FOgugrcOWiWdL4i+Q3XhdvkwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAnwFCCKxtx -hMYS6kXtIbj9fAho7N5KG5g7zumhnkKa4PTiCaZcmDMWW2Vr/LmbJpDhhlgfCn5+ -DX1ODouTBLmE8OijfzTiq/XVu0a336A6gYxWSAKVjwbL8s0qOcYSWp1i6alJVU3p -F8KXPYESdthoGPZ+psRSqYVMgziUK9/dObvP4Z5O4aDrY4rAbpkBZXi1yqsqkIbF -XlNiV4kUwUGP5ppgl+RcW/oonJ/jVe1CNrbQjfMMz26HOKqYkakfSCrHJ0kE1tb4 -M8nQ4reHAJofY69brHB+lp+wO+Wj+AS2+Cw4VCEGUTMyeIAXWYOVZmUdtVvyGz5t -npjCCfPsUiBb +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQACiT/lQgml +mmMvVC1nUau/4J5cdqD7GfJJdMZlrEZI3rhSWGDubwsE3bixiaHL2x4oXyD70++P +XCilAvYTfiCa6c2akbAALzxsPoQ7sjNPi7M/Ym3V+Yn1w2M3UntPoyDk6yW7wKD5 +0ejQ+lNV1B8s1eIusP5MlcmcDZkkr7X3yP/c9GO9vWWXobkm2FHWlmX3x2oy7CNZ +N4xTMNb2k3B2w4o9XnQTWTbXDRh1BuUf/MCqtMiTCkzw/NDpHiN+bheGxx+Oo1oS +go81o9Jpsvideoh15oQF6jQe4Ay86W7zN+tdCKL72NJpXfiriksjDJ5qRIMWepRl +s91hHCgxH3Xx -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/common.py b/net/data/verify_certificate_chain_unittest/common.py index 0174ec1..6bfefbf 100755 --- a/net/data/verify_certificate_chain_unittest/common.py +++ b/net/data/verify_certificate_chain_unittest/common.py
@@ -426,7 +426,7 @@ return Certificate(name, TYPE_CA, None) -def create_intermediary_certificate(name, issuer): +def create_intermediate_certificate(name, issuer): return Certificate(name, TYPE_CA, issuer)
diff --git a/net/data/verify_certificate_chain_unittest/expired-intermediary.pem b/net/data/verify_certificate_chain_unittest/expired-intermediary.pem deleted file mode 100644 index f3f2054..0000000 --- a/net/data/verify_certificate_chain_unittest/expired-intermediary.pem +++ /dev/null
@@ -1,280 +0,0 @@ -[Created by: generate-expired-intermediary.py] - -Certificate chain with 1 intermediary, where the intermediary is expired -(violates validity.notAfter). Verification is expected to fail. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:aa:15:ea:8b:25:e9:de:1a:5f:39:89:dd:71:6d: - 30:a6:24:ca:59:9b:63:ab:c2:18:2d:d4:80:ea:63: - 71:70:2e:fe:ac:c0:7d:01:b1:35:06:7c:ad:a8:8c: - 18:5f:34:16:23:07:78:07:f1:ee:92:08:39:68:1b: - 08:53:c0:4e:68:62:01:e3:5e:3f:6f:bf:84:18:06: - a8:59:8d:81:cc:39:71:b9:49:a8:19:2e:44:49:7b: - 8c:a6:71:15:2c:2a:3d:69:b9:42:5f:48:3c:1b:37: - c0:c0:fa:11:a8:d2:5a:bc:70:43:e3:b5:04:62:42: - 40:bc:5a:8d:f6:bb:27:7a:70:34:9b:dc:a8:12:75: - 0d:1b:5c:1e:81:44:41:7f:57:6e:c6:40:78:f6:a6: - 5b:98:93:61:4d:e6:dd:bd:49:8f:ba:1e:c5:ac:e9: - 3f:b3:d1:c5:c9:dd:db:88:f0:47:5a:fc:fc:ec:b3: - 87:2f:7f:f0:e1:a0:69:05:48:21:58:18:4b:79:e9: - de:92:9c:5f:89:79:68:f7:5e:59:58:9c:09:88:5e: - 7e:1c:6d:1e:ad:41:4d:f2:b9:9f:ef:9a:9b:57:8e: - ff:35:c3:69:2c:35:eb:30:f0:e4:07:94:09:87:a6: - ef:f4:1b:4b:61:47:64:d1:c9:8b:ba:08:e3:9a:01: - 99:43 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 40:79:FB:A7:C3:78:BA:A4:08:EC:1C:B2:14:21:D9:DD:6A:9E:B5:29 - X509v3 Authority Key Identifier: - keyid:6D:48:EB:C2:7F:9A:86:86:39:A3:39:79:C1:5B:A7:BD:A9:4E:23:00 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 5d:d4:68:d4:44:96:48:60:17:d4:88:12:43:df:6b:f0:b3:4c: - b2:ab:70:57:bc:d3:98:ae:34:d2:ab:e9:a3:b7:ae:76:9b:49: - e5:c5:bd:45:33:6a:19:e2:58:96:c7:49:98:24:0b:c1:57:5e: - 64:a7:2d:7a:c6:1f:fb:9d:ba:a9:19:6e:25:31:2a:b1:82:41: - 47:d4:02:47:ba:03:c3:43:d1:6b:05:10:b0:25:30:5c:0c:17: - 3c:a6:7c:4e:6d:94:35:b4:65:e6:67:32:9a:9b:df:26:fa:c6: - f6:f9:c0:47:62:64:a9:95:02:a3:aa:70:82:38:c3:6d:b3:cd: - 75:37:bd:4e:c5:91:bc:a1:48:7e:47:a1:bb:39:c4:7d:06:ef: - dc:c1:28:6b:6e:c6:d5:a3:e1:a0:d5:ec:c3:0a:ae:e5:5b:da: - 67:14:af:f5:6e:6a:06:72:2e:0d:61:31:31:b7:d4:a4:7b:45: - 21:50:cb:2d:30:c4:1f:c5:55:5c:e2:50:ce:35:cc:23:35:b0: - c2:92:ae:89:16:93:66:94:36:43:ff:30:79:b1:28:4d:6f:d1: - 01:83:a4:e5:fd:d2:d8:6f:c0:0e:e2:d1:85:e8:56:ea:a7:9a: - d3:ec:f6:96:fc:d2:0c:ec:61:78:97:c8:2a:6d:49:67:ac:66: - 19:37:0a:f1 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqFeqL -JeneGl85id1xbTCmJMpZm2Orwhgt1IDqY3FwLv6swH0BsTUGfK2ojBhfNBYjB3gH -8e6SCDloGwhTwE5oYgHjXj9vv4QYBqhZjYHMOXG5SagZLkRJe4ymcRUsKj1puUJf -SDwbN8DA+hGo0lq8cEPjtQRiQkC8Wo32uyd6cDSb3KgSdQ0bXB6BREF/V27GQHj2 -pluYk2FN5t29SY+6HsWs6T+z0cXJ3duI8Eda/Pzss4cvf/DhoGkFSCFYGEt56d6S -nF+JeWj3XllYnAmIXn4cbR6tQU3yuZ/vmptXjv81w2ksNesw8OQHlAmHpu/0G0th -R2TRyYu6COOaAZlDAgMBAAGjgekwgeYwHQYDVR0OBBYEFEB5+6fDeLqkCOwcshQh -2d1qnrUpMB8GA1UdIwQYMBaAFG1I68J/moaGOaM5ecFbp72pTiMAMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAXdRo1ESWSGAX1IgSQ99r -8LNMsqtwV7zTmK400qvpo7eudptJ5cW9RTNqGeJYlsdJmCQLwVdeZKctesYf+526 -qRluJTEqsYJBR9QCR7oDw0PRawUQsCUwXAwXPKZ8Tm2UNbRl5mcympvfJvrG9vnA -R2JkqZUCo6pwgjjDbbPNdTe9TsWRvKFIfkehuznEfQbv3MEoa27G1aPhoNXswwqu -5VvaZxSv9W5qBnIuDWExMbfUpHtFIVDLLTDEH8VVXOJQzjXMIzWwwpKuiRaTZpQ2 -Q/8webEoTW/RAYOk5f3S2G/ADuLRhehW6qea0+z2lvzSDOxheJfIKm1JZ6xmGTcK -8Q== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Mar 1 12:00:00 2015 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:b5:a7:f6:93:6b:28:98:90:c6:36:f3:31:5e:b2: - 6d:43:8a:03:c7:8d:9a:04:1a:23:9d:07:ee:5c:47: - 26:da:31:7e:96:34:7e:9d:d8:29:ff:56:2c:05:f9: - d9:ff:e9:10:26:9e:53:12:4b:cb:9d:b6:2f:9d:87: - 33:9c:91:7e:d4:81:c7:63:cf:3a:52:b7:62:18:bb: - b5:47:c4:ba:80:79:71:30:31:ed:08:e6:c5:85:03: - d1:e7:05:24:bf:8b:24:f0:2d:44:3c:80:eb:da:75: - f5:8f:a7:6e:dc:1c:46:b8:c6:bf:76:7b:20:e6:f5: - 3d:0a:c1:32:54:c6:f1:e6:34:6c:18:c6:11:a5:16: - 5b:29:24:75:fa:d3:ee:b9:91:56:80:88:df:fe:7f: - 6b:fa:07:49:95:46:b0:0e:61:ce:8d:f0:a7:64:d5: - e5:05:7a:c1:9a:6f:e9:e0:44:05:f8:75:ea:d9:64: - c9:20:98:28:11:d0:c4:fe:31:2f:9b:a5:79:42:2c: - ee:95:6b:7c:34:d4:15:5c:f8:68:e9:de:5c:b7:c8: - 1c:33:aa:24:3d:29:60:6e:18:e8:c8:cb:6a:a6:ad: - 3c:eb:36:0f:1a:81:aa:0b:8a:0e:fd:7b:e5:8b:12: - 7b:76:04:56:7e:b7:1d:cf:cf:65:77:03:fe:a2:6d: - 02:29 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 6D:48:EB:C2:7F:9A:86:86:39:A3:39:79:C1:5B:A7:BD:A9:4E:23:00 - X509v3 Authority Key Identifier: - keyid:7A:B1:AA:9D:A5:49:7E:15:F6:31:BC:33:C7:B6:57:F7:FD:13:5C:CF - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 1f:03:06:d7:ad:e1:fb:5a:3f:20:60:5d:d0:db:54:2b:b7:52: - 1a:67:c1:06:75:a7:48:d0:de:14:02:e2:6b:c6:71:d0:da:41: - 8e:59:c9:17:8e:c5:1e:27:2e:4a:16:2c:7c:77:1e:d4:1c:14: - 84:85:22:b2:d4:49:90:ab:c3:86:a6:b5:52:97:53:1e:1f:2e: - e4:ff:60:42:53:03:bb:59:e2:7e:f0:59:a6:4e:04:e6:73:3e: - d3:2a:c3:ff:1f:69:cd:29:4b:ce:39:aa:93:b9:97:d6:f0:e6: - e4:52:ca:30:5f:7f:2d:60:6f:93:20:ec:74:dc:d6:65:0d:5d: - bc:49:cd:ee:56:29:4f:34:8f:9f:5d:54:b6:2b:df:7b:33:8b: - 2a:b8:7d:f4:39:f3:e1:02:95:3f:e4:28:14:73:58:7d:88:2b: - e5:1b:e5:0a:9e:eb:b2:e7:7c:bf:e7:1a:70:5f:0f:3d:50:d9: - 8c:ea:4b:0a:e9:03:8e:5b:84:68:af:5f:72:6d:96:62:b3:90: - de:f7:be:8d:95:cb:59:5e:d8:7b:41:3e:32:3a:76:a6:01:45: - 54:9c:d5:98:78:f0:f7:bf:6b:00:4f:0e:c6:05:8b:0f:64:6a: - ca:0d:fc:ff:db:08:d4:20:11:5e:2b:70:59:bb:5d:46:da:07: - 94:12:e6:c7 ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE1MDMwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtaf2k2so -mJDGNvMxXrJtQ4oDx42aBBojnQfuXEcm2jF+ljR+ndgp/1YsBfnZ/+kQJp5TEkvL -nbYvnYcznJF+1IHHY886UrdiGLu1R8S6gHlxMDHtCObFhQPR5wUkv4sk8C1EPIDr -2nX1j6du3BxGuMa/dnsg5vU9CsEyVMbx5jRsGMYRpRZbKSR1+tPuuZFWgIjf/n9r -+gdJlUawDmHOjfCnZNXlBXrBmm/p4EQF+HXq2WTJIJgoEdDE/jEvm6V5QizulWt8 -NNQVXPho6d5ct8gcM6okPSlgbhjoyMtqpq086zYPGoGqC4oO/XvlixJ7dgRWfrcd -z89ldwP+om0CKQIDAQABo4HLMIHIMB0GA1UdDgQWBBRtSOvCf5qGhjmjOXnBW6e9 -qU4jADAfBgNVHSMEGDAWgBR6saqdpUl+FfYxvDPHtlf3/RNczzA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AB8DBtet4ftaPyBgXdDbVCu3UhpnwQZ1p0jQ3hQC4mvGcdDaQY5ZyReOxR4nLkoW -LHx3HtQcFISFIrLUSZCrw4amtVKXUx4fLuT/YEJTA7tZ4n7wWaZOBOZzPtMqw/8f -ac0pS845qpO5l9bw5uRSyjBffy1gb5Mg7HTc1mUNXbxJze5WKU80j59dVLYr33sz -iyq4ffQ58+EClT/kKBRzWH2IK+Ub5Qqe67LnfL/nGnBfDz1Q2YzqSwrpA45bhGiv -X3JtlmKzkN73vo2Vy1le2HtBPjI6dqYBRVSc1Zh48Pe/awBPDsYFiw9kasoN/P/b -CNQgEV4rcFm7XUbaB5QS5sc= ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:ea:ec:57:02:47:92:bc:08:b2:1a:2b:0d:03:36: - e3:2c:b0:4a:52:00:ed:12:f6:5d:39:61:ba:1c:fc: - 06:9c:11:13:b6:97:b1:ae:bc:66:4c:8a:05:03:29: - 4c:8a:59:cb:27:86:96:98:ce:5c:35:17:74:ba:ad: - 1f:14:00:2c:84:cf:cf:2c:fa:5e:a4:70:e5:66:e1: - 28:79:be:5a:39:42:ad:a5:bb:66:ca:f2:59:d2:cc: - 22:30:c7:bd:aa:19:e2:ed:be:4f:67:05:26:71:a1: - 39:96:52:e1:42:cf:fe:83:d2:87:00:e2:96:7b:34: - 64:cb:a7:76:ed:cf:79:ca:0f:1d:44:49:9e:7c:0a: - cb:3f:f4:f2:95:1f:07:23:12:75:0c:f7:f4:55:4e: - 3c:39:ac:0b:93:a4:33:76:27:82:d7:fa:9e:41:17: - d6:98:e5:c9:a8:0d:40:62:b6:80:36:e7:35:71:6a: - aa:bb:ae:25:0d:12:b1:c7:f2:18:e6:05:3f:43:df: - 37:0b:92:30:1c:1f:7c:55:36:01:35:0b:8b:f0:19: - 81:39:52:70:c6:e8:51:14:41:ae:e8:90:e0:ce:78: - 31:98:8a:ed:0c:c7:24:bb:1a:3f:ef:78:80:0e:35: - 19:e2:57:f7:3e:f6:ca:03:c2:f5:46:25:80:32:c7: - 44:39 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 7A:B1:AA:9D:A5:49:7E:15:F6:31:BC:33:C7:B6:57:F7:FD:13:5C:CF - X509v3 Authority Key Identifier: - keyid:7A:B1:AA:9D:A5:49:7E:15:F6:31:BC:33:C7:B6:57:F7:FD:13:5C:CF - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - a2:db:fb:36:6b:24:df:02:28:0c:ba:9d:88:82:7b:e7:e0:87: - 58:75:70:78:40:3d:f6:53:b9:57:0f:a3:01:b6:aa:3e:80:34: - 2f:b5:dc:9b:30:3e:43:44:79:70:22:48:0a:33:28:87:6d:09: - 90:92:d8:41:d5:ca:18:72:ba:65:5d:cb:b2:25:50:1c:07:f7: - b7:b7:23:93:2c:da:61:b4:c8:15:66:17:17:b4:d3:a8:4a:cd: - b6:01:bf:4c:e5:84:5d:b2:fb:fe:24:98:44:e8:84:16:6b:f4: - 04:f9:88:50:ec:42:1c:31:4b:87:1b:67:76:63:01:8f:46:0b: - 66:1b:59:a6:83:43:ed:33:4f:f8:74:74:2e:fe:8d:2c:f4:55: - 9f:c5:f9:c1:eb:44:9b:5b:aa:bd:98:5e:36:87:0f:c8:8e:f3: - f7:e3:ef:08:72:a8:f6:d0:f9:86:fa:58:1e:fb:73:43:b0:ba: - f9:8d:b0:f5:29:da:64:be:d8:e2:94:88:75:25:54:ce:e6:4d: - 80:33:be:bc:c0:7e:76:fc:65:2e:dc:74:d7:86:64:08:47:f0: - 6c:a1:dc:ae:69:2e:71:23:56:eb:a0:6c:f6:2a:15:2c:a7:a5: - 05:92:68:56:16:07:cd:82:62:02:e8:77:1f:0f:85:31:02:0c: - c0:9a:56:cd ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOrsVwJHkrwIshorDQM2 -4yywSlIA7RL2XTlhuhz8BpwRE7aXsa68ZkyKBQMpTIpZyyeGlpjOXDUXdLqtHxQA -LITPzyz6XqRw5WbhKHm+WjlCraW7ZsryWdLMIjDHvaoZ4u2+T2cFJnGhOZZS4ULP -/oPShwDilns0ZMundu3PecoPHURJnnwKyz/08pUfByMSdQz39FVOPDmsC5OkM3Yn -gtf6nkEX1pjlyagNQGK2gDbnNXFqqruuJQ0SscfyGOYFP0PfNwuSMBwffFU2ATUL -i/AZgTlScMboURRBruiQ4M54MZiK7QzHJLsaP+94gA41GeJX9z72ygPC9UYlgDLH -RDkCAwEAAaOByzCByDAdBgNVHQ4EFgQUerGqnaVJfhX2Mbwzx7ZX9/0TXM8wHwYD -VR0jBBgwFoAUerGqnaVJfhX2Mbwzx7ZX9/0TXM8wNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCi2/s2ayTf -AigMup2Ignvn4IdYdXB4QD32U7lXD6MBtqo+gDQvtdybMD5DRHlwIkgKMyiHbQmQ -kthB1coYcrplXcuyJVAcB/e3tyOTLNphtMgVZhcXtNOoSs22Ab9M5YRdsvv+JJhE -6IQWa/QE+YhQ7EIcMUuHG2d2YwGPRgtmG1mmg0PtM0/4dHQu/o0s9FWfxfnB60Sb -W6q9mF42hw/IjvP34+8Icqj20PmG+lge+3NDsLr5jbD1KdpkvtjilIh1JVTO5k2A -M768wH52/GUu3HTXhmQIR/BsodyuaS5xI1broGz2KhUsp6UFkmhWFgfNgmIC6Hcf -D4UxAgzAmlbN ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -RkFJTA== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/expired-intermediate.pem b/net/data/verify_certificate_chain_unittest/expired-intermediate.pem new file mode 100644 index 0000000..6ca87fd4 --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/expired-intermediate.pem
@@ -0,0 +1,280 @@ +[Created by: generate-expired-intermediate.py] + +Certificate chain with 1 intermediate, where the intermediate is expired +(violates validity.notAfter). Verification is expected to fail. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c0:b3:a7:c8:34:e7:e2:df:55:43:80:00:33:96: + 78:2c:3a:ac:7e:79:5d:86:9f:df:7e:9b:7a:30:d0: + 5b:30:2b:26:cc:06:e7:1f:13:6c:80:36:59:ec:1c: + 4b:c9:70:c2:79:14:f4:83:2f:cf:39:a2:9d:96:5c: + f2:91:90:ae:8f:f6:63:f6:cc:fb:1b:eb:fe:53:9b: + b6:27:8b:52:bb:bb:94:1b:8b:e5:76:cc:5a:4d:d7: + 9c:96:05:62:f4:c8:bf:87:cf:a7:6e:55:fd:b5:ab: + 28:ae:08:c3:cd:5f:72:77:e3:d8:8d:de:1b:cb:17: + bb:4c:b3:3d:6d:f2:84:22:5c:fb:84:31:46:68:3e: + bd:b5:83:81:24:01:80:7d:eb:76:8e:1f:7b:8f:e7: + 77:cb:8f:ca:69:77:5a:7a:56:f3:1c:3c:16:bf:00: + 2b:9f:2d:f5:3a:59:e0:f5:84:91:d3:7a:3e:90:39: + 44:5a:65:36:ab:5f:25:5d:9b:57:1e:13:91:97:88: + cb:36:39:d3:10:ee:2c:54:4d:6c:d7:22:92:37:0b: + 04:05:8f:1d:c3:58:b4:87:7c:db:17:2b:fc:db:00: + eb:0f:8c:75:96:e5:12:96:37:fe:b2:d5:68:1c:67: + fe:fb:60:c2:30:85:ae:0d:9b:62:50:6f:32:ae:fc: + 85:77 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + FC:25:45:D2:F9:2D:71:1C:EA:7B:79:2C:C5:C7:37:5F:9E:2A:5F:5D + X509v3 Authority Key Identifier: + keyid:4C:33:3C:86:48:60:C6:50:02:47:AF:DE:60:2F:A0:5C:96:EE:70:7B + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + 46:d0:27:3e:e6:49:d1:48:c4:0e:d3:0e:d0:3e:be:44:7f:0e: + a0:38:92:84:c4:ed:60:65:1c:26:3f:12:dd:d8:e3:49:c6:c8: + 42:86:67:95:6c:61:e7:61:8c:da:0a:db:90:d0:6f:e7:9f:05: + 38:a5:4a:4e:c3:40:f8:2b:ff:67:ad:9f:70:27:10:8d:68:f2: + ee:78:d5:a7:83:2f:e3:67:b3:47:8c:39:c9:29:97:f0:77:b7: + fe:7f:c7:6b:aa:6d:4c:83:39:e3:dc:bd:c3:18:e3:d8:d3:50: + 8a:97:d3:ee:59:3a:62:20:5b:e7:99:77:e6:d1:d2:d3:d0:d5: + 04:7d:86:8e:26:30:05:d1:0e:0f:d6:d2:1e:49:42:67:61:81: + 3d:10:75:d6:ba:c4:07:bb:e7:43:c8:a6:f7:56:e3:2b:d4:35: + d1:56:94:5c:0b:b6:25:02:d7:cd:74:e7:4d:1d:02:d3:43:ab: + dd:50:9f:c4:cf:15:4c:77:87:48:1e:57:3f:3d:7e:7e:67:9b: + ae:2f:79:ea:16:a9:cd:c6:76:cb:3c:75:75:a7:78:22:af:a9: + b4:83:d3:b2:72:e8:43:cc:4a:8d:ee:b4:5a:ac:b2:30:96:52: + 91:26:4b:17:29:4e:53:b4:58:df:f9:1d:53:2c:66:3d:c5:d7: + 11:99:b6:f5 +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDAs6fI +NOfi31VDgAAzlngsOqx+eV2Gn99+m3ow0FswKybMBucfE2yANlnsHEvJcMJ5FPSD +L885op2WXPKRkK6P9mP2zPsb6/5Tm7Yni1K7u5Qbi+V2zFpN15yWBWL0yL+Hz6du +Vf21qyiuCMPNX3J349iN3hvLF7tMsz1t8oQiXPuEMUZoPr21g4EkAYB963aOH3uP +53fLj8ppd1p6VvMcPBa/ACufLfU6WeD1hJHTej6QOURaZTarXyVdm1ceE5GXiMs2 +OdMQ7ixUTWzXIpI3CwQFjx3DWLSHfNsXK/zbAOsPjHWW5RKWN/6y1WgcZ/77YMIw +ha4Nm2JQbzKu/IV3AgMBAAGjgekwgeYwHQYDVR0OBBYEFPwlRdL5LXEc6nt5LMXH +N1+eKl9dMB8GA1UdIwQYMBaAFEwzPIZIYMZQAkev3mAvoFyW7nB7MD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEARtAnPuZJ0UjEDtMO0D6+ +RH8OoDiShMTtYGUcJj8S3djjScbIQoZnlWxh52GM2grbkNBv558FOKVKTsNA+Cv/ +Z62fcCcQjWjy7njVp4Mv42ezR4w5ySmX8He3/n/Ha6ptTIM549y9wxjj2NNQipfT +7lk6YiBb55l35tHS09DVBH2GjiYwBdEOD9bSHklCZ2GBPRB11rrEB7vnQ8im91bj +K9Q10VaUXAu2JQLXzXTnTR0C00Or3VCfxM8VTHeHSB5XPz1+fmebri956hapzcZ2 +yzx1dad4Iq+ptIPTsnLoQ8xKje60WqyyMJZSkSZLFylOU7RY3/kdUyxmPcXXEZm2 +9Q== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Mar 1 12:00:00 2015 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ae:f8:c2:3a:71:85:a2:bd:ca:2c:30:b7:22:3a: + f3:c9:24:7e:74:86:98:af:cd:13:0a:c1:4c:52:56: + f6:03:19:af:7d:67:73:2e:e2:99:e4:3b:f7:7a:7c: + dc:8d:83:61:36:c4:89:bc:14:aa:11:8d:e7:fe:3d: + 61:e5:1a:78:88:9b:af:63:05:30:78:f8:1e:f5:92: + e5:2d:02:d4:b4:cb:a4:44:a4:cc:1b:38:52:fb:55: + 4a:b9:37:d4:bb:d0:13:20:69:cb:1f:34:4c:d0:ca: + 32:04:23:f3:52:1f:39:e8:90:a3:3d:68:f5:a9:e3: + fc:e3:f1:e2:c3:47:55:68:ab:7e:90:77:87:90:00: + e9:30:05:ea:30:07:6d:66:d6:c8:98:bd:8b:81:18: + c6:c5:45:26:30:ce:c8:61:6a:dc:70:7a:23:8a:4d: + b8:ca:94:68:a7:48:ba:d6:fb:10:89:a9:9d:5e:1c: + 43:10:b5:de:33:68:a3:2c:91:2b:70:da:be:bd:1e: + b2:30:2e:b9:f7:57:fc:d9:d1:4a:92:78:34:93:df: + 89:6a:85:1c:df:23:f3:30:fb:7d:9f:7b:b3:cc:9d: + 85:98:f8:64:7a:34:ba:7a:51:80:01:eb:91:77:7f: + 77:f6:65:86:9e:51:5e:4e:20:6f:c9:ed:3c:50:1c: + cd:8f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 4C:33:3C:86:48:60:C6:50:02:47:AF:DE:60:2F:A0:5C:96:EE:70:7B + X509v3 Authority Key Identifier: + keyid:FB:59:3E:CC:A2:42:62:72:9F:53:96:95:3A:48:EA:16:80:C8:42:40 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 4f:a5:3b:98:b8:a9:83:3a:35:3d:75:a8:f6:e8:59:43:95:3a: + 0b:37:dc:ac:d0:12:82:31:2a:64:c8:64:81:f4:f8:d7:28:2c: + bf:6f:81:79:a8:21:7b:70:62:4b:7f:c8:b1:bf:69:8b:38:14: + e8:78:aa:61:f1:6f:6b:1a:81:93:e7:c4:7b:9f:99:75:2c:90: + e9:8d:3a:7e:4e:2f:09:f9:0a:20:04:cb:3e:c6:ed:59:f5:2e: + 2e:be:73:b4:40:4f:9d:96:f0:8c:b8:01:88:fa:bf:7a:ed:f6: + cc:46:c5:62:1b:bb:f3:1d:3a:4b:02:7c:aa:6e:61:1f:5b:4e: + 0e:d5:3f:c3:5c:c0:5f:1a:aa:fb:bb:4f:4d:a4:45:4c:2a:cd: + c0:c2:29:3d:1f:31:2b:0d:80:45:c7:5f:4b:09:96:88:a6:4a: + b0:fb:66:3f:4b:41:c3:5b:a7:f7:7f:ce:cb:b5:c9:54:62:66: + 61:d1:20:73:f6:c2:e0:81:11:20:b1:a0:a5:44:3f:52:4a:77: + 9d:b9:b9:99:e7:73:a8:23:1f:02:91:03:e5:90:ad:23:00:2a: + 08:99:37:16:df:ca:70:bf:da:e9:50:1d:c5:94:81:57:97:7d: + 3f:d2:4f:91:74:94:90:2e:5c:dd:33:13:a0:83:25:4d:c0:7e: + 19:97:e3:d6 +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE1MDMwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArvjCOnGF +or3KLDC3IjrzySR+dIaYr80TCsFMUlb2AxmvfWdzLuKZ5Dv3enzcjYNhNsSJvBSq +EY3n/j1h5Rp4iJuvYwUwePge9ZLlLQLUtMukRKTMGzhS+1VKuTfUu9ATIGnLHzRM +0MoyBCPzUh856JCjPWj1qeP84/Hiw0dVaKt+kHeHkADpMAXqMAdtZtbImL2LgRjG +xUUmMM7IYWrccHojik24ypRop0i61vsQiamdXhxDELXeM2ijLJErcNq+vR6yMC65 +91f82dFKkng0k9+JaoUc3yPzMPt9n3uzzJ2FmPhkejS6elGAAeuRd3939mWGnlFe +TiBvye08UBzNjwIDAQABo4HLMIHIMB0GA1UdDgQWBBRMMzyGSGDGUAJHr95gL6Bc +lu5wezAfBgNVHSMEGDAWgBT7WT7MokJicp9TlpU6SOoWgMhCQDA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +AE+lO5i4qYM6NT11qPboWUOVOgs33KzQEoIxKmTIZIH0+NcoLL9vgXmoIXtwYkt/ +yLG/aYs4FOh4qmHxb2sagZPnxHufmXUskOmNOn5OLwn5CiAEyz7G7Vn1Li6+c7RA +T52W8Iy4AYj6v3rt9sxGxWIbu/MdOksCfKpuYR9bTg7VP8NcwF8aqvu7T02kRUwq +zcDCKT0fMSsNgEXHX0sJloimSrD7Zj9LQcNbp/d/zsu1yVRiZmHRIHP2wuCBESCx +oKVEP1JKd525uZnnc6gjHwKRA+WQrSMAKgiZNxbfynC/2ulQHcWUgVeXfT/ST5F0 +lJAuXN0zE6CDJU3AfhmX49Y= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c9:53:af:4f:d1:35:5f:3e:69:08:13:28:41:5b: + 69:25:b0:ee:39:75:73:4c:63:c4:08:42:0c:5e:04: + 04:62:21:1a:92:5d:c8:6d:e8:44:6a:3b:3e:c5:6a: + 22:56:86:db:cb:38:c8:c7:55:ed:2c:dc:bc:36:39: + 76:96:3f:6a:5f:3d:12:43:60:b1:94:13:75:94:02: + 8b:ad:f4:be:85:5b:ed:f1:c5:03:2c:3c:0c:e3:eb: + 7f:ab:94:4a:79:8b:48:fd:ad:7a:c3:e0:a8:de:40: + ea:f0:a7:87:54:40:6e:f4:74:88:aa:2b:bb:21:bf: + d6:7f:da:bc:cf:52:48:3d:b6:75:0d:e2:6b:ea:03: + 0a:d7:39:f5:78:45:63:05:1a:4b:99:40:5e:97:08: + 0a:5d:34:63:fa:ba:de:a7:f5:1c:e8:b2:26:96:0f: + c9:c1:ac:6d:ef:05:8d:1c:dc:09:0b:bc:d3:f3:fb: + 10:43:2f:b2:36:3e:cf:84:1a:37:1e:fc:81:67:c6: + 14:87:bb:87:33:16:2a:95:cf:e7:0a:b7:52:00:05: + 09:08:a9:a5:97:5d:be:ed:19:92:4e:6c:4f:94:7f: + e5:1a:34:c0:dc:3f:02:8e:ae:77:fc:b6:27:77:78: + 48:e7:ca:a1:bd:27:1d:3c:a3:2d:8d:46:d5:a6:9d: + 53:cd + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + FB:59:3E:CC:A2:42:62:72:9F:53:96:95:3A:48:EA:16:80:C8:42:40 + X509v3 Authority Key Identifier: + keyid:FB:59:3E:CC:A2:42:62:72:9F:53:96:95:3A:48:EA:16:80:C8:42:40 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 34:3c:af:58:31:78:ea:c0:32:23:d8:b0:8e:84:44:9c:a3:b7: + 0b:b5:a4:4b:3d:21:d2:8a:02:ec:4c:ed:ab:c3:0a:17:89:50: + 45:fc:43:0b:db:6c:e6:69:56:3c:41:b0:c9:2d:12:19:bd:a1: + b6:a7:fa:25:a4:73:6f:32:06:b7:f5:ac:64:b3:b9:b6:44:65: + 83:b2:48:cc:3c:68:69:ae:16:0a:c0:c5:57:39:00:51:16:97: + 0e:03:7d:e7:02:65:f2:84:de:e9:a6:9d:d5:83:73:37:9d:f5: + bc:d8:ef:dc:6f:1b:48:db:f6:ca:a0:00:d5:e6:c0:f6:94:2d: + a9:4e:b4:4d:cf:49:7d:c4:4d:3a:68:a2:b2:d8:e8:67:77:98: + 6f:1c:2d:4a:74:13:2b:24:04:67:50:38:7e:e9:cb:0c:94:0d: + d0:07:50:52:a5:03:10:07:6a:04:ef:33:ea:b0:70:9f:27:34: + 47:b0:f8:41:81:7e:f2:93:0b:c0:cf:c3:d7:06:59:f1:24:2a: + 61:64:7f:38:f0:4f:77:d3:92:e4:1f:e4:44:a4:b6:85:40:59: + 3d:df:f2:cc:57:ea:1a:58:1d:f8:90:d4:2d:53:67:56:c3:88: + 9d:17:0f:19:19:fc:ed:4e:cc:b9:76:fa:fc:93:e5:bf:08:e7: + a9:d6:46:0f +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMlTr0/RNV8+aQgTKEFb +aSWw7jl1c0xjxAhCDF4EBGIhGpJdyG3oRGo7PsVqIlaG28s4yMdV7SzcvDY5dpY/ +al89EkNgsZQTdZQCi630voVb7fHFAyw8DOPrf6uUSnmLSP2tesPgqN5A6vCnh1RA +bvR0iKoruyG/1n/avM9SSD22dQ3ia+oDCtc59XhFYwUaS5lAXpcICl00Y/q63qf1 +HOiyJpYPycGsbe8FjRzcCQu80/P7EEMvsjY+z4QaNx78gWfGFIe7hzMWKpXP5wq3 +UgAFCQippZddvu0Zkk5sT5R/5Ro0wNw/Ao6ud/y2J3d4SOfKob0nHTyjLY1G1aad +U80CAwEAAaOByzCByDAdBgNVHQ4EFgQU+1k+zKJCYnKfU5aVOkjqFoDIQkAwHwYD +VR0jBBgwFoAU+1k+zKJCYnKfU5aVOkjqFoDIQkAwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA0PK9YMXjq +wDIj2LCOhESco7cLtaRLPSHSigLsTO2rwwoXiVBF/EML22zmaVY8QbDJLRIZvaG2 +p/olpHNvMga39axks7m2RGWDskjMPGhprhYKwMVXOQBRFpcOA33nAmXyhN7ppp3V +g3M3nfW82O/cbxtI2/bKoADV5sD2lC2pTrRNz0l9xE06aKKy2Ohnd5hvHC1KdBMr +JARnUDh+6csMlA3QB1BSpQMQB2oE7zPqsHCfJzRHsPhBgX7ykwvAz8PXBlnxJCph +ZH848E9305LkH+REpLaFQFk93/LMV+oaWB34kNQtU2dWw4idFw8ZGfztTsy5dvr8 +k+W/COep1kYP +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +RkFJTA== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/expired-root.pem b/net/data/verify_certificate_chain_unittest/expired-root.pem index 5e9ffcf..57b0b7b0 100644 --- a/net/data/verify_certificate_chain_unittest/expired-root.pem +++ b/net/data/verify_certificate_chain_unittest/expired-root.pem
@@ -1,6 +1,6 @@ [Created by: generate-expired-root.py] -Certificate chain with 1 intermediary, where the root certificate is expired +Certificate chain with 1 intermediate, where the root certificate is expired (violates validity.notAfter). Verification is expected to fail. Certificate: @@ -8,7 +8,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -17,80 +17,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c2:5a:d7:49:58:e0:e3:06:4c:d0:8d:83:ad:7a: - ff:86:7c:0e:00:26:64:44:8a:cb:38:bd:95:8e:b1: - 7f:7c:48:7f:02:ef:7d:f9:b4:76:76:eb:5a:1d:71: - 99:3a:c8:66:1a:c8:fb:24:d3:e8:9c:af:3b:5c:b5: - 10:f0:32:7c:46:87:9a:3f:f6:57:6a:45:5c:18:6e: - 92:54:54:16:4e:17:79:1c:a1:05:7c:21:3c:dc:89: - 23:5d:aa:f9:1e:a1:8c:9b:9f:d7:a0:f3:c3:23:f0: - f4:b5:12:ac:d3:57:cb:bb:f9:8e:0d:d8:e9:d5:bd: - 71:2b:3e:38:d1:fe:f0:17:cb:f0:ce:23:8f:8a:ee: - 56:4d:94:18:31:c3:1d:74:07:57:a4:f7:07:e8:b3: - a4:60:53:38:96:83:f7:59:cf:03:f9:38:3c:35:87: - 6a:71:92:8a:1b:4f:7e:f0:49:76:ba:65:42:87:fe: - b2:21:e1:17:d6:98:50:36:5a:7f:fe:8d:f6:bf:ab: - 46:63:fc:57:e8:57:c5:90:9b:27:07:30:fa:26:1d: - 13:eb:f2:e1:b0:99:f9:55:39:76:0f:ca:a4:31:85: - c6:62:df:53:cd:3e:df:bf:83:1d:a9:07:b1:a2:8a: - be:43:f2:05:1e:f9:ca:28:2e:81:39:fa:2c:74:c5: - 7c:b1 + 00:de:6b:17:fa:9d:bf:8d:97:11:c1:2b:af:53:67: + 89:b2:bb:1b:7c:25:a6:ba:81:f9:43:3f:15:51:06: + 24:11:3c:3c:d1:28:16:86:53:15:fb:e6:99:67:08: + d7:2a:74:2d:ba:f2:72:55:ec:8e:7b:13:30:f8:31: + dc:16:a2:7f:7a:83:9c:26:ee:cb:5a:49:68:75:7e: + 97:a9:04:e5:2a:dc:e7:5d:9d:60:22:7f:b5:b3:d5: + 13:7c:64:3b:75:a5:b8:92:8f:67:7e:de:7e:42:13: + 7a:d2:e1:da:c5:f5:a7:bb:db:57:db:e5:09:d8:37: + 6f:80:c0:06:52:c5:ea:33:1b:35:ba:21:de:6c:a0: + e2:c8:19:b4:cc:3e:3c:0e:af:f1:a8:c6:01:f7:d8: + 7a:dc:83:4a:e8:9f:dc:30:f7:c8:a4:19:c4:89:45: + 69:60:3b:ca:a0:f8:86:09:56:1e:0f:55:c4:32:8f: + 95:fd:02:ee:e6:76:d5:bc:4a:6c:8f:b4:47:3f:04: + e4:0c:45:16:a3:04:3b:73:f2:5e:2e:6b:62:9e:25: + e9:46:2c:ee:b9:3a:6b:a9:84:63:d2:aa:a6:73:66: + 61:77:90:e2:7b:1e:d0:c3:3c:7d:23:40:cb:9d:a4: + 53:ab:bb:9d:57:b8:dd:30:f4:89:cd:be:40:0f:8c: + fe:45 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 14:B3:FA:87:AB:1D:54:2D:2B:B8:C4:5D:33:57:C5:52:F4:15:B8:20 + E1:00:21:A7:60:75:C5:70:AE:67:AA:A2:C0:27:3E:1D:88:0B:8F:3A X509v3 Authority Key Identifier: - keyid:ED:CC:99:FA:9D:D2:85:7E:0E:02:42:8E:72:48:C3:F4:29:4B:95:D2 + keyid:63:74:44:85:E8:82:EC:BA:73:D2:A8:F4:8D:AF:0B:B0:37:F6:14:DD Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 42:13:4f:10:c0:69:c9:ad:88:94:2d:df:24:e6:47:6c:d3:07: - 33:75:77:ba:c8:40:f4:28:1f:7a:0a:49:14:93:5f:d7:6e:91: - 49:22:a3:cb:f0:52:f9:d6:22:90:ef:62:79:3d:cc:e5:2f:d0: - c9:c3:0e:b0:54:06:6c:31:7e:f3:9e:48:be:02:c8:f3:60:cb: - d7:5b:65:f6:82:41:fa:b4:19:34:e2:82:9c:0a:02:ee:ec:2a: - 53:6d:25:49:19:9a:ce:1a:6c:c4:49:e2:3b:08:fb:6f:05:00: - 65:d6:64:29:a9:c5:9f:83:27:af:49:a8:b8:14:de:e0:43:c6: - b4:c2:ad:49:55:d5:58:42:50:cb:20:54:df:1e:9b:0a:9d:d3: - a0:85:4d:a2:5c:cb:07:24:1c:f0:91:d2:89:54:d1:69:7a:68: - 05:6a:3c:80:00:e5:7d:6d:9a:0b:37:0d:d0:6b:5e:61:d4:04: - 37:73:41:ae:48:10:0a:3b:b1:d4:67:31:19:19:43:d2:22:f4: - 29:72:cd:8d:97:5b:f8:11:09:5b:32:07:56:fb:f4:d7:66:cc: - 72:e4:db:f6:1d:53:70:0e:bf:4c:c2:0f:61:07:a9:f3:1d:5f: - 03:f9:1e:9c:96:f6:49:1a:b8:51:1d:16:22:1a:f5:2b:ac:da: - ce:5a:a6:38 + a0:85:7a:3a:fd:63:12:8f:fa:ea:aa:a0:17:37:a9:ee:2d:a1: + 98:e4:4e:c0:5a:8f:42:1e:f7:09:c9:36:0e:8e:7c:0f:00:20: + f8:73:5b:7c:e2:f0:ea:45:35:0e:70:b3:a7:65:d6:8e:ad:02: + 2b:04:79:c0:0b:e3:3e:57:da:ab:7a:e5:78:6e:91:fd:0c:bf: + 3a:22:14:16:c1:42:e1:8c:f9:92:1c:7d:74:b3:72:b6:18:42: + 1f:30:c1:f1:05:f2:7e:9e:71:f8:a7:e1:e4:6d:9b:a4:8a:29: + f0:ae:73:c3:b9:7d:93:5f:4c:b4:7e:4e:fb:6d:3f:4d:85:46: + ea:31:32:01:92:50:10:c7:81:82:d3:86:75:8b:47:c3:e7:e9: + 17:0c:42:d2:e4:70:66:eb:07:e7:6e:1a:12:b2:c9:8a:62:b0: + 0e:8e:27:f1:90:9e:82:10:96:92:c9:9f:31:e1:50:21:e8:39: + c3:d8:26:2a:f9:36:21:02:e7:ac:a7:0c:81:a1:35:1c:7c:33: + e8:84:26:9a:41:a7:07:d0:ff:d5:18:b9:b8:2c:46:47:3a:1b: + 22:c4:35:f7:ab:86:98:63:cf:8a:d1:94:be:5b:59:a3:4b:6a: + 01:1f:df:27:cb:09:d3:98:43:88:80:9c:ed:ca:73:60:41:e0: + 77:8d:e4:ab -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDCWtdJ -WODjBkzQjYOtev+GfA4AJmREiss4vZWOsX98SH8C7335tHZ261odcZk6yGYayPsk -0+icrztctRDwMnxGh5o/9ldqRVwYbpJUVBZOF3kcoQV8ITzciSNdqvkeoYybn9eg -88Mj8PS1EqzTV8u7+Y4N2OnVvXErPjjR/vAXy/DOI4+K7lZNlBgxwx10B1ek9wfo -s6RgUziWg/dZzwP5ODw1h2pxkoobT37wSXa6ZUKH/rIh4RfWmFA2Wn/+jfa/q0Zj -/FfoV8WQmycHMPomHRPr8uGwmflVOXYPyqQxhcZi31PNPt+/gx2pB7Giir5D8gUe -+cooLoE5+ix0xXyxAgMBAAGjgekwgeYwHQYDVR0OBBYEFBSz+oerHVQtK7jEXTNX -xVL0FbggMB8GA1UdIwQYMBaAFO3Mmfqd0oV+DgJCjnJIw/QpS5XSMD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDeaxf6 +nb+NlxHBK69TZ4myuxt8Jaa6gflDPxVRBiQRPDzRKBaGUxX75plnCNcqdC268nJV +7I57EzD4MdwWon96g5wm7staSWh1fpepBOUq3OddnWAif7Wz1RN8ZDt1pbiSj2d+ +3n5CE3rS4drF9ae721fb5QnYN2+AwAZSxeozGzW6Id5soOLIGbTMPjwOr/GoxgH3 +2Hrcg0ron9ww98ikGcSJRWlgO8qg+IYJVh4PVcQyj5X9Au7mdtW8SmyPtEc/BOQM +RRajBDtz8l4ua2KeJelGLO65OmuphGPSqqZzZmF3kOJ7HtDDPH0jQMudpFOru51X +uN0w9InNvkAPjP5FAgMBAAGjgekwgeYwHQYDVR0OBBYEFOEAIadgdcVwrmeqosAn +Ph2IC486MB8GA1UdIwQYMBaAFGN0RIXoguy6c9Ko9I2vC7A39hTdMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAQhNPEMBpya2IlC3fJOZH -bNMHM3V3ushA9CgfegpJFJNf126RSSKjy/BS+dYikO9ieT3M5S/QycMOsFQGbDF+ -855IvgLI82DL11tl9oJB+rQZNOKCnAoC7uwqU20lSRmazhpsxEniOwj7bwUAZdZk -KanFn4Mnr0mouBTe4EPGtMKtSVXVWEJQyyBU3x6bCp3ToIVNolzLByQc8JHSiVTR -aXpoBWo8gADlfW2aCzcN0GteYdQEN3NBrkgQCjux1GcxGRlD0iL0KXLNjZdb+BEJ -WzIHVvv012bMcuTb9h1TcA6/TMIPYQep8x1fA/kenJb2SRq4UR0WIhr1K6zazlqm -OA== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAoIV6Ov1jEo/66qqgFzep +7i2hmOROwFqPQh73Cck2Do58DwAg+HNbfOLw6kU1DnCzp2XWjq0CKwR5wAvjPlfa +q3rleG6R/Qy/OiIUFsFC4Yz5khx9dLNythhCHzDB8QXyfp5x+Kfh5G2bpIop8K5z +w7l9k19MtH5O+20/TYVG6jEyAZJQEMeBgtOGdYtHw+fpFwxC0uRwZusH524aErLJ +imKwDo4n8ZCeghCWksmfMeFQIeg5w9gmKvk2IQLnrKcMgaE1HHwz6IQmmkGnB9D/ +1Ri5uCxGRzobIsQ196uGmGPPitGUvltZo0tqAR/fJ8sJ05hDiICc7cpzYEHgd43k +qw== -----END CERTIFICATE----- Certificate: @@ -102,35 +102,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b0:4e:34:a2:37:40:52:cd:58:5e:d8:18:40:f2: - 23:9e:a8:78:10:18:db:5b:87:a3:e2:e3:c8:a5:50: - b7:c3:1c:fa:e5:77:7f:93:b3:44:2a:90:60:39:81: - a4:c4:63:e0:3d:8a:d8:36:c8:5d:df:04:01:c1:f1: - b5:65:12:3d:f5:22:f9:f5:ff:c5:60:2a:48:39:90: - 69:df:08:9f:bc:07:6c:c6:ab:3f:e4:2d:05:b5:b3: - 11:9e:4d:5a:8d:3c:64:3f:1e:7d:df:05:1c:e2:e4: - b7:d9:42:36:cb:86:df:53:2a:ea:51:2b:53:f8:3a: - 07:5a:08:8b:df:fb:9d:2f:1f:94:a9:fb:07:93:87: - 20:ee:e6:ae:d9:a5:2e:1a:eb:d9:67:0e:ce:8f:7e: - 0b:be:3a:ca:b2:9c:40:38:54:5c:35:99:ac:07:12: - 3e:00:a3:39:07:76:e1:fa:df:7b:81:59:0b:a3:8e: - 4e:42:b7:1e:09:04:e2:0c:ea:eb:d5:c0:da:dd:6f: - f0:6e:6a:34:2a:38:ae:4f:b4:f3:4f:06:17:c3:83: - 0a:66:e8:c6:8a:54:71:86:0b:8b:39:3b:73:07:d2: - 0b:dc:4c:86:79:da:86:44:25:3d:dc:f1:38:eb:22: - ce:92:df:8b:9b:ff:47:eb:7a:28:0a:91:cd:ba:30: - 77:7d + 00:d6:9b:b6:c4:fd:a9:f3:0d:77:4f:26:65:7d:54: + f5:19:ab:7a:49:c0:8a:90:ee:86:43:c4:1f:52:f8: + af:1c:47:f7:88:0d:19:df:2f:5d:b1:c2:3c:5d:1d: + 9e:54:cd:e0:22:6a:6b:b4:8f:f9:38:0b:ef:b2:81: + 80:ee:22:83:5b:3e:2e:b7:b0:cd:4f:2f:78:be:d4: + 40:3f:c9:d9:4b:f6:39:6c:63:94:a4:c2:1b:97:01: + a2:a6:9b:5c:11:f8:40:c4:25:64:6a:9a:17:fb:43: + ab:d4:42:cd:d3:6e:23:68:90:3e:c0:54:0f:73:58: + 13:c2:70:9f:c6:76:a4:c3:94:e8:b2:5f:16:e3:a9: + f7:87:56:06:85:d9:ca:2c:09:01:39:97:c0:f2:36: + e1:90:97:c1:78:9f:99:86:03:e6:00:6a:ea:2c:60: + b0:ae:08:04:e8:11:bd:7e:e5:4e:e6:b1:9b:d0:1c: + 09:ff:ea:68:1b:c0:54:4a:c5:ad:d9:bd:25:e9:b3: + 7a:66:7f:98:50:9e:a7:c4:1b:ed:fa:2a:cc:94:9e: + bd:4b:11:b4:03:7c:6e:8e:5e:db:46:b1:59:2f:b2: + 18:fc:2f:83:ef:e3:d1:24:3a:c0:60:ae:dd:ab:a6: + 93:07:27:cb:d9:7f:1b:75:f2:1a:82:35:e5:1b:e6: + 27:01 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - ED:CC:99:FA:9D:D2:85:7E:0E:02:42:8E:72:48:C3:F4:29:4B:95:D2 + 63:74:44:85:E8:82:EC:BA:73:D2:A8:F4:8D:AF:0B:B0:37:F6:14:DD X509v3 Authority Key Identifier: - keyid:62:81:A1:85:84:13:F2:70:79:BD:48:5B:29:88:E0:F1:27:35:41:F7 + keyid:01:34:E7:14:1F:DF:2E:D5:19:18:06:94:60:42:D1:A8:FC:16:E0:61 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -145,41 +145,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 02:82:8b:cf:81:89:f2:15:d3:a7:a6:30:c8:2a:c8:32:c5:95: - 7c:18:60:2e:51:48:c5:26:47:b8:5e:49:17:b4:aa:87:f7:8b: - 22:73:2a:81:20:1d:1c:54:b7:7b:91:e1:48:40:7a:19:13:05: - 05:6e:e4:21:75:d7:a7:a0:54:bf:da:18:a1:52:08:95:0a:c5: - e0:36:f3:6d:ab:ed:21:69:e1:e7:4d:8f:85:85:22:ac:7b:b3: - 7f:3f:1a:7e:44:be:06:ee:0b:f5:89:53:e3:d1:fa:f7:51:00: - 7c:61:d2:5e:48:ab:4c:bb:47:03:a2:d4:6a:78:02:7e:33:5a: - b9:7c:14:12:5a:c2:bb:66:91:4f:21:cb:c0:b7:80:72:4b:28: - 6c:d9:7b:02:fa:04:26:f2:de:2a:54:7d:69:89:88:f3:b9:10: - ab:0a:07:fa:f8:7c:1e:bb:45:0f:4f:de:2e:36:3e:a4:63:b0: - 71:a1:be:2b:dd:0c:fa:0b:97:f0:ad:56:b0:dd:76:51:e7:45: - aa:a3:82:cd:77:5a:07:3a:e5:bc:fd:37:8f:52:ee:e0:de:ac: - 99:44:94:65:7d:b1:30:89:4d:12:da:73:29:06:a9:28:42:5d: - 1f:1a:a7:44:f3:77:5b:99:4a:ca:a6:dd:3a:cd:a1:16:76:11: - 16:44:34:c0 + 33:28:d1:77:84:d7:9e:51:7e:ce:85:49:35:ee:e8:f3:fb:d6: + 4f:fa:6c:00:0b:90:a1:f1:37:4b:d0:3e:9d:82:2d:e0:96:d8: + 72:fb:61:96:d6:36:a2:1a:ca:62:44:c3:a3:14:c5:0b:e0:de: + 39:a9:c9:75:a4:9f:2c:54:0d:fa:61:5c:fa:6e:66:0f:71:0e: + 58:12:d4:1a:c6:c0:ca:33:f7:8f:0f:2a:8f:a1:2d:c1:a8:64: + 2e:52:23:ac:fe:9b:04:90:84:13:44:40:e8:4b:bf:53:30:72: + ff:5c:7e:8c:62:87:c5:03:a8:84:8c:7c:4d:fb:d6:8c:8c:35: + 56:9b:0f:01:e3:81:9b:6c:36:e2:f1:88:06:16:75:2f:6e:cc: + 70:30:67:c9:6c:3c:28:49:72:0d:11:6b:1d:73:ae:d9:bf:e6: + 6c:63:c4:70:df:18:8c:fc:d0:03:01:c5:8a:22:4e:b1:c5:03: + dc:36:9a:22:08:ab:46:88:d6:93:2c:6c:1b:05:b1:60:69:be: + ad:97:d1:a8:e4:a1:70:5a:ab:84:87:72:75:13:50:95:58:b1: + 80:27:50:60:9b:b1:da:7e:18:b8:f0:bd:f3:54:89:04:32:ff: + b1:f2:be:a8:09:14:b1:74:30:a8:95:8e:59:ed:8a:63:28:ce: + 55:68:d8:e2 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsE40ojdA -Us1YXtgYQPIjnqh4EBjbW4ej4uPIpVC3wxz65Xd/k7NEKpBgOYGkxGPgPYrYNshd -3wQBwfG1ZRI99SL59f/FYCpIOZBp3wifvAdsxqs/5C0FtbMRnk1ajTxkPx593wUc -4uS32UI2y4bfUyrqUStT+DoHWgiL3/udLx+UqfsHk4cg7uau2aUuGuvZZw7Oj34L -vjrKspxAOFRcNZmsBxI+AKM5B3bh+t97gVkLo45OQrceCQTiDOrr1cDa3W/wbmo0 -KjiuT7TzTwYXw4MKZujGilRxhguLOTtzB9IL3EyGedqGRCU93PE46yLOkt+Lm/9H -63ooCpHNujB3fQIDAQABo4HLMIHIMB0GA1UdDgQWBBTtzJn6ndKFfg4CQo5ySMP0 -KUuV0jAfBgNVHSMEGDAWgBRigaGFhBPycHm9SFspiODxJzVB9zA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1pu2xP2p +8w13TyZlfVT1Gat6ScCKkO6GQ8QfUvivHEf3iA0Z3y9dscI8XR2eVM3gImprtI/5 +OAvvsoGA7iKDWz4ut7DNTy94vtRAP8nZS/Y5bGOUpMIblwGipptcEfhAxCVkapoX ++0Or1ELN024jaJA+wFQPc1gTwnCfxnakw5Tosl8W46n3h1YGhdnKLAkBOZfA8jbh +kJfBeJ+ZhgPmAGrqLGCwrggE6BG9fuVO5rGb0BwJ/+poG8BUSsWt2b0l6bN6Zn+Y +UJ6nxBvt+irMlJ69SxG0A3xujl7bRrFZL7IY/C+D7+PRJDrAYK7dq6aTByfL2X8b +dfIagjXlG+YnAQIDAQABo4HLMIHIMB0GA1UdDgQWBBRjdESF6ILsunPSqPSNrwuw +N/YU3TAfBgNVHSMEGDAWgBQBNOcUH98u1RkYBpRgQtGo/BbgYTA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AAKCi8+BifIV06emMMgqyDLFlXwYYC5RSMUmR7heSRe0qof3iyJzKoEgHRxUt3uR -4UhAehkTBQVu5CF116egVL/aGKFSCJUKxeA2822r7SFp4edNj4WFIqx7s38/Gn5E -vgbuC/WJU+PR+vdRAHxh0l5Iq0y7RwOi1Gp4An4zWrl8FBJawrtmkU8hy8C3gHJL -KGzZewL6BCby3ipUfWmJiPO5EKsKB/r4fB67RQ9P3i42PqRjsHGhvivdDPoLl/Ct -VrDddlHnRaqjgs13Wgc65bz9N49S7uDerJlElGV9sTCJTRLacykGqShCXR8ap0Tz -d1uZSsqm3TrNoRZ2ERZENMA= +ADMo0XeE155Rfs6FSTXu6PP71k/6bAALkKHxN0vQPp2CLeCW2HL7YZbWNqIaymJE +w6MUxQvg3jmpyXWknyxUDfphXPpuZg9xDlgS1BrGwMoz948PKo+hLcGoZC5SI6z+ +mwSQhBNEQOhLv1Mwcv9cfoxih8UDqISMfE371oyMNVabDwHjgZtsNuLxiAYWdS9u +zHAwZ8lsPChJcg0Rax1zrtm/5mxjxHDfGIz80AMBxYoiTrHFA9w2miIIq0aI1pMs +bBsFsWBpvq2X0ajkoXBaq4SHcnUTUJVYsYAnUGCbsdp+GLjwvfNUiQQy/7HyvqgJ +FLF0MKiVjlntimMozlVo2OI= -----END CERTIFICATE----- Certificate: @@ -196,30 +196,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b5:79:69:47:50:a7:53:24:79:a6:6a:35:e8:33: - 74:57:45:da:2c:69:13:1f:76:f9:51:ce:b4:47:ad: - a3:c3:58:50:d1:5f:d6:34:5b:3a:62:f0:6c:ea:e7: - 86:c2:09:78:b3:53:0d:7f:45:cb:2b:8e:2e:1f:9b: - c0:7e:47:90:e3:7b:20:cc:01:ed:b6:c3:c6:40:69: - 74:2b:f1:db:a5:f8:f4:5b:fd:e9:84:db:1a:fc:4f: - 91:4b:e7:f5:2e:99:d0:c9:69:f5:48:5b:8b:19:ca: - dc:5c:0d:3d:15:25:56:77:86:b6:54:fc:d3:1d:8e: - f8:ea:f5:ec:de:30:38:93:28:37:7c:d4:b7:29:26: - 6f:2a:4a:56:c3:12:91:18:d6:77:cf:4f:31:4e:13: - b3:8f:ca:bc:7b:a7:7f:f1:af:db:77:80:51:8c:42: - 1c:27:37:18:ac:6c:45:8e:d5:21:25:16:09:fb:3b: - 0c:84:a8:60:ea:8a:03:65:94:f5:5c:d6:62:36:ae: - b4:de:a3:b1:ee:1b:85:12:8c:6e:ba:ee:14:94:b9: - c7:cb:a3:f1:d1:96:ed:81:79:71:27:d0:d8:26:b4: - 80:54:c8:07:a9:34:71:a2:a9:04:33:d6:58:02:59: - f9:14:97:5e:a9:2b:8c:41:2a:5c:3e:ac:30:b8:63: - 52:35 + 00:cc:3f:3d:39:6a:1a:de:64:b7:11:19:82:b6:ed: + b9:47:d8:67:22:83:07:f7:a1:de:70:05:e1:83:f2: + 06:8d:ea:b0:19:95:27:f4:19:c8:b9:53:91:35:0a: + 50:2c:26:7c:77:9f:fb:d5:36:19:f3:91:67:8d:2a: + ea:0c:81:ab:f6:dd:8a:32:e9:e9:71:71:57:ea:3c: + 5f:e8:b8:9b:60:6a:7d:2a:8c:54:66:ad:5a:b5:e0: + c0:0e:a1:0b:2f:00:b3:f9:e3:82:16:4f:8c:a9:4c: + 89:72:88:ba:2c:60:04:29:09:7c:bc:9e:d4:81:62: + 22:ed:3d:2f:00:5a:71:7d:db:87:54:83:8d:43:49: + db:6d:53:59:36:81:d4:ef:8f:e6:fa:d8:9b:a2:f0: + e6:1c:32:26:8c:f6:d5:57:4e:bb:dc:6e:f4:fd:24: + b4:3a:75:91:3b:9d:72:78:1f:06:7d:05:88:72:eb: + d7:4a:d1:22:97:19:90:90:d8:e0:d5:03:4c:be:8e: + 04:9b:b0:4d:8d:1b:dd:96:91:7e:90:16:7b:5d:32: + 3d:f5:c3:a9:1c:62:07:17:55:56:4b:08:75:5b:fc: + 11:57:39:52:81:08:2e:31:b3:ee:7c:38:e0:62:dd: + cc:47:b1:fb:c7:45:47:aa:b7:c6:c1:20:ba:b0:13: + 63:b9 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 62:81:A1:85:84:13:F2:70:79:BD:48:5B:29:88:E0:F1:27:35:41:F7 + 01:34:E7:14:1F:DF:2E:D5:19:18:06:94:60:42:D1:A8:FC:16:E0:61 X509v3 Authority Key Identifier: - keyid:62:81:A1:85:84:13:F2:70:79:BD:48:5B:29:88:E0:F1:27:35:41:F7 + keyid:01:34:E7:14:1F:DF:2E:D5:19:18:06:94:60:42:D1:A8:FC:16:E0:61 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -234,41 +234,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 47:20:58:cf:09:e0:8c:35:aa:91:d7:be:d1:6a:dc:06:11:ef: - 4a:b2:f1:94:41:3b:b4:00:d5:d3:be:cb:4b:ef:67:e0:1b:91: - 8b:c3:4f:42:92:9a:5b:8f:84:b1:8e:86:f8:9a:f8:aa:d2:66: - 34:76:e5:bb:6f:95:4c:f4:23:e4:71:53:6a:02:8d:e4:ad:7f: - c3:6c:77:a0:8d:00:80:c9:cf:e3:d0:96:e2:5a:1c:b6:66:96: - 0d:2a:43:58:66:c8:53:b8:7a:6e:c2:c4:2b:c6:54:33:40:b3: - f3:07:67:37:51:92:b2:7f:9a:e3:c1:79:36:4b:d8:9f:e9:6e: - 04:c6:49:19:51:fd:6f:21:86:09:9a:00:76:e0:5e:73:b0:57: - 00:25:c5:2a:12:b3:bd:9a:8b:1b:ff:46:90:47:20:76:2b:bf: - 8e:94:7d:1a:7c:56:f6:0a:03:7b:5a:42:97:76:77:2e:a5:0c: - 2e:a0:03:13:a8:39:79:82:a0:98:8c:da:bd:1e:7e:af:56:21: - 95:14:26:ef:06:07:d7:ec:42:6b:2f:b1:e6:f7:97:88:30:5f: - 79:50:99:92:b4:9e:20:d0:c2:95:8e:f7:61:64:99:c3:13:da: - 46:a1:63:73:0b:23:e8:d7:e7:97:36:82:2b:2a:12:8e:b8:a9: - 2d:3c:35:b3 + 79:96:30:f1:a6:30:2b:c8:b8:51:8f:17:03:6c:ca:26:30:f8: + 2e:40:ff:ea:d3:3a:b6:80:db:d6:cc:ec:83:75:84:65:47:8b: + fc:0e:b4:13:b2:68:41:2e:ab:83:0d:4a:d0:d1:16:ab:f3:5c: + 80:a0:60:f0:08:c9:b3:56:26:c3:08:d1:37:0c:66:fa:11:ce: + 93:74:d1:ed:a7:5c:34:d4:31:d4:ba:af:81:d4:ca:85:93:27: + cc:c1:8f:97:06:51:61:94:1f:e9:3a:90:e7:39:c8:0e:f0:08: + 97:bd:ff:b4:2d:b6:20:9f:78:7b:7c:c0:25:ea:3b:2e:9d:66: + 84:f9:2a:f3:7e:54:20:1c:d9:fa:5f:0c:4a:c1:ea:36:8c:ae: + 43:c5:26:b6:99:f4:bd:2d:da:ff:96:f3:a9:1d:03:4a:50:44: + 2a:0c:bb:42:fb:b2:e4:44:f5:c2:06:1a:10:e7:cb:32:d6:40: + b9:eb:85:d1:79:0e:f5:6a:1b:2b:fe:3e:01:c6:2d:a5:e4:bd: + b0:46:76:a3:50:07:42:9d:18:76:3f:c2:29:1b:03:94:c2:d1: + 14:4d:47:cd:44:63:e0:d4:30:b9:e5:05:03:88:ca:a5:a8:0e: + 01:15:02:d8:cc:8c:91:87:56:d6:20:00:58:73:db:2e:10:86: + 41:63:5e:35 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE1MDMwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALV5aUdQp1MkeaZqNegz -dFdF2ixpEx92+VHOtEeto8NYUNFf1jRbOmLwbOrnhsIJeLNTDX9FyyuOLh+bwH5H -kON7IMwB7bbDxkBpdCvx26X49Fv96YTbGvxPkUvn9S6Z0Mlp9UhbixnK3FwNPRUl -VneGtlT80x2O+Or17N4wOJMoN3zUtykmbypKVsMSkRjWd89PMU4Ts4/KvHunf/Gv -23eAUYxCHCc3GKxsRY7VISUWCfs7DISoYOqKA2WU9VzWYjautN6jse4bhRKMbrru -FJS5x8uj8dGW7YF5cSfQ2Ca0gFTIB6k0caKpBDPWWAJZ+RSXXqkrjEEqXD6sMLhj -UjUCAwEAAaOByzCByDAdBgNVHQ4EFgQUYoGhhYQT8nB5vUhbKYjg8Sc1QfcwHwYD -VR0jBBgwFoAUYoGhhYQT8nB5vUhbKYjg8Sc1QfcwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMw/PTlqGt5ktxEZgrbt +uUfYZyKDB/eh3nAF4YPyBo3qsBmVJ/QZyLlTkTUKUCwmfHef+9U2GfORZ40q6gyB +q/bdijLp6XFxV+o8X+i4m2BqfSqMVGatWrXgwA6hCy8As/njghZPjKlMiXKIuixg +BCkJfLye1IFiIu09LwBacX3bh1SDjUNJ221TWTaB1O+P5vrYm6Lw5hwyJoz21VdO +u9xu9P0ktDp1kTudcngfBn0FiHLr10rRIpcZkJDY4NUDTL6OBJuwTY0b3ZaRfpAW +e10yPfXDqRxiBxdVVksIdVv8EVc5UoEILjGz7nw44GLdzEex+8dFR6q3xsEgurAT +Y7kCAwEAAaOByzCByDAdBgNVHQ4EFgQUATTnFB/fLtUZGAaUYELRqPwW4GEwHwYD +VR0jBBgwFoAUATTnFB/fLtUZGAaUYELRqPwW4GEwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBHIFjPCeCM -NaqR177RatwGEe9KsvGUQTu0ANXTvstL72fgG5GLw09Ckppbj4Sxjob4mviq0mY0 -duW7b5VM9CPkcVNqAo3krX/DbHegjQCAyc/j0JbiWhy2ZpYNKkNYZshTuHpuwsQr -xlQzQLPzB2c3UZKyf5rjwXk2S9if6W4ExkkZUf1vIYYJmgB24F5zsFcAJcUqErO9 -mosb/0aQRyB2K7+OlH0afFb2CgN7WkKXdncupQwuoAMTqDl5gqCYjNq9Hn6vViGV -FCbvBgfX7EJrL7Hm95eIMF95UJmStJ4g0MKVjvdhZJnDE9pGoWNzCyPo1+eXNoIr -KhKOuKktPDWz +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB5ljDxpjAr +yLhRjxcDbMomMPguQP/q0zq2gNvWzOyDdYRlR4v8DrQTsmhBLquDDUrQ0Rar81yA +oGDwCMmzVibDCNE3DGb6Ec6TdNHtp1w01DHUuq+B1MqFkyfMwY+XBlFhlB/pOpDn +OcgO8AiXvf+0LbYgn3h7fMAl6jsunWaE+SrzflQgHNn6XwxKweo2jK5DxSa2mfS9 +Ldr/lvOpHQNKUEQqDLtC+7LkRPXCBhoQ58sy1kC564XReQ71ahsr/j4Bxi2l5L2w +RnajUAdCnRh2P8IpGwOUwtEUTUfNRGPg1DC55QUDiMqlqA4BFQLYzIyRh1bWIABY +c9suEIZBY141 -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/expired-target-notBefore.pem b/net/data/verify_certificate_chain_unittest/expired-target-notBefore.pem index 3a1096d4..5f480a7 100644 --- a/net/data/verify_certificate_chain_unittest/expired-target-notBefore.pem +++ b/net/data/verify_certificate_chain_unittest/expired-target-notBefore.pem
@@ -1,6 +1,6 @@ [Created by: generate-expired-target-notBefore.py] -Certificate chain with 1 intermediary, where the target is expired (violates +Certificate chain with 1 intermediate, where the target is expired (violates validity.notBefore). Verification is expected to fail. Certificate: @@ -8,7 +8,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Mar 2 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -17,80 +17,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b8:1e:b0:de:22:2f:b4:13:ca:c4:72:10:b9:bd: - 4c:80:81:be:17:f2:45:bb:5a:d2:b4:a1:f6:3e:1c: - 50:00:d5:8d:fe:27:5b:a2:21:07:8b:1a:de:56:56: - 58:88:25:41:09:4e:fd:04:bb:6c:75:c7:48:3f:98: - 6b:4c:54:8a:22:26:28:f3:c6:76:5f:e8:bf:ad:bf: - 4f:ad:6d:1a:1d:ba:5e:fc:0d:2f:92:b2:4f:f7:bb: - e5:fd:3a:ff:8d:fb:f1:9f:96:90:18:46:2c:cf:7b: - 62:75:b8:c5:e9:40:ce:67:21:e0:4b:9e:78:65:9b: - 9e:71:50:bd:33:12:53:78:7f:ad:fd:bf:e0:ae:d2: - 72:51:c1:18:d0:96:71:78:23:ff:a6:55:39:d5:9a: - 89:3e:21:72:cd:9d:13:fa:04:9f:08:6f:c0:d0:c5: - ab:b2:27:b5:b8:e2:2d:ab:31:a3:7a:c1:94:56:8b: - 35:9c:b8:46:71:1c:d6:69:95:c1:0a:98:e4:14:96: - 3c:2f:cb:12:ac:71:88:a4:aa:d0:c8:0e:51:98:47: - 71:e8:0e:a0:e7:7e:01:95:b3:73:3f:9b:c4:8b:9d: - d0:dc:17:a9:53:35:99:29:67:f3:28:d2:7f:1e:0d: - 17:6b:5d:56:c9:91:a6:ae:e8:07:a6:76:d6:8e:2a: - 48:47 + 00:d8:d8:32:e7:2a:be:55:8d:e7:e8:ae:ee:1d:c6: + f5:3b:0c:6d:25:d9:53:8e:4a:84:0c:1e:7b:cb:30: + 2f:5f:1f:85:a3:e7:e0:92:79:b4:a2:35:fe:b7:71: + b4:a3:c0:79:dd:50:e5:e4:b0:61:b5:2c:97:2e:e6: + 4a:bc:c6:3c:c7:20:f3:87:20:4e:27:d8:8a:f6:0d: + a9:ac:0a:57:9a:53:03:9e:5f:32:ef:07:18:0a:ab: + f6:a7:42:4e:ef:36:9a:10:4a:db:d3:9f:49:d7:04: + 3a:95:61:77:ba:5e:d2:84:cb:57:ec:45:91:d0:fd: + be:5b:8b:4d:2f:0b:21:ab:89:ab:92:d9:fc:18:0c: + 44:bb:54:0a:94:5d:bd:ee:ac:a9:ee:f2:27:a8:3f: + 30:b1:e7:f6:fd:1a:05:86:56:db:22:de:bd:e5:a6: + d2:50:2d:4c:0c:ab:1c:b2:49:6c:23:9a:46:d8:f5: + 53:f4:9d:52:2c:f0:25:e3:a8:e7:99:d3:6d:ec:f0: + 0c:d1:bd:1e:73:c6:8f:5d:11:50:88:b3:63:bc:c7: + c5:eb:36:74:8f:03:fe:1a:36:d7:ac:5f:18:ae:73: + 11:7f:dc:81:dc:7c:77:17:ec:2c:91:c5:db:cc:2d: + 1a:a0:f1:ad:aa:d4:b6:1d:22:ee:22:bd:48:c9:f0: + df:7f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 27:06:C6:75:1B:30:9B:E0:78:6C:9C:9B:F1:E1:29:B7:11:41:6D:BD + E6:C3:54:85:55:F1:44:F6:4B:55:D3:EA:09:69:E3:95:F6:DA:2A:FA X509v3 Authority Key Identifier: - keyid:7A:68:26:1F:EE:59:FA:52:EB:B0:98:D1:5D:F6:19:9F:8D:1C:F5:FB + keyid:EC:3F:B7:92:DD:EA:7D:97:A5:77:22:28:E9:98:4D:0D:07:69:C4:86 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 4e:c4:5a:b3:1f:31:4c:04:75:f8:bb:7d:7b:ed:93:07:81:e3: - 41:b9:50:b0:c4:01:06:7d:64:f3:c5:d8:5b:96:0e:b6:c2:fa: - 66:50:25:79:c8:6f:6c:03:f1:7b:e6:73:60:cc:68:42:0e:43: - 85:58:46:c2:51:27:73:dd:f1:6d:9d:d1:7a:80:97:e5:cf:0c: - 9a:85:a1:92:ed:26:3a:d6:10:fd:19:c8:f2:fb:b9:47:ee:a9: - 63:1c:52:c5:97:1a:6b:2f:f4:dc:9c:cb:74:86:6a:48:2a:87: - ac:24:d5:cc:8c:2b:12:9d:6d:bc:7e:be:95:3f:88:83:18:68: - 75:59:db:79:fb:f0:c7:38:7b:8f:a3:16:e0:44:4c:19:e3:cd: - 36:98:fb:fd:c9:17:5e:2f:9c:0c:e1:ba:f2:6e:c0:6e:91:9d: - 5e:c0:0b:95:d8:62:7e:2e:8a:2d:4c:f9:b4:ca:17:0d:f0:d2: - 71:b0:4d:15:79:b0:8b:9e:96:cf:2e:44:1a:84:a7:4f:61:38: - 67:61:1c:a1:70:a0:a4:02:5b:42:f5:a0:09:95:cc:22:89:0d: - 4e:e2:1b:dd:1d:fe:ae:d7:84:58:db:dd:07:1d:96:6b:32:11: - da:c6:56:d9:cd:69:10:25:62:fd:91:2d:63:0f:8c:82:fe:00: - 8a:eb:87:4f + 27:8e:41:9c:f0:5c:4a:e0:b0:63:c7:fa:cc:1f:d4:21:35:33: + 87:13:68:b7:18:08:0e:ba:22:a1:51:1a:d9:ba:31:a7:35:80: + c7:75:35:a4:68:c8:3e:91:79:55:e3:60:34:79:a1:0f:a9:cc: + 05:92:61:40:b0:66:2b:fe:c7:29:a2:54:f3:7c:71:b6:36:fe: + a9:fd:7b:79:ea:66:19:c0:2f:d2:56:97:2f:ca:12:a3:96:6b: + b3:57:c8:06:58:6f:de:53:d7:63:ee:93:d6:b2:f2:11:9c:8a: + a1:00:26:6c:9a:bd:dd:da:97:ea:07:61:5e:48:8e:dd:3f:10: + 4b:39:d1:9a:ba:8f:14:30:b3:36:3c:9f:a7:2c:68:b4:3c:da: + f2:90:24:4a:03:19:38:24:73:b5:72:b3:ae:31:b3:44:96:36: + 3d:38:c5:c7:07:62:78:06:d8:5d:01:07:d9:b3:2d:be:0f:46: + 13:8c:25:f9:d7:e0:84:5d:a4:62:a7:5d:3b:22:cf:e6:95:97: + 20:d3:24:40:cc:cf:3d:72:17:f9:c1:8e:ee:15:6f:99:8f:24: + d1:83:6b:f9:fe:6b:94:3a:9c:2c:02:5c:1d:70:d6:f8:d6:69: + 0d:99:f5:53:89:4f:21:7b:a6:34:dd:ce:27:ef:45:a5:e0:c6: + e5:f5:fc:5f -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMzAyMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4HrDe -Ii+0E8rEchC5vUyAgb4X8kW7WtK0ofY+HFAA1Y3+J1uiIQeLGt5WVliIJUEJTv0E -u2x1x0g/mGtMVIoiJijzxnZf6L+tv0+tbRodul78DS+Ssk/3u+X9Ov+N+/GflpAY -RizPe2J1uMXpQM5nIeBLnnhlm55xUL0zElN4f639v+Cu0nJRwRjQlnF4I/+mVTnV -mok+IXLNnRP6BJ8Ib8DQxauyJ7W44i2rMaN6wZRWizWcuEZxHNZplcEKmOQUljwv -yxKscYikqtDIDlGYR3HoDqDnfgGVs3M/m8SLndDcF6lTNZkpZ/Mo0n8eDRdrXVbJ -kaau6AemdtaOKkhHAgMBAAGjgekwgeYwHQYDVR0OBBYEFCcGxnUbMJvgeGycm/Hh -KbcRQW29MB8GA1UdIwQYMBaAFHpoJh/uWfpS67CY0V32GZ+NHPX7MD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMzAyMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDY2DLn +Kr5Vjeforu4dxvU7DG0l2VOOSoQMHnvLMC9fH4Wj5+CSebSiNf63cbSjwHndUOXk +sGG1LJcu5kq8xjzHIPOHIE4n2Ir2DamsCleaUwOeXzLvBxgKq/anQk7vNpoQStvT +n0nXBDqVYXe6XtKEy1fsRZHQ/b5bi00vCyGriauS2fwYDES7VAqUXb3urKnu8ieo +PzCx5/b9GgWGVtsi3r3lptJQLUwMqxyySWwjmkbY9VP0nVIs8CXjqOeZ023s8AzR +vR5zxo9dEVCIs2O8x8XrNnSPA/4aNtesXxiucxF/3IHcfHcX7CyRxdvMLRqg8a2q +1LYdIu4ivUjJ8N9/AgMBAAGjgekwgeYwHQYDVR0OBBYEFObDVIVV8UT2S1XT6glp +45X22ir6MB8GA1UdIwQYMBaAFOw/t5Ld6n2XpXciKOmYTQ0HacSGMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEATsRasx8xTAR1+Lt9e+2T -B4HjQblQsMQBBn1k88XYW5YOtsL6ZlAlechvbAPxe+ZzYMxoQg5DhVhGwlEnc93x -bZ3ReoCX5c8MmoWhku0mOtYQ/RnI8vu5R+6pYxxSxZcaay/03JzLdIZqSCqHrCTV -zIwrEp1tvH6+lT+IgxhodVnbefvwxzh7j6MW4ERMGePNNpj7/ckXXi+cDOG68m7A -bpGdXsALldhifi6KLUz5tMoXDfDScbBNFXmwi56Wzy5EGoSnT2E4Z2EcoXCgpAJb -QvWgCZXMIokNTuIb3R3+rteEWNvdBx2WazIR2sZW2c1pECVi/ZEtYw+Mgv4AiuuH -Tw== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAJ45BnPBcSuCwY8f6zB/U +ITUzhxNotxgIDroioVEa2boxpzWAx3U1pGjIPpF5VeNgNHmhD6nMBZJhQLBmK/7H +KaJU83xxtjb+qf17eepmGcAv0laXL8oSo5Zrs1fIBlhv3lPXY+6T1rLyEZyKoQAm +bJq93dqX6gdhXkiO3T8QSznRmrqPFDCzNjyfpyxotDza8pAkSgMZOCRztXKzrjGz +RJY2PTjFxwdieAbYXQEH2bMtvg9GE4wl+dfghF2kYqddOyLP5pWXINMkQMzPPXIX ++cGO7hVvmY8k0YNr+f5rlDqcLAJcHXDW+NZpDZn1U4lPIXumNN3OJ+9FpeDG5fX8 +Xw== -----END CERTIFICATE----- Certificate: @@ -102,35 +102,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c0:6b:09:c5:84:c2:5f:1b:c6:98:31:2d:a2:3e: - 03:a9:13:4d:b8:4b:03:a6:1d:0a:e4:e1:ba:81:31: - 2b:dd:92:7c:6b:81:85:c4:d4:cf:73:30:33:b2:8d: - 9f:d9:0b:48:a0:70:51:88:93:d5:f1:ef:bd:14:6e: - 7b:da:b6:a4:c5:a9:ca:cd:27:90:38:c8:5e:12:68: - f8:f2:70:01:8a:da:e3:6c:2f:62:c4:67:40:e2:92: - 20:fe:77:d9:91:f4:6b:02:0c:40:d6:b5:ef:98:85: - 36:58:59:ec:e7:17:c8:72:53:8a:fc:2e:fa:08:70: - ba:ab:ea:42:40:50:e0:6b:14:04:73:78:34:96:db: - 8a:c9:22:21:f1:c1:1b:81:7c:95:c6:83:f8:d1:40: - 1f:5d:ec:bc:d0:4e:30:7f:b2:07:b4:e2:be:3f:f7: - 28:ab:a2:61:fd:98:3b:5a:1c:c9:61:30:13:ea:7c: - 7d:13:99:a0:9a:a5:a5:72:3f:a7:e7:7d:3b:a6:b7: - 09:6c:48:5c:ec:a3:d6:4c:2e:eb:21:e8:97:aa:44: - 32:23:03:dd:24:8d:08:b4:94:df:65:5b:7c:45:59: - 11:4b:ce:1f:78:e5:c4:bc:87:00:bb:c4:69:d7:3b: - ae:a6:b7:80:df:4c:e2:0d:be:a4:0e:1c:05:5d:cf: - dc:c9 + 00:e4:7c:a3:bb:4c:6d:c3:5e:ae:62:cd:af:18:39: + c5:4b:6a:a3:fd:85:d0:ed:8b:25:93:bd:2b:06:22: + b2:6b:c1:ff:73:c9:26:dd:d6:eb:eb:ee:93:4a:6d: + df:10:02:b8:c5:72:d4:2f:c7:b4:1a:06:e9:38:b4: + 90:ae:9f:5f:69:45:47:07:68:17:b2:84:8a:65:b8: + 1e:ef:de:f1:b4:8a:6b:ab:de:55:79:5d:f5:2e:96: + 46:5b:5c:87:0b:4a:a8:53:70:4f:6f:f3:9e:9d:f4: + f8:38:fa:1f:a6:5f:a3:25:08:f2:e9:63:fc:3c:98: + 4d:91:df:77:60:e7:e2:bd:af:bb:d9:23:38:2d:6e: + 07:07:0c:1a:59:5e:8a:43:c7:da:b2:ce:39:3a:80: + c6:72:60:1f:d3:93:45:cd:63:b8:8b:96:bf:30:cd: + b1:f6:56:d7:a9:de:14:42:ae:42:40:f8:e9:7b:47: + a3:63:a1:5d:b9:2b:c0:3b:2b:81:56:11:54:ce:96: + 85:e6:3a:8c:66:ff:42:9f:ce:e4:a4:80:f5:59:8a: + 4b:ae:b2:37:c2:1f:45:9b:49:cd:db:0f:8b:a7:37: + 31:20:19:b4:42:20:aa:e9:e4:af:13:5a:b9:ea:d2: + 2c:9a:15:48:af:8d:ed:d0:fe:02:c0:a2:c6:47:bd: + dd:2f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 7A:68:26:1F:EE:59:FA:52:EB:B0:98:D1:5D:F6:19:9F:8D:1C:F5:FB + EC:3F:B7:92:DD:EA:7D:97:A5:77:22:28:E9:98:4D:0D:07:69:C4:86 X509v3 Authority Key Identifier: - keyid:66:52:63:09:9B:DD:07:2A:2D:E0:F3:6C:29:FB:D9:74:87:F5:02:6A + keyid:44:FC:9D:F0:51:F2:23:99:FE:A4:76:CB:CB:5C:39:BD:FC:68:38:45 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -145,41 +145,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - b2:03:09:bd:ed:73:cd:8d:d6:d0:f4:86:40:00:10:eb:b9:37: - 74:1d:f2:b3:dc:2d:df:a4:75:77:f1:62:23:b8:2d:70:14:af: - 33:4e:0c:8f:6d:13:db:d4:dc:92:04:8d:0e:b6:14:98:07:f6: - 80:cb:9a:8d:d3:0e:9d:6d:13:12:c1:01:f0:14:9d:a3:c1:05: - 45:3c:26:16:d2:39:3f:ed:3c:6c:ab:c0:2b:b2:21:29:dc:4b: - 6b:51:cf:e9:99:ef:fa:14:3a:c4:f1:77:c0:83:f5:7f:af:11: - 40:db:f3:3f:7c:18:26:79:e9:15:c0:62:79:06:85:15:8a:53: - 03:be:2f:e9:5c:69:7c:c7:d7:47:6a:7b:00:c8:d8:4f:55:ce: - d1:64:58:0f:87:ef:27:b2:7b:59:20:04:7d:4f:16:08:c7:d0: - f0:c1:aa:b6:a9:ae:aa:fd:a7:98:2c:40:28:bb:e5:d7:91:e5: - 72:c9:ab:0a:92:0e:b0:d5:ff:9c:db:73:5d:e1:9d:a5:fd:89: - 4e:c8:26:8d:f8:76:0b:7e:7f:94:70:73:e4:22:b4:fb:2f:bc: - 06:84:73:b1:99:78:fa:5f:e8:d7:20:8f:b9:cb:d9:a4:99:7e: - be:b9:89:1c:07:0a:19:cb:0c:f0:15:70:81:51:ee:d7:8e:e8: - f7:21:3f:fd + 40:21:7c:15:90:68:e9:aa:b0:ab:21:63:e7:21:f1:92:5b:75: + 02:34:b4:cd:06:b3:45:f4:93:07:d1:0f:f2:bc:92:ac:75:94: + 43:ad:a8:4f:91:6a:28:0c:cd:47:8d:01:de:54:51:aa:14:e3: + 35:f8:eb:d8:d4:59:f5:86:ef:55:e6:6f:54:17:47:c1:5f:e8: + be:0d:7f:34:d2:88:2d:b5:04:29:25:11:cc:a3:d7:0e:49:b2: + 9a:e3:01:1d:3f:15:89:68:41:19:4d:ee:8d:12:0e:96:ce:5e: + e5:08:31:64:4f:89:e0:91:1b:a9:b0:3c:4e:50:cb:83:a0:df: + d0:d3:df:af:53:d5:99:6b:88:dd:9c:4f:98:f1:0d:1d:f5:29: + f6:c5:be:18:84:4f:1f:76:ce:6f:c8:08:a0:f4:58:af:a3:ff: + cb:44:55:ad:2e:6e:e0:44:07:f4:a3:d4:08:9c:d1:0e:04:29: + 34:54:1b:bd:e8:e3:b4:56:e1:0b:05:bd:ee:6d:47:fb:10:42: + d2:14:12:e4:15:29:bd:06:13:7d:12:41:fa:5f:5d:01:27:69: + 99:76:ff:76:74:c8:c8:fe:11:c5:2e:67:44:d3:32:6d:8f:45: + e4:0a:5a:73:ef:74:75:6a:6c:d6:c2:c5:e8:73:bc:be:29:b3: + 3a:01:cf:02 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwGsJxYTC -XxvGmDEtoj4DqRNNuEsDph0K5OG6gTEr3ZJ8a4GFxNTPczAzso2f2QtIoHBRiJPV -8e+9FG572rakxanKzSeQOMheEmj48nABitrjbC9ixGdA4pIg/nfZkfRrAgxA1rXv -mIU2WFns5xfIclOK/C76CHC6q+pCQFDgaxQEc3g0ltuKySIh8cEbgXyVxoP40UAf -Xey80E4wf7IHtOK+P/coq6Jh/Zg7WhzJYTAT6nx9E5mgmqWlcj+n5307prcJbEhc -7KPWTC7rIeiXqkQyIwPdJI0ItJTfZVt8RVkRS84feOXEvIcAu8Rp1zuupreA30zi -Db6kDhwFXc/cyQIDAQABo4HLMIHIMB0GA1UdDgQWBBR6aCYf7ln6UuuwmNFd9hmf -jRz1+zAfBgNVHSMEGDAWgBRmUmMJm90HKi3g82wp+9l0h/UCajA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5Hyju0xt +w16uYs2vGDnFS2qj/YXQ7Yslk70rBiKya8H/c8km3dbr6+6TSm3fEAK4xXLUL8e0 +GgbpOLSQrp9faUVHB2gXsoSKZbge797xtIprq95VeV31LpZGW1yHC0qoU3BPb/Oe +nfT4OPofpl+jJQjy6WP8PJhNkd93YOfiva+72SM4LW4HBwwaWV6KQ8fass45OoDG +cmAf05NFzWO4i5a/MM2x9lbXqd4UQq5CQPjpe0ejY6FduSvAOyuBVhFUzpaF5jqM +Zv9Cn87kpID1WYpLrrI3wh9Fm0nN2w+LpzcxIBm0QiCq6eSvE1q56tIsmhVIr43t +0P4CwKLGR73dLwIDAQABo4HLMIHIMB0GA1UdDgQWBBTsP7eS3ep9l6V3IijpmE0N +B2nEhjAfBgNVHSMEGDAWgBRE/J3wUfIjmf6kdsvLXDm9/Gg4RTA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -ALIDCb3tc82N1tD0hkAAEOu5N3Qd8rPcLd+kdXfxYiO4LXAUrzNODI9tE9vU3JIE -jQ62FJgH9oDLmo3TDp1tExLBAfAUnaPBBUU8JhbSOT/tPGyrwCuyISncS2tRz+mZ -7/oUOsTxd8CD9X+vEUDb8z98GCZ56RXAYnkGhRWKUwO+L+lcaXzH10dqewDI2E9V -ztFkWA+H7yeye1kgBH1PFgjH0PDBqraprqr9p5gsQCi75deR5XLJqwqSDrDV/5zb -c13hnaX9iU7IJo34dgt+f5Rwc+QitPsvvAaEc7GZePpf6Ncgj7nL2aSZfr65iRwH -ChnLDPAVcIFR7teO6PchP/0= +AEAhfBWQaOmqsKshY+ch8ZJbdQI0tM0Gs0X0kwfRD/K8kqx1lEOtqE+RaigMzUeN +Ad5UUaoU4zX469jUWfWG71Xmb1QXR8Ff6L4NfzTSiC21BCklEcyj1w5JsprjAR0/ +FYloQRlN7o0SDpbOXuUIMWRPieCRG6mwPE5Qy4Og39DT369T1ZlriN2cT5jxDR31 +KfbFvhiETx92zm/ICKD0WK+j/8tEVa0ubuBEB/Sj1Aic0Q4EKTRUG73o47RW4QsF +ve5tR/sQQtIUEuQVKb0GE30SQfpfXQEnaZl2/3Z0yMj+EcUuZ0TTMm2PReQKWnPv +dHVqbNbCxehzvL4pszoBzwI= -----END CERTIFICATE----- Certificate: @@ -196,30 +196,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:bb:61:9d:50:28:51:f7:22:01:45:32:28:d0:d0: - b2:c3:41:a4:3a:1f:8b:9a:b0:eb:61:31:39:1a:87: - 5b:03:fb:02:82:15:8f:7f:d7:bb:4e:89:ae:08:df: - 7e:6f:2f:66:87:8f:57:ab:a0:61:79:25:64:eb:20: - 5d:e7:92:17:bd:c4:1b:e0:ea:27:e2:7b:b8:6e:05: - 08:07:54:3d:4e:d6:80:8b:b9:50:d0:75:23:93:c3: - e2:1b:de:f7:20:24:35:0f:d4:c3:dd:cf:07:19:29: - 6f:08:08:a6:b3:9f:6d:2a:8b:3c:b7:6f:32:fe:81: - 6d:1b:ad:88:96:c5:1f:a4:7a:a4:81:b5:e4:b3:9a: - bc:42:b0:40:e5:77:8d:12:32:cc:d9:05:12:6a:47: - 62:2b:22:5b:a8:48:fe:14:1a:a1:2f:03:34:f1:2b: - 8f:d5:bf:3c:18:ae:f1:67:79:c8:a3:8d:29:d0:ce: - 23:03:6f:ee:14:5e:97:dd:4d:c8:f5:1f:c4:1d:49: - 08:b5:9c:7d:fa:e1:79:08:27:83:2d:8a:f4:43:d6: - d6:6b:78:f4:0e:4c:42:57:72:03:61:73:b5:82:23: - 98:2a:a9:06:f9:b3:95:cd:01:66:c2:3e:96:da:02: - 13:95:e1:e6:51:94:67:2d:37:a5:cf:c1:18:62:fb: - 56:15 + 00:a0:21:1c:d1:00:97:80:26:4c:59:fe:1f:73:23: + 48:97:10:b0:7f:bb:bb:34:00:76:fb:5d:e6:1f:59: + ed:24:d9:25:9c:16:06:50:8e:83:da:d6:93:22:80: + 34:69:d3:d2:ee:98:9b:51:09:02:25:e4:04:fa:cc: + de:4f:f6:3d:9c:65:80:b3:83:19:dd:74:b7:3f:84: + 86:7f:77:f9:5b:bc:c9:5c:0d:98:3e:77:df:3b:f1: + 43:cd:3d:4a:88:81:76:08:cb:56:25:5f:ff:56:7e: + e1:e2:ab:41:60:9a:89:32:cf:9b:5e:3f:95:17:04: + 75:2d:a2:b7:e8:02:ea:6e:a0:2f:69:9f:30:a7:cd: + 7b:e6:e5:3d:98:01:51:b4:3e:c2:cf:87:f9:a1:e8: + 9d:69:43:91:37:58:b9:ec:2e:64:5f:76:21:e5:09: + 8c:6e:72:31:f4:c5:79:2f:14:1f:84:17:10:e3:50: + 0f:5d:d2:dd:f1:33:cb:57:f2:19:8c:04:96:e8:a7: + 3b:77:51:3a:6e:03:2b:29:2a:db:40:da:fb:41:f2: + bc:37:ef:31:5c:2b:0f:b2:f4:58:27:b6:0f:24:4d: + 1d:97:ca:bd:00:c8:5f:eb:c4:3d:5d:b7:9e:d6:58: + 45:8a:20:af:2f:16:fc:51:6c:55:66:24:19:21:66: + 38:9f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 66:52:63:09:9B:DD:07:2A:2D:E0:F3:6C:29:FB:D9:74:87:F5:02:6A + 44:FC:9D:F0:51:F2:23:99:FE:A4:76:CB:CB:5C:39:BD:FC:68:38:45 X509v3 Authority Key Identifier: - keyid:66:52:63:09:9B:DD:07:2A:2D:E0:F3:6C:29:FB:D9:74:87:F5:02:6A + keyid:44:FC:9D:F0:51:F2:23:99:FE:A4:76:CB:CB:5C:39:BD:FC:68:38:45 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -234,41 +234,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 09:c6:5a:c2:9c:aa:78:6d:66:79:43:2a:1c:a4:0b:04:42:8c: - 54:6c:89:d7:ce:e0:fd:8e:33:5b:6c:2b:a2:ed:05:de:ea:3b: - 11:21:bd:e9:23:45:bd:0f:e0:5c:fe:1b:11:8b:46:75:c1:24: - 84:5a:95:15:a5:b3:73:86:6b:aa:8f:dc:46:3c:64:d9:60:9e: - c1:7a:63:a3:d5:d6:b4:27:ed:c3:77:ea:5d:59:e7:93:05:df: - be:58:4c:a5:92:52:61:11:d1:7f:27:e6:9b:29:3c:b8:9d:a0: - 5c:d0:98:5f:a7:ed:39:14:f4:30:81:f6:0d:3b:cd:96:d6:dd: - 7a:e2:b0:55:7c:ab:87:10:54:a6:5d:ac:27:5b:a6:a1:1e:ee: - e7:26:cb:44:1d:fe:84:85:54:e0:cb:62:1b:5a:bb:ed:38:c0: - f4:bd:1e:5d:ee:c6:d7:6e:b3:27:56:5c:8d:1f:dd:70:52:35: - 8a:bc:07:0a:97:99:10:80:16:5b:a3:d1:de:f9:97:59:ca:5f: - 42:10:c0:26:3e:6e:92:a9:6d:e5:09:1e:4c:92:4b:2e:a7:e8: - 81:7f:e4:bb:b3:44:3c:71:e3:0c:ba:66:30:4a:fc:30:40:ce: - 50:98:1b:61:52:91:02:84:ff:a1:a3:09:ad:1b:68:db:52:a6: - cf:18:79:af + 94:de:4b:73:02:e3:22:7f:1e:82:0c:64:a8:de:79:70:34:96: + 9d:b5:e9:a0:51:bc:5c:3a:b1:97:7e:a4:0a:04:60:5a:3b:3a: + 88:7e:ff:67:1a:19:7f:61:c0:6a:f9:73:14:b4:6b:be:21:fd: + f3:e2:7a:61:56:73:15:9e:8d:c5:bb:21:47:8a:1f:fa:03:0d: + 0a:90:20:37:69:49:0b:2e:6a:9c:64:5b:e8:f0:ed:29:32:5f: + bc:f8:59:81:ad:d8:d9:71:ef:8d:bd:9c:ed:2e:c3:53:4f:12: + ec:f3:83:24:36:30:b1:c6:59:a7:2c:a8:6d:62:30:bc:a3:28: + 13:0a:09:ed:47:a9:f5:68:e9:97:33:b2:e7:e7:5c:f9:bb:c1: + 4b:7b:63:62:0a:0f:31:58:7e:24:88:30:f5:42:cf:3e:86:ca: + 48:5b:83:44:b0:04:fa:0b:e2:9c:8b:5f:9c:68:77:23:79:40: + 29:95:0d:6e:32:bf:ab:b4:ae:8a:2a:ca:f2:2a:92:a7:0d:b4: + 80:5d:ce:be:f8:68:24:00:d9:30:9c:de:ba:35:d4:22:b5:dd: + 15:37:70:bd:2e:7c:53:65:db:6f:1d:47:fa:53:56:dd:d0:9f: + e7:d5:d5:27:7f:c7:2e:9b:55:c2:70:1f:5e:66:b8:d1:2e:ac: + c6:e9:de:aa -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALthnVAoUfciAUUyKNDQ -ssNBpDofi5qw62ExORqHWwP7AoIVj3/Xu06Jrgjffm8vZoePV6ugYXklZOsgXeeS -F73EG+DqJ+J7uG4FCAdUPU7WgIu5UNB1I5PD4hve9yAkNQ/Uw93PBxkpbwgIprOf -bSqLPLdvMv6BbRutiJbFH6R6pIG15LOavEKwQOV3jRIyzNkFEmpHYisiW6hI/hQa -oS8DNPErj9W/PBiu8Wd5yKONKdDOIwNv7hRel91NyPUfxB1JCLWcffrheQgngy2K -9EPW1mt49A5MQldyA2FztYIjmCqpBvmzlc0BZsI+ltoCE5Xh5lGUZy03pc/BGGL7 -VhUCAwEAAaOByzCByDAdBgNVHQ4EFgQUZlJjCZvdByot4PNsKfvZdIf1AmowHwYD -VR0jBBgwFoAUZlJjCZvdByot4PNsKfvZdIf1AmowNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKAhHNEAl4AmTFn+H3Mj +SJcQsH+7uzQAdvtd5h9Z7STZJZwWBlCOg9rWkyKANGnT0u6Ym1EJAiXkBPrM3k/2 +PZxlgLODGd10tz+Ehn93+Vu8yVwNmD533zvxQ809SoiBdgjLViVf/1Z+4eKrQWCa +iTLPm14/lRcEdS2it+gC6m6gL2mfMKfNe+blPZgBUbQ+ws+H+aHonWlDkTdYuewu +ZF92IeUJjG5yMfTFeS8UH4QXEONQD13S3fEzy1fyGYwEluinO3dROm4DKykq20Da ++0HyvDfvMVwrD7L0WCe2DyRNHZfKvQDIX+vEPV23ntZYRYogry8W/FFsVWYkGSFm +OJ8CAwEAAaOByzCByDAdBgNVHQ4EFgQURPyd8FHyI5n+pHbLy1w5vfxoOEUwHwYD +VR0jBBgwFoAURPyd8FHyI5n+pHbLy1w5vfxoOEUwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAJxlrCnKp4 -bWZ5QyocpAsEQoxUbInXzuD9jjNbbCui7QXe6jsRIb3pI0W9D+Bc/hsRi0Z1wSSE -WpUVpbNzhmuqj9xGPGTZYJ7BemOj1da0J+3Dd+pdWeeTBd++WEylklJhEdF/J+ab -KTy4naBc0Jhfp+05FPQwgfYNO82W1t164rBVfKuHEFSmXawnW6ahHu7nJstEHf6E -hVTgy2IbWrvtOMD0vR5d7sbXbrMnVlyNH91wUjWKvAcKl5kQgBZbo9He+ZdZyl9C -EMAmPm6SqW3lCR5Mkksup+iBf+S7s0Q8ceMMumYwSvwwQM5QmBthUpEChP+howmt -G2jbUqbPGHmv +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCU3ktzAuMi +fx6CDGSo3nlwNJadtemgUbxcOrGXfqQKBGBaOzqIfv9nGhl/YcBq+XMUtGu+If3z +4nphVnMVno3FuyFHih/6Aw0KkCA3aUkLLmqcZFvo8O0pMl+8+FmBrdjZce+NvZzt +LsNTTxLs84MkNjCxxlmnLKhtYjC8oygTCgntR6n1aOmXM7Ln51z5u8FLe2NiCg8x +WH4kiDD1Qs8+hspIW4NEsAT6C+Kci1+caHcjeUAplQ1uMr+rtK6KKsryKpKnDbSA +Xc6++GgkANkwnN66NdQitd0VN3C9LnxTZdtvHUf6U1bd0J/n1dUnf8cum1XCcB9e +ZrjRLqzG6d6q -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/expired-target.pem b/net/data/verify_certificate_chain_unittest/expired-target.pem index 8afcd0f..2919474 100644 --- a/net/data/verify_certificate_chain_unittest/expired-target.pem +++ b/net/data/verify_certificate_chain_unittest/expired-target.pem
@@ -1,6 +1,6 @@ [Created by: generate-expired-target.py] -Certificate chain with 1 intermediary, where the target is expired (violates +Certificate chain with 1 intermediate, where the target is expired (violates validity.notAfter). Verification is expected to fail. Certificate: @@ -8,7 +8,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Mar 1 12:00:00 2015 GMT @@ -17,80 +17,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:e3:02:17:8f:16:37:b7:e0:0b:44:86:f7:4f:de: - 18:39:31:91:ed:11:80:67:c4:e0:18:7e:42:8e:be: - dd:a9:0e:e7:ff:47:f2:1d:eb:a8:53:21:5b:c0:3e: - 32:59:cf:31:24:e3:0f:00:4a:d2:f7:9a:77:31:10: - 45:89:e3:e8:62:9c:c7:06:31:d0:c8:86:2b:3d:a7: - 71:83:82:fa:c1:c2:cb:84:74:48:ad:c9:8a:4d:27: - 1e:75:bb:4e:ce:54:3c:c1:b5:25:e5:02:d0:b3:8c: - 14:f3:f5:9e:f8:30:20:ec:c6:d9:c4:a2:aa:06:f9: - dc:ca:53:2f:76:cf:32:42:fd:7a:1a:c3:da:4a:d3: - 82:30:84:f5:fb:02:82:f6:db:6e:87:fc:e8:69:14: - a0:9f:2d:07:c4:ac:64:86:f5:ac:4b:22:f1:b0:d1: - 91:2e:29:f7:cf:e0:10:aa:5d:cd:df:d7:a7:b9:9d: - 72:cc:fd:16:d5:11:97:90:75:dc:5e:02:ab:7f:d3: - dd:0a:a8:bc:5a:34:c6:8d:bb:8f:7a:04:d5:b6:99: - 20:a4:72:c9:ba:00:cf:69:5e:e5:dd:bf:47:b3:3c: - be:83:0d:4b:95:be:91:58:a4:a4:33:2e:3b:b8:da: - 85:3d:74:66:8f:f9:0b:be:8e:9d:3e:b6:ca:8b:9b: - 7e:19 + 00:df:82:6a:2a:fe:30:47:00:84:06:de:48:a1:fc: + a5:d9:2c:d5:7d:e2:71:eb:ff:b5:7b:da:8c:c7:fc: + 38:8a:a3:64:5a:f8:01:70:e0:c0:26:d4:70:2c:08: + da:6b:5c:b4:40:41:aa:9e:b4:1d:05:9b:54:7c:54: + a4:b8:07:03:b0:69:95:98:c5:e6:7a:7f:71:6f:07: + dd:a5:21:59:79:7c:58:7c:00:0d:9d:18:6b:c0:3d: + 2d:fe:c6:63:58:c6:5f:29:47:01:b6:a2:dd:bb:f4: + 8a:8b:d0:15:3e:0b:01:18:34:0a:d4:a1:d3:e9:7a: + c3:5d:97:2b:c7:53:ff:49:81:34:fc:16:b4:02:f8: + 7c:55:6e:fa:9b:4f:cd:31:1a:f5:d2:5c:8f:92:d7: + bd:48:50:a9:b1:c4:89:cd:6d:c8:1d:99:77:34:d1: + d3:61:8f:b9:f8:3b:3e:c6:b3:2e:5f:3c:d0:f7:04: + 34:51:9f:83:4e:7b:1d:c9:59:53:81:6e:d9:f7:4b: + 36:dc:80:9e:b4:a4:cb:5d:18:1d:d3:52:3e:d8:b3: + 4e:28:c5:ba:2c:bd:dc:d1:e2:4a:21:e5:2a:ed:6f: + 97:84:a9:01:89:eb:2e:21:9e:b9:4a:6a:9b:c5:fe: + b0:5a:34:cf:25:0f:55:53:41:be:94:b9:8d:81:44: + fa:b5 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 1C:D2:85:3D:00:41:91:25:0B:8B:C2:CB:0E:D7:97:F1:14:8E:DE:01 + A1:54:DE:B4:8A:C7:C9:C4:33:C6:9B:40:BF:3D:6E:CF:DB:47:EC:8C X509v3 Authority Key Identifier: - keyid:90:4B:3E:89:21:25:2A:3C:CA:35:BF:D9:A6:B1:CF:BC:1F:9D:3A:2F + keyid:13:F7:B3:D5:1C:C9:63:BD:3A:24:01:43:AE:4A:26:96:46:55:F5:F0 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 6d:36:b8:bc:75:67:0d:8a:5b:00:51:3b:06:31:af:83:23:80: - a0:4f:eb:05:d6:5c:15:20:a3:10:7b:3e:31:0a:ba:45:b5:6b: - 21:2b:02:bf:83:73:2c:cd:81:85:a0:38:ed:4e:bd:b7:36:dc: - b6:69:bb:81:7b:75:74:3c:ac:5a:c2:59:74:6d:d9:64:8e:5b: - 16:19:25:44:98:cb:9d:cd:a0:d4:6f:7f:d2:a3:11:cd:94:aa: - b0:74:ee:c2:a3:3b:aa:98:e0:c5:0d:01:a4:f8:a2:84:ab:d0: - db:19:9d:4d:ce:84:89:50:e8:3a:44:fb:e5:06:f3:d8:e9:d5: - aa:81:69:af:2a:f2:9e:58:35:d5:3d:97:44:3a:79:47:22:d6: - 9c:1b:b9:93:ea:3f:44:ac:cf:2a:54:52:86:0b:db:17:9d:f9: - 4d:54:46:4d:af:21:92:cf:8a:01:52:14:07:96:c7:48:75:3c: - 66:4d:74:fb:44:06:eb:a9:ab:12:2e:91:80:de:02:c1:12:5b: - 32:76:36:46:13:16:00:31:76:c9:ee:64:e6:75:03:49:7d:63: - d6:bf:f1:90:1f:b6:49:38:e5:af:37:63:46:e2:4d:d1:29:b8: - b3:24:ec:f5:f8:32:c3:03:fa:1a:ad:30:1a:db:41:4d:5e:43: - 46:ae:6d:4e + aa:f9:d5:79:52:fa:99:3e:d8:cd:ab:c3:e4:05:a9:85:c5:bf: + 78:3b:d6:14:0b:06:f4:62:77:8e:70:40:a5:b9:b4:46:52:5d: + 86:ad:52:52:f7:c3:1f:e9:e8:8a:e2:5b:23:63:bf:e8:5c:d8: + a6:11:ad:02:94:09:04:3b:67:cb:62:a3:09:67:eb:b3:68:0f: + 81:6d:0f:d6:4e:6c:d8:a3:e5:85:8f:8f:7e:65:a4:c7:d9:ba: + a8:05:22:2c:94:9d:8f:e4:d1:a5:5c:7e:c0:0f:39:3e:d7:b4: + 2c:df:d7:c1:ab:9e:5d:8d:28:51:d5:fa:2f:c6:fa:85:17:d4: + 05:d5:4d:d8:ee:6a:14:23:da:a0:cc:43:7b:65:54:71:e1:e1: + 79:b0:62:0a:a3:70:56:9b:53:5d:70:b7:78:6f:fd:ba:13:a7: + 99:0a:0a:b3:46:2a:7b:48:26:31:b2:50:aa:5e:29:d9:1b:55: + 1f:cb:de:2a:17:4d:ee:0d:67:2b:4e:dd:f6:54:d0:72:ec:e3: + 53:4e:24:26:a6:1e:17:e8:94:ca:a8:4a:3a:af:b8:48:51:1a: + 76:38:bd:bf:cb:c5:56:e4:a8:e4:f8:cb:cb:e9:97:ed:4e:b9: + af:fb:e7:92:d3:b7:ba:81:a0:13:e8:09:31:f3:45:91:2a:5c: + 93:12:a9:99 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTUwMzAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjAheP -Fje34AtEhvdP3hg5MZHtEYBnxOAYfkKOvt2pDuf/R/Id66hTIVvAPjJZzzEk4w8A -StL3mncxEEWJ4+hinMcGMdDIhis9p3GDgvrBwsuEdEityYpNJx51u07OVDzBtSXl -AtCzjBTz9Z74MCDsxtnEoqoG+dzKUy92zzJC/Xoaw9pK04IwhPX7AoL2226H/Ohp -FKCfLQfErGSG9axLIvGw0ZEuKffP4BCqXc3f16e5nXLM/RbVEZeQddxeAqt/090K -qLxaNMaNu496BNW2mSCkcsm6AM9pXuXdv0ezPL6DDUuVvpFYpKQzLju42oU9dGaP -+Qu+jp0+tsqLm34ZAgMBAAGjgekwgeYwHQYDVR0OBBYEFBzShT0AQZElC4vCyw7X -l/EUjt4BMB8GA1UdIwQYMBaAFJBLPokhJSo8yjW/2aaxz7wfnTovMD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTUwMzAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDfgmoq +/jBHAIQG3kih/KXZLNV94nHr/7V72ozH/DiKo2Ra+AFw4MAm1HAsCNprXLRAQaqe +tB0Fm1R8VKS4BwOwaZWYxeZ6f3FvB92lIVl5fFh8AA2dGGvAPS3+xmNYxl8pRwG2 +ot279IqL0BU+CwEYNArUodPpesNdlyvHU/9JgTT8FrQC+HxVbvqbT80xGvXSXI+S +171IUKmxxInNbcgdmXc00dNhj7n4Oz7Gsy5fPND3BDRRn4NOex3JWVOBbtn3Szbc +gJ60pMtdGB3TUj7Ys04oxbosvdzR4koh5Srtb5eEqQGJ6y4hnrlKapvF/rBaNM8l +D1VTQb6UuY2BRPq1AgMBAAGjgekwgeYwHQYDVR0OBBYEFKFU3rSKx8nEM8abQL89 +bs/bR+yMMB8GA1UdIwQYMBaAFBP3s9UcyWO9OiQBQ65KJpZGVfXwMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAbTa4vHVnDYpbAFE7BjGv -gyOAoE/rBdZcFSCjEHs+MQq6RbVrISsCv4NzLM2BhaA47U69tzbctmm7gXt1dDys -WsJZdG3ZZI5bFhklRJjLnc2g1G9/0qMRzZSqsHTuwqM7qpjgxQ0BpPiihKvQ2xmd -Tc6EiVDoOkT75Qbz2OnVqoFpryrynlg11T2XRDp5RyLWnBu5k+o/RKzPKlRShgvb -F535TVRGTa8hks+KAVIUB5bHSHU8Zk10+0QG66mrEi6RgN4CwRJbMnY2RhMWADF2 -ye5k5nUDSX1j1r/xkB+2STjlrzdjRuJN0Sm4syTs9fgywwP6Gq0wGttBTV5DRq5t -Tg== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAqvnVeVL6mT7YzavD5AWp +hcW/eDvWFAsG9GJ3jnBApbm0RlJdhq1SUvfDH+noiuJbI2O/6FzYphGtApQJBDtn +y2KjCWfrs2gPgW0P1k5s2KPlhY+PfmWkx9m6qAUiLJSdj+TRpVx+wA85Pte0LN/X +waueXY0oUdX6L8b6hRfUBdVN2O5qFCPaoMxDe2VUceHhebBiCqNwVptTXXC3eG/9 +uhOnmQoKs0Yqe0gmMbJQql4p2RtVH8veKhdN7g1nK07d9lTQcuzjU04kJqYeF+iU +yqhKOq+4SFEadji9v8vFVuSo5PjLy+mX7U65r/vnktO3uoGgE+gJMfNFkSpckxKp +mQ== -----END CERTIFICATE----- Certificate: @@ -102,35 +102,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c1:92:e2:bf:d0:e9:8f:c6:45:f0:c9:ef:51:cc: - 97:cc:cb:80:ac:c1:7c:da:7e:28:12:0c:84:45:6b: - db:fb:4f:ba:16:3e:33:8b:a1:14:70:42:99:ca:4e: - 8e:55:ac:13:e5:ac:d4:30:9e:25:dc:19:d9:b9:de: - 46:7a:84:80:29:bd:a1:11:f8:f2:af:ce:c1:0c:73: - 43:29:37:c3:76:61:32:70:6d:e7:29:bf:dd:9f:68: - ed:9e:c2:b9:8c:f6:16:7c:b9:06:4b:65:ff:57:26: - 9d:62:48:ee:0b:0f:4c:5e:fb:d7:a9:e3:d8:4b:a9: - 0c:01:b6:00:f8:48:27:64:03:b6:73:d0:85:10:92: - 4c:50:f8:f4:33:95:ea:52:30:72:b0:c1:e1:d3:1e: - 8e:67:2a:64:42:c8:61:b8:3f:76:d2:01:1d:e6:dc: - d2:66:09:41:24:c3:22:b4:55:3a:f0:5e:3d:82:af: - 5d:0d:b7:d7:96:02:dc:94:e4:d2:24:dc:49:f8:d3: - dc:b9:78:0e:ce:cf:8f:1a:3f:06:8b:57:e4:51:91: - 7f:64:1b:cd:db:4d:80:88:26:21:dc:da:64:ae:64: - bb:03:21:1c:de:ce:44:eb:a7:b4:43:50:51:cc:67: - da:16:91:93:94:e4:d0:ed:28:dc:8a:16:8b:3d:d8: - cd:19 + 00:ba:33:55:c9:1e:c0:91:17:3a:eb:30:8c:ed:23: + cc:1d:6d:1e:e7:6e:4e:ac:23:63:23:ae:48:87:13: + 61:0f:0c:0b:ee:72:f7:c2:7b:95:2e:7b:25:34:08: + b6:e1:f5:ae:50:bf:8f:cf:81:6e:e6:26:9f:92:61: + c4:fb:44:9e:23:09:df:13:80:bc:38:5b:db:08:6c: + 68:60:46:d4:e3:e0:41:91:c4:42:d5:d9:75:d2:c4: + df:29:b8:04:bb:96:dc:9d:e4:0b:f7:de:ab:cf:90: + ad:22:c8:ab:56:65:84:00:3b:b9:e6:29:b5:e2:96: + 88:bd:95:e5:10:6d:57:ab:be:d1:f4:61:bb:1d:b4: + 7f:f9:02:db:48:d3:21:9d:f1:03:77:bf:f9:ca:f3: + 4e:2d:44:1c:28:1d:c5:4f:30:1b:0a:8b:71:0e:5f: + 86:0a:3f:97:7f:47:a6:a2:3c:60:02:c6:e8:bd:e9: + 52:b1:0b:cb:53:d4:09:f4:b6:20:23:b4:89:09:ff: + 1a:61:e8:dd:ac:19:4d:be:94:1e:60:24:d4:6c:89: + 03:3a:c4:44:5b:dd:7c:59:37:b7:0c:83:40:24:0e: + ed:ab:02:cf:cd:93:d2:3d:5d:e0:c6:c4:c5:1d:1a: + 01:d1:e1:77:58:62:90:e1:83:af:d2:ee:31:f3:29: + 0c:1f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 90:4B:3E:89:21:25:2A:3C:CA:35:BF:D9:A6:B1:CF:BC:1F:9D:3A:2F + 13:F7:B3:D5:1C:C9:63:BD:3A:24:01:43:AE:4A:26:96:46:55:F5:F0 X509v3 Authority Key Identifier: - keyid:C3:6A:BF:B8:BB:62:64:F0:4C:4C:28:47:94:45:0F:15:0D:DC:CD:5A + keyid:5F:B1:E2:C5:58:EB:EF:73:DC:15:A3:0F:8E:24:0C:6C:67:65:00:04 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -145,41 +145,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - bd:cb:4f:22:e2:7a:50:05:dd:e3:d6:41:19:2b:6d:4a:3e:a8: - 90:27:4f:ce:eb:ee:83:4f:d5:b6:ea:a5:18:1c:00:83:84:76: - 92:76:a7:2c:54:5f:94:a7:fc:4c:2f:38:08:c5:24:3f:95:57: - e4:55:e2:a5:96:b7:c0:7b:cc:8f:ce:a1:81:e2:d2:51:17:d3: - 7f:6b:76:ed:f5:41:2a:7a:56:e2:d1:ed:55:94:38:2e:9f:cb: - 9b:a3:8b:d8:d7:42:24:81:55:97:82:a1:77:52:7c:1f:70:db: - 0b:bf:a5:eb:96:2e:d4:fb:9c:d5:6a:6e:9b:60:75:01:e1:fe: - f1:14:64:42:82:2a:f5:ea:b3:e1:2e:40:fe:b2:af:9f:c5:66: - 25:d8:7d:8c:5f:00:3d:04:b4:02:8c:c7:99:30:d0:c0:02:e4: - 5f:3b:75:01:59:76:1c:3c:95:5b:28:49:90:2f:c0:af:45:f0: - 4c:62:ca:40:66:80:7e:25:89:ab:91:55:ee:41:71:af:05:4c: - 7e:31:2c:99:24:50:c9:dd:97:79:73:97:f9:5a:79:79:05:ff: - c6:83:b7:e3:4d:86:b6:a3:60:1d:7c:e6:89:80:a3:50:8f:b1: - 4a:43:d2:a9:89:92:8b:38:20:71:64:0a:41:8b:fd:2f:4b:ab: - 3c:45:99:0f + a5:43:87:2e:d0:2c:51:df:a7:aa:48:b4:38:fc:1d:6f:c9:db: + 23:32:75:f2:d1:52:45:ea:4a:89:1f:e9:10:0c:22:0d:70:3e: + f0:c1:cf:b7:a8:cd:af:d4:33:99:14:6e:62:b9:a8:0f:a6:2c: + 75:dd:d8:79:88:fc:cb:c4:7e:64:b1:2f:7a:0b:b2:a4:6c:82: + 29:7d:23:32:d3:de:a8:90:a8:77:f8:33:13:e9:3e:42:0b:32: + e8:50:e0:af:31:2f:b9:e5:be:b7:c7:16:ca:a7:96:9e:95:24: + d2:c1:b3:df:70:5f:7b:8a:33:6b:55:76:e8:18:32:66:0e:9a: + 60:cf:dc:30:1e:38:15:05:6e:cc:4a:1e:e7:2e:e0:5a:de:ea: + 84:a1:ce:04:fd:db:74:d6:fe:b6:4d:6b:86:38:22:78:f1:3e: + ba:dc:8b:85:a6:2f:56:10:1f:7d:b8:96:00:4c:d6:a3:fa:93: + fd:1b:29:64:40:7c:f8:65:3f:73:8a:7e:3e:72:c7:ce:19:74: + 51:21:26:5d:2d:41:a0:95:c9:8f:70:fd:2a:60:7a:b0:fc:e5: + 14:65:9a:3e:68:2c:4a:47:1b:5a:97:8a:31:a9:1a:1a:c9:fc: + e3:be:c9:dd:65:0f:33:2b:f9:d9:68:5b:54:22:c4:dc:a6:21: + 42:6c:ec:64 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwZLiv9Dp -j8ZF8MnvUcyXzMuArMF82n4oEgyERWvb+0+6Fj4zi6EUcEKZyk6OVawT5azUMJ4l -3BnZud5GeoSAKb2hEfjyr87BDHNDKTfDdmEycG3nKb/dn2jtnsK5jPYWfLkGS2X/ -VyadYkjuCw9MXvvXqePYS6kMAbYA+EgnZAO2c9CFEJJMUPj0M5XqUjBysMHh0x6O -ZypkQshhuD920gEd5tzSZglBJMMitFU68F49gq9dDbfXlgLclOTSJNxJ+NPcuXgO -zs+PGj8Gi1fkUZF/ZBvN202AiCYh3NpkrmS7AyEc3s5E66e0Q1BRzGfaFpGTlOTQ -7SjcihaLPdjNGQIDAQABo4HLMIHIMB0GA1UdDgQWBBSQSz6JISUqPMo1v9mmsc+8 -H506LzAfBgNVHSMEGDAWgBTDar+4u2Jk8ExMKEeURQ8VDdzNWjA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAujNVyR7A +kRc66zCM7SPMHW0e525OrCNjI65IhxNhDwwL7nL3wnuVLnslNAi24fWuUL+Pz4Fu +5iafkmHE+0SeIwnfE4C8OFvbCGxoYEbU4+BBkcRC1dl10sTfKbgEu5bcneQL996r +z5CtIsirVmWEADu55im14paIvZXlEG1Xq77R9GG7HbR/+QLbSNMhnfEDd7/5yvNO +LUQcKB3FTzAbCotxDl+GCj+Xf0emojxgAsbovelSsQvLU9QJ9LYgI7SJCf8aYejd +rBlNvpQeYCTUbIkDOsREW918WTe3DINAJA7tqwLPzZPSPV3gxsTFHRoB0eF3WGKQ +4YOv0u4x8ykMHwIDAQABo4HLMIHIMB0GA1UdDgQWBBQT97PVHMljvTokAUOuSiaW +RlX18DAfBgNVHSMEGDAWgBRfseLFWOvvc9wVow+OJAxsZ2UABDA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AL3LTyLielAF3ePWQRkrbUo+qJAnT87r7oNP1bbqpRgcAIOEdpJ2pyxUX5Sn/Ewv -OAjFJD+VV+RV4qWWt8B7zI/OoYHi0lEX039rdu31QSp6VuLR7VWUOC6fy5uji9jX -QiSBVZeCoXdSfB9w2wu/peuWLtT7nNVqbptgdQHh/vEUZEKCKvXqs+EuQP6yr5/F -ZiXYfYxfAD0EtAKMx5kw0MAC5F87dQFZdhw8lVsoSZAvwK9F8ExiykBmgH4liauR -Ve5Bca8FTH4xLJkkUMndl3lzl/laeXkF/8aDt+NNhrajYB185omAo1CPsUpD0qmJ -kos4IHFkCkGL/S9LqzxFmQ8= +AKVDhy7QLFHfp6pItDj8HW/J2yMydfLRUkXqSokf6RAMIg1wPvDBz7eoza/UM5kU +bmK5qA+mLHXd2HmI/MvEfmSxL3oLsqRsgil9IzLT3qiQqHf4MxPpPkILMuhQ4K8x +L7nlvrfHFsqnlp6VJNLBs99wX3uKM2tVdugYMmYOmmDP3DAeOBUFbsxKHucu4Fre +6oShzgT923TW/rZNa4Y4InjxPrrci4WmL1YQH324lgBM1qP6k/0bKWRAfPhlP3OK +fj5yx84ZdFEhJl0tQaCVyY9w/SpgerD85RRlmj5oLEpHG1qXijGpGhrJ/OO+yd1l +DzMr+dloW1QixNymIUJs7GQ= -----END CERTIFICATE----- Certificate: @@ -196,30 +196,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:fa:da:12:88:da:6c:4d:a4:17:2e:e6:c7:c7:f6: - fc:0b:41:94:b9:ad:5e:72:7f:53:82:c3:9b:bd:f0: - 39:fd:6c:be:42:2f:28:fe:76:7e:e6:24:f7:6b:32: - 42:c7:0e:6f:b3:9b:4d:61:ab:f3:f1:76:67:29:77: - a5:6a:b9:64:65:40:42:0a:ad:dc:27:16:7a:94:ae: - 8f:f0:d2:db:e7:7c:71:21:c9:ca:f0:64:94:58:32: - b7:fa:d3:27:bc:84:95:ce:d2:81:43:dc:7d:b3:e8: - 76:aa:eb:0a:a6:c1:03:1f:ae:19:db:8a:c4:ef:a1: - bd:f3:d6:e9:e7:20:a8:83:1c:78:d5:85:c2:be:9f: - c9:e2:4e:ab:e6:a8:53:6b:c7:5d:d6:57:6f:4f:2d: - db:75:89:c6:10:a3:96:36:22:8d:c3:0a:20:7b:5f: - 75:04:a6:4a:8d:24:d3:21:0b:16:fe:70:ae:34:d4: - bd:33:27:86:cb:b3:c8:b8:9a:80:70:0c:01:38:af: - e8:dc:0a:32:ca:a8:da:6c:a7:0a:2d:f3:b6:f7:cb: - 7f:ea:59:38:66:ce:9d:93:f2:75:89:d3:5f:43:5c: - 9b:29:1c:d4:e9:37:6d:7c:79:ee:ad:c9:70:62:58: - 4f:25:f6:21:20:44:a8:0b:c6:52:9d:2f:ea:a5:f8: - b3:cf + 00:df:9c:45:02:46:38:eb:d4:64:cd:8e:95:65:63: + d5:e6:71:8b:67:13:d8:bc:6d:64:73:d7:40:17:79: + 80:a4:8d:8e:5f:bf:5e:48:b0:2f:bc:49:08:71:b4: + 80:38:00:cd:e9:ee:2e:6e:73:8a:77:56:b4:b3:d0: + e3:0c:40:c9:ca:1f:9b:a0:89:68:07:34:cd:f4:f4: + b9:a2:c1:ca:42:0e:da:90:cf:95:89:3a:3c:de:ad: + a6:ff:49:6c:e2:5e:f5:0b:ff:be:06:ee:ab:e1:81: + e9:da:a3:b8:d5:63:af:5e:10:63:49:23:0a:1d:ca: + 3e:bc:96:6e:82:5c:4f:ce:56:a7:8f:53:34:65:cb: + 47:88:3e:38:4d:71:b6:8a:06:e4:ed:4f:d2:df:59: + 3e:a7:03:a7:be:c2:14:a6:cf:9e:4b:c8:a3:25:21: + b2:3e:f8:cd:65:de:fc:0e:52:fd:fa:cf:d3:07:af: + 79:53:11:bf:e6:77:ce:d8:1a:4b:4f:cb:d2:35:28: + f8:5a:4b:05:a2:dd:88:e1:54:ac:1a:15:8d:54:a2: + b7:ac:66:7a:f8:4a:2a:75:94:15:b3:44:c2:05:ff: + e3:a0:34:40:84:00:39:6d:6d:e1:8e:16:f3:d3:60: + 2b:95:2f:fc:74:6e:b1:83:b7:0b:9d:9e:d8:34:45: + 21:f7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - C3:6A:BF:B8:BB:62:64:F0:4C:4C:28:47:94:45:0F:15:0D:DC:CD:5A + 5F:B1:E2:C5:58:EB:EF:73:DC:15:A3:0F:8E:24:0C:6C:67:65:00:04 X509v3 Authority Key Identifier: - keyid:C3:6A:BF:B8:BB:62:64:F0:4C:4C:28:47:94:45:0F:15:0D:DC:CD:5A + keyid:5F:B1:E2:C5:58:EB:EF:73:DC:15:A3:0F:8E:24:0C:6C:67:65:00:04 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -234,41 +234,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 48:d9:ed:17:dd:a3:7c:5f:6b:aa:90:6d:f5:d4:61:a3:27:8e: - 83:92:15:7a:6c:d7:87:71:95:6a:e4:e0:d9:11:4e:2a:af:14: - 5c:11:ba:a0:2e:15:bd:f0:c6:2d:72:0a:17:ce:02:1a:3b:61: - 16:5d:1a:ff:e8:45:4d:d6:f2:93:9d:09:ce:e6:ec:a8:c8:de: - e6:40:dc:26:cc:15:89:38:b9:59:06:27:d0:93:af:0e:83:08: - 9f:c3:50:1c:b1:e0:88:69:b2:43:61:c3:4c:bc:d9:19:d7:87: - 57:c3:e6:99:7b:f0:02:09:ac:e1:f0:a1:55:d5:53:0c:fc:c4: - b3:3c:49:67:30:70:d5:c7:cd:94:a6:07:f0:cd:89:fd:68:b4: - 29:9d:63:91:f6:bf:79:da:6a:93:6d:b5:52:57:d8:1a:62:18: - 9f:ed:71:5c:d2:5d:53:0b:04:56:5c:05:81:6b:16:9a:dd:ff: - fe:5d:98:32:97:07:c1:7b:9c:d5:08:07:2e:b9:17:ab:1e:a3: - ea:64:b1:02:1b:04:ca:5f:4c:fd:1f:45:91:d9:f6:de:c7:78: - 9d:aa:5d:b7:cc:6f:58:7f:2d:71:cc:5c:3a:8c:e5:db:51:3e: - af:77:1f:d1:e1:81:cb:74:c0:36:46:be:51:4e:55:94:98:65: - 7d:33:c0:5e + 98:24:67:cd:0c:c3:0f:c5:09:c1:b3:b2:c3:eb:90:d5:1b:7e: + ce:45:7e:e8:f9:ae:bd:54:46:58:4e:0f:b3:65:30:45:98:3e: + 02:bf:a0:a9:e6:9c:69:f7:94:c8:bc:3d:33:ed:ac:52:5e:65: + 58:f1:ef:4d:bd:bf:39:65:62:e1:75:35:b2:27:92:fa:9b:3d: + 92:ed:51:f3:73:9a:73:2f:2f:61:2a:1d:34:e0:a1:fa:fc:b3: + dc:24:40:af:14:fd:d5:26:d0:5e:cb:fd:05:8b:88:f5:5c:0f: + 6f:75:68:c5:32:f1:1d:cd:a2:be:b2:66:0c:1a:4c:d6:df:1b: + e4:09:b9:bf:32:41:59:ca:bc:48:33:b1:ec:6a:fa:4d:dc:72: + ae:96:15:29:35:78:85:96:f9:64:05:75:50:b3:3e:b0:f8:15: + 7c:06:54:ff:36:98:2a:6d:4f:33:b0:78:1c:d3:be:12:2d:5b: + b4:37:2b:04:1b:d8:ce:28:db:9c:6d:49:e8:6f:f6:45:75:0a: + fb:69:dc:71:63:cd:c6:17:84:4b:8a:14:a0:ef:42:6a:6f:f2: + a8:76:e9:c6:4b:94:d2:24:f5:aa:80:d2:b6:81:17:c6:7d:7d: + 88:36:fe:26:44:cf:36:5a:5e:de:c4:34:da:54:1e:89:1f:d6: + 98:9e:3c:f7 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPraEojabE2kFy7mx8f2 -/AtBlLmtXnJ/U4LDm73wOf1svkIvKP52fuYk92syQscOb7ObTWGr8/F2Zyl3pWq5 -ZGVAQgqt3CcWepSuj/DS2+d8cSHJyvBklFgyt/rTJ7yElc7SgUPcfbPodqrrCqbB -Ax+uGduKxO+hvfPW6ecgqIMceNWFwr6fyeJOq+aoU2vHXdZXb08t23WJxhCjljYi -jcMKIHtfdQSmSo0k0yELFv5wrjTUvTMnhsuzyLiagHAMATiv6NwKMsqo2mynCi3z -tvfLf+pZOGbOnZPydYnTX0Ncmykc1Ok3bXx57q3JcGJYTyX2ISBEqAvGUp0v6qX4 -s88CAwEAAaOByzCByDAdBgNVHQ4EFgQUw2q/uLtiZPBMTChHlEUPFQ3czVowHwYD -VR0jBBgwFoAUw2q/uLtiZPBMTChHlEUPFQ3czVowNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN+cRQJGOOvUZM2OlWVj +1eZxi2cT2LxtZHPXQBd5gKSNjl+/XkiwL7xJCHG0gDgAzenuLm5zindWtLPQ4wxA +ycofm6CJaAc0zfT0uaLBykIO2pDPlYk6PN6tpv9JbOJe9Qv/vgbuq+GB6dqjuNVj +r14QY0kjCh3KPryWboJcT85Wp49TNGXLR4g+OE1xtooG5O1P0t9ZPqcDp77CFKbP +nkvIoyUhsj74zWXe/A5S/frP0weveVMRv+Z3ztgaS0/L0jUo+FpLBaLdiOFUrBoV +jVSit6xmevhKKnWUFbNEwgX/46A0QIQAOW1t4Y4W89NgK5Uv/HRusYO3C52e2DRF +IfcCAwEAAaOByzCByDAdBgNVHQ4EFgQUX7HixVjr73PcFaMPjiQMbGdlAAQwHwYD +VR0jBBgwFoAUX7HixVjr73PcFaMPjiQMbGdlAAQwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBI2e0X3aN8 -X2uqkG311GGjJ46DkhV6bNeHcZVq5ODZEU4qrxRcEbqgLhW98MYtcgoXzgIaO2EW -XRr/6EVN1vKTnQnO5uyoyN7mQNwmzBWJOLlZBifQk68Ogwifw1AcseCIabJDYcNM -vNkZ14dXw+aZe/ACCazh8KFV1VMM/MSzPElnMHDVx82UpgfwzYn9aLQpnWOR9r95 -2mqTbbVSV9gaYhif7XFc0l1TCwRWXAWBaxaa3f/+XZgylwfBe5zVCAcuuRerHqPq -ZLECGwTKX0z9H0WR2fbex3idql23zG9Yfy1xzFw6jOXbUT6vdx/R4YHLdMA2Rr5R -TlWUmGV9M8Be +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCYJGfNDMMP +xQnBs7LD65DVG37ORX7o+a69VEZYTg+zZTBFmD4Cv6Cp5pxp95TIvD0z7axSXmVY +8e9Nvb85ZWLhdTWyJ5L6mz2S7VHzc5pzLy9hKh004KH6/LPcJECvFP3VJtBey/0F +i4j1XA9vdWjFMvEdzaK+smYMGkzW3xvkCbm/MkFZyrxIM7HsavpN3HKulhUpNXiF +lvlkBXVQsz6w+BV8BlT/NpgqbU8zsHgc074SLVu0NysEG9jOKNucbUnob/ZFdQr7 +adxxY83GF4RLihSg70Jqb/KodunGS5TSJPWqgNK2gRfGfX2INv4mRM82Wl7exDTa +VB6JH9aYnjz3 -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/generate-basic-constraints-pathlen-0-self-issued.py b/net/data/verify_certificate_chain_unittest/generate-basic-constraints-pathlen-0-self-issued.py index 03c6eb5..55f649f 100755 --- a/net/data/verify_certificate_chain_unittest/generate-basic-constraints-pathlen-0-self-issued.py +++ b/net/data/verify_certificate_chain_unittest/generate-basic-constraints-pathlen-0-self-issued.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 2 intermediaries. The first intermediary has a basic +"""Certificate chain with 2 intermediates. The first intermediate has a basic constraints path length of 0. The second one is self-issued so does not count against the path length.""" @@ -12,22 +12,22 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary with pathlen 0 -intermediary1 = common.create_intermediary_certificate('Intermediary', root) -intermediary1.get_extensions().set_property('basicConstraints', +# Intermediate with pathlen 0 +intermediate1 = common.create_intermediate_certificate('Intermediate', root) +intermediate1.get_extensions().set_property('basicConstraints', 'critical,CA:true,pathlen:0') -# Another intermediary (with the same pathlen restriction). +# Another intermediate (with the same pathlen restriction). # Note that this is self-issued but NOT self-signed. -intermediary2 = common.create_intermediary_certificate('Intermediary', - intermediary1) -intermediary2.get_extensions().set_property('basicConstraints', +intermediate2 = common.create_intermediate_certificate('Intermediate', + intermediate1) +intermediate2.get_extensions().set_property('basicConstraints', 'critical,CA:true,pathlen:0') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary2) +target = common.create_end_entity_certificate('Target', intermediate2) -chain = [target, intermediary2, intermediary1] +chain = [target, intermediate2, intermediate1] trusted = [root] time = common.DEFAULT_TIME verify_result = True
diff --git a/net/data/verify_certificate_chain_unittest/generate-expired-intermediary.py b/net/data/verify_certificate_chain_unittest/generate-expired-intermediate.py similarity index 74% rename from net/data/verify_certificate_chain_unittest/generate-expired-intermediary.py rename to net/data/verify_certificate_chain_unittest/generate-expired-intermediate.py index 463a37b..708d734 100755 --- a/net/data/verify_certificate_chain_unittest/generate-expired-intermediary.py +++ b/net/data/verify_certificate_chain_unittest/generate-expired-intermediate.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, where the intermediary is expired +"""Certificate chain with 1 intermediate, where the intermediate is expired (violates validity.notAfter). Verification is expected to fail.""" import common @@ -12,20 +12,20 @@ root = common.create_self_signed_root_certificate('Root') root.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.set_validity_range(common.JANUARY_1_2015_UTC, +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.set_validity_range(common.JANUARY_1_2015_UTC, common.MARCH_1_2015_UTC) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] # Both the root and target are valid at this time, however the -# intermediary certificate is not. +# intermediate certificate is not. time = common.MARCH_2_2015_UTC verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-expired-root.py b/net/data/verify_certificate_chain_unittest/generate-expired-root.py index 83f7917..328edcc 100755 --- a/net/data/verify_certificate_chain_unittest/generate-expired-root.py +++ b/net/data/verify_certificate_chain_unittest/generate-expired-root.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, where the root certificate is expired +"""Certificate chain with 1 intermediate, where the root certificate is expired (violates validity.notAfter). Verification is expected to fail.""" import common @@ -12,19 +12,19 @@ root = common.create_self_signed_root_certificate('Root') root.set_validity_range(common.JANUARY_1_2015_UTC, common.MARCH_1_2015_UTC) -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.set_validity_range(common.JANUARY_1_2015_UTC, +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] -# Both the target and intermediary are valid at this time, however the +# Both the target and intermediate are valid at this time, however the # root is not. time = common.MARCH_2_2015_UTC verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-expired-target-notBefore.py b/net/data/verify_certificate_chain_unittest/generate-expired-target-notBefore.py index fae1831c..209154d 100755 --- a/net/data/verify_certificate_chain_unittest/generate-expired-target-notBefore.py +++ b/net/data/verify_certificate_chain_unittest/generate-expired-target-notBefore.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, where the target is expired (violates +"""Certificate chain with 1 intermediate, where the target is expired (violates validity.notBefore). Verification is expected to fail.""" import common @@ -12,19 +12,19 @@ root = common.create_self_signed_root_certificate('Root') root.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.set_validity_range(common.JANUARY_1_2015_UTC, +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.set_validity_range(common.MARCH_2_2015_UTC, common.JANUARY_1_2016_UTC) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] -# Both the root and intermediary are valid at this time, however the +# Both the root and intermediate are valid at this time, however the # target is not. time = common.MARCH_1_2015_UTC verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-expired-target.py b/net/data/verify_certificate_chain_unittest/generate-expired-target.py index eaa94d3..d75fa5a 100755 --- a/net/data/verify_certificate_chain_unittest/generate-expired-target.py +++ b/net/data/verify_certificate_chain_unittest/generate-expired-target.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, where the target is expired (violates +"""Certificate chain with 1 intermediate, where the target is expired (violates validity.notAfter). Verification is expected to fail.""" import common @@ -12,19 +12,19 @@ root = common.create_self_signed_root_certificate('Root') root.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.set_validity_range(common.JANUARY_1_2015_UTC, +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.set_validity_range(common.JANUARY_1_2015_UTC, common.MARCH_1_2015_UTC) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] -# Both the root and intermediary are valid at this time, however the +# Both the root and intermediate are valid at this time, however the # target is not. time = common.MARCH_2_2015_UTC verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-ca-false.py b/net/data/verify_certificate_chain_unittest/generate-intermediate-basic-constraints-ca-false.py similarity index 70% rename from net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-ca-false.py rename to net/data/verify_certificate_chain_unittest/generate-intermediate-basic-constraints-ca-false.py index 4375f0e3..5d15191 100755 --- a/net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-ca-false.py +++ b/net/data/verify_certificate_chain_unittest/generate-intermediate-basic-constraints-ca-false.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The intermediary +"""Certificate chain with 1 intermediate and a trusted root. The intermediate has a basic constraints extension that indicates it is NOT a CA. Verification is expected to fail.""" @@ -12,15 +12,15 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary with incorrect basic constraints. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.get_extensions().set_property('basicConstraints', +# Intermediate with incorrect basic constraints. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.get_extensions().set_property('basicConstraints', 'critical,CA:false') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py b/net/data/verify_certificate_chain_unittest/generate-intermediate-basic-constraints-not-critical.py similarity index 70% rename from net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py rename to net/data/verify_certificate_chain_unittest/generate-intermediate-basic-constraints-not-critical.py index 284354fd..9a409fc 100755 --- a/net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py +++ b/net/data/verify_certificate_chain_unittest/generate-intermediate-basic-constraints-not-critical.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The intermediary +"""Certificate chain with 1 intermediate and a trusted root. The intermediate has a basic constraints extension but does not mark it as critical. Verification is expected to succeed, since although not critical, the basicConstraints indicates CA=true as expected.""" @@ -13,14 +13,14 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary with non-critical basic constarints. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.get_extensions().set_property('basicConstraints', 'CA:true') +# Intermediate with non-critical basic constarints. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.get_extensions().set_property('basicConstraints', 'CA:true') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = True
diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-basic-constraints.py b/net/data/verify_certificate_chain_unittest/generate-intermediate-lacks-basic-constraints.py similarity index 69% rename from net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-basic-constraints.py rename to net/data/verify_certificate_chain_unittest/generate-intermediate-lacks-basic-constraints.py index 1faced54..db91ff72 100755 --- a/net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-basic-constraints.py +++ b/net/data/verify_certificate_chain_unittest/generate-intermediate-lacks-basic-constraints.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The intermediary +"""Certificate chain with 1 intermediate and a trusted root. The intermediate lacks the basic constraints extension, and hence is expected to fail validation (RFC 5280 requires v3 signing certificates have a BasicConstaints).""" @@ -12,14 +12,14 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary that lacks basic constraints. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.get_extensions().remove_property('basicConstraints') +# Intermediate that lacks basic constraints. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.get_extensions().remove_property('basicConstraints') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-signing-key-usage.py b/net/data/verify_certificate_chain_unittest/generate-intermediate-lacks-signing-key-usage.py similarity index 71% rename from net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-signing-key-usage.py rename to net/data/verify_certificate_chain_unittest/generate-intermediate-lacks-signing-key-usage.py index 4c3d8e8..5a3c5e1 100755 --- a/net/data/verify_certificate_chain_unittest/generate-intermediary-lacks-signing-key-usage.py +++ b/net/data/verify_certificate_chain_unittest/generate-intermediate-lacks-signing-key-usage.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The intermediary +"""Certificate chain with 1 intermediate and a trusted root. The intermediate contains a keyUsage extension, HOWEVER it does not contain the keyCertSign bit. Hence validation is expected to fail.""" @@ -12,15 +12,15 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary that is missing keyCertSign. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.get_extensions().set_property('keyUsage', +# Intermediate that is missing keyCertSign. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.get_extensions().set_property('keyUsage', 'critical,digitalSignature,keyEncipherment') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-signed-with-md5.py b/net/data/verify_certificate_chain_unittest/generate-intermediate-signed-with-md5.py similarity index 72% rename from net/data/verify_certificate_chain_unittest/generate-intermediary-signed-with-md5.py rename to net/data/verify_certificate_chain_unittest/generate-intermediate-signed-with-md5.py index 8a59e651..5dec9d1 100755 --- a/net/data/verify_certificate_chain_unittest/generate-intermediary-signed-with-md5.py +++ b/net/data/verify_certificate_chain_unittest/generate-intermediate-signed-with-md5.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The intermediary +"""Certificate chain with 1 intermediate and a trusted root. The intermediate however is signed using the MD5 hash. Verification is expected to fail because MD5 is too weak.""" @@ -12,14 +12,14 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.set_signature_hash('md5') +# Intermediate. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.set_signature_hash('md5') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-unknown-critical-extension.py b/net/data/verify_certificate_chain_unittest/generate-intermediate-unknown-critical-extension.py similarity index 72% rename from net/data/verify_certificate_chain_unittest/generate-intermediary-unknown-critical-extension.py rename to net/data/verify_certificate_chain_unittest/generate-intermediate-unknown-critical-extension.py index 39c0597..b4bffa1a 100755 --- a/net/data/verify_certificate_chain_unittest/generate-intermediary-unknown-critical-extension.py +++ b/net/data/verify_certificate_chain_unittest/generate-intermediate-unknown-critical-extension.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The intermediary +"""Certificate chain with 1 intermediate and a trusted root. The intermediate has an unknown X.509v3 extension (OID=1.2.3.4) that is marked as critical. Verifying this certificate chain is expected to fail because there is an unrecognized critical extension.""" @@ -13,15 +13,15 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary that has an unknown critical extension. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.get_extensions().add_property('1.2.3.4', +# Intermediate that has an unknown critical extension. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.get_extensions().add_property('1.2.3.4', 'critical,DER:01:02:03:04') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-intermediary-unknown-non-critical-extension.py b/net/data/verify_certificate_chain_unittest/generate-intermediate-unknown-non-critical-extension.py similarity index 69% rename from net/data/verify_certificate_chain_unittest/generate-intermediary-unknown-non-critical-extension.py rename to net/data/verify_certificate_chain_unittest/generate-intermediate-unknown-non-critical-extension.py index 874a658..b4bbb9e 100755 --- a/net/data/verify_certificate_chain_unittest/generate-intermediary-unknown-non-critical-extension.py +++ b/net/data/verify_certificate_chain_unittest/generate-intermediate-unknown-non-critical-extension.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The intermediary +"""Certificate chain with 1 intermediate and a trusted root. The intermediate has an unknown X.509v3 extension that is marked as non-critical. Verification is expected to succeed because although unrecognized, the extension is not critical.""" @@ -12,15 +12,15 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -intermediary = common.create_intermediary_certificate('Intermediary', root) +intermediate = common.create_intermediate_certificate('Intermediate', root) -# Intermediary that has an unknown non-critical extension. -intermediary.get_extensions().add_property('1.2.3.4', 'DER:01:02:03:04') +# Intermediate that has an unknown non-critical extension. +intermediate.get_extensions().add_property('1.2.3.4', 'DER:01:02:03:04') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = True
diff --git a/net/data/verify_certificate_chain_unittest/generate-key-rollover.py b/net/data/verify_certificate_chain_unittest/generate-key-rollover.py index e06b4522..01deacb 100755 --- a/net/data/verify_certificate_chain_unittest/generate-key-rollover.py +++ b/net/data/verify_certificate_chain_unittest/generate-key-rollover.py
@@ -49,18 +49,18 @@ newroot = common.create_self_signed_root_certificate('Root') newroot.set_validity_range(JANUARY_2_2015_UTC, common.JANUARY_1_2016_UTC) # Root with the new key signed by the old key. -newrootrollover = common.create_intermediary_certificate('Root', oldroot) +newrootrollover = common.create_intermediate_certificate('Root', oldroot) newrootrollover.set_key_path(newroot.get_key_path()) newrootrollover.set_validity_range(JANUARY_2_2015_UTC, common.JANUARY_1_2016_UTC) # Intermediate signed by oldroot. -oldintermediate = common.create_intermediary_certificate('Intermediate', +oldintermediate = common.create_intermediate_certificate('Intermediate', oldroot) oldintermediate.set_validity_range(common.JANUARY_1_2015_UTC, common.JANUARY_1_2016_UTC) # Intermediate signed by newroot. Same key as oldintermediate. -newintermediate = common.create_intermediary_certificate('Intermediate', +newintermediate = common.create_intermediate_certificate('Intermediate', newroot) newintermediate.set_key_path(oldintermediate.get_key_path()) newintermediate.set_validity_range(JANUARY_2_2015_UTC,
diff --git a/net/data/verify_certificate_chain_unittest/generate-non-self-signed-root.py b/net/data/verify_certificate_chain_unittest/generate-non-self-signed-root.py index 355f61e..1a64171 100755 --- a/net/data/verify_certificate_chain_unittest/generate-non-self-signed-root.py +++ b/net/data/verify_certificate_chain_unittest/generate-non-self-signed-root.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The trusted root +"""Certificate chain with 1 intermediate and a trusted root. The trusted root is NOT self signed, however its issuer is not included in the chain or root store. Verification is expected to succeed since the root is trusted.""" @@ -12,15 +12,15 @@ shadow_root = common.create_self_signed_root_certificate('ShadowRoot') # Non-self-signed root (part of trust store). -root = common.create_intermediary_certificate('Root', shadow_root) +root = common.create_intermediate_certificate('Root', shadow_root) -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = True
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-and-intermediary.py b/net/data/verify_certificate_chain_unittest/generate-target-and-intermediate.py similarity index 73% rename from net/data/verify_certificate_chain_unittest/generate-target-and-intermediary.py rename to net/data/verify_certificate_chain_unittest/generate-target-and-intermediate.py index 94525cc..f198774 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-and-intermediary.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-and-intermediate.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. Verification is +"""Certificate chain with 1 intermediate and a trusted root. Verification is expected to succeed.""" import common @@ -11,13 +11,13 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = True
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-has-keycertsign-but-not-ca.py b/net/data/verify_certificate_chain_unittest/generate-target-has-keycertsign-but-not-ca.py index fa3cafb4..bd19047 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-has-keycertsign-but-not-ca.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-has-keycertsign-but-not-ca.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, a trusted root, and a target +"""Certificate chain with 1 intermediate, a trusted root, and a target certificate that is not a CA, and yet has the keyCertSign bit set. Verification is expected to fail, since keyCertSign should only be asserted when CA is true.""" @@ -13,16 +13,16 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate (end entity but has keyCertSign bit set). -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.get_extensions().set_property('keyUsage', 'critical,digitalSignature,keyEncipherment,keyCertSign') -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-has-pathlen-but-not-ca.py b/net/data/verify_certificate_chain_unittest/generate-target-has-pathlen-but-not-ca.py index 5d29739..558e98cf 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-has-pathlen-but-not-ca.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-has-pathlen-but-not-ca.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, a trusted root, and a target +"""Certificate chain with 1 intermediate, a trusted root, and a target certificate that is not a CA, and yet has a pathlen set. Verification is expected to fail, since pathlen should only be set for CAs.""" @@ -12,16 +12,16 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate (end entity, but has pathlen set). -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.get_extensions().set_property('basicConstraints', 'critical,CA:false,pathlen:1') -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-not-end-entity.py b/net/data/verify_certificate_chain_unittest/generate-target-not-end-entity.py index 83573ad..65423d5d 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-not-end-entity.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-not-end-entity.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, a trusted root, and a target +"""Certificate chain with 1 intermediate, a trusted root, and a target certificate that is also a CA. Verification is expected to succeed, as the test code accepts any target certificate.""" @@ -12,13 +12,13 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate (is also a CA) -target = common.create_intermediary_certificate('Target', intermediary) +target = common.create_intermediate_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = True
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-signed-by-512bit-rsa.py b/net/data/verify_certificate_chain_unittest/generate-target-signed-by-512bit-rsa.py index 75144a0..e8550d6 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-signed-by-512bit-rsa.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-signed-by-512bit-rsa.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The target +"""Certificate chain with 1 intermediate and a trusted root. The target certificate is signed using a weak RSA key (512-bit modulus), and so verification is expected to fail.""" @@ -12,14 +12,14 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary with a very weak key size (512-bit RSA). -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.generate_rsa_key(512) +# Intermediate with a very weak key size (512-bit RSA). +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.generate_rsa_key(512) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py b/net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py index 562ebb1f..d052c540 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-signed-using-ecdsa.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with a trusted root using RSA, and intermediary using EC, +"""Certificate chain with a trusted root using RSA, and intermediate using EC, and a target certificate using RSA. Verification is expected to succeed.""" import common @@ -11,14 +11,14 @@ # Self-signed root certificate (part of trust store), using RSA. root = common.create_self_signed_root_certificate('Root') -# Intermediary using an EC key for the P-384 curve. -intermediary = common.create_intermediary_certificate('Intermediary', root) -intermediary.generate_ec_key('secp384r1') +# Intermediate using an EC key for the P-384 curve. +intermediate = common.create_intermediate_certificate('Intermediate', root) +intermediate.generate_ec_key('secp384r1') # Target certificate contains an RSA key (but is signed using ECDSA). -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = True
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-signed-with-md5.py b/net/data/verify_certificate_chain_unittest/generate-target-signed-with-md5.py index 743ad25..28a2d83 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-signed-with-md5.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-signed-with-md5.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with an intermediary that uses MD5 to sign the target +"""Certificate chain with an intermediate that uses MD5 to sign the target certificate. This is expected to fail because MD5 is too weak.""" import common @@ -11,14 +11,14 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.set_signature_hash('md5') -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-unknown-critical-extension.py b/net/data/verify_certificate_chain_unittest/generate-target-unknown-critical-extension.py index 7254299..4c0e19c 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-unknown-critical-extension.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-unknown-critical-extension.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary and a trusted root. The target +"""Certificate chain with 1 intermediate and a trusted root. The target certificate has an unknown X.509v3 extension (OID=1.2.3.4) that is marked as critical. Verifying this certificate chain is expected to fail because there is an unrecognized critical extension.""" @@ -13,15 +13,15 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate (has unknown critical extension). -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) target.get_extensions().add_property('1.2.3.4', 'critical,DER:01:02:03:04') -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-target-wrong-signature.py b/net/data/verify_certificate_chain_unittest/generate-target-wrong-signature.py index 162f7160..d941b18 100755 --- a/net/data/verify_certificate_chain_unittest/generate-target-wrong-signature.py +++ b/net/data/verify_certificate_chain_unittest/generate-target-wrong-signature.py
@@ -12,19 +12,19 @@ # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary certificate to include in the certificate chain. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate to include in the certificate chain. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Actual intermediate that was used to sign the target certificate. It has the # same subject as expected, but a different RSA key from the certificate # included in the actual chain. -wrong_intermediary = common.create_intermediary_certificate('Intermediary', +wrong_intermediate = common.create_intermediate_certificate('Intermediate', root) -# Target certificate, signed using |wrong_intermediary| NOT |intermediary|. -target = common.create_end_entity_certificate('Target', wrong_intermediary) +# Target certificate, signed using |wrong_intermediate| NOT |intermediate|. +target = common.create_end_entity_certificate('Target', wrong_intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-unknown-root.py b/net/data/verify_certificate_chain_unittest/generate-unknown-root.py index 4f0b5f50..523b590 100755 --- a/net/data/verify_certificate_chain_unittest/generate-unknown-root.py +++ b/net/data/verify_certificate_chain_unittest/generate-unknown-root.py
@@ -3,8 +3,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 1 intermediary, but the root is not in trust store. -Verification is expected to fail because the final intermediary (Intermediary) +"""Certificate chain with 1 intermediate, but the root is not in trust store. +Verification is expected to fail because the final intermediate (Intermediate) does not chain to a known root.""" import common @@ -12,13 +12,13 @@ # Self-signed root certificate, which is NOT added to the trust store. root = common.create_self_signed_root_certificate('Root') -# Intermediary certificate. -intermediary = common.create_intermediary_certificate('Intermediary', root) +# Intermediate certificate. +intermediate = common.create_intermediate_certificate('Intermediate', root) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary) +target = common.create_end_entity_certificate('Target', intermediate) -chain = [target, intermediary] +chain = [target, intermediate] trusted = [] # Note that this lacks |root| time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-violates-basic-constraints-pathlen-0.py b/net/data/verify_certificate_chain_unittest/generate-violates-basic-constraints-pathlen-0.py index 0298956e..02599ffb 100755 --- a/net/data/verify_certificate_chain_unittest/generate-violates-basic-constraints-pathlen-0.py +++ b/net/data/verify_certificate_chain_unittest/generate-violates-basic-constraints-pathlen-0.py
@@ -3,30 +3,30 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 2 intermediaries. The first intermediary has a basic +"""Certificate chain with 2 intermediates. The first intermediate has a basic constraints path length of 0, so it is a violation for it to have a subordinate -intermediary.""" +intermediate.""" import common # Self-signed root certificate (part of trust store). root = common.create_self_signed_root_certificate('Root') -# Intermediary with pathlen 0 -intermediary1 = common.create_intermediary_certificate('Intermediary1', root) -intermediary1.get_extensions().set_property('basicConstraints', +# Intermediate with pathlen 0 +intermediate1 = common.create_intermediate_certificate('Intermediate1', root) +intermediate1.get_extensions().set_property('basicConstraints', 'critical,CA:true,pathlen:0') -# Another intermediary (with the same pathlen restriction) -intermediary2 = common.create_intermediary_certificate('Intermediary2', - intermediary1) -intermediary2.get_extensions().set_property('basicConstraints', +# Another intermediate (with the same pathlen restriction) +intermediate2 = common.create_intermediate_certificate('Intermediate2', + intermediate1) +intermediate2.get_extensions().set_property('basicConstraints', 'critical,CA:true,pathlen:0') # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary2) +target = common.create_end_entity_certificate('Target', intermediate2) -chain = [target, intermediary2, intermediary1] +chain = [target, intermediate2, intermediate1] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py b/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py index bda9c25..149c000 100755 --- a/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py +++ b/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py
@@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Certificate chain with 2 intermediaries and one end entity certificate. The +"""Certificate chain with 2 intermediates and one end entity certificate. The root certificate has a pathlen:1 restriction so this is an invalid chain.""" import common @@ -13,17 +13,17 @@ root.get_extensions().set_property('basicConstraints', 'critical,CA:true,pathlen:1') -# Intermediary 1 (no pathlen restriction). -intermediary1 = common.create_intermediary_certificate('Intermediary1', root) +# Intermediate 1 (no pathlen restriction). +intermediate1 = common.create_intermediate_certificate('Intermediate1', root) -# Intermediary 2 (no pathlen restriction). -intermediary2 = common.create_intermediary_certificate('Intermediary2', - intermediary1) +# Intermediate 2 (no pathlen restriction). +intermediate2 = common.create_intermediate_certificate('Intermediate2', + intermediate1) # Target certificate. -target = common.create_end_entity_certificate('Target', intermediary2) +target = common.create_end_entity_certificate('Target', intermediate2) -chain = [target, intermediary2, intermediary1] +chain = [target, intermediate2, intermediate1] trusted = [root] time = common.DEFAULT_TIME verify_result = False
diff --git a/net/data/verify_certificate_chain_unittest/intermediary-basic-constraints-ca-false.pem b/net/data/verify_certificate_chain_unittest/intermediary-basic-constraints-ca-false.pem deleted file mode 100644 index 04bbffe7..0000000 --- a/net/data/verify_certificate_chain_unittest/intermediary-basic-constraints-ca-false.pem +++ /dev/null
@@ -1,281 +0,0 @@ -[Created by: generate-intermediary-basic-constraints-ca-false.py] - -Certificate chain with 1 intermediary and a trusted root. The intermediary -has a basic constraints extension that indicates it is NOT a CA. Verification -is expected to fail. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:d7:2c:b6:2c:cc:74:93:54:76:43:6a:c8:78:5d: - c4:cc:30:ab:d1:16:46:84:b6:d8:28:13:74:4f:7f: - 6c:e1:ef:0c:12:07:c8:f5:2b:bd:98:3e:5f:ec:3c: - 6b:96:6b:7d:42:d1:a0:1c:e3:9a:c5:04:10:9f:f6: - d8:d2:e9:0b:98:3b:40:f1:3d:9f:39:fd:70:7b:d3: - f6:af:83:14:48:89:1c:87:aa:f1:21:fc:ab:f4:1e: - b3:66:3b:1e:ae:f9:9b:5d:9b:6d:6c:19:14:e2:38: - 09:36:99:be:b6:c0:27:50:91:33:c5:8d:11:4b:83: - 95:db:21:d6:3b:a8:7c:d9:a7:6b:04:cc:d4:81:28: - 8e:bb:57:76:2a:d9:d9:fa:31:07:62:dc:34:af:2d: - ec:7d:2f:8c:73:b9:57:44:cc:86:3b:49:d5:45:df: - bd:11:97:4e:b5:d2:07:17:71:39:0c:54:5b:c7:76: - db:69:64:e6:0d:3d:a2:c8:bc:45:35:06:f4:6f:fb: - ff:e5:23:53:9d:36:92:b5:15:2e:c7:62:62:22:69: - 66:62:2c:51:ee:1c:b7:2e:10:82:14:e2:ff:3f:f9: - 4e:a5:ad:70:fe:c8:26:d3:99:fb:ee:ea:67:f9:8a: - 06:b8:a1:60:99:4f:ef:95:0e:96:3a:c2:35:11:e9: - 4e:7d - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 34:A4:95:47:59:7D:2A:43:E3:DD:5F:55:F7:D0:F4:C0:25:E5:AD:8E - X509v3 Authority Key Identifier: - keyid:9F:6B:93:D1:46:61:07:80:55:0A:40:C8:FE:A8:D8:DD:8E:B1:EF:DD - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 75:a4:8c:02:02:da:03:71:90:d9:46:cc:6a:21:36:ef:86:21: - 68:60:4a:a9:ce:af:f6:49:cf:f4:6b:b0:96:42:60:d5:02:91: - 62:93:01:8b:cb:0b:eb:a5:b0:b8:49:6c:8e:54:84:c2:53:d4: - 46:09:d6:db:29:96:a0:45:e5:09:5b:c1:b7:ba:be:8a:43:62: - f9:8b:e4:47:d5:a9:d9:03:0e:83:86:78:19:81:c8:3b:20:86: - 1d:72:98:cd:06:73:fa:b1:e4:df:fd:08:9c:52:bb:f6:48:61: - bc:6f:3f:1e:1c:ef:f5:4e:94:5b:ee:e7:96:44:ff:1a:8d:6c: - a6:9c:d1:77:17:1f:c7:e1:53:d5:5e:a5:d8:55:c8:36:48:f6: - 8c:25:c3:1b:27:09:58:8e:30:6a:ad:ad:5e:0a:2e:5f:6f:5a: - cb:1a:fb:fe:c9:03:1f:bf:37:9c:b5:c3:93:b7:4c:a2:d5:e2: - ac:af:94:91:85:22:8c:c7:8b:b0:39:4a:67:f0:82:dc:db:fe: - 39:3c:1d:50:4c:70:44:7e:aa:73:e4:fd:51:48:12:ea:9c:18: - b1:27:6b:96:e7:aa:cf:f6:58:bf:05:d0:a4:51:71:27:b6:2c: - 3d:a7:50:4d:93:1a:8d:04:84:7e:d3:9f:0d:b5:a5:6b:d3:db: - d4:3a:03:fb ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDXLLYs -zHSTVHZDash4XcTMMKvRFkaEttgoE3RPf2zh7wwSB8j1K72YPl/sPGuWa31C0aAc -45rFBBCf9tjS6QuYO0DxPZ85/XB70/avgxRIiRyHqvEh/Kv0HrNmOx6u+Ztdm21s -GRTiOAk2mb62wCdQkTPFjRFLg5XbIdY7qHzZp2sEzNSBKI67V3Yq2dn6MQdi3DSv -Lex9L4xzuVdEzIY7SdVF370Rl0610gcXcTkMVFvHdttpZOYNPaLIvEU1BvRv+//l -I1OdNpK1FS7HYmIiaWZiLFHuHLcuEIIU4v8/+U6lrXD+yCbTmfvu6mf5iga4oWCZ -T++VDpY6wjUR6U59AgMBAAGjgekwgeYwHQYDVR0OBBYEFDSklUdZfSpD491fVffQ -9MAl5a2OMB8GA1UdIwQYMBaAFJ9rk9FGYQeAVQpAyP6o2N2Ose/dMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAdaSMAgLaA3GQ2UbMaiE2 -74YhaGBKqc6v9knP9GuwlkJg1QKRYpMBi8sL66WwuElsjlSEwlPURgnW2ymWoEXl -CVvBt7q+ikNi+YvkR9Wp2QMOg4Z4GYHIOyCGHXKYzQZz+rHk3/0InFK79khhvG8/ -Hhzv9U6UW+7nlkT/Go1sppzRdxcfx+FT1V6l2FXINkj2jCXDGycJWI4waq2tXgou -X29ayxr7/skDH783nLXDk7dMotXirK+UkYUijMeLsDlKZ/CC3Nv+OTwdUExwRH6q -c+T9UUgS6pwYsSdrlueqz/ZYvwXQpFFxJ7YsPadQTZMajQSEftOfDbWla9Pb1DoD -+w== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:b6:2b:92:72:9f:d2:59:95:3f:16:fd:eb:d3:37: - 3e:4d:fa:bf:05:3a:e3:8b:b5:32:90:42:9c:d7:69: - c5:30:e6:0f:d3:6d:fb:93:c0:0e:30:f2:9f:42:8d: - 83:17:62:e0:ac:41:c4:2b:29:4f:e6:c7:64:27:a8: - ca:c0:46:16:50:ba:e1:de:3a:ed:4b:1e:49:84:cf: - 16:2c:5d:84:0c:8e:0d:42:c0:d2:01:e3:94:2a:79: - d7:da:d7:a6:51:75:fe:a3:e5:1a:95:f5:38:a3:5b: - f8:5c:8a:a9:90:f1:f9:83:4a:13:25:61:bc:33:fb: - 19:69:71:c1:c1:a6:45:4a:bd:7f:3f:a6:92:43:fe: - db:88:a2:15:a9:41:cf:9d:62:9b:b4:fc:71:8f:4f: - be:5d:4a:48:8a:7a:de:57:11:82:44:49:a6:5c:25: - a0:8c:0b:f0:ec:74:51:76:ae:f4:5c:14:c6:d0:90: - b9:93:64:93:f8:04:82:99:28:98:fa:c8:a2:e8:98: - 20:2d:7d:cd:d9:99:ef:74:eb:7a:63:06:4c:7a:86: - 1e:e8:4b:8f:d0:8d:ab:d9:3a:8e:bc:ec:f2:2a:0d: - e1:5f:89:54:0f:ef:b8:28:ff:d5:f6:ef:a7:14:94: - 52:72:48:50:29:85:5b:d9:fd:1e:14:59:c8:69:df: - 89:47 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 9F:6B:93:D1:46:61:07:80:55:0A:40:C8:FE:A8:D8:DD:8E:B1:EF:DD - X509v3 Authority Key Identifier: - keyid:D8:01:99:4C:28:49:4B:7F:FB:30:0A:92:A8:90:6F:8B:9C:45:05:7F - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:FALSE - Signature Algorithm: sha256WithRSAEncryption - 7f:36:da:7c:f5:4a:3b:37:53:82:b4:98:99:0b:d7:c0:73:b9: - 05:89:75:fa:97:e4:cc:9d:73:61:18:ad:f2:bd:57:3f:6b:d0: - 45:a2:45:2a:27:68:13:f1:a3:80:15:85:13:52:4b:c6:8f:12: - 78:ba:21:51:fb:9d:1c:88:5d:5c:f5:0b:e5:66:ef:b4:72:67: - 16:cb:3d:79:83:56:9b:90:50:91:fe:f2:0c:f9:36:88:dd:14: - ef:b7:d2:1e:a3:54:d3:67:9f:3e:bc:7b:8c:45:be:12:c0:a9: - 21:cf:b7:ea:e9:9e:ec:e8:79:02:a0:48:3e:a8:b9:fc:62:9d: - a3:ab:74:b6:22:97:ab:78:7f:60:8e:67:96:02:ff:13:6d:66: - b9:df:a4:55:c7:e4:82:a9:f7:0d:30:d4:e9:6b:a9:25:68:f8: - 3c:2f:73:38:cf:07:af:b5:ef:82:5a:5f:34:0c:d9:0a:56:ad: - 30:c4:8a:2a:90:5c:92:e6:01:f5:49:4e:58:a0:13:0c:81:46: - ef:01:bc:8f:48:15:49:da:5d:20:28:a7:2a:b9:2b:85:9c:f8: - c4:5e:76:6f:ff:67:c0:2a:ee:96:91:2e:8d:b3:be:6b:66:51: - 0e:d5:7f:c9:21:c0:af:79:cc:07:0a:cc:dc:85:00:85:cf:74: - 9e:6f:2f:31 ------BEGIN CERTIFICATE----- -MIIDajCCAlKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtiuScp/S -WZU/Fv3r0zc+Tfq/BTrji7UykEKc12nFMOYP0237k8AOMPKfQo2DF2LgrEHEKylP -5sdkJ6jKwEYWULrh3jrtSx5JhM8WLF2EDI4NQsDSAeOUKnnX2temUXX+o+UalfU4 -o1v4XIqpkPH5g0oTJWG8M/sZaXHBwaZFSr1/P6aSQ/7biKIVqUHPnWKbtPxxj0++ -XUpIinreVxGCREmmXCWgjAvw7HRRdq70XBTG0JC5k2ST+ASCmSiY+sii6JggLX3N -2ZnvdOt6YwZMeoYe6EuP0I2r2TqOvOzyKg3hX4lUD++4KP/V9u+nFJRSckhQKYVb -2f0eFFnIad+JRwIDAQABo4HIMIHFMB0GA1UdDgQWBBSfa5PRRmEHgFUKQMj+qNjd -jrHv3TAfBgNVHSMEGDAWgBTYAZlMKElLf/swCpKokG+LnEUFfzA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEBAH82 -2nz1Sjs3U4K0mJkL18BzuQWJdfqX5Mydc2EYrfK9Vz9r0EWiRSonaBPxo4AVhRNS -S8aPEni6IVH7nRyIXVz1C+Vm77RyZxbLPXmDVpuQUJH+8gz5NojdFO+30h6jVNNn -nz68e4xFvhLAqSHPt+rpnuzoeQKgSD6oufxinaOrdLYil6t4f2COZ5YC/xNtZrnf -pFXH5IKp9w0w1OlrqSVo+DwvczjPB6+174JaXzQM2QpWrTDEiiqQXJLmAfVJTlig -EwyBRu8BvI9IFUnaXSAopyq5K4Wc+MRedm//Z8Aq7paRLo2zvmtmUQ7Vf8khwK95 -zAcKzNyFAIXPdJ5vLzE= ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:a6:91:a5:68:ad:ba:89:8f:b6:5c:19:a1:3d:10: - ad:55:97:10:17:06:9a:7d:59:e7:7c:56:3d:1d:5f: - 17:c7:a2:e5:e7:80:52:a8:cd:ef:ca:82:4a:77:e4: - ac:77:7c:35:f1:1b:b3:7a:9a:58:78:9e:1c:00:c9: - 67:9d:4d:d0:f4:92:f1:0a:82:8a:f0:d4:57:04:04: - cc:12:e4:86:95:93:12:a7:9b:ee:6f:d2:85:5d:63: - 3c:5c:94:91:db:d0:3c:f1:a8:ca:05:19:22:98:e0: - ef:29:22:35:40:3c:7c:c4:74:5c:df:24:2b:e4:b8: - bc:23:ba:db:aa:6b:ef:ba:bb:aa:c2:ab:ce:9f:07: - 2e:36:da:21:67:4d:80:71:ba:4a:7b:62:16:08:51: - 29:35:dd:c8:1d:8c:60:d8:8c:05:a2:ec:f0:5e:af: - f4:f2:e8:95:03:c1:79:77:3e:ff:f4:31:ed:ab:cc: - 1b:dd:7e:f6:2c:71:3a:1c:e3:ab:ab:a4:ab:79:12: - 59:a5:f6:84:00:83:ff:8c:e5:3b:a0:4f:37:2a:b1: - c4:a5:19:69:46:2c:87:bc:a5:0e:ee:31:13:2e:0e: - ed:d2:e2:19:be:d0:14:b3:68:b5:34:c6:3f:6e:95: - da:eb:2c:55:30:92:3d:f8:93:df:4e:ec:85:a7:b3: - 06:71 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - D8:01:99:4C:28:49:4B:7F:FB:30:0A:92:A8:90:6F:8B:9C:45:05:7F - X509v3 Authority Key Identifier: - keyid:D8:01:99:4C:28:49:4B:7F:FB:30:0A:92:A8:90:6F:8B:9C:45:05:7F - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 38:6a:c5:72:2a:2b:2b:2c:d4:6f:07:a5:14:46:10:e5:3b:68: - 80:3c:d9:60:ef:12:ed:e6:1a:c0:76:4a:3d:9c:e1:86:71:b5: - 15:de:eb:47:51:d6:85:3e:14:ef:18:e6:b0:3c:ac:6b:0b:48: - 42:0f:76:3d:59:89:84:63:61:fe:6a:a0:47:0a:75:1a:64:92: - e3:09:14:12:d9:af:36:ec:f4:c5:79:37:22:cd:88:b8:f8:3c: - 55:0a:28:2e:21:26:45:cf:95:41:e4:6c:5a:ad:23:0a:cc:fd: - 83:71:76:7d:63:e2:9f:6c:f2:07:ee:6e:e3:fd:dd:87:f0:23: - 9c:04:5e:19:b2:67:38:00:91:ea:05:4c:3c:db:cd:19:d3:f6: - 7c:fd:fa:1d:86:fc:49:fe:45:ac:99:28:b1:a6:e7:fb:90:a2: - 98:59:a7:12:bc:26:ce:6d:b5:0f:62:19:40:a4:67:45:06:ec: - 18:1e:c5:83:e4:a1:fb:e6:58:3c:6c:a3:12:29:46:22:0d:8a: - 07:75:72:ab:6a:a9:c3:1c:0c:d3:a3:0b:fd:50:af:37:89:0b: - f6:70:57:1c:fb:d6:e7:0f:e6:52:5e:f6:1f:02:1c:73:bb:2b: - eb:21:1e:f0:aa:fe:b1:50:c0:12:fc:76:8c:d0:94:0a:ab:3b: - a8:0a:6c:28 ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKaRpWituomPtlwZoT0Q -rVWXEBcGmn1Z53xWPR1fF8ei5eeAUqjN78qCSnfkrHd8NfEbs3qaWHieHADJZ51N -0PSS8QqCivDUVwQEzBLkhpWTEqeb7m/ShV1jPFyUkdvQPPGoygUZIpjg7ykiNUA8 -fMR0XN8kK+S4vCO626pr77q7qsKrzp8HLjbaIWdNgHG6SntiFghRKTXdyB2MYNiM -BaLs8F6v9PLolQPBeXc+//Qx7avMG91+9ixxOhzjq6ukq3kSWaX2hACD/4zlO6BP -NyqxxKUZaUYsh7ylDu4xEy4O7dLiGb7QFLNotTTGP26V2ussVTCSPfiT307shaez -BnECAwEAAaOByzCByDAdBgNVHQ4EFgQU2AGZTChJS3/7MAqSqJBvi5xFBX8wHwYD -VR0jBBgwFoAU2AGZTChJS3/7MAqSqJBvi5xFBX8wNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA4asVyKisr -LNRvB6UURhDlO2iAPNlg7xLt5hrAdko9nOGGcbUV3utHUdaFPhTvGOawPKxrC0hC -D3Y9WYmEY2H+aqBHCnUaZJLjCRQS2a827PTFeTcizYi4+DxVCiguISZFz5VB5Gxa -rSMKzP2DcXZ9Y+KfbPIH7m7j/d2H8COcBF4Zsmc4AJHqBUw8280Z0/Z8/fodhvxJ -/kWsmSixpuf7kKKYWacSvCbObbUPYhlApGdFBuwYHsWD5KH75lg8bKMSKUYiDYoH -dXKraqnDHAzTowv9UK83iQv2cFcc+9bnD+ZSXvYfAhxzuyvrIR7wqv6xUMAS/HaM -0JQKqzuoCmwo ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -RkFJTA== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediary-basic-constraints-not-critical.pem b/net/data/verify_certificate_chain_unittest/intermediary-basic-constraints-not-critical.pem deleted file mode 100644 index 3ff3682..0000000 --- a/net/data/verify_certificate_chain_unittest/intermediary-basic-constraints-not-critical.pem +++ /dev/null
@@ -1,282 +0,0 @@ -[Created by: generate-intermediary-basic-constraints-not-critical.py] - -Certificate chain with 1 intermediary and a trusted root. The intermediary -has a basic constraints extension but does not mark it as critical. -Verification is expected to succeed, since although not critical, the -basicConstraints indicates CA=true as expected. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:d2:25:d5:a0:7a:94:e6:21:0b:8b:e5:68:21:06: - c4:a7:fe:fd:de:97:31:a6:80:a2:3d:be:f0:03:c2: - de:d5:a1:a6:3f:6e:19:3b:fe:f4:66:8f:8f:c8:d3: - e4:7f:73:fc:e7:1c:2f:b4:9f:5e:bf:25:71:2d:d0: - 65:60:76:0d:a6:be:af:1a:1f:3c:00:bf:cd:8e:de: - 04:6f:6c:8d:25:c5:7a:64:71:31:d7:4a:e9:bd:5f: - fa:e6:b8:e8:55:a2:c7:2b:b4:7d:4e:e3:bc:23:c9: - 0f:79:29:86:dd:4d:b3:dd:12:c5:1a:d3:fc:4a:31: - 54:47:7b:62:20:f5:bb:7c:47:6d:7f:67:d5:69:4b: - f8:99:4f:dd:13:56:a4:9d:0a:fc:d0:da:b5:bd:e0: - 0c:c8:50:d6:e1:73:d8:59:37:95:99:70:31:3d:46: - 44:d5:68:7b:45:4b:9e:4a:fd:25:33:05:7c:24:05: - 0f:6c:00:4b:3e:0c:cf:56:e8:88:ef:67:bc:bd:66: - b4:7c:bc:db:c6:4e:8b:44:0b:65:8f:c6:a9:57:d7: - b0:8e:88:19:fc:d6:b7:02:b9:50:a0:e2:06:61:1d: - d1:03:7a:ce:75:09:d2:64:d5:c6:61:3b:f1:28:5b: - 4b:de:08:2f:b9:96:55:d9:4c:8c:48:d0:c6:2b:ee: - 59:33 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - F9:45:14:0B:10:A3:AC:77:3B:19:DE:FB:66:FE:CF:E3:9A:F4:57:1A - X509v3 Authority Key Identifier: - keyid:73:DC:40:FE:F8:8F:F4:BD:DE:B0:63:30:AF:05:0B:6C:4E:99:54:7F - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 41:3c:ca:d6:88:67:86:f8:dc:35:ab:37:d0:40:96:7b:4e:70: - 2a:6b:cc:15:31:fd:06:87:ac:81:6d:89:ce:66:b2:26:73:bc: - 71:3e:af:be:b2:ba:d5:bc:a5:b7:64:0c:7d:31:9b:0c:e1:0c: - 73:14:0c:e0:fe:95:d3:ca:1d:d1:51:8a:fb:b1:e1:8d:68:58: - 30:51:a6:2f:86:57:61:a6:20:7c:1f:0c:7f:14:c7:fe:fa:88: - 14:7b:d9:41:5c:20:da:16:3c:ce:77:b8:ee:7c:33:d8:cf:2e: - 6e:e3:43:01:00:0a:c0:1c:a0:eb:6b:36:a0:d6:bd:6e:91:a9: - e1:8d:8d:b2:4e:12:d3:fa:56:84:be:eb:65:d8:9d:e2:c7:d4: - 36:a2:7e:b8:b2:d4:5c:2f:c2:47:1e:ca:7a:fd:b4:30:3a:59: - 19:8d:ca:7e:44:65:86:97:2d:f4:65:3b:f0:12:4b:d0:74:48: - f9:dd:d3:d3:89:97:83:c6:4c:bb:da:e7:ce:e7:5e:93:f3:51: - 4c:22:95:31:59:a9:3d:82:ec:8d:4c:8e:44:42:5f:13:d0:56: - c2:35:e1:07:11:6d:23:92:3c:de:b1:3e:1c:4e:0e:e3:c6:06: - 09:e1:dc:b8:4c:89:82:35:3c:51:60:1f:06:65:11:39:8b:b4: - 20:04:f0:90 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSJdWg -epTmIQuL5WghBsSn/v3elzGmgKI9vvADwt7VoaY/bhk7/vRmj4/I0+R/c/znHC+0 -n16/JXEt0GVgdg2mvq8aHzwAv82O3gRvbI0lxXpkcTHXSum9X/rmuOhVoscrtH1O -47wjyQ95KYbdTbPdEsUa0/xKMVRHe2Ig9bt8R21/Z9VpS/iZT90TVqSdCvzQ2rW9 -4AzIUNbhc9hZN5WZcDE9RkTVaHtFS55K/SUzBXwkBQ9sAEs+DM9W6IjvZ7y9ZrR8 -vNvGTotEC2WPxqlX17COiBn81rcCuVCg4gZhHdEDes51CdJk1cZhO/EoW0veCC+5 -llXZTIxI0MYr7lkzAgMBAAGjgekwgeYwHQYDVR0OBBYEFPlFFAsQo6x3Oxne+2b+ -z+Oa9FcaMB8GA1UdIwQYMBaAFHPcQP74j/S93rBjMK8FC2xOmVR/MD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAQTzK1ohnhvjcNas30ECW -e05wKmvMFTH9BoesgW2JzmayJnO8cT6vvrK61bylt2QMfTGbDOEMcxQM4P6V08od -0VGK+7HhjWhYMFGmL4ZXYaYgfB8MfxTH/vqIFHvZQVwg2hY8zne47nwz2M8ubuND -AQAKwByg62s2oNa9bpGp4Y2Nsk4S0/pWhL7rZdid4sfUNqJ+uLLUXC/CRx7Kev20 -MDpZGY3KfkRlhpct9GU78BJL0HRI+d3T04mXg8ZMu9rnzudek/NRTCKVMVmpPYLs -jUyOREJfE9BWwjXhBxFtI5I83rE+HE4O48YGCeHcuEyJgjU8UWAfBmUROYu0IATw -kA== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:d5:4a:96:98:34:e1:a8:92:88:9a:0c:d0:b7:e3: - a0:dc:71:4b:32:cd:59:a1:b9:9c:d5:e5:30:1b:ad: - 7e:41:7f:e7:39:81:25:d1:e7:66:c2:5f:79:80:ea: - ff:6b:ef:b9:95:9e:8b:a0:0c:6a:b6:c8:4b:50:2c: - 7d:f1:ad:46:ed:9a:7c:7d:6a:65:70:de:c2:45:7e: - 1b:28:af:dc:eb:3d:bb:4c:98:a9:8c:b3:a3:35:a1: - 2b:cd:bb:8e:2a:2b:74:6d:0c:91:72:36:c2:2f:0e: - 46:2a:77:34:ab:98:f8:28:c9:02:42:78:2f:b2:e0: - 9a:0d:ae:03:94:c0:31:79:1e:72:ce:8b:7c:21:c8: - d5:1c:9b:94:04:29:ce:1c:5f:22:e3:f0:20:62:2b: - 7d:7d:c2:fa:29:5c:8b:2a:dd:0f:08:31:49:58:7d: - 85:76:21:b4:46:0e:d8:26:dc:26:f9:0a:9b:58:a2: - b8:29:b4:df:c0:4e:10:56:28:96:02:54:7c:e9:a3: - 3f:84:12:6a:89:ed:f0:0d:a0:03:54:0c:b2:33:6d: - 1b:a7:84:f2:a0:b0:57:5e:4b:c1:2f:6d:e9:22:52: - 50:b1:3b:a7:7d:ee:a7:dc:6e:6a:bd:b6:a6:ea:66: - f8:1f:30:60:18:d8:5b:a6:dd:9d:9b:d3:4e:2b:0a: - c4:0b - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 73:DC:40:FE:F8:8F:F4:BD:DE:B0:63:30:AF:05:0B:6C:4E:99:54:7F - X509v3 Authority Key Identifier: - keyid:6C:05:B0:A0:A8:03:A4:A1:90:D1:A5:74:D2:13:D9:2E:57:83:36:73 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 81:08:b8:48:94:05:02:aa:61:ea:32:48:55:02:31:f6:e0:5d: - 05:6f:32:9b:6a:a0:3b:6f:0e:1d:2a:01:1a:14:20:a2:1e:23: - b4:70:61:86:55:b5:4c:5b:61:3f:dd:1e:38:a4:98:3f:bd:61: - e4:1e:56:54:ed:0e:51:65:6c:73:af:99:86:fc:a7:50:48:87: - 95:6f:5a:93:0d:c9:7a:ff:fb:39:d1:f4:40:2c:fe:1f:28:aa: - 85:cf:12:bd:7b:df:2b:12:56:4a:91:4e:e4:80:00:52:4c:bb: - b2:e6:05:27:47:e2:3f:bb:a4:d7:cc:92:c2:27:02:10:50:10: - 0c:f8:ee:4c:93:90:89:8d:db:8a:f9:05:f1:ec:d7:cf:67:20: - a4:da:90:e0:38:34:fd:79:9b:6b:04:a8:bd:6f:e8:82:4a:d9: - 37:49:b3:10:50:e6:c5:56:d9:ac:9b:e8:97:52:41:a1:66:be: - cb:64:1d:12:0d:86:8b:34:42:26:9a:ad:c3:8a:14:ff:35:0d: - 82:8f:96:e0:af:b7:e7:20:30:3e:b3:fe:57:4a:80:5e:53:8b: - ec:15:ca:a8:db:b7:c6:87:b7:ab:81:8b:42:23:4a:74:9c:9e: - 59:b8:3c:8d:0e:d2:f3:9d:79:45:9a:0e:fd:8c:6b:9e:b5:c8: - e7:03:64:79 ------BEGIN CERTIFICATE----- -MIIDajCCAlKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1UqWmDTh -qJKImgzQt+Og3HFLMs1Zobmc1eUwG61+QX/nOYEl0edmwl95gOr/a++5lZ6LoAxq -tshLUCx98a1G7Zp8fWplcN7CRX4bKK/c6z27TJipjLOjNaErzbuOKit0bQyRcjbC -Lw5GKnc0q5j4KMkCQngvsuCaDa4DlMAxeR5yzot8IcjVHJuUBCnOHF8i4/AgYit9 -fcL6KVyLKt0PCDFJWH2FdiG0Rg7YJtwm+QqbWKK4KbTfwE4QViiWAlR86aM/hBJq -ie3wDaADVAyyM20bp4TyoLBXXkvBL23pIlJQsTunfe6n3G5qvbam6mb4HzBgGNhb -pt2dm9NOKwrECwIDAQABo4HIMIHFMB0GA1UdDgQWBBRz3ED++I/0vd6wYzCvBQts -TplUfzAfBgNVHSMEGDAWgBRsBbCgqAOkoZDRpXTSE9kuV4M2czA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAIEI -uEiUBQKqYeoySFUCMfbgXQVvMptqoDtvDh0qARoUIKIeI7RwYYZVtUxbYT/dHjik -mD+9YeQeVlTtDlFlbHOvmYb8p1BIh5VvWpMNyXr/+znR9EAs/h8oqoXPEr173ysS -VkqRTuSAAFJMu7LmBSdH4j+7pNfMksInAhBQEAz47kyTkImN24r5BfHs189nIKTa -kOA4NP15m2sEqL1v6IJK2TdJsxBQ5sVW2ayb6JdSQaFmvstkHRINhos0QiaarcOK -FP81DYKPluCvt+cgMD6z/ldKgF5Ti+wVyqjbt8aHt6uBi0IjSnScnlm4PI0O0vOd -eUWaDv2Ma561yOcDZHk= ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:b6:f1:d2:f8:c9:10:d5:cf:0c:55:ce:8c:38:a2: - 8f:f5:f1:cf:20:85:56:92:df:42:8c:5c:1a:db:8e: - 1d:2e:b4:b3:95:72:e4:67:76:7c:c5:61:62:2b:cf: - 97:f7:84:29:80:ff:df:e8:e7:da:f6:05:11:1d:40: - 1e:73:76:ff:e4:eb:fa:45:59:20:d9:35:cb:c7:4f: - 2b:49:2a:61:7c:45:a1:fe:da:8c:89:05:38:84:ab: - cb:0b:c9:36:3b:e5:3e:31:5e:0b:a6:27:63:b1:c2: - 34:88:3a:e5:e3:43:93:0b:46:69:03:dd:31:16:65: - 18:6e:64:4c:84:e4:a1:37:6b:15:ef:f3:8f:57:e8: - 57:f6:a8:86:62:9b:92:d0:67:d3:ed:0f:89:d3:4e: - 09:aa:e8:74:ab:ce:4b:51:63:52:55:f1:24:9d:42: - 70:cb:14:0f:e3:b4:7f:ba:6a:3c:87:27:eb:3b:82: - 64:99:6a:f9:be:20:5a:9e:b9:8a:8b:ab:94:ed:f3: - 33:eb:ea:42:5c:7e:20:df:f4:9d:82:8f:ac:8e:52: - 99:06:db:d0:9f:01:38:e7:b9:0c:d2:b4:ca:7f:74: - 03:e2:f7:0b:0e:a9:40:14:6c:7f:1b:15:00:77:0a: - 98:76:ee:bd:62:24:f6:a7:8b:d4:7e:4b:8d:c9:eb: - 04:a7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 6C:05:B0:A0:A8:03:A4:A1:90:D1:A5:74:D2:13:D9:2E:57:83:36:73 - X509v3 Authority Key Identifier: - keyid:6C:05:B0:A0:A8:03:A4:A1:90:D1:A5:74:D2:13:D9:2E:57:83:36:73 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 52:82:fe:3f:2b:71:41:fd:4c:9b:db:c5:b1:60:72:a7:cf:f4: - 29:91:36:0f:ce:92:72:95:3e:34:ab:84:0c:af:23:e8:e1:28: - 35:29:c9:c8:78:9a:12:d7:f1:22:1c:21:e1:b0:b4:df:af:36: - c4:ca:71:2a:6e:6f:4a:d5:65:58:31:7a:c2:d1:30:66:e0:0a: - 61:54:e0:61:97:7b:41:72:58:d9:02:da:22:8b:21:e6:d5:31: - 4c:d2:3c:11:d8:0d:12:f0:dc:eb:e0:1d:16:3a:74:de:9c:b4: - b2:bb:69:ed:e1:53:14:9e:1c:06:3f:ff:e7:2f:8a:d1:f6:37: - 89:76:b2:61:60:5f:48:ce:a3:8f:e0:b5:6f:92:18:21:e4:a8: - 1f:12:70:86:54:2a:da:78:3d:5d:3c:13:b8:b4:7f:a5:81:f0: - 55:cf:ea:56:b4:0a:8a:ca:2b:ca:be:08:9e:a6:4c:12:99:5f: - 23:93:08:58:70:8f:c8:fb:88:11:fe:d6:16:c7:a3:3b:1f:6b: - 78:b0:05:29:9f:7d:4c:01:ba:ed:8a:5f:a8:38:e9:a4:c2:44: - ce:e8:37:1d:d8:1f:16:e4:ef:84:bb:1f:4b:3a:b0:9a:00:57: - aa:ba:52:1c:f4:da:f7:69:5d:ef:8d:35:ef:5c:03:fa:8d:87: - fc:92:60:28 ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALbx0vjJENXPDFXOjDii -j/XxzyCFVpLfQoxcGtuOHS60s5Vy5Gd2fMVhYivPl/eEKYD/3+jn2vYFER1AHnN2 -/+Tr+kVZINk1y8dPK0kqYXxFof7ajIkFOISrywvJNjvlPjFeC6YnY7HCNIg65eND -kwtGaQPdMRZlGG5kTITkoTdrFe/zj1foV/aohmKbktBn0+0PidNOCarodKvOS1Fj -UlXxJJ1CcMsUD+O0f7pqPIcn6zuCZJlq+b4gWp65iourlO3zM+vqQlx+IN/0nYKP -rI5SmQbb0J8BOOe5DNK0yn90A+L3Cw6pQBRsfxsVAHcKmHbuvWIk9qeL1H5Ljcnr -BKcCAwEAAaOByzCByDAdBgNVHQ4EFgQUbAWwoKgDpKGQ0aV00hPZLleDNnMwHwYD -VR0jBBgwFoAUbAWwoKgDpKGQ0aV00hPZLleDNnMwNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBSgv4/K3FB -/Uyb28WxYHKnz/QpkTYPzpJylT40q4QMryPo4Sg1KcnIeJoS1/EiHCHhsLTfrzbE -ynEqbm9K1WVYMXrC0TBm4AphVOBhl3tBcljZAtoiiyHm1TFM0jwR2A0S8Nzr4B0W -OnTenLSyu2nt4VMUnhwGP//nL4rR9jeJdrJhYF9IzqOP4LVvkhgh5KgfEnCGVCra -eD1dPBO4tH+lgfBVz+pWtAqKyivKvgiepkwSmV8jkwhYcI/I+4gR/tYWx6M7H2t4 -sAUpn31MAbrtil+oOOmkwkTO6Dcd2B8W5O+Eux9LOrCaAFequlIc9Nr3aV3vjTXv -XAP6jYf8kmAo ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -U1VDQ0VTUw== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediary-lacks-basic-constraints.pem b/net/data/verify_certificate_chain_unittest/intermediary-lacks-basic-constraints.pem deleted file mode 100644 index 016f94e..0000000 --- a/net/data/verify_certificate_chain_unittest/intermediary-lacks-basic-constraints.pem +++ /dev/null
@@ -1,278 +0,0 @@ -[Created by: generate-intermediary-lacks-basic-constraints.py] - -Certificate chain with 1 intermediary and a trusted root. The intermediary -lacks the basic constraints extension, and hence is expected to fail validation -(RFC 5280 requires v3 signing certificates have a BasicConstaints). - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:f3:d6:19:96:48:0c:01:e2:21:3d:98:21:52:df: - 5a:79:95:01:e5:c2:ab:77:e4:7b:10:17:64:75:a4: - ca:b6:69:cc:a9:4a:1d:b6:7f:a0:16:89:32:21:c2: - 2a:c2:58:28:d2:f3:ef:a5:2d:81:92:47:17:d5:61: - 65:ab:43:22:ce:59:5b:20:31:be:6e:84:23:19:d5: - 7e:a8:70:50:6c:de:06:b8:58:09:97:fd:02:98:31: - 2d:3b:ab:1b:4a:82:6c:28:ab:c5:a3:6b:ea:40:2b: - 48:02:73:e4:ce:ea:f6:3b:6a:80:1f:5b:59:30:86: - 1b:5e:64:61:b5:94:d2:f0:c8:bb:88:b1:90:05:1a: - e8:e6:97:dc:7d:e8:53:c8:9f:88:09:69:82:1f:1e: - e2:d1:70:f3:85:06:63:18:0a:d2:f1:71:a3:25:a3: - 42:76:3a:5e:02:78:e6:7a:c6:a4:82:dd:79:35:5a: - da:8e:37:92:82:bf:01:13:1b:6e:52:97:97:32:f1: - b2:4e:95:bc:55:89:61:61:73:b4:64:30:b1:89:87: - 51:17:29:f3:67:de:5b:99:ee:47:71:07:8c:d5:17: - 55:e0:70:bc:b6:06:6e:eb:7a:c6:69:69:97:e1:3d: - 1d:be:93:da:a0:fa:cb:2f:f0:ed:5c:da:18:0e:67: - 89:8d - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - FD:C8:4E:91:CD:73:65:1D:13:F9:EC:F0:91:13:F1:D0:01:AD:1E:7C - X509v3 Authority Key Identifier: - keyid:60:E7:1E:8E:53:95:1F:8F:00:D1:F7:9F:36:01:26:15:86:53:0E:F2 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 88:1d:e7:e6:1e:4b:93:a9:79:59:0e:10:43:1e:f7:79:a4:c7: - 68:55:81:b6:b4:6d:b0:5b:b6:46:13:8b:4e:1c:d4:79:17:b1: - 71:46:b6:69:21:92:fa:bf:bd:76:cc:6c:b1:04:58:28:41:79: - 34:4f:09:e7:17:5c:d0:ac:fc:c5:2e:1e:5c:31:ca:ed:55:ea: - df:4a:43:9a:72:37:0a:8a:69:dd:4e:e9:a3:ef:dd:48:45:41: - 7b:55:e3:d1:98:69:a5:ec:0b:43:32:24:da:33:cd:fd:35:74: - 17:81:b1:61:37:b1:12:5d:51:86:e6:a2:08:e5:c7:99:aa:f7: - 23:c4:5f:83:c0:59:9c:36:f9:a0:4c:03:f7:40:42:fb:90:39: - 5a:45:e5:e2:94:a3:58:c2:a1:d8:c9:aa:3e:83:98:b0:32:a1: - 85:9a:b1:34:c7:67:a4:03:67:6e:5b:d7:83:b8:92:0f:af:81: - b5:00:50:c4:0f:f6:bb:cd:7d:0f:a8:cd:28:bb:48:b8:32:82: - ef:d1:cf:96:74:e4:25:74:ce:5e:4c:75:d2:80:55:a3:6b:a6: - 76:eb:aa:3e:2b:55:d3:c9:bd:2b:32:d3:1d:01:00:cb:8d:c4: - c0:b9:29:0b:10:e5:ab:34:2f:30:63:29:df:a8:4f:b3:28:dd: - 0b:8c:ea:14 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDz1hmW -SAwB4iE9mCFS31p5lQHlwqt35HsQF2R1pMq2acypSh22f6AWiTIhwirCWCjS8++l -LYGSRxfVYWWrQyLOWVsgMb5uhCMZ1X6ocFBs3ga4WAmX/QKYMS07qxtKgmwoq8Wj -a+pAK0gCc+TO6vY7aoAfW1kwhhteZGG1lNLwyLuIsZAFGujml9x96FPIn4gJaYIf -HuLRcPOFBmMYCtLxcaMlo0J2Ol4CeOZ6xqSC3Xk1WtqON5KCvwETG25Sl5cy8bJO -lbxViWFhc7RkMLGJh1EXKfNn3luZ7kdxB4zVF1XgcLy2Bm7resZpaZfhPR2+k9qg -+ssv8O1c2hgOZ4mNAgMBAAGjgekwgeYwHQYDVR0OBBYEFP3ITpHNc2UdE/ns8JET -8dABrR58MB8GA1UdIwQYMBaAFGDnHo5TlR+PANH3nzYBJhWGUw7yMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAiB3n5h5Lk6l5WQ4QQx73 -eaTHaFWBtrRtsFu2RhOLThzUeRexcUa2aSGS+r+9dsxssQRYKEF5NE8J5xdc0Kz8 -xS4eXDHK7VXq30pDmnI3Copp3U7po+/dSEVBe1Xj0ZhppewLQzIk2jPN/TV0F4Gx -YTexEl1RhuaiCOXHmar3I8Rfg8BZnDb5oEwD90BC+5A5WkXl4pSjWMKh2MmqPoOY -sDKhhZqxNMdnpANnblvXg7iSD6+BtQBQxA/2u819D6jNKLtIuDKC79HPlnTkJXTO -Xkx10oBVo2umduuqPitV08m9KzLTHQEAy43EwLkpCxDlqzQvMGMp36hPsyjdC4zq -FA== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:a0:8f:6c:dd:c5:0d:76:a9:8a:da:5d:9f:94:cf: - 9a:18:cd:32:ee:e1:c3:88:29:0d:40:7d:8b:37:9c: - 18:b9:ed:11:81:5b:cc:8c:7c:4a:f3:e2:b9:eb:f7: - 3c:74:5a:5c:78:37:e3:7e:a8:b9:34:d7:da:d2:dc: - 52:de:c6:bb:ca:cd:39:c3:ea:8e:84:1b:e5:ad:4b: - 67:1b:70:bd:70:0e:5e:20:95:37:bf:ae:d1:f4:b0: - 97:c0:8a:d3:e5:2a:04:d8:eb:1d:c8:f0:95:1b:25: - d4:49:ae:d4:5f:d9:bc:ea:19:2d:38:d3:d2:c4:8b: - 77:37:45:ae:f9:70:b2:43:93:85:06:58:e0:3e:38: - 11:32:d2:bc:a5:d4:df:09:2d:e9:c4:16:a7:f9:5b: - 25:8d:57:f7:bf:01:4e:c8:25:b4:f8:5d:33:1d:7a: - 04:4b:9d:fe:71:d4:65:78:4b:8d:52:ef:04:80:d4: - 45:18:1d:d8:53:8e:2a:e8:23:3f:14:a4:b4:f1:00: - ff:30:be:06:c5:61:ac:13:e8:cb:4c:ef:77:f7:6b: - 1d:da:5a:d4:7f:f8:5a:87:cb:4b:45:05:8c:06:73: - 7b:65:d5:71:c9:35:c7:6e:07:ce:0b:e2:54:e1:43: - f0:da:a9:51:b8:ad:fe:da:de:29:8c:5f:2d:40:06: - 7f:39 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 60:E7:1E:8E:53:95:1F:8F:00:D1:F7:9F:36:01:26:15:86:53:0E:F2 - X509v3 Authority Key Identifier: - keyid:73:D9:03:F6:54:EA:FC:42:DA:77:EC:19:89:AD:6D:D2:A3:3E:E9:FD - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - Signature Algorithm: sha256WithRSAEncryption - 43:31:7d:91:39:1d:8a:88:6c:d2:2d:36:b1:92:53:1d:18:24: - e9:42:27:c3:d3:f1:77:69:6f:67:7b:39:46:32:fb:36:a1:8d: - 07:ee:16:6b:ac:09:e3:78:38:7a:a7:4b:fe:3f:81:eb:f2:85: - aa:d6:3e:5a:68:57:e3:98:0d:ae:ee:45:84:d1:ed:6d:9c:78: - fe:63:50:94:55:5e:b5:41:ef:c9:16:ed:4f:38:03:cb:73:3c: - 79:c1:c4:0c:c1:95:43:11:49:c0:bc:7e:9a:6a:05:d2:43:c4: - 66:72:66:57:69:46:ed:a7:10:af:bf:e9:bb:48:72:4b:00:a2: - 46:78:38:68:dd:6b:a9:ac:62:70:4b:0b:f3:29:fa:a7:a2:42: - 4b:d7:88:1f:97:1f:71:60:20:82:89:d6:3a:60:d5:4b:08:28: - 6a:6a:97:2e:c9:93:d8:a7:32:b7:e1:68:be:07:7a:3c:76:3b: - 2c:1b:10:17:4c:c9:ea:ee:48:c9:ad:ac:2e:61:dd:16:eb:62: - 1e:33:1d:6c:8a:b4:56:0f:3d:04:35:f3:8f:d0:12:f9:66:8d: - 39:95:e9:44:41:32:7e:f3:17:2e:58:c9:0c:23:b1:e3:db:f7: - ed:da:bd:94:0e:00:27:34:3d:3d:c6:48:d8:e4:a3:66:57:d9: - 5e:13:3e:59 ------BEGIN CERTIFICATE----- -MIIDXDCCAkSgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoI9s3cUN -dqmK2l2flM+aGM0y7uHDiCkNQH2LN5wYue0RgVvMjHxK8+K56/c8dFpceDfjfqi5 -NNfa0txS3sa7ys05w+qOhBvlrUtnG3C9cA5eIJU3v67R9LCXwIrT5SoE2OsdyPCV -GyXUSa7UX9m86hktONPSxIt3N0Wu+XCyQ5OFBljgPjgRMtK8pdTfCS3pxBan+Vsl -jVf3vwFOyCW0+F0zHXoES53+cdRleEuNUu8EgNRFGB3YU44q6CM/FKS08QD/ML4G -xWGsE+jLTO9392sd2lrUf/hah8tLRQWMBnN7ZdVxyTXHbgfOC+JU4UPw2qlRuK3+ -2t4pjF8tQAZ/OQIDAQABo4G6MIG3MB0GA1UdDgQWBBRg5x6OU5UfjwDR9582ASYV -hlMO8jAfBgNVHSMEGDAWgBRz2QP2VOr8Qtp37BmJrW3Soz7p/TA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4IBAQBDMX2ROR2KiGzSLTaxklMd -GCTpQifD0/F3aW9nezlGMvs2oY0H7hZrrAnjeDh6p0v+P4Hr8oWq1j5aaFfjmA2u -7kWE0e1tnHj+Y1CUVV61Qe/JFu1POAPLczx5wcQMwZVDEUnAvH6aagXSQ8RmcmZX -aUbtpxCvv+m7SHJLAKJGeDho3WuprGJwSwvzKfqnokJL14gflx9xYCCCidY6YNVL -CChqapcuyZPYpzK34Wi+B3o8djssGxAXTMnq7kjJrawuYd0W62IeMx1sirRWDz0E -NfOP0BL5Zo05lelEQTJ+8xcuWMkMI7Hj2/ft2r2UDgAnND09xkjY5KNmV9leEz5Z ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:ea:c6:b8:66:62:c2:1a:2a:7d:83:ca:b2:7b:11: - e4:92:4a:b8:3a:39:35:73:aa:89:55:7d:f4:ec:40: - 4b:2c:c7:56:58:ac:9d:25:ef:c3:26:86:98:c4:74: - a4:3a:94:36:d8:78:7c:1a:f4:f7:5c:a0:56:69:fc: - 23:c0:a4:06:5f:5b:ce:ea:cb:32:9b:c3:21:89:fd: - 9f:4e:38:a2:b9:f4:de:af:44:1e:53:02:09:41:44: - 92:bc:a5:4f:70:86:23:85:48:2a:51:01:70:ab:b0: - c4:bd:97:3c:2f:d0:2c:3e:9c:be:40:2e:ee:be:f8: - ed:63:a2:1b:fd:e2:0f:d1:b2:3b:b3:ce:da:84:59: - 56:bb:77:17:93:ef:c0:b7:b4:11:db:b9:6e:b0:4a: - 28:55:fb:56:4e:ed:22:b6:e3:4d:5b:ad:6a:af:ff: - df:33:f9:18:a6:91:0a:b8:89:d3:28:55:18:c7:71: - 19:32:bc:88:a8:ee:5b:c8:34:84:e5:f5:fe:6e:5e: - c0:3b:73:9b:a4:bc:4c:6a:8a:5a:31:c0:34:f3:c3: - 89:e0:57:97:64:01:dd:c2:9f:75:8e:e3:fd:b3:58: - b5:0b:e3:4d:8f:94:e8:9b:0c:c2:12:af:13:31:30: - d1:a6:1c:2c:f1:0a:7a:a4:17:e2:2f:6f:73:cb:22: - 15:67 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 73:D9:03:F6:54:EA:FC:42:DA:77:EC:19:89:AD:6D:D2:A3:3E:E9:FD - X509v3 Authority Key Identifier: - keyid:73:D9:03:F6:54:EA:FC:42:DA:77:EC:19:89:AD:6D:D2:A3:3E:E9:FD - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - e0:b7:24:3a:ee:4c:8d:42:9f:b9:52:2b:7d:21:c5:7b:dd:2b: - bc:6a:5d:86:57:ee:d5:1f:27:e6:e1:08:e3:72:a3:10:2b:97: - 1b:98:b9:39:18:6e:7f:b8:b0:1c:f1:f5:d9:7e:1d:05:3f:5b: - f4:cd:1e:66:7f:77:ed:ab:d0:51:b6:ad:6c:a6:66:ab:fc:31: - a1:ac:ee:66:ae:3b:af:4e:3c:c6:29:07:dc:1a:ac:b5:10:3f: - 3f:ad:27:1b:bc:32:19:ab:b3:75:62:47:23:d1:b8:60:78:ac: - 96:0c:4f:b8:31:7b:40:7e:f3:f7:ba:a9:ae:9b:65:ef:c5:e3: - fc:c8:28:c6:c0:74:48:00:33:48:a4:e6:3c:0c:5b:a0:1e:c2: - 57:c5:0c:24:34:c3:36:c0:8a:f3:a6:c3:16:24:32:c3:dc:81: - 76:54:3e:00:68:c8:6a:b6:ee:9f:ab:44:64:64:37:54:ff:1b: - b9:a5:c2:bf:ff:a5:68:b3:5a:ef:d7:bc:64:39:24:2e:ad:c7: - a3:9c:ef:60:cb:ab:de:45:f1:40:65:95:01:0c:52:ea:a8:d6: - 8b:77:e0:2e:1f:2b:4f:a3:bc:b8:80:6b:8d:92:42:66:17:10: - 4b:d4:b0:2d:8d:4c:77:50:74:83:0e:9a:4c:0d:3b:6b:3d:c6: - 0a:2e:f6:5c ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOrGuGZiwhoqfYPKsnsR -5JJKuDo5NXOqiVV99OxASyzHVlisnSXvwyaGmMR0pDqUNth4fBr091ygVmn8I8Ck -Bl9bzurLMpvDIYn9n044orn03q9EHlMCCUFEkrylT3CGI4VIKlEBcKuwxL2XPC/Q -LD6cvkAu7r747WOiG/3iD9GyO7PO2oRZVrt3F5PvwLe0Edu5brBKKFX7Vk7tIrbj -TVutaq//3zP5GKaRCriJ0yhVGMdxGTK8iKjuW8g0hOX1/m5ewDtzm6S8TGqKWjHA -NPPDieBXl2QB3cKfdY7j/bNYtQvjTY+U6JsMwhKvEzEw0aYcLPEKeqQX4i9vc8si -FWcCAwEAAaOByzCByDAdBgNVHQ4EFgQUc9kD9lTq/ELad+wZia1t0qM+6f0wHwYD -VR0jBBgwFoAUc9kD9lTq/ELad+wZia1t0qM+6f0wNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQDgtyQ67kyN -Qp+5Uit9IcV73Su8al2GV+7VHyfm4QjjcqMQK5cbmLk5GG5/uLAc8fXZfh0FP1v0 -zR5mf3ftq9BRtq1spmar/DGhrO5mrjuvTjzGKQfcGqy1ED8/rScbvDIZq7N1Ykcj -0bhgeKyWDE+4MXtAfvP3uqmum2XvxeP8yCjGwHRIADNIpOY8DFugHsJXxQwkNMM2 -wIrzpsMWJDLD3IF2VD4AaMhqtu6fq0RkZDdU/xu5pcK//6Vos1rv17xkOSQurcej -nO9gy6veRfFAZZUBDFLqqNaLd+AuHytPo7y4gGuNkkJmFxBL1LAtjUx3UHSDDppM -DTtrPcYKLvZc ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -RkFJTA== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediary-lacks-signing-key-usage.pem b/net/data/verify_certificate_chain_unittest/intermediary-lacks-signing-key-usage.pem deleted file mode 100644 index 63275452..0000000 --- a/net/data/verify_certificate_chain_unittest/intermediary-lacks-signing-key-usage.pem +++ /dev/null
@@ -1,281 +0,0 @@ -[Created by: generate-intermediary-lacks-signing-key-usage.py] - -Certificate chain with 1 intermediary and a trusted root. The intermediary -contains a keyUsage extension, HOWEVER it does not contain the keyCertSign bit. -Hence validation is expected to fail. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:b6:80:03:5a:ee:21:94:59:e3:bf:eb:26:bb:b5: - 2e:39:80:35:38:e7:7e:1d:e6:17:d2:fb:50:be:d2: - 03:33:14:ee:1f:a2:f8:78:bb:d0:60:e2:0c:ff:59: - 80:52:fb:5a:3d:38:2d:26:9e:d6:af:df:f2:ff:49: - f7:ec:8a:02:2b:51:02:d3:53:f9:6e:2b:ed:68:5e: - 90:54:03:7b:f7:0c:08:93:59:9f:41:2c:27:05:6c: - dd:dc:f8:a8:ea:78:c0:6d:a1:c8:11:cd:e8:40:cc: - 6c:65:db:16:50:20:07:68:00:c0:7f:c5:89:fe:e8: - 6a:0c:36:6a:ad:5a:ab:40:8e:4c:0e:e9:51:a0:6b: - 28:b8:df:c0:7c:3c:6c:a7:b8:8b:9e:07:1f:e5:29: - 01:5b:81:76:ca:53:80:b8:a4:8f:1a:35:66:b7:96: - 24:ac:fb:44:a1:4c:71:c6:28:6d:91:75:59:1a:bf: - e4:8e:15:71:43:3f:24:3f:b4:db:a0:2c:5e:af:46: - 16:65:7e:25:0c:90:5e:16:7b:e3:a6:47:0f:03:fe: - 31:cc:06:dc:ba:0e:0b:fa:6b:e5:4a:53:11:c4:00: - 54:d5:76:09:97:12:38:31:12:9d:27:49:e8:4d:01: - 18:0c:54:b3:c7:a8:c3:fc:60:3f:92:0b:ef:9f:72: - 8e:59 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 76:E3:64:67:6F:B9:A6:B7:6E:DC:62:12:09:FE:30:0A:19:F4:BF:B3 - X509v3 Authority Key Identifier: - keyid:5A:C6:0B:DA:37:A3:BB:21:85:17:C5:EF:0C:FA:BF:A9:79:B1:FE:29 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 92:d5:77:f8:65:61:e9:66:0d:f7:00:9b:46:28:26:52:37:9f: - 3c:15:33:01:95:61:b9:0c:a1:c3:e7:f5:09:6a:4c:ba:0f:3b: - 80:3a:65:c3:22:e7:9d:e7:4d:c3:ca:3a:bc:88:98:6c:a3:8e: - 56:4e:64:98:b7:85:a7:aa:d3:e8:9a:b3:e4:2f:7d:18:bf:74: - c7:29:d9:51:a7:39:4a:4b:e1:94:14:0b:f9:af:e9:89:26:98: - cb:b2:b7:64:d4:ab:42:f5:68:cb:40:78:72:91:02:13:fe:05: - 41:68:42:c2:e0:d5:ea:bd:56:52:6f:76:b3:20:f4:e6:39:2a: - 83:ea:7a:c9:d2:37:4a:45:c4:ad:ac:6a:24:38:6e:fd:d6:ed: - 4c:42:cf:87:2c:7d:21:e5:18:ee:3a:c0:1e:83:ac:25:70:9a: - f5:fd:e7:4e:ab:67:0e:5d:00:9f:44:e4:e5:d6:d9:02:43:05: - 91:c3:66:a6:1f:8a:ce:ae:c8:2b:4d:c6:0e:9e:5f:d7:ff:e7: - b6:39:a7:f1:19:b0:3a:59:33:6a:72:a6:03:6b:42:e7:f8:07: - a3:0d:2d:f7:31:c3:f4:e5:cf:8b:24:42:0c:29:40:5a:7d:df: - 65:81:8c:0f:cb:86:e6:2b:39:26:58:0b:18:b8:4c:87:6c:10: - 03:0b:7c:c4 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2gANa -7iGUWeO/6ya7tS45gDU4534d5hfS+1C+0gMzFO4fovh4u9Bg4gz/WYBS+1o9OC0m -ntav3/L/SffsigIrUQLTU/luK+1oXpBUA3v3DAiTWZ9BLCcFbN3c+KjqeMBtocgR -zehAzGxl2xZQIAdoAMB/xYn+6GoMNmqtWqtAjkwO6VGgayi438B8PGynuIueBx/l -KQFbgXbKU4C4pI8aNWa3liSs+0ShTHHGKG2RdVkav+SOFXFDPyQ/tNugLF6vRhZl -fiUMkF4We+OmRw8D/jHMBty6Dgv6a+VKUxHEAFTVdgmXEjgxEp0nSehNARgMVLPH -qMP8YD+SC++fco5ZAgMBAAGjgekwgeYwHQYDVR0OBBYEFHbjZGdvuaa3btxiEgn+ -MAoZ9L+zMB8GA1UdIwQYMBaAFFrGC9o3o7shhRfF7wz6v6l5sf4pMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAktV3+GVh6WYN9wCbRigm -UjefPBUzAZVhuQyhw+f1CWpMug87gDplwyLnnedNw8o6vIiYbKOOVk5kmLeFp6rT -6Jqz5C99GL90xynZUac5SkvhlBQL+a/piSaYy7K3ZNSrQvVoy0B4cpECE/4FQWhC -wuDV6r1WUm92syD05jkqg+p6ydI3SkXEraxqJDhu/dbtTELPhyx9IeUY7jrAHoOs -JXCa9f3nTqtnDl0An0Tk5dbZAkMFkcNmph+Kzq7IK03GDp5f1//ntjmn8RmwOlkz -anKmA2tC5/gHow0t9zHD9OXPiyRCDClAWn3fZYGMD8uG5is5JlgLGLhMh2wQAwt8 -xA== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:9b:71:4d:95:69:ff:1c:81:da:58:66:90:29:ae: - 15:48:a6:43:09:a2:05:75:ca:16:d1:a5:69:e0:77: - c8:c1:f4:e5:e2:4d:97:c6:09:e4:e0:98:64:c2:b7: - 7f:11:5a:ee:7a:3e:c5:d8:24:b0:b8:a2:98:ac:05: - bd:71:07:71:6a:11:67:17:55:5c:2d:d3:fe:4b:d0: - e1:f3:d5:08:de:7e:c2:56:ff:e6:95:6f:11:7f:5a: - 34:e7:0c:1c:e3:82:f6:f4:e1:ed:4e:ce:60:2f:f7: - 5d:b8:b1:54:f0:c8:aa:28:5d:56:90:24:7b:cf:a7: - 01:de:d9:63:16:a3:7b:5e:34:c9:8c:35:50:57:fc: - be:6c:48:70:83:7a:52:d9:19:f8:e8:a2:91:f3:23: - 34:f3:14:b6:3d:59:e6:86:05:9b:26:ec:14:fa:78: - d3:91:a4:af:f7:c5:01:15:c0:3c:84:b8:5f:09:62: - ab:c3:b3:51:df:14:20:47:ee:0b:5f:85:06:42:4d: - b3:5a:e0:08:14:32:d8:0a:8b:7a:41:f5:0e:34:cc: - 4a:a3:79:be:6d:b5:cd:d1:b8:e0:71:2a:81:e1:22: - bc:6c:fe:89:59:97:ee:71:ad:d7:e1:d4:ea:01:85: - 0a:ae:83:a1:09:65:3c:2e:68:29:e1:3f:b0:c2:c7: - 90:85 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 5A:C6:0B:DA:37:A3:BB:21:85:17:C5:EF:0C:FA:BF:A9:79:B1:FE:29 - X509v3 Authority Key Identifier: - keyid:D3:3B:10:26:28:99:EC:09:2A:08:9C:53:7D:24:9F:B1:F1:04:0B:B5 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 53:21:fb:72:d3:86:6c:af:f6:75:07:5c:bc:0c:7a:97:8f:05: - b8:86:af:ee:af:ca:9b:c0:89:2f:28:cd:79:a7:a3:70:04:37: - 8b:ca:4d:84:3a:72:d5:9a:2e:f9:85:64:59:5b:7f:7e:b4:bf: - 09:74:af:fe:f1:d1:8c:47:3a:1b:87:9d:73:ce:a1:de:8f:33: - f7:ad:b4:7d:83:d5:e2:60:ff:f4:b2:79:ee:6b:fb:db:ae:c5: - f5:1c:e9:20:9a:b9:71:31:c9:55:02:a1:e1:9b:a6:b7:dd:c0: - cc:e1:66:02:91:fe:a1:59:67:bf:3b:45:32:20:08:a0:08:66: - eb:47:2d:db:24:6f:ab:3c:53:9b:96:81:5f:61:4a:fa:bb:70: - 2a:31:a1:2b:ff:cc:ae:1c:c9:be:e5:a6:f1:6a:6e:b1:3f:4b: - 30:59:e3:a7:9f:f2:6e:6d:9d:ed:5f:b9:cf:b2:07:66:84:63: - 53:f4:64:c7:d1:b2:62:63:c6:ec:a2:09:89:c5:bc:75:96:bc: - d2:a5:86:f7:9c:28:1c:47:45:30:e6:90:87:c6:e3:2b:be:d3: - 8e:b7:89:30:f3:f3:83:14:f6:56:be:0c:e7:34:6e:6f:b4:f3: - 0c:17:87:dd:a8:e2:8b:ec:34:24:dc:0c:16:dc:e4:c4:21:da: - dc:ba:9d:a6 ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm3FNlWn/ -HIHaWGaQKa4VSKZDCaIFdcoW0aVp4HfIwfTl4k2Xxgnk4Jhkwrd/EVruej7F2CSw -uKKYrAW9cQdxahFnF1VcLdP+S9Dh89UI3n7CVv/mlW8Rf1o05wwc44L29OHtTs5g -L/dduLFU8MiqKF1WkCR7z6cB3tljFqN7XjTJjDVQV/y+bEhwg3pS2Rn46KKR8yM0 -8xS2PVnmhgWbJuwU+njTkaSv98UBFcA8hLhfCWKrw7NR3xQgR+4LX4UGQk2zWuAI -FDLYCot6QfUONMxKo3m+bbXN0bjgcSqB4SK8bP6JWZfuca3X4dTqAYUKroOhCWU8 -Lmgp4T+wwseQhQIDAQABo4HLMIHIMB0GA1UdDgQWBBRaxgvaN6O7IYUXxe8M+r+p -ebH+KTAfBgNVHSMEGDAWgBTTOxAmKJnsCSoInFN9JJ+x8QQLtTA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgWgMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AFMh+3LThmyv9nUHXLwMepePBbiGr+6vypvAiS8ozXmno3AEN4vKTYQ6ctWaLvmF -ZFlbf360vwl0r/7x0YxHOhuHnXPOod6PM/ettH2D1eJg//Syee5r+9uuxfUc6SCa -uXExyVUCoeGbprfdwMzhZgKR/qFZZ787RTIgCKAIZutHLdskb6s8U5uWgV9hSvq7 -cCoxoSv/zK4cyb7lpvFqbrE/SzBZ46ef8m5tne1fuc+yB2aEY1P0ZMfRsmJjxuyi -CYnFvHWWvNKlhvecKBxHRTDmkIfG4yu+0463iTDz84MU9la+DOc0bm+08wwXh92o -4ovsNCTcDBbc5MQh2ty6naY= ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:99:27:87:07:8d:52:53:4f:bc:b6:55:16:e3:64: - 12:13:89:32:c4:f9:6f:a2:9c:93:06:fc:4c:a9:4d: - 09:1a:04:8a:24:58:74:7a:53:ad:d6:c6:29:0e:19: - f2:cc:1e:02:72:2d:7f:52:4c:3a:88:dd:35:fc:c5: - e6:d4:41:1a:b0:76:a7:b9:c1:db:d9:7a:a0:56:d8: - e7:4c:a6:ed:45:ca:99:eb:4c:dd:44:5b:52:79:00: - 1b:f0:ca:fc:19:c9:39:d7:1c:24:e5:90:f8:77:f7: - 4a:cd:0c:ec:dc:c5:15:6d:43:de:43:b4:f9:03:b9: - fa:b9:8f:4f:b4:e2:9f:dd:e8:d5:af:9f:ab:79:ce: - 32:2f:be:04:85:e8:2f:5e:91:26:b5:08:a1:ef:11: - f5:20:28:8d:09:9f:4e:b9:5a:ef:cf:45:b3:aa:6e: - 14:1b:fe:1e:c3:4b:39:ad:76:9a:58:b5:be:c4:ae: - ce:0e:03:ef:8e:5d:a7:03:00:e7:ed:88:0e:97:8e: - 2d:bd:82:6e:d8:39:7f:c0:7e:4e:c8:1e:eb:60:cb: - f7:97:dd:fb:79:ee:a8:00:4a:40:b7:1c:2f:1a:59: - 5a:51:36:a9:aa:0b:97:a0:d0:d5:87:5e:b9:36:73: - 5c:31:fc:b6:8c:ef:f1:2a:f5:ea:6d:2b:05:d2:8c: - 60:87 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - D3:3B:10:26:28:99:EC:09:2A:08:9C:53:7D:24:9F:B1:F1:04:0B:B5 - X509v3 Authority Key Identifier: - keyid:D3:3B:10:26:28:99:EC:09:2A:08:9C:53:7D:24:9F:B1:F1:04:0B:B5 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 2e:84:d8:57:d4:09:e8:0e:8f:b5:9c:8f:48:ef:62:40:49:3e: - 9a:2e:b9:85:1c:77:f6:94:f3:73:0e:06:58:d4:63:5d:20:90: - e4:4b:c8:39:64:ca:ec:04:8c:bb:dd:b2:58:81:3e:89:05:1d: - 42:19:f9:d4:92:24:de:03:6c:69:36:74:95:65:b3:a4:06:83: - 2b:9f:93:72:57:dc:53:09:be:d2:fb:23:39:df:85:73:9a:c2: - c4:2d:7e:aa:36:01:dd:4e:a6:4f:fe:61:99:21:9c:89:a4:e7: - f8:8e:03:92:f6:cc:24:08:db:c8:59:41:6e:ea:c2:c3:4a:54: - d6:93:e5:3d:17:ff:24:a4:f7:55:2b:3c:d2:40:a7:2a:67:df: - 67:66:f5:37:ef:aa:20:d2:5a:da:d1:19:08:43:be:ae:11:f3: - 43:80:8a:ce:15:af:04:c5:b5:10:21:7c:f6:5e:7a:68:8e:59: - 40:ca:4b:be:c7:59:1b:48:a4:a1:ee:ef:57:b4:5b:d9:93:3b: - a2:36:3b:b6:f2:54:1e:c8:97:7e:5c:62:99:6c:f6:b0:bf:df: - af:5a:52:64:99:39:93:20:dc:4f:5e:a6:fe:8d:19:e2:21:1f: - 95:9d:7c:e8:8e:05:eb:74:ed:60:8e:ee:76:17:a8:40:56:36: - ac:bf:61:b9 ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJknhweNUlNPvLZVFuNk -EhOJMsT5b6Kckwb8TKlNCRoEiiRYdHpTrdbGKQ4Z8sweAnItf1JMOojdNfzF5tRB -GrB2p7nB29l6oFbY50ym7UXKmetM3URbUnkAG/DK/BnJOdccJOWQ+Hf3Ss0M7NzF -FW1D3kO0+QO5+rmPT7Tin93o1a+fq3nOMi++BIXoL16RJrUIoe8R9SAojQmfTrla -789Fs6puFBv+HsNLOa12mli1vsSuzg4D745dpwMA5+2IDpeOLb2Cbtg5f8B+Tsge -62DL95fd+3nuqABKQLccLxpZWlE2qaoLl6DQ1YdeuTZzXDH8tozv8Sr16m0rBdKM -YIcCAwEAAaOByzCByDAdBgNVHQ4EFgQU0zsQJiiZ7AkqCJxTfSSfsfEEC7UwHwYD -VR0jBBgwFoAU0zsQJiiZ7AkqCJxTfSSfsfEEC7UwNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAuhNhX1Ano -Do+1nI9I72JAST6aLrmFHHf2lPNzDgZY1GNdIJDkS8g5ZMrsBIy73bJYgT6JBR1C -GfnUkiTeA2xpNnSVZbOkBoMrn5NyV9xTCb7S+yM534VzmsLELX6qNgHdTqZP/mGZ -IZyJpOf4jgOS9swkCNvIWUFu6sLDSlTWk+U9F/8kpPdVKzzSQKcqZ99nZvU376og -0lra0RkIQ76uEfNDgIrOFa8ExbUQIXz2XnpojllAyku+x1kbSKSh7u9XtFvZkzui -Nju28lQeyJd+XGKZbPawv9+vWlJkmTmTINxPXqb+jRniIR+VnXzojgXrdO1gju52 -F6hAVjasv2G5 ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -RkFJTA== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediary-signed-with-md5.pem b/net/data/verify_certificate_chain_unittest/intermediary-signed-with-md5.pem deleted file mode 100644 index d1544816..0000000 --- a/net/data/verify_certificate_chain_unittest/intermediary-signed-with-md5.pem +++ /dev/null
@@ -1,281 +0,0 @@ -[Created by: generate-intermediary-signed-with-md5.py] - -Certificate chain with 1 intermediary and a trusted root. The intermediary -however is signed using the MD5 hash. Verification is expected to fail because -MD5 is too weak. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:e9:b3:cb:c4:9b:c5:59:0a:ca:5e:ca:b3:7b:e1: - bb:ec:3d:4b:10:7b:d4:ee:71:92:1c:c0:24:af:0b: - c4:5e:55:3b:af:aa:e3:43:a3:d3:ae:1c:db:7b:fe: - 2a:35:d0:d8:49:77:09:f5:5d:65:9b:84:42:93:da: - 64:a4:12:f7:f5:6d:91:2f:7c:96:aa:7b:50:09:67: - 1d:f6:76:a2:4f:64:6c:d7:78:c6:78:f4:5c:83:3a: - 01:64:3c:15:37:4e:2a:b9:48:2a:ce:42:36:35:59: - b0:b0:f6:4c:db:21:59:14:87:91:09:d8:18:76:b8: - fb:0c:b4:e4:ab:5a:24:27:e5:47:9c:c7:eb:d0:74: - 17:5b:13:9a:f7:96:b7:1d:de:84:8c:6a:fd:c7:92: - 53:09:72:31:66:aa:54:07:3d:1c:2c:86:e9:68:d8: - 12:f6:22:ec:37:b5:58:6c:26:fe:79:c5:d0:f7:42: - 79:f9:ad:7a:3a:f4:0a:52:3e:5a:5b:45:d9:a8:d1: - 18:35:db:9d:56:81:11:49:f9:77:0d:ff:a7:1e:39: - 63:14:3b:64:3d:d0:2f:1b:47:c6:ad:6a:a8:d8:c9: - 09:cd:58:0b:5d:de:ad:aa:56:38:bd:42:0f:f9:c6: - 9d:c0:da:b0:06:03:a5:3f:43:5f:e1:83:74:cc:a7: - ab:9f - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - E8:2D:DF:58:DB:57:BD:6D:98:31:15:C9:58:49:E0:02:47:79:10:9D - X509v3 Authority Key Identifier: - keyid:0E:AF:B4:0B:04:28:C3:55:B4:F8:2D:EB:A1:62:49:26:60:A2:A7:D8 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - a2:d6:e1:fe:94:8d:78:bc:5b:9e:53:1a:b9:6b:76:32:2e:66: - 0b:b3:ce:8f:96:9a:33:37:b6:e2:fb:99:56:2e:3b:cb:3d:d3: - 96:c7:b8:05:9a:00:e4:f4:72:f6:97:b2:b3:72:08:3d:17:59: - af:98:b3:16:a2:cb:e7:b8:bf:c1:5b:49:92:28:9c:47:bd:29: - 9e:56:f8:52:67:eb:de:23:69:52:79:32:1f:ba:b5:58:d3:b6: - 19:58:ac:62:04:a5:29:9a:7b:df:90:ad:c1:b1:42:c4:6c:a6: - 16:db:af:5e:ee:85:83:9e:c9:02:ba:c6:3c:63:55:93:58:36: - b4:86:b8:fa:e4:09:6f:98:6f:23:2a:2c:98:04:e4:2c:fd:69: - 61:b2:36:88:8f:a2:70:ec:2a:47:6d:e0:cb:f8:5c:07:25:71: - f4:f6:af:50:a7:d7:49:d8:c8:08:4a:09:12:8c:21:bc:d7:54: - f2:04:fc:f0:33:2f:aa:b1:a7:d3:0a:d0:96:0f:69:7c:a4:a8: - cd:a5:a6:d3:d2:6a:b1:f2:b1:0a:81:18:68:18:23:c1:6f:9c: - 40:9f:d2:2d:6d:e2:52:36:05:4e:99:ae:b2:e1:b3:da:40:99: - 1f:c6:9f:ae:9b:43:1d:e3:db:58:7c:96:b5:b8:cc:b6:b7:e9: - 1b:57:a0:61 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDps8vE -m8VZCspeyrN74bvsPUsQe9TucZIcwCSvC8ReVTuvquNDo9OuHNt7/io10NhJdwn1 -XWWbhEKT2mSkEvf1bZEvfJaqe1AJZx32dqJPZGzXeMZ49FyDOgFkPBU3Tiq5SCrO -QjY1WbCw9kzbIVkUh5EJ2Bh2uPsMtOSrWiQn5Uecx+vQdBdbE5r3lrcd3oSMav3H -klMJcjFmqlQHPRwshulo2BL2Iuw3tVhsJv55xdD3Qnn5rXo69ApSPlpbRdmo0Rg1 -251WgRFJ+XcN/6ceOWMUO2Q90C8bR8ataqjYyQnNWAtd3q2qVji9Qg/5xp3A2rAG -A6U/Q1/hg3TMp6ufAgMBAAGjgekwgeYwHQYDVR0OBBYEFOgt31jbV71tmDEVyVhJ -4AJHeRCdMB8GA1UdIwQYMBaAFA6vtAsEKMNVtPgt66FiSSZgoqfYMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAotbh/pSNeLxbnlMauWt2 -Mi5mC7POj5aaMze24vuZVi47yz3Tlse4BZoA5PRy9peys3IIPRdZr5izFqLL57i/ -wVtJkiicR70pnlb4Umfr3iNpUnkyH7q1WNO2GVisYgSlKZp735CtwbFCxGymFtuv -Xu6Fg57JArrGPGNVk1g2tIa4+uQJb5hvIyosmATkLP1pYbI2iI+icOwqR23gy/hc -ByVx9PavUKfXSdjICEoJEowhvNdU8gT88DMvqrGn0wrQlg9pfKSozaWm09JqsfKx -CoEYaBgjwW+cQJ/SLW3iUjYFTpmusuGz2kCZH8afrptDHePbWHyWtbjMtrfpG1eg -YQ== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: md5WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:e9:c2:e1:d4:1c:a8:bf:ff:07:7f:17:bf:a4:f7: - f5:bc:e3:1f:76:32:e2:a3:e4:5c:a2:5d:83:a4:ad: - c7:19:12:8a:20:dc:5c:d3:db:22:97:e5:59:09:d8: - 7f:95:bc:79:61:c2:66:d1:69:02:fc:98:02:12:8e: - f4:4e:63:4d:1f:d0:df:f9:25:f0:86:f0:17:ba:3d: - 1c:5c:7d:7c:0a:f5:fc:f5:f3:a1:1f:44:45:30:e5: - f2:02:b8:e2:04:69:50:f7:b8:10:1d:35:92:56:3b: - 06:42:fc:a7:e5:45:40:b0:0c:2f:2c:61:dd:0e:55: - cb:23:7d:8b:48:b6:ac:68:b3:e3:3b:fc:07:a4:89: - 17:3e:e3:fc:74:12:e6:2f:15:b8:78:dc:a2:6b:6b: - 98:e2:36:f6:69:26:71:21:20:d1:60:4d:44:ea:32: - fd:54:64:4a:f1:6a:94:f3:51:43:e8:f9:5f:68:9e: - 03:a8:a8:6c:a2:0e:55:e5:d8:87:ad:62:db:61:5b: - a8:4b:1a:dc:f3:14:9f:97:24:5c:32:98:e4:9b:8b: - 1e:32:d4:12:d0:5b:a1:c1:f6:2e:85:42:c4:dc:60: - 8f:b1:b2:8b:7a:63:3e:ad:95:62:60:2a:0e:88:dc: - 5c:10:c6:90:ab:6b:75:d2:42:f4:b2:a9:81:5a:d8: - 0e:41 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 0E:AF:B4:0B:04:28:C3:55:B4:F8:2D:EB:A1:62:49:26:60:A2:A7:D8 - X509v3 Authority Key Identifier: - keyid:DE:7E:F6:82:CA:37:00:C9:C3:30:07:35:D1:BA:48:C5:9B:B6:2D:A7 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: md5WithRSAEncryption - 03:a2:90:68:d8:0d:83:e4:1c:83:20:2e:0b:ff:60:1c:01:a9: - ec:66:71:cd:3b:61:2c:10:95:ab:42:4e:fc:05:bb:40:d3:8c: - 00:34:72:b3:8f:74:de:21:67:0a:e8:b4:93:3d:c3:a2:a0:a0: - f0:4b:d9:7d:c6:2b:4f:dd:31:12:ad:72:3c:54:58:5c:21:3f: - 75:39:46:80:da:f3:20:1d:93:a3:ef:bb:00:91:bd:8d:22:16: - d9:5e:c7:a1:45:39:1a:76:d9:7d:e6:86:6c:65:0e:29:50:4b: - 5f:40:ec:79:9c:9a:d0:d9:fa:6a:6a:90:62:db:fa:9e:28:1a: - 40:e4:b3:45:90:41:26:09:d4:7c:f7:5c:58:ce:c5:67:6a:d1: - 41:86:73:df:6e:cb:79:70:75:5f:d2:54:53:07:e0:53:d1:45: - d9:4b:e7:f6:2b:60:fb:56:b4:17:79:be:2a:7e:98:0d:ad:ea: - d1:79:5d:87:80:65:84:15:61:d8:dd:a8:3c:5f:f0:90:a6:0b: - d8:c5:ca:d8:8d:fb:2f:1b:f8:a2:4d:ea:33:71:c2:30:a5:3b: - 56:a4:73:79:51:b7:7a:e7:6c:f7:23:52:48:61:1c:82:54:97: - 0d:54:e5:80:07:bb:84:d7:ee:90:ee:4d:85:df:f7:34:fb:d3: - d8:bf:19:7f ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6cLh1Byo -v/8Hfxe/pPf1vOMfdjLio+Rcol2DpK3HGRKKINxc09sil+VZCdh/lbx5YcJm0WkC -/JgCEo70TmNNH9Df+SXwhvAXuj0cXH18CvX89fOhH0RFMOXyArjiBGlQ97gQHTWS -VjsGQvyn5UVAsAwvLGHdDlXLI32LSLasaLPjO/wHpIkXPuP8dBLmLxW4eNyia2uY -4jb2aSZxISDRYE1E6jL9VGRK8WqU81FD6PlfaJ4DqKhsog5V5diHrWLbYVuoSxrc -8xSflyRcMpjkm4seMtQS0FuhwfYuhULE3GCPsbKLemM+rZViYCoOiNxcEMaQq2t1 -0kL0sqmBWtgOQQIDAQABo4HLMIHIMB0GA1UdDgQWBBQOr7QLBCjDVbT4LeuhYkkm -YKKn2DAfBgNVHSMEGDAWgBTefvaCyjcAycMwBzXRukjFm7YtpzA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEB -AAOikGjYDYPkHIMgLgv/YBwBqexmcc07YSwQlatCTvwFu0DTjAA0crOPdN4hZwro -tJM9w6KgoPBL2X3GK0/dMRKtcjxUWFwhP3U5RoDa8yAdk6PvuwCRvY0iFtlex6FF -ORp22X3mhmxlDilQS19A7HmcmtDZ+mpqkGLb+p4oGkDks0WQQSYJ1Hz3XFjOxWdq -0UGGc99uy3lwdV/SVFMH4FPRRdlL5/YrYPtWtBd5vip+mA2t6tF5XYeAZYQVYdjd -qDxf8JCmC9jFytiN+y8b+KJN6jNxwjClO1akc3lRt3rnbPcjUkhhHIJUlw1U5YAH -u4TX7pDuTYXf9zT709i/GX8= ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:c6:d0:57:18:e0:d7:81:35:67:b0:a4:a1:5b:fd: - 8f:32:51:4f:d9:76:67:02:84:59:10:4d:4a:b9:ed: - 1d:ef:fe:5e:d4:69:c1:24:e3:1f:91:08:d8:15:de: - 68:ca:dc:c7:fc:ea:6f:27:a5:60:45:af:0f:f1:44: - b8:d7:c7:96:70:d9:e1:dd:84:aa:ea:65:52:62:67: - e1:06:cd:d9:18:ad:eb:a3:0a:60:4b:cd:76:71:44: - 26:3c:22:c7:44:74:77:31:50:a5:b3:c4:ef:ac:14: - 1e:ea:ff:74:a0:7b:e4:7a:ca:87:dd:45:0b:bc:75: - 4b:92:44:0f:e8:f3:d2:6d:3e:47:4b:cf:77:a2:e9: - ff:f9:e2:79:9f:88:d7:ff:e5:cc:93:91:91:24:e1: - 9f:ef:a4:13:15:cc:03:3e:06:ba:9d:4c:de:52:b9: - de:c6:57:af:76:d8:9e:4b:37:11:1d:52:57:fe:af: - 8e:11:1d:fd:a8:55:3b:84:c9:10:ac:dc:51:62:e8: - c8:54:5b:3d:60:0b:8e:ad:66:2a:26:92:81:c6:a1: - be:31:51:d3:28:b1:9e:86:67:ca:c4:f2:88:47:1c: - 03:c9:f8:ee:f8:87:4c:b4:9e:24:9d:c0:48:d8:ec: - a7:8b:52:7a:d0:65:cf:06:2a:63:7f:1c:c9:15:44: - 48:01 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - DE:7E:F6:82:CA:37:00:C9:C3:30:07:35:D1:BA:48:C5:9B:B6:2D:A7 - X509v3 Authority Key Identifier: - keyid:DE:7E:F6:82:CA:37:00:C9:C3:30:07:35:D1:BA:48:C5:9B:B6:2D:A7 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 8c:97:4a:f9:c2:c2:57:2a:4b:a1:69:03:9e:c1:17:fb:4c:f2: - 8e:36:0f:e2:c4:f6:4d:42:9c:ac:7f:67:7b:fd:7e:fd:14:3b: - fb:df:08:3d:0e:23:fa:d1:47:d5:68:14:b2:1f:5c:40:db:fe: - 8d:e6:fc:17:3a:c6:2f:5e:96:1a:3c:32:fa:63:c5:e5:cf:fc: - db:6b:59:71:b8:f7:d2:70:78:cc:7f:8c:54:5f:c6:69:ba:98: - 77:92:32:b3:a1:18:84:ed:3c:93:3f:12:93:64:e6:7f:92:8a: - 4f:db:42:1d:c0:7c:0d:4a:d6:ef:ca:05:a3:5b:26:47:79:7e: - 91:b0:e6:35:92:91:e2:2f:4d:18:17:44:b5:a7:de:8a:92:86: - 4c:0c:de:0e:23:53:c0:30:1f:7a:c5:70:59:94:19:02:8a:f1: - 23:f9:88:fb:09:af:b8:90:d6:c6:d5:46:92:74:44:8b:8e:66: - b1:79:cb:82:3d:80:cc:cf:d9:03:5a:a3:71:a6:f5:f0:75:9f: - 79:38:f0:fe:66:e5:d1:a1:9d:0a:48:e1:45:a1:42:fb:d3:16: - 53:91:b9:c9:0d:27:8a:34:e0:59:8d:4f:e0:e7:7d:7d:0c:e6: - ec:a1:ea:66:23:77:55:fc:f1:d0:13:32:1d:9e:0c:fd:3b:38: - 1d:dc:2c:2b ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbQVxjg14E1Z7CkoVv9 -jzJRT9l2ZwKEWRBNSrntHe/+XtRpwSTjH5EI2BXeaMrcx/zqbyelYEWvD/FEuNfH -lnDZ4d2EquplUmJn4QbN2Rit66MKYEvNdnFEJjwix0R0dzFQpbPE76wUHur/dKB7 -5HrKh91FC7x1S5JED+jz0m0+R0vPd6Lp//nieZ+I1//lzJORkSThn++kExXMAz4G -up1M3lK53sZXr3bYnks3ER1SV/6vjhEd/ahVO4TJEKzcUWLoyFRbPWALjq1mKiaS -gcahvjFR0yixnoZnysTyiEccA8n47viHTLSeJJ3ASNjsp4tSetBlzwYqY38cyRVE -SAECAwEAAaOByzCByDAdBgNVHQ4EFgQU3n72gso3AMnDMAc10bpIxZu2LacwHwYD -VR0jBBgwFoAU3n72gso3AMnDMAc10bpIxZu2LacwNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCMl0r5wsJX -KkuhaQOewRf7TPKONg/ixPZNQpysf2d7/X79FDv73wg9DiP60UfVaBSyH1xA2/6N -5vwXOsYvXpYaPDL6Y8Xlz/zba1lxuPfScHjMf4xUX8Zpuph3kjKzoRiE7TyTPxKT -ZOZ/kopP20IdwHwNStbvygWjWyZHeX6RsOY1kpHiL00YF0S1p96KkoZMDN4OI1PA -MB96xXBZlBkCivEj+Yj7Ca+4kNbG1UaSdESLjmaxecuCPYDMz9kDWqNxpvXwdZ95 -OPD+ZuXRoZ0KSOFFoUL70xZTkbnJDSeKNOBZjU/g5319DObsoepmI3dV/PHQEzId -ngz9Ozgd3Cwr ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -RkFJTA== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediary-unknown-critical-extension.pem b/net/data/verify_certificate_chain_unittest/intermediary-unknown-critical-extension.pem deleted file mode 100644 index 7e7045c..0000000 --- a/net/data/verify_certificate_chain_unittest/intermediary-unknown-critical-extension.pem +++ /dev/null
@@ -1,284 +0,0 @@ -[Created by: generate-intermediary-unknown-critical-extension.py] - -Certificate chain with 1 intermediary and a trusted root. The intermediary -has an unknown X.509v3 extension (OID=1.2.3.4) that is marked as critical. -Verifying this certificate chain is expected to fail because there is an -unrecognized critical extension. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:cf:51:a6:c4:9e:d4:eb:c4:eb:d6:57:2b:80:e5: - da:cd:db:3a:cf:b0:43:c5:18:9c:4e:b7:c4:9c:18: - 73:e6:85:e6:00:00:76:25:9f:5d:8f:28:19:f2:05: - 02:a9:5c:75:65:12:38:d7:7a:eb:e3:46:42:07:3d: - 3b:c4:5d:32:7b:26:fb:1e:69:cb:36:ca:c2:da:2f: - b4:ec:e3:bf:5e:9a:d3:8a:6d:3e:f2:53:dc:da:40: - 3c:fe:fd:02:36:32:f5:b2:17:bf:05:97:f0:3e:8b: - b7:15:a2:10:be:27:79:62:30:82:3e:57:60:60:13: - 8e:fc:33:8e:72:cd:d9:d9:50:e9:62:04:8c:e4:db: - f8:cf:1b:da:a2:f7:ee:4c:b8:7f:b2:bf:92:c9:2c: - 44:a7:b5:ad:b9:75:06:c0:24:5a:0b:44:ca:4f:af: - f6:2f:c2:00:12:bb:7b:0c:c4:54:47:f1:73:53:64: - 72:40:9d:51:40:b3:21:73:ce:82:c5:f3:b7:14:ef: - 31:50:5b:d5:0b:b7:92:0e:08:5c:ea:ed:73:86:e3: - b1:6d:63:7f:56:7d:74:3e:3b:90:8c:2f:a2:6e:65: - b9:4e:38:a3:54:fb:7b:de:69:6f:c0:57:ea:51:c0: - 09:83:b4:a8:4d:ec:74:a6:ea:31:97:0c:9a:66:b7: - 58:0f - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 89:EB:AF:F5:F3:C7:53:ED:03:95:5A:DB:94:4A:E0:BF:C3:D2:CE:FA - X509v3 Authority Key Identifier: - keyid:21:32:55:0D:16:9C:AD:C4:16:5D:BE:40:67:0D:B6:40:4E:E2:75:60 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 17:7b:87:2f:11:ac:6d:68:03:d3:07:31:20:18:b7:d4:9d:98: - e4:aa:10:6d:f2:41:2f:3e:cf:1f:50:f9:f9:3f:6e:61:c2:b7: - dd:e0:f6:5a:d6:66:bb:2d:31:98:6a:12:0a:17:e8:a1:4e:cd: - fd:c4:ed:3e:01:a3:1c:ef:18:9e:fb:f8:46:c6:1b:ad:a4:ce: - ba:84:79:a6:84:f0:2c:84:d4:6c:3f:f9:ff:f8:66:f1:9b:82: - 8c:83:c8:79:5b:bd:f0:dd:e0:e5:76:55:92:97:d2:46:64:ea: - 3e:99:bc:9d:b8:8f:15:41:f8:3f:1b:c0:df:cd:d5:01:88:74: - 37:8e:58:f8:ad:7d:75:70:59:98:cc:c4:bd:fc:b9:bd:f5:69: - fe:09:08:be:ea:e8:f3:ee:53:d8:05:4f:d5:d1:85:dc:7e:58: - 64:cf:d4:41:c1:d0:ec:c4:2a:ca:ae:39:8e:57:63:e3:03:ff: - 4f:d4:42:92:ec:ac:e8:f6:83:e5:51:0e:32:2c:6f:2d:15:72: - 21:37:f0:18:77:3b:97:f5:71:84:1f:07:e0:76:b6:a0:f4:34: - 16:b9:53:e2:4f:48:45:b6:7d:b3:0f:30:06:e6:89:89:a4:3f: - e8:4c:2a:9c:1f:9c:91:c9:66:4e:28:39:3d:5b:21:19:03:dc: - 02:56:69:e9 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPUabE -ntTrxOvWVyuA5drN2zrPsEPFGJxOt8ScGHPmheYAAHYln12PKBnyBQKpXHVlEjjX -euvjRkIHPTvEXTJ7Jvseacs2ysLaL7Ts479emtOKbT7yU9zaQDz+/QI2MvWyF78F -l/A+i7cVohC+J3liMII+V2BgE478M45yzdnZUOliBIzk2/jPG9qi9+5MuH+yv5LJ -LESnta25dQbAJFoLRMpPr/YvwgASu3sMxFRH8XNTZHJAnVFAsyFzzoLF87cU7zFQ -W9ULt5IOCFzq7XOG47FtY39WfXQ+O5CML6JuZblOOKNU+3veaW/AV+pRwAmDtKhN -7HSm6jGXDJpmt1gPAgMBAAGjgekwgeYwHQYDVR0OBBYEFInrr/Xzx1PtA5Va25RK -4L/D0s76MB8GA1UdIwQYMBaAFCEyVQ0WnK3EFl2+QGcNtkBO4nVgMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAF3uHLxGsbWgD0wcxIBi3 -1J2Y5KoQbfJBLz7PH1D5+T9uYcK33eD2WtZmuy0xmGoSChfooU7N/cTtPgGjHO8Y -nvv4RsYbraTOuoR5poTwLITUbD/5//hm8ZuCjIPIeVu98N3g5XZVkpfSRmTqPpm8 -nbiPFUH4PxvA383VAYh0N45Y+K19dXBZmMzEvfy5vfVp/gkIvuro8+5T2AVP1dGF -3H5YZM/UQcHQ7MQqyq45jldj4wP/T9RCkuys6PaD5VEOMixvLRVyITfwGHc7l/Vx -hB8H4Ha2oPQ0FrlT4k9IRbZ9sw8wBuaJiaQ/6EwqnB+ckclmTig5PVshGQPcAlZp -6Q== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:c7:80:3b:a7:4e:4e:fa:0a:39:4f:5b:5c:af:ba: - 84:27:6a:8d:34:95:5e:91:93:c8:d0:1f:64:84:5f: - 25:d9:3b:5d:f9:31:5f:4f:6f:04:be:50:35:09:5e: - 78:f3:9a:15:b5:27:fa:24:70:04:26:29:08:95:a5: - dd:b1:ee:4f:ee:d8:a0:59:51:ab:75:70:c2:7b:42: - 06:e2:4d:d7:91:ec:e5:e7:f8:34:1e:01:63:45:11: - 6a:fe:45:3e:e7:16:59:86:e7:4b:91:67:ec:1f:c1: - 13:a4:62:cb:f6:0d:9b:2b:e5:1e:df:c4:35:f3:94: - 60:9b:99:e1:54:ce:ff:7d:92:f1:9d:d4:f6:0e:99: - 8c:dc:7b:b1:95:54:04:6f:40:1c:23:42:50:ab:96: - f5:9e:93:27:f1:5c:e5:97:9c:c1:e4:ae:a8:cb:f9: - 42:7e:14:02:e1:32:4b:4d:03:2d:2a:a6:7e:a1:77: - c3:4e:4e:46:18:1a:95:d7:0d:48:8d:a1:d3:bb:b7: - 55:07:01:d9:c0:27:fd:f7:ec:61:3a:57:84:b6:91: - 78:dc:a9:19:a6:d4:83:c5:57:67:bd:b7:a0:6a:ec: - 7b:83:1e:d9:bf:2f:b7:bf:d6:ce:18:5a:54:cf:8b: - 1a:fc:5a:03:63:bc:d2:3a:01:db:91:e0:ce:96:19: - 55:19 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 21:32:55:0D:16:9C:AD:C4:16:5D:BE:40:67:0D:B6:40:4E:E2:75:60 - X509v3 Authority Key Identifier: - keyid:BA:1F:26:2C:E0:77:F2:16:78:6D:83:49:A1:30:9E:B4:AB:10:6A:22 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - 1.2.3.4: critical - .... - Signature Algorithm: sha256WithRSAEncryption - 02:57:1a:5a:82:9a:29:1e:39:b4:aa:c4:e3:04:2b:6f:1c:0a: - 79:df:d3:f8:c9:9f:94:b6:c1:7e:e5:47:8d:35:72:e2:09:ce: - 6f:61:f1:7e:93:f3:37:11:0d:c0:28:05:bc:8d:dc:f8:2a:22: - 0e:dc:79:b9:71:99:38:f5:c2:81:ac:0b:47:c2:39:96:2e:2b: - 35:0a:fe:80:fe:50:da:74:03:1c:4b:36:be:4b:23:70:4f:a1: - 1f:c8:3b:9a:6b:92:3d:61:9b:67:9a:8b:ea:0b:b0:8c:aa:6a: - 02:fd:27:6f:a8:be:8f:d0:78:f2:84:76:da:e2:c5:10:3c:9f: - 61:c4:3f:50:8e:40:ac:d8:aa:87:b6:7c:da:42:c5:05:c0:82: - bc:9f:35:ae:22:34:32:11:71:ab:fd:27:af:ef:42:ec:cd:b7: - d1:66:14:5f:f1:e5:10:c2:1f:ac:e4:96:1f:a9:9c:5a:ad:97: - 4d:90:40:df:cb:77:15:ba:d5:f4:76:94:9f:d6:c2:4f:53:60: - 3b:c3:a3:9c:02:4d:03:28:32:58:3d:0f:62:36:a9:7b:70:d9: - f8:2b:05:cd:ca:c7:17:68:76:6b:cd:ad:7f:f1:65:a6:d1:be: - b7:4c:83:bb:0d:5d:98:6e:02:d3:b6:ea:82:b6:44:0d:a1:b2: - 37:4b:a0:a3 ------BEGIN CERTIFICATE----- -MIIDfTCCAmWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx4A7p05O -+go5T1tcr7qEJ2qNNJVekZPI0B9khF8l2Ttd+TFfT28EvlA1CV5485oVtSf6JHAE -JikIlaXdse5P7tigWVGrdXDCe0IG4k3Xkezl5/g0HgFjRRFq/kU+5xZZhudLkWfs -H8ETpGLL9g2bK+Ue38Q185Rgm5nhVM7/fZLxndT2DpmM3HuxlVQEb0AcI0JQq5b1 -npMn8Vzll5zB5K6oy/lCfhQC4TJLTQMtKqZ+oXfDTk5GGBqV1w1IjaHTu7dVBwHZ -wCf99+xhOleEtpF43KkZptSDxVdnvbegaux7gx7Zvy+3v9bOGFpUz4sa/FoDY7zS -OgHbkeDOlhlVGQIDAQABo4HbMIHYMB0GA1UdDgQWBBQhMlUNFpytxBZdvkBnDbZA -TuJ1YDAfBgNVHSMEGDAWgBS6HyYs4HfyFnhtg0mhMJ60qxBqIjA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDgYDKgMEAQH/BAQBAgMEMA0G -CSqGSIb3DQEBCwUAA4IBAQACVxpagpopHjm0qsTjBCtvHAp539P4yZ+UtsF+5UeN -NXLiCc5vYfF+k/M3EQ3AKAW8jdz4KiIO3Hm5cZk49cKBrAtHwjmWLis1Cv6A/lDa -dAMcSza+SyNwT6EfyDuaa5I9YZtnmovqC7CMqmoC/SdvqL6P0HjyhHba4sUQPJ9h -xD9QjkCs2KqHtnzaQsUFwIK8nzWuIjQyEXGr/Sev70LszbfRZhRf8eUQwh+s5JYf -qZxarZdNkEDfy3cVutX0dpSf1sJPU2A7w6OcAk0DKDJYPQ9iNql7cNn4KwXNyscX -aHZrza1/8WWm0b63TIO7DV2YbgLTtuqCtkQNobI3S6Cj ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:9f:42:45:62:cb:c5:f3:07:65:8a:9b:4c:d4:91: - 4a:66:e6:89:24:24:6f:91:3e:4a:50:63:42:47:e3: - 67:10:71:ac:f3:81:82:3b:9f:56:7c:6a:36:a6:87: - be:d5:e6:03:4b:bb:d3:c8:90:6a:6b:1d:4c:16:a1: - c3:98:58:f7:39:de:90:27:df:40:c5:03:10:b2:b4: - 1b:cb:28:5d:80:a4:83:60:f2:c0:ac:f5:1f:81:4d: - 31:84:6f:04:96:7b:26:bf:b6:55:78:33:06:23:65: - 1c:bc:65:ac:a3:31:27:49:38:ce:92:73:87:a7:b4: - 53:4b:85:71:29:7a:f5:09:fc:03:9a:90:56:14:b1: - b7:89:03:c4:61:b6:49:fc:3d:30:62:84:a2:46:66: - 22:37:32:fd:a3:62:bb:99:62:53:ca:fc:1f:e9:29: - c6:d4:8c:09:6f:02:d5:de:7c:de:12:d8:00:dd:df: - 04:94:d4:36:b5:f6:d9:fe:a7:ff:46:e7:07:da:3e: - d0:e3:ea:90:4c:7c:b7:ff:bc:85:99:d5:1f:46:f5: - ac:57:e9:09:03:61:8c:0b:9d:a8:82:9c:17:43:27: - de:80:d2:59:e3:ca:ed:23:41:1a:32:48:83:ca:bd: - 8e:cb:bf:9c:f0:03:7d:e0:41:ce:72:05:27:59:3c: - 10:5b - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - BA:1F:26:2C:E0:77:F2:16:78:6D:83:49:A1:30:9E:B4:AB:10:6A:22 - X509v3 Authority Key Identifier: - keyid:BA:1F:26:2C:E0:77:F2:16:78:6D:83:49:A1:30:9E:B4:AB:10:6A:22 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 70:b4:15:ff:b7:d9:b7:51:10:ce:fa:e5:61:0e:f6:c7:b6:d7: - be:59:ed:07:d5:77:95:e1:ef:3f:80:9e:99:d2:2c:1b:9a:a7: - 35:1c:ec:84:9e:ce:27:52:3a:2c:00:06:4d:60:62:aa:4b:a7: - 61:32:e3:64:f1:96:c7:d2:3f:fe:78:bc:f4:da:76:f9:44:d2: - 9b:1a:94:1f:44:9a:49:c9:c0:1c:de:a9:63:d0:23:4a:c3:fb: - 60:45:76:dd:12:ef:c1:95:4f:8e:bd:48:56:b8:f9:74:e2:5c: - ae:90:5a:19:9e:90:13:0b:97:ff:cd:a9:45:54:68:aa:fa:f6: - ea:3f:2e:fa:2a:40:48:42:cd:10:cc:c8:e6:a4:34:9d:8f:1c: - 74:55:58:b2:99:cf:35:40:23:bf:90:5f:4c:60:30:5f:a0:b4: - d6:0f:4f:42:03:71:82:f7:d3:f5:72:bb:a8:cf:24:ab:10:7e: - c5:e1:84:a9:7e:25:b1:8a:80:db:ae:0e:49:f1:03:fb:11:1a: - 63:58:42:7f:73:9b:f3:f8:d6:ae:81:0b:59:ca:98:ec:3d:9c: - 85:6b:7d:70:e8:c2:04:47:f0:b6:7e:4a:96:70:c9:a8:11:b7: - 23:54:55:d3:57:c3:7e:47:66:35:91:26:56:fd:37:14:35:a4: - 6b:29:38:ee ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ9CRWLLxfMHZYqbTNSR -SmbmiSQkb5E+SlBjQkfjZxBxrPOBgjufVnxqNqaHvtXmA0u708iQamsdTBahw5hY -9znekCffQMUDELK0G8soXYCkg2DywKz1H4FNMYRvBJZ7Jr+2VXgzBiNlHLxlrKMx -J0k4zpJzh6e0U0uFcSl69Qn8A5qQVhSxt4kDxGG2Sfw9MGKEokZmIjcy/aNiu5li -U8r8H+kpxtSMCW8C1d583hLYAN3fBJTUNrX22f6n/0bnB9o+0OPqkEx8t/+8hZnV -H0b1rFfpCQNhjAudqIKcF0Mn3oDSWePK7SNBGjJIg8q9jsu/nPADfeBBznIFJ1k8 -EFsCAwEAAaOByzCByDAdBgNVHQ4EFgQUuh8mLOB38hZ4bYNJoTCetKsQaiIwHwYD -VR0jBBgwFoAUuh8mLOB38hZ4bYNJoTCetKsQaiIwNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBwtBX/t9m3 -URDO+uVhDvbHtte+We0H1XeV4e8/gJ6Z0iwbmqc1HOyEns4nUjosAAZNYGKqS6dh -MuNk8ZbH0j/+eLz02nb5RNKbGpQfRJpJycAc3qlj0CNKw/tgRXbdEu/BlU+OvUhW -uPl04lyukFoZnpATC5f/zalFVGiq+vbqPy76KkBIQs0QzMjmpDSdjxx0VViymc81 -QCO/kF9MYDBfoLTWD09CA3GC99P1cruozySrEH7F4YSpfiWxioDbrg5J8QP7ERpj -WEJ/c5vz+NaugQtZypjsPZyFa31w6MIER/C2fkqWcMmoEbcjVFXTV8N+R2Y1kSZW -/TcUNaRrKTju ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -RkFJTA== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediary-unknown-non-critical-extension.pem b/net/data/verify_certificate_chain_unittest/intermediary-unknown-non-critical-extension.pem deleted file mode 100644 index dffed19..0000000 --- a/net/data/verify_certificate_chain_unittest/intermediary-unknown-non-critical-extension.pem +++ /dev/null
@@ -1,284 +0,0 @@ -[Created by: generate-intermediary-unknown-non-critical-extension.py] - -Certificate chain with 1 intermediary and a trusted root. The intermediary -has an unknown X.509v3 extension that is marked as non-critical. Verification -is expected to succeed because although unrecognized, the extension is not -critical. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:e2:f4:a3:48:79:59:87:08:4d:c1:84:b4:97:67: - 5d:f6:24:2b:74:f1:f0:1a:13:e0:a5:28:30:1f:c6: - 04:fc:ce:9b:73:4a:95:1f:56:a0:9d:26:07:97:8f: - 7c:06:c7:a2:fb:5f:85:41:d3:bd:50:83:61:72:5e: - a0:f9:e1:39:c6:ae:77:05:8c:f7:8e:6f:ae:5d:14: - 69:97:12:4a:c7:40:de:e7:ab:7a:83:9b:b3:e8:15: - 90:ab:52:3a:ee:c4:36:9b:58:eb:51:c3:1d:c5:c8: - eb:f7:65:e9:15:56:93:e4:55:37:97:29:f1:88:da: - fc:1c:53:5f:24:07:f9:3e:14:86:b3:50:c6:94:06: - 8e:b1:b1:ab:32:d4:f3:98:ee:f8:42:ed:65:43:36: - bb:4f:59:a0:4d:77:a5:9e:a9:c2:40:40:df:cc:3c: - d7:dc:56:bd:d4:2c:fe:b5:20:d6:a8:74:cd:99:4f: - bf:eb:71:0b:20:95:f2:c3:21:92:42:d7:e6:ff:5b: - 87:0b:c2:89:5c:e7:d6:30:77:cd:8d:c7:92:0d:74: - 6f:88:d6:81:49:e8:f6:25:de:6d:51:3e:db:cd:e4: - 91:99:98:5a:ff:7a:61:46:da:7a:ec:9b:22:a5:5f: - 16:6e:cd:7a:ec:3b:b0:aa:1b:af:65:a6:3a:85:fc: - a6:e9 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 82:EC:E0:87:C2:A2:2A:EF:4B:E0:B5:F8:75:6A:18:32:51:B4:0D:54 - X509v3 Authority Key Identifier: - keyid:60:BD:98:38:CE:C3:01:40:CA:86:14:C7:F4:E4:D5:72:BA:ED:80:31 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 89:1e:64:8c:61:b5:87:aa:76:6d:f6:ef:87:b6:ca:3b:0f:47: - a9:bb:9a:91:7f:7a:d8:65:e9:c7:b1:1a:ea:13:fb:9c:79:5e: - df:33:f5:d9:bc:f1:f8:89:bc:59:31:27:c2:2d:3e:47:e9:13: - 27:65:c8:cb:ba:e1:da:51:60:7a:93:aa:28:92:d5:81:89:09: - b7:22:e7:4b:4f:82:0e:fb:2f:62:19:b4:ea:f5:47:34:fd:60: - 7e:4c:e6:be:08:8e:f8:fd:89:62:ff:97:89:27:69:37:7f:e3: - 76:ea:72:30:ca:de:73:bb:c7:65:1c:6d:5e:ab:f8:ba:da:57: - 7d:28:1f:6a:64:76:aa:89:6b:ac:57:a3:e9:e2:c1:ca:f8:4b: - 7c:0b:21:57:cc:71:c8:9b:7f:25:8f:09:61:6e:5c:a8:9b:0b: - 79:98:7a:1e:82:95:22:fd:9e:9c:cd:20:73:0d:0e:d9:21:cb: - 67:3d:e9:1e:24:ae:4f:84:1f:de:3e:27:ee:54:41:66:71:9c: - b6:6b:08:7a:16:e7:c1:c7:7a:71:24:ed:c0:2a:d9:fd:2b:ff: - e6:41:c9:63:93:90:52:35:21:4a:72:be:f9:9c:27:49:0d:b7: - 01:af:cb:5f:53:ee:ef:58:69:16:ba:e6:5b:12:45:e0:d4:3d: - ea:58:fe:a5 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDi9KNI -eVmHCE3BhLSXZ132JCt08fAaE+ClKDAfxgT8zptzSpUfVqCdJgeXj3wGx6L7X4VB -071Qg2FyXqD54TnGrncFjPeOb65dFGmXEkrHQN7nq3qDm7PoFZCrUjruxDabWOtR -wx3FyOv3ZekVVpPkVTeXKfGI2vwcU18kB/k+FIazUMaUBo6xsasy1POY7vhC7WVD -NrtPWaBNd6WeqcJAQN/MPNfcVr3ULP61INaodM2ZT7/rcQsglfLDIZJC1+b/W4cL -wolc59Ywd82Nx5INdG+I1oFJ6PYl3m1RPtvN5JGZmFr/emFG2nrsmyKlXxZuzXrs -O7CqG69lpjqF/KbpAgMBAAGjgekwgeYwHQYDVR0OBBYEFILs4IfCoirvS+C1+HVq -GDJRtA1UMB8GA1UdIwQYMBaAFGC9mDjOwwFAyoYUx/Tk1XK67YAxMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAiR5kjGG1h6p2bfbvh7bK -Ow9HqbuakX962GXpx7Ea6hP7nHle3zP12bzx+Im8WTEnwi0+R+kTJ2XIy7rh2lFg -epOqKJLVgYkJtyLnS0+CDvsvYhm06vVHNP1gfkzmvgiO+P2JYv+XiSdpN3/jdupy -MMrec7vHZRxtXqv4utpXfSgfamR2qolrrFej6eLByvhLfAshV8xxyJt/JY8JYW5c -qJsLeZh6HoKVIv2enM0gcw0O2SHLZz3pHiSuT4Qf3j4n7lRBZnGctmsIehbnwcd6 -cSTtwCrZ/Sv/5kHJY5OQUjUhSnK++ZwnSQ23Aa/LX1Pu71hpFrrmWxJF4NQ96lj+ -pQ== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:de:7c:cd:1c:92:c3:9a:ff:be:f3:03:37:c7:6a: - 3a:d4:ac:56:50:3a:b1:17:0d:73:09:ef:d9:16:4b: - 38:de:a4:82:46:61:a8:ed:f8:b9:a0:21:7e:3c:26: - f6:a8:c5:d3:34:99:9c:58:c6:e1:de:f6:1c:eb:49: - a3:34:65:71:29:95:3a:2e:b4:5f:33:dd:2a:0b:5f: - 7a:e0:47:3f:bc:00:15:a1:24:26:9f:c6:c7:d7:eb: - e3:f3:37:19:d5:30:48:f2:7d:c5:77:11:cc:cc:17: - 7e:91:c4:20:f8:a6:c3:28:00:ec:23:53:40:7b:0e: - dc:14:6e:57:a5:ca:52:9f:2b:3b:34:ea:e4:ae:5c: - ed:b4:8d:25:9a:08:00:26:d0:e4:34:d2:94:36:8c: - e1:df:ef:31:f8:18:5b:ed:80:57:44:77:94:a2:fa: - ae:5c:e0:ea:e1:30:e3:24:03:da:7c:5b:66:90:c7: - 01:f1:f8:8d:ca:bc:d7:e3:25:35:28:3c:f6:f4:83: - 13:2a:73:d0:f7:c2:69:11:b1:ed:43:6d:71:28:7e: - 43:8d:f5:f0:78:e2:5a:31:39:38:ae:92:05:29:e0: - 1f:04:6f:9d:a0:a1:b4:29:80:af:87:1c:0c:e5:7d: - 6d:11:59:63:43:af:7f:a4:32:fa:0a:d1:7e:88:86: - cd:61 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 60:BD:98:38:CE:C3:01:40:CA:86:14:C7:F4:E4:D5:72:BA:ED:80:31 - X509v3 Authority Key Identifier: - keyid:B2:41:26:7A:EF:3A:C9:BF:FE:6A:E7:7F:04:60:B0:34:62:08:E3:93 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - 1.2.3.4: - .... - Signature Algorithm: sha256WithRSAEncryption - 68:5c:74:6c:fd:93:14:86:9f:d9:3a:4b:67:1d:6e:2b:78:2f: - 89:b4:b0:76:ac:3f:aa:ea:4a:ea:42:04:40:96:09:1a:b7:b7: - 01:93:fb:55:0d:44:30:0e:16:b3:e8:bb:b2:77:17:79:93:37: - 17:b5:62:c9:5b:15:76:90:2d:74:3d:1f:7e:59:61:59:e2:61: - 81:18:46:6b:94:42:be:be:d3:1e:37:16:68:49:db:9e:f0:f1: - 24:bb:e0:00:e0:57:e0:27:3f:59:e9:a8:92:31:80:2a:7a:cc: - b1:47:5b:8d:3b:55:f5:5a:f0:9a:56:90:1a:8e:d2:ab:51:e2: - 15:ca:9f:cb:a9:ec:10:f1:5d:58:72:84:75:63:bd:a7:7c:bf: - 5b:80:65:d6:97:77:e2:8a:89:8a:ea:5b:1f:da:55:5e:7b:33: - 37:e2:60:09:02:13:89:a3:ca:0f:bf:17:8e:47:fb:c1:8d:a8: - fb:9f:20:64:a6:a4:a0:86:da:fa:7f:6a:e1:50:10:41:9b:21: - e6:8e:9f:29:9c:cc:0b:83:a3:65:47:2a:15:8b:47:6a:48:89: - e4:2c:97:d7:81:51:bb:bb:e0:db:22:e2:be:bf:53:63:26:77: - 08:c3:b6:04:c7:9b:9c:03:91:00:63:bd:70:cb:e2:6c:c8:a7: - 2c:5b:f6:28 ------BEGIN CERTIFICATE----- -MIIDejCCAmKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3nzNHJLD -mv++8wM3x2o61KxWUDqxFw1zCe/ZFks43qSCRmGo7fi5oCF+PCb2qMXTNJmcWMbh -3vYc60mjNGVxKZU6LrRfM90qC1964Ec/vAAVoSQmn8bH1+vj8zcZ1TBI8n3FdxHM -zBd+kcQg+KbDKADsI1NAew7cFG5XpcpSnys7NOrkrlzttI0lmggAJtDkNNKUNozh -3+8x+Bhb7YBXRHeUovquXODq4TDjJAPafFtmkMcB8fiNyrzX4yU1KDz29IMTKnPQ -98JpEbHtQ21xKH5DjfXweOJaMTk4rpIFKeAfBG+doKG0KYCvhxwM5X1tEVljQ69/ -pDL6CtF+iIbNYQIDAQABo4HYMIHVMB0GA1UdDgQWBBRgvZg4zsMBQMqGFMf05NVy -uu2AMTAfBgNVHSMEGDAWgBSyQSZ67zrJv/5q538EYLA0YgjjkzA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wCwYDKgMEBAQBAgMEMA0GCSqG -SIb3DQEBCwUAA4IBAQBoXHRs/ZMUhp/ZOktnHW4reC+JtLB2rD+q6krqQgRAlgka -t7cBk/tVDUQwDhaz6Luydxd5kzcXtWLJWxV2kC10PR9+WWFZ4mGBGEZrlEK+vtMe -NxZoSdue8PEku+AA4FfgJz9Z6aiSMYAqesyxR1uNO1X1WvCaVpAajtKrUeIVyp/L -qewQ8V1YcoR1Y72nfL9bgGXWl3fiiomK6lsf2lVeezM34mAJAhOJo8oPvxeOR/vB -jaj7nyBkpqSghtr6f2rhUBBBmyHmjp8pnMwLg6NlRyoVi0dqSInkLJfXgVG7u+Db -IuK+v1NjJncIw7YEx5ucA5EAY71wy+JsyKcsW/Yo ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:a8:e9:07:4a:9e:20:9a:c5:14:9a:16:49:17:bf: - 0b:c1:7d:b6:91:54:cd:60:e6:df:bf:81:e1:bb:24: - 47:df:ea:c8:27:93:bb:49:b7:b7:e6:48:ff:11:43: - c1:8d:cb:54:f8:0d:49:05:e7:4b:a9:0d:cb:79:b8: - 49:26:6b:1c:ad:7d:2c:e5:a3:0a:1b:ad:99:9c:d4: - c2:d6:2c:de:ae:74:42:b7:06:ca:e0:57:06:e6:46: - 5a:80:70:6f:f7:0c:76:c5:8f:de:cc:35:85:bf:f5: - 79:29:63:79:22:fd:c0:48:1e:a0:4f:86:6b:2f:07: - 72:55:1f:96:dc:81:c7:19:8d:bf:7f:56:21:fc:05: - 6e:1a:3d:6d:f2:a7:37:6f:8d:c9:f5:5e:79:3a:89: - 6b:b5:6b:d4:14:eb:c4:de:3d:68:8c:e6:f8:96:e3: - b3:cb:73:09:6a:d1:8d:46:9e:c6:9f:1d:01:30:69: - ea:a4:2a:3c:90:fe:40:92:9d:61:81:88:96:67:cb: - ae:4c:f5:3d:31:37:8b:31:0a:a0:cf:87:80:f7:50: - eb:93:32:bf:64:13:3e:0a:d8:98:80:4b:b7:b1:a9: - 87:fe:b8:d3:d2:3b:a2:7d:20:cb:ff:6b:4e:67:88: - 52:03:4c:a2:2a:81:0d:63:4e:d0:f8:2e:f6:38:c9: - 9b:03 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - B2:41:26:7A:EF:3A:C9:BF:FE:6A:E7:7F:04:60:B0:34:62:08:E3:93 - X509v3 Authority Key Identifier: - keyid:B2:41:26:7A:EF:3A:C9:BF:FE:6A:E7:7F:04:60:B0:34:62:08:E3:93 - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 91:be:af:fa:3e:50:a9:b4:7e:d5:c6:a9:91:2f:d3:63:11:bc: - 07:35:35:31:76:8e:69:e4:39:7d:82:65:be:6b:b0:9e:42:ce: - 0c:02:5a:0d:73:93:ce:89:c1:c7:27:cb:19:26:a0:77:85:53: - b5:1e:a8:60:9f:0c:b9:b4:fa:34:9f:4f:3a:0e:d6:ab:d3:a6: - 47:32:d8:ec:c9:80:90:2e:7c:fa:5f:16:96:f6:ba:fd:13:10: - 73:ec:3e:b0:3c:f5:7a:e1:8f:e3:32:59:d2:f1:3c:36:8c:92: - 21:a1:29:21:39:1c:08:b1:f6:85:35:ab:36:97:56:fc:4c:85: - 11:bc:69:72:05:f6:21:b8:85:bb:1e:cf:69:1a:3c:98:dd:93: - 58:53:e0:f1:ce:d0:2a:68:d9:b3:b9:26:71:d9:61:01:a8:cd: - bb:53:48:06:a5:c4:3f:d6:3b:aa:01:4d:01:fc:f2:79:96:a9: - 13:d3:ba:25:2c:2a:3d:e5:bd:e1:f7:ae:f9:3a:ea:59:77:8c: - 27:3c:f5:a4:01:f8:08:97:1b:28:1a:81:cb:ce:36:6b:2f:1e: - 41:05:f6:d6:d9:4d:84:87:16:61:e4:34:4c:06:7e:a8:2b:2b: - b5:a1:93:de:ca:52:f7:74:d9:ce:f7:f7:2b:0f:5d:f8:b6:9f: - 93:34:b2:00 ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKjpB0qeIJrFFJoWSRe/ -C8F9tpFUzWDm37+B4bskR9/qyCeTu0m3t+ZI/xFDwY3LVPgNSQXnS6kNy3m4SSZr -HK19LOWjChutmZzUwtYs3q50QrcGyuBXBuZGWoBwb/cMdsWP3sw1hb/1eSljeSL9 -wEgeoE+Gay8HclUfltyBxxmNv39WIfwFbho9bfKnN2+NyfVeeTqJa7Vr1BTrxN49 -aIzm+Jbjs8tzCWrRjUaexp8dATBp6qQqPJD+QJKdYYGIlmfLrkz1PTE3izEKoM+H -gPdQ65Myv2QTPgrYmIBLt7Gph/6409I7on0gy/9rTmeIUgNMoiqBDWNO0Pgu9jjJ -mwMCAwEAAaOByzCByDAdBgNVHQ4EFgQUskEmeu86yb/+aud/BGCwNGII45MwHwYD -VR0jBBgwFoAUskEmeu86yb/+aud/BGCwNGII45MwNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCRvq/6PlCp -tH7VxqmRL9NjEbwHNTUxdo5p5Dl9gmW+a7CeQs4MAloNc5POicHHJ8sZJqB3hVO1 -Hqhgnwy5tPo0n086Dtar06ZHMtjsyYCQLnz6XxaW9rr9ExBz7D6wPPV64Y/jMlnS -8Tw2jJIhoSkhORwIsfaFNas2l1b8TIURvGlyBfYhuIW7Hs9pGjyY3ZNYU+DxztAq -aNmzuSZx2WEBqM27U0gGpcQ/1juqAU0B/PJ5lqkT07olLCo95b3h9675OupZd4wn -PPWkAfgIlxsoGoHLzjZrLx5BBfbW2U2EhxZh5DRMBn6oKyu1oZPeylL3dNnO9/cr -D134tp+TNLIA ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -U1VDQ0VTUw== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediate-basic-constraints-ca-false.pem b/net/data/verify_certificate_chain_unittest/intermediate-basic-constraints-ca-false.pem new file mode 100644 index 0000000..a2a73ca9 --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/intermediate-basic-constraints-ca-false.pem
@@ -0,0 +1,281 @@ +[Created by: generate-intermediate-basic-constraints-ca-false.py] + +Certificate chain with 1 intermediate and a trusted root. The intermediate +has a basic constraints extension that indicates it is NOT a CA. Verification +is expected to fail. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b7:1c:6d:3b:54:28:d0:fa:14:25:fe:22:77:55: + 16:d3:25:34:af:cd:e7:5a:8a:38:4b:82:99:95:6d: + e1:99:f7:f3:1d:53:2d:8e:90:b2:d5:4e:7e:e7:0c: + 9d:73:98:5e:3b:ed:bc:4f:fe:c7:38:f7:8a:ce:b7: + 08:0f:bd:78:18:9a:ec:f2:21:9e:25:ba:bc:24:3f: + 22:73:60:f7:2c:fa:9a:e9:aa:f8:75:65:4e:af:4e: + d9:01:f3:27:3e:c8:f5:b5:27:98:bd:a2:f6:34:ad: + 70:c8:5e:fb:3f:87:08:dc:d0:a6:30:c1:35:ee:95: + 7b:f2:7a:59:03:7e:03:39:fb:51:be:b3:13:54:cc: + 15:68:e1:b7:97:40:cf:e4:ff:84:a2:10:75:6d:d5: + 29:f8:91:8d:38:0a:92:c6:34:89:89:c2:d4:49:84: + 35:94:f9:08:ad:8c:44:10:3e:49:40:21:53:bb:6e: + 1b:20:1c:ce:e3:c8:a7:c7:e9:ab:4f:3f:f2:21:47: + 3a:d5:0a:59:6f:a9:59:42:ff:c5:7c:6a:c5:fc:79: + 29:05:a0:07:47:64:39:d0:bc:a1:86:64:c8:4c:08: + ec:f2:03:47:7c:00:ce:02:ff:5a:02:59:d3:ee:2c: + db:35:32:e9:24:a2:c2:f8:50:c8:3e:10:b1:dd:0a: + 5d:1b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 03:34:C9:78:9C:53:67:7A:2C:96:D9:3F:63:F2:18:3D:49:A8:44:87 + X509v3 Authority Key Identifier: + keyid:9C:93:40:54:48:97:2B:0C:3B:AF:CE:5C:79:97:26:EC:32:33:4C:FB + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + 72:78:37:46:b3:e3:d4:01:73:3a:59:1c:5f:13:27:10:46:dd: + ec:b1:9e:7c:6d:d8:a7:ac:b1:62:36:57:2a:44:17:d4:64:22: + 18:67:ae:84:0b:6b:53:49:76:15:a3:d3:7e:69:ae:d4:54:5d: + 46:11:0a:15:1c:ee:91:ab:da:6a:88:24:b0:ae:21:ee:a2:e6: + de:c4:cb:79:93:62:18:7d:4e:ee:d8:83:7d:65:63:f3:9c:08: + ca:28:5c:af:51:9f:36:b2:c3:06:3c:ec:cf:35:84:c5:9e:bc: + 75:03:be:e5:23:4e:7f:67:7d:86:14:df:21:4d:5e:d3:b7:86: + d6:14:cd:84:3a:3d:29:4f:de:e5:db:ac:96:a9:58:cf:02:e4: + c4:b1:26:08:34:f5:a4:3f:47:a1:0f:b3:0b:69:29:78:50:ba: + a9:eb:4a:44:fc:e7:bf:e9:ce:ba:8b:dc:b9:6a:25:c6:11:32: + 24:a0:59:7c:6e:4d:6c:cf:1b:f2:06:0f:5f:d7:4d:35:b1:f9: + a2:f7:c4:b0:b4:bb:ab:58:b5:ba:09:39:0d:50:d9:c2:a4:eb: + d9:79:23:40:ed:51:97:75:de:f5:14:c0:dc:ea:9f:6a:80:70: + ef:4e:b8:52:26:46:fc:70:e8:83:9c:2c:e8:63:b0:7f:81:a3: + 4e:91:35:02 +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3HG07 +VCjQ+hQl/iJ3VRbTJTSvzedaijhLgpmVbeGZ9/MdUy2OkLLVTn7nDJ1zmF477bxP +/sc494rOtwgPvXgYmuzyIZ4lurwkPyJzYPcs+prpqvh1ZU6vTtkB8yc+yPW1J5i9 +ovY0rXDIXvs/hwjc0KYwwTXulXvyelkDfgM5+1G+sxNUzBVo4beXQM/k/4SiEHVt +1Sn4kY04CpLGNImJwtRJhDWU+QitjEQQPklAIVO7bhsgHM7jyKfH6atPP/IhRzrV +CllvqVlC/8V8asX8eSkFoAdHZDnQvKGGZMhMCOzyA0d8AM4C/1oCWdPuLNs1Mukk +osL4UMg+ELHdCl0bAgMBAAGjgekwgeYwHQYDVR0OBBYEFAM0yXicU2d6LJbZP2Py +GD1JqESHMB8GA1UdIwQYMBaAFJyTQFRIlysMO6/OXHmXJuwyM0z7MD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAcng3RrPj1AFzOlkcXxMn +EEbd7LGefG3Yp6yxYjZXKkQX1GQiGGeuhAtrU0l2FaPTfmmu1FRdRhEKFRzukava +aogksK4h7qLm3sTLeZNiGH1O7tiDfWVj85wIyihcr1GfNrLDBjzszzWExZ68dQO+ +5SNOf2d9hhTfIU1e07eG1hTNhDo9KU/e5duslqlYzwLkxLEmCDT1pD9HoQ+zC2kp +eFC6qetKRPznv+nOuovcuWolxhEyJKBZfG5NbM8b8gYPX9dNNbH5ovfEsLS7q1i1 +ugk5DVDZwqTr2XkjQO1Rl3Xe9RTA3OqfaoBw7064UiZG/HDog5ws6GOwf4GjTpE1 +Ag== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c6:22:75:92:c4:7c:6f:77:4d:46:f7:17:84:1b: + e2:08:1f:ff:71:7e:4d:6d:a4:e7:0f:58:46:84:61: + 22:02:70:4e:b8:45:3a:e2:10:d1:cf:ff:91:7c:12: + 8e:7d:19:ab:0a:46:ac:1b:d6:d6:05:b6:99:43:9b: + ab:e5:cf:ee:62:e9:94:21:84:72:5b:63:6e:5a:e1: + 25:42:c3:b7:ee:31:5f:e0:e7:69:19:01:a2:d5:54: + 70:f8:aa:aa:24:5b:3b:4d:2b:cd:2f:e4:2a:a4:be: + ba:2f:ab:a2:b6:f8:84:71:f3:23:bc:12:68:26:1e: + 49:d0:87:3e:46:46:33:47:70:f2:42:d4:3f:ba:9c: + 89:7d:4f:6e:a5:35:cf:d9:46:a8:63:c4:35:4a:e7: + 4f:f2:e0:51:90:8e:08:ed:2e:ae:18:ac:5d:16:44: + 25:32:fa:1b:3c:14:e9:37:69:9f:72:48:01:a5:1b: + f3:e1:e7:75:ec:ca:92:83:48:a4:67:e1:8d:c1:dd: + 15:02:e4:4a:82:93:d3:f3:27:9e:66:ce:a8:3a:17: + d2:c6:a7:08:31:ba:d2:e8:e7:fa:53:b6:4f:09:d8: + 7e:e4:53:b2:f1:03:d9:c4:31:0c:6d:32:a0:9d:08: + d3:c4:bb:db:45:11:68:80:ba:f8:52:dc:19:9e:67: + 68:99 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 9C:93:40:54:48:97:2B:0C:3B:AF:CE:5C:79:97:26:EC:32:33:4C:FB + X509v3 Authority Key Identifier: + keyid:6F:25:CD:4D:1F:09:D0:5A:D5:3A:23:08:72:F1:9D:08:8A:1D:CA:34 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:FALSE + Signature Algorithm: sha256WithRSAEncryption + 14:4a:f9:6f:29:a6:a1:1b:2b:d7:3d:5d:14:83:05:1a:46:ac: + 73:64:d5:b7:09:87:0f:08:1d:b2:ac:1c:db:79:05:e4:62:fa: + 37:7d:78:82:c9:7c:44:f3:01:9a:a6:31:78:ac:af:1e:53:9e: + 84:ab:95:f0:2e:48:62:d6:3e:a3:95:35:1e:18:c6:9e:0d:15: + 9e:94:0f:bd:8c:1b:f6:de:48:d8:cd:7c:9b:23:4d:bb:d0:f6: + df:bb:27:a6:55:82:07:3e:27:2e:80:6e:b3:67:06:67:6d:b6: + f8:5f:60:58:ab:d8:9d:f6:4b:6b:a8:9a:be:9e:c3:69:e8:15: + 00:61:9f:b2:24:6d:bd:d5:e3:7e:c7:83:66:4e:12:58:b7:c1: + c1:0e:de:1a:dc:ae:4d:19:78:b8:6c:48:fb:5b:fc:a2:86:0b: + 60:77:d7:cb:d6:e6:c9:13:5f:cf:d6:98:6c:ab:9e:9b:9d:99: + 4c:87:91:3e:d1:4a:ad:ef:84:f6:45:cc:da:99:fa:ff:57:df: + be:44:70:f9:0c:38:63:c0:31:44:45:05:46:9a:63:db:dd:a0: + f5:dc:1b:f8:51:d8:30:e5:47:23:29:d1:79:a5:e6:1e:87:2b: + c3:f8:0e:fe:de:13:bb:cd:a5:14:f3:d8:0b:34:73:47:68:07: + 8a:ac:e0:65 +-----BEGIN CERTIFICATE----- +MIIDajCCAlKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxiJ1ksR8 +b3dNRvcXhBviCB//cX5NbaTnD1hGhGEiAnBOuEU64hDRz/+RfBKOfRmrCkasG9bW +BbaZQ5ur5c/uYumUIYRyW2NuWuElQsO37jFf4OdpGQGi1VRw+KqqJFs7TSvNL+Qq +pL66L6uitviEcfMjvBJoJh5J0Ic+RkYzR3DyQtQ/upyJfU9upTXP2UaoY8Q1SudP +8uBRkI4I7S6uGKxdFkQlMvobPBTpN2mfckgBpRvz4ed17MqSg0ikZ+GNwd0VAuRK +gpPT8yeeZs6oOhfSxqcIMbrS6Of6U7ZPCdh+5FOy8QPZxDEMbTKgnQjTxLvbRRFo +gLr4UtwZnmdomQIDAQABo4HIMIHFMB0GA1UdDgQWBBSck0BUSJcrDDuvzlx5lybs +MjNM+zAfBgNVHSMEGDAWgBRvJc1NHwnQWtU6Iwhy8Z0Iih3KNDA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEBABRK ++W8ppqEbK9c9XRSDBRpGrHNk1bcJhw8IHbKsHNt5BeRi+jd9eILJfETzAZqmMXis +rx5TnoSrlfAuSGLWPqOVNR4Yxp4NFZ6UD72MG/beSNjNfJsjTbvQ9t+7J6ZVggc+ +Jy6AbrNnBmdttvhfYFir2J32S2uomr6ew2noFQBhn7Ikbb3V437Hg2ZOEli3wcEO +3hrcrk0ZeLhsSPtb/KKGC2B318vW5skTX8/WmGyrnpudmUyHkT7RSq3vhPZFzNqZ ++v9X375EcPkMOGPAMURFBUaaY9vdoPXcG/hR2DDlRyMp0Xml5h6HK8P4Dv7eE7vN +pRTz2As0c0doB4qs4GU= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c4:3e:31:36:4f:df:d0:36:0e:06:5c:89:2c:c8: + 01:c6:18:a4:e7:1f:82:11:af:30:66:28:7c:c3:14: + b2:ff:a4:6c:6a:c0:f4:ae:58:82:5f:91:e6:78:19: + d7:d2:87:5c:9e:75:3a:af:c0:fd:e8:18:c4:81:b4: + 51:be:f7:c3:0d:74:d7:8a:53:01:28:c9:da:93:f4: + a6:da:51:6a:d1:23:78:1b:ab:17:46:e6:bb:71:4e: + 33:8b:9d:e1:75:7e:56:3b:00:02:74:fe:1f:49:01: + 81:0f:59:05:d6:2a:a0:48:db:9f:fc:29:6e:77:6e: + e3:78:63:4d:12:9f:f5:54:63:a5:1e:b2:c4:83:62: + ac:79:76:bd:80:d9:4c:dd:99:44:91:c3:31:fd:0f: + 3a:d8:13:6d:3c:4f:98:5b:50:e0:1a:84:b5:3b:e2: + 0f:52:89:7f:b0:de:97:e2:f9:e5:0b:2c:c4:61:9a: + f3:4b:15:e3:f2:a3:30:44:b0:d4:a6:1a:dd:60:c0: + 85:21:30:ed:b5:1e:6f:9f:50:db:ad:42:a6:3a:04: + 7c:3f:ae:94:ed:eb:43:2a:d9:85:c8:1d:72:f4:61: + d5:27:7a:a4:62:93:56:37:4b:4e:d5:44:02:f0:29: + 1f:70:2c:76:fb:2f:5b:d4:dc:86:09:03:fe:d9:13: + 5f:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 6F:25:CD:4D:1F:09:D0:5A:D5:3A:23:08:72:F1:9D:08:8A:1D:CA:34 + X509v3 Authority Key Identifier: + keyid:6F:25:CD:4D:1F:09:D0:5A:D5:3A:23:08:72:F1:9D:08:8A:1D:CA:34 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 5e:dc:6f:dc:d9:7f:6f:75:c7:c8:27:62:2f:02:7c:c2:26:35: + 82:6c:5e:93:88:34:9b:e2:fc:8a:89:9e:0a:a0:89:aa:08:e4: + 1c:59:38:4b:c7:5c:ba:92:d5:ce:1a:b0:30:25:ba:69:c9:52: + 6e:29:78:31:d6:49:c5:b3:64:e3:49:28:2d:3c:41:8a:10:c4: + 77:f1:a8:77:37:50:52:ec:ed:bb:1a:61:3f:29:ad:3e:1a:56: + 06:48:a0:89:17:91:77:67:bc:4d:68:9a:ac:a8:a8:ad:4a:05: + 2a:33:18:7a:5e:b9:32:f5:c4:7b:c0:23:90:fb:78:9a:0a:18: + f3:9b:46:f1:3c:c5:f0:3c:1b:06:56:39:3b:ba:da:5e:7e:5f: + 42:47:bc:fd:a6:bb:64:2d:db:9a:5b:60:61:e6:9d:a6:ac:c9: + 24:20:ff:cd:b7:5d:ee:8e:04:92:a1:10:34:26:48:b2:b6:3a: + c7:9a:66:2e:f0:64:f0:61:64:ef:28:85:c9:94:46:6b:fb:c5: + 0f:b9:f5:ef:51:5a:61:be:27:39:00:4c:00:7f:8a:49:14:7b: + 1a:40:e5:e7:fe:d6:d0:a7:df:33:5c:86:1e:e5:4a:64:ff:e8: + 8f:1f:9e:3c:d8:a9:a2:d2:0b:c3:53:b7:cf:f6:d1:92:84:be: + d9:e6:67:06 +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQ+MTZP39A2DgZciSzI +AcYYpOcfghGvMGYofMMUsv+kbGrA9K5Ygl+R5ngZ19KHXJ51Oq/A/egYxIG0Ub73 +ww1014pTASjJ2pP0ptpRatEjeBurF0bmu3FOM4ud4XV+VjsAAnT+H0kBgQ9ZBdYq +oEjbn/wpbndu43hjTRKf9VRjpR6yxINirHl2vYDZTN2ZRJHDMf0POtgTbTxPmFtQ +4BqEtTviD1KJf7Del+L55QssxGGa80sV4/KjMESw1KYa3WDAhSEw7bUeb59Q261C +pjoEfD+ulO3rQyrZhcgdcvRh1Sd6pGKTVjdLTtVEAvApH3AsdvsvW9TchgkD/tkT +XycCAwEAAaOByzCByDAdBgNVHQ4EFgQUbyXNTR8J0FrVOiMIcvGdCIodyjQwHwYD +VR0jBBgwFoAUbyXNTR8J0FrVOiMIcvGdCIodyjQwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBe3G/c2X9v +dcfIJ2IvAnzCJjWCbF6TiDSb4vyKiZ4KoImqCOQcWThLx1y6ktXOGrAwJbppyVJu +KXgx1knFs2TjSSgtPEGKEMR38ah3N1BS7O27GmE/Ka0+GlYGSKCJF5F3Z7xNaJqs +qKitSgUqMxh6Xrky9cR7wCOQ+3iaChjzm0bxPMXwPBsGVjk7utpefl9CR7z9prtk +LduaW2Bh5p2mrMkkIP/Nt13ujgSSoRA0JkiytjrHmmYu8GTwYWTvKIXJlEZr+8UP +ufXvUVphvic5AEwAf4pJFHsaQOXn/tbQp98zXIYe5Upk/+iPH5482Kmi0gvDU7fP +9tGShL7Z5mcG +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +RkFJTA== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediate-basic-constraints-not-critical.pem b/net/data/verify_certificate_chain_unittest/intermediate-basic-constraints-not-critical.pem new file mode 100644 index 0000000..60d7b29cb --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/intermediate-basic-constraints-not-critical.pem
@@ -0,0 +1,282 @@ +[Created by: generate-intermediate-basic-constraints-not-critical.py] + +Certificate chain with 1 intermediate and a trusted root. The intermediate +has a basic constraints extension but does not mark it as critical. +Verification is expected to succeed, since although not critical, the +basicConstraints indicates CA=true as expected. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:9f:2f:38:1d:84:e6:1c:ed:c4:47:2b:63:0b:41: + 73:dd:fe:74:c7:1a:d2:c8:7f:c1:90:ae:bf:6b:82: + a1:17:93:80:a1:92:39:52:66:81:93:90:e6:15:d7: + d6:bc:a4:03:eb:fc:50:b2:dc:f6:29:f7:a9:32:b6: + 23:6c:d4:d0:3e:d9:56:6e:9d:a0:91:10:2c:8a:1e: + 93:8d:38:37:ef:3e:7d:7a:de:15:07:c2:6c:62:1c: + 76:81:ce:a7:9e:be:44:57:1b:77:77:ed:fa:2f:e1: + c5:53:83:65:74:c6:11:3c:f2:4d:84:89:1d:3b:54: + 93:5e:38:44:f1:d4:03:ad:03:69:fd:eb:da:02:aa: + cf:6f:04:ea:22:0a:3f:a1:68:bc:56:a4:51:aa:93: + 8a:f2:22:47:42:04:98:48:68:40:2e:f6:a6:8d:38: + 84:ba:1a:56:0c:bc:53:85:77:b4:ba:e2:03:ac:10: + 0f:1d:52:64:ad:f5:92:20:38:dc:fa:dd:8b:c6:8d: + 96:30:ea:72:e2:aa:ff:5d:c3:fc:dc:1a:43:c6:da: + 48:56:f6:4c:d4:8d:00:da:28:5f:01:23:9b:b1:eb: + b7:92:b7:35:43:5e:c0:21:96:22:b6:bd:c6:5f:1b: + 0b:58:88:44:a5:ee:90:f4:e6:d0:94:41:2c:44:8c: + af:e9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 05:31:5F:95:5B:3C:43:02:74:27:C6:2E:06:50:92:FF:5C:54:AE:73 + X509v3 Authority Key Identifier: + keyid:77:27:6B:15:A8:06:86:AD:0D:67:E0:D6:5B:82:3A:F8:6B:00:A3:A7 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + 00:ba:cd:3c:7b:0f:eb:b3:b1:5f:5b:0a:83:12:4d:d6:28:7e: + ff:d9:65:2c:23:f8:d2:68:cc:25:14:0c:6e:9b:37:bb:72:66: + 13:54:ff:b9:2f:f4:c8:9e:77:5b:31:2b:93:e6:94:cf:e9:bd: + 43:1a:e8:f6:c3:c5:61:fa:ff:a7:72:09:ba:2b:08:02:e4:a5: + 62:24:b1:b1:3b:0a:c0:bb:72:19:af:73:2d:9a:66:8e:f7:0f: + 30:9f:49:0f:aa:83:87:ed:45:9e:75:3a:50:32:d6:c4:cf:20: + a0:31:73:16:98:69:e9:d7:16:5b:6f:6f:0a:d8:96:82:a3:d6: + a8:a4:84:d7:1a:50:22:bd:14:d7:61:d9:43:a9:58:cf:46:e8: + 64:e9:1c:a9:d6:d3:49:45:1e:53:16:71:05:a7:0b:ae:d7:c0: + 43:8c:24:02:07:6f:99:ed:4b:f6:89:a8:31:f5:ba:56:e3:db: + 00:10:7e:0d:e0:46:96:b2:27:be:60:29:e8:91:e9:55:43:b1: + e6:74:e9:17:4e:bd:db:32:ec:61:7e:b0:d1:17:27:90:29:d9: + 2e:53:6a:8f:de:77:ae:f4:ff:f4:96:84:e6:8d:37:43:63:17: + 87:6a:8c:55:bd:ea:fd:2c:b2:83:10:3c:d7:f0:bd:21:45:ad: + ba:36:6d:43 +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCfLzgd +hOYc7cRHK2MLQXPd/nTHGtLIf8GQrr9rgqEXk4ChkjlSZoGTkOYV19a8pAPr/FCy +3PYp96kytiNs1NA+2VZunaCRECyKHpONODfvPn163hUHwmxiHHaBzqeevkRXG3d3 +7fov4cVTg2V0xhE88k2EiR07VJNeOETx1AOtA2n969oCqs9vBOoiCj+haLxWpFGq +k4ryIkdCBJhIaEAu9qaNOIS6GlYMvFOFd7S64gOsEA8dUmSt9ZIgONz63YvGjZYw +6nLiqv9dw/zcGkPG2khW9kzUjQDaKF8BI5ux67eStzVDXsAhliK2vcZfGwtYiESl +7pD05tCUQSxEjK/pAgMBAAGjgekwgeYwHQYDVR0OBBYEFAUxX5VbPEMCdCfGLgZQ +kv9cVK5zMB8GA1UdIwQYMBaAFHcnaxWoBoatDWfg1luCOvhrAKOnMD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAALrNPHsP67OxX1sKgxJN +1ih+/9llLCP40mjMJRQMbps3u3JmE1T/uS/0yJ53WzErk+aUz+m9Qxro9sPFYfr/ +p3IJuisIAuSlYiSxsTsKwLtyGa9zLZpmjvcPMJ9JD6qDh+1FnnU6UDLWxM8goDFz +Fphp6dcWW29vCtiWgqPWqKSE1xpQIr0U12HZQ6lYz0boZOkcqdbTSUUeUxZxBacL +rtfAQ4wkAgdvme1L9omoMfW6VuPbABB+DeBGlrInvmAp6JHpVUOx5nTpF0692zLs +YX6w0RcnkCnZLlNqj953rvT/9JaE5o03Q2MXh2qMVb3q/SyygxA81/C9IUWtujZt +Qw== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:94:4c:ba:e4:24:50:f0:02:98:a7:42:66:d3:d6: + 53:4d:ad:3f:76:fa:4f:72:61:fd:79:cc:43:e2:d6: + 2f:d9:99:84:0b:da:34:6f:65:ca:78:2b:a9:22:98: + 04:ba:93:89:e9:8c:d0:71:62:cd:a4:3a:35:e2:8c: + 2d:8a:48:36:2b:d1:99:52:27:c7:44:34:30:2c:87: + a7:47:e3:df:74:a3:6c:c6:3c:d2:ba:5c:3c:04:79: + 1f:11:36:58:7a:86:65:60:cc:a1:4c:ba:f9:72:7e: + 80:d3:1b:12:18:8a:44:b3:f3:fa:20:f8:8c:3d:63: + e3:96:0a:6b:0a:32:a1:f1:75:7c:6b:76:5f:1b:ef: + bd:64:c3:34:fd:2e:27:89:dd:ef:e5:74:08:08:a4: + 96:92:7b:f3:4b:f5:ee:eb:91:0b:bb:ca:53:e8:ed: + 48:a8:bb:7c:f8:9f:30:f7:15:05:32:7d:73:62:37: + 4f:f7:a1:d4:de:45:e2:f7:49:86:b9:c9:f8:84:cc: + 67:b2:f0:34:48:e6:54:e4:5d:1f:fb:03:fc:d8:15: + a1:17:0e:53:0d:c8:c9:a6:99:bf:f8:93:df:af:35: + e3:10:91:91:24:f3:eb:88:0b:d8:4f:16:36:a3:28: + ad:21:bd:22:bf:46:59:0a:ea:f0:fb:fc:01:c3:ba: + 42:e9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 77:27:6B:15:A8:06:86:AD:0D:67:E0:D6:5B:82:3A:F8:6B:00:A3:A7 + X509v3 Authority Key Identifier: + keyid:6C:17:23:18:CA:A6:A4:28:C6:08:4C:AA:9A:3F:18:FB:7B:67:B2:36 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + af:80:f1:f7:93:98:cd:84:13:e3:eb:ab:2d:ff:91:4c:72:5d: + d9:a9:b7:96:e8:bc:e9:f3:31:a0:46:7c:0d:49:a3:1f:5a:6a: + aa:82:9a:c2:1f:37:7a:9a:37:1a:96:fb:8e:fa:28:e1:eb:b8: + a3:d0:66:2d:9e:6e:ff:8e:c3:0a:17:23:ae:60:d5:9b:d2:fb: + 23:2b:a9:b0:22:cb:e6:85:29:11:d3:b5:71:3e:30:9a:9c:60: + 24:c5:a8:42:66:4f:5c:10:8b:fa:61:ad:d7:14:2b:51:0e:53: + 24:1a:c7:5f:d9:12:97:6a:8c:da:d5:f9:35:41:4c:d4:0e:a8: + 98:c6:e8:61:db:7b:95:d5:ca:26:ff:60:01:e2:c6:4e:f7:67: + ee:36:1f:2b:71:82:46:f5:11:44:ce:7b:ac:85:06:f1:09:35: + 07:62:08:36:ad:b6:5b:c6:70:a0:bb:f0:5b:2e:47:09:a2:69: + 79:a6:f1:77:fd:3c:b9:57:f4:c7:e6:f8:80:18:ba:d0:a0:c1: + b1:6f:b9:c8:3b:a2:c1:83:5c:e7:3a:05:19:36:c5:ae:54:dc: + df:1d:ad:18:e0:52:dd:71:ba:53:3e:2c:7d:eb:09:3a:cb:25: + 10:b3:52:50:7f:42:2b:a8:2c:a7:cc:02:8e:17:99:af:7e:d2: + 75:f4:15:f1 +-----BEGIN CERTIFICATE----- +MIIDajCCAlKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlEy65CRQ +8AKYp0Jm09ZTTa0/dvpPcmH9ecxD4tYv2ZmEC9o0b2XKeCupIpgEupOJ6YzQcWLN +pDo14owtikg2K9GZUifHRDQwLIenR+PfdKNsxjzSulw8BHkfETZYeoZlYMyhTLr5 +cn6A0xsSGIpEs/P6IPiMPWPjlgprCjKh8XV8a3ZfG++9ZMM0/S4nid3v5XQICKSW +knvzS/Xu65ELu8pT6O1IqLt8+J8w9xUFMn1zYjdP96HU3kXi90mGucn4hMxnsvA0 +SOZU5F0f+wP82BWhFw5TDcjJppm/+JPfrzXjEJGRJPPriAvYTxY2oyitIb0iv0ZZ +Curw+/wBw7pC6QIDAQABo4HIMIHFMB0GA1UdDgQWBBR3J2sVqAaGrQ1n4NZbgjr4 +awCjpzAfBgNVHSMEGDAWgBRsFyMYyqakKMYITKqaPxj7e2eyNjA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAK+A +8feTmM2EE+Prqy3/kUxyXdmpt5bovOnzMaBGfA1Jox9aaqqCmsIfN3qaNxqW+476 +KOHruKPQZi2ebv+OwwoXI65g1ZvS+yMrqbAiy+aFKRHTtXE+MJqcYCTFqEJmT1wQ +i/phrdcUK1EOUyQax1/ZEpdqjNrV+TVBTNQOqJjG6GHbe5XVyib/YAHixk73Z+42 +Hytxgkb1EUTOe6yFBvEJNQdiCDattlvGcKC78FsuRwmiaXmm8Xf9PLlX9Mfm+IAY +utCgwbFvucg7osGDXOc6BRk2xa5U3N8drRjgUt1xulM+LH3rCTrLJRCzUlB/Qiuo +LKfMAo4Xma9+0nX0FfE= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e2:4c:a9:08:30:3f:0e:6a:ec:ec:80:8e:07:cb: + fa:9b:01:b9:8a:37:f0:b1:f2:c2:43:79:90:7e:70: + 76:ac:5c:41:60:55:66:fb:4f:e6:79:c8:18:01:7f: + d5:bd:9a:d5:58:5a:00:bf:81:86:37:1e:68:1a:92: + da:dd:e8:20:1a:47:43:78:bb:7e:5c:82:c6:59:1b: + 37:c9:99:b2:ac:bb:d2:c0:cf:58:5a:25:13:a6:6b: + 9a:79:be:dc:f6:6f:6c:80:5d:58:c2:b5:67:ae:09: + 1b:ba:2a:f3:2a:00:d2:43:b6:59:df:38:7c:ef:c1: + be:1b:a1:e0:7d:9b:20:27:04:67:94:45:b3:2d:f6: + 77:91:3c:c4:94:5f:78:7a:79:2c:4b:21:23:8b:f4: + d3:60:73:10:59:c7:a1:84:3f:5a:4e:82:43:90:68: + 77:2a:f6:b1:d2:d4:cc:cd:76:36:13:95:c5:a7:f4: + 46:d8:b7:ee:ef:59:07:2c:69:4d:9c:22:e4:2d:f1: + a9:2c:50:35:50:c2:91:ea:37:d9:6c:b6:f2:ff:cd: + 7e:00:ae:51:e3:b4:10:5f:87:e3:92:fe:9e:62:a5: + 34:fe:15:c4:19:20:3a:68:fd:3c:be:ae:aa:a3:52: + 48:d3:05:95:99:f8:38:18:c5:44:d6:71:c4:bf:34: + e5:c7 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 6C:17:23:18:CA:A6:A4:28:C6:08:4C:AA:9A:3F:18:FB:7B:67:B2:36 + X509v3 Authority Key Identifier: + keyid:6C:17:23:18:CA:A6:A4:28:C6:08:4C:AA:9A:3F:18:FB:7B:67:B2:36 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + d2:00:6a:7a:21:40:79:ad:84:23:e8:62:29:b5:47:0a:7a:91: + 08:3d:f3:af:0a:14:e9:93:08:7a:81:bf:44:6f:e9:59:5b:d6: + 8f:e1:bd:cd:9f:46:94:2e:7e:79:df:53:9e:85:e3:86:e0:15: + 65:e4:fd:b9:10:f7:19:6c:f1:ba:39:3b:2e:49:97:18:7d:95: + a9:e5:14:49:65:44:31:39:5b:75:c7:09:75:1f:b3:5a:5b:fe: + 09:1a:4a:af:ec:6b:58:5a:7b:ef:44:58:37:ab:23:72:bd:97: + 7b:02:63:65:cf:3d:f6:13:62:44:49:04:dc:85:fc:6f:31:80: + c7:e0:1e:5b:77:90:29:cb:06:67:4e:99:41:b1:66:d7:4b:a3: + fa:85:5c:bc:2e:c5:fa:a0:a1:8d:07:ba:52:31:cf:5e:2a:98: + f1:ba:dc:56:4b:b3:cc:11:b2:d1:2d:0a:eb:75:a8:fe:f6:02: + d8:9b:0f:5b:7e:11:50:b1:51:b9:31:11:c5:4b:fa:bf:34:4d: + 46:e9:27:39:61:ca:09:41:b2:67:fc:54:8a:38:0b:50:7d:f0: + e4:7a:a4:30:08:12:86:b3:fc:d2:43:0c:b5:50:4b:45:ee:cf: + 90:5b:3e:39:47:11:b6:6b:a6:24:fe:02:17:07:7c:06:15:23: + 0f:d8:0e:7b +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOJMqQgwPw5q7OyAjgfL ++psBuYo38LHywkN5kH5wdqxcQWBVZvtP5nnIGAF/1b2a1VhaAL+BhjceaBqS2t3o +IBpHQ3i7flyCxlkbN8mZsqy70sDPWFolE6Zrmnm+3PZvbIBdWMK1Z64JG7oq8yoA +0kO2Wd84fO/Bvhuh4H2bICcEZ5RFsy32d5E8xJRfeHp5LEshI4v002BzEFnHoYQ/ +Wk6CQ5Bodyr2sdLUzM12NhOVxaf0Rti37u9ZByxpTZwi5C3xqSxQNVDCkeo32Wy2 +8v/NfgCuUeO0EF+H45L+nmKlNP4VxBkgOmj9PL6uqqNSSNMFlZn4OBjFRNZxxL80 +5ccCAwEAAaOByzCByDAdBgNVHQ4EFgQUbBcjGMqmpCjGCEyqmj8Y+3tnsjYwHwYD +VR0jBBgwFoAUbBcjGMqmpCjGCEyqmj8Y+3tnsjYwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQDSAGp6IUB5 +rYQj6GIptUcKepEIPfOvChTpkwh6gb9Eb+lZW9aP4b3Nn0aULn5531OeheOG4BVl +5P25EPcZbPG6OTsuSZcYfZWp5RRJZUQxOVt1xwl1H7NaW/4JGkqv7GtYWnvvRFg3 +qyNyvZd7AmNlzz32E2JESQTchfxvMYDH4B5bd5ApywZnTplBsWbXS6P6hVy8LsX6 +oKGNB7pSMc9eKpjxutxWS7PMEbLRLQrrdaj+9gLYmw9bfhFQsVG5MRHFS/q/NE1G +6Sc5YcoJQbJn/FSKOAtQffDkeqQwCBKGs/zSQwy1UEtF7s+QWz45RxG2a6Yk/gIX +B3wGFSMP2A57 +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +U1VDQ0VTUw== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediate-lacks-basic-constraints.pem b/net/data/verify_certificate_chain_unittest/intermediate-lacks-basic-constraints.pem new file mode 100644 index 0000000..90276347 --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/intermediate-lacks-basic-constraints.pem
@@ -0,0 +1,278 @@ +[Created by: generate-intermediate-lacks-basic-constraints.py] + +Certificate chain with 1 intermediate and a trusted root. The intermediate +lacks the basic constraints extension, and hence is expected to fail validation +(RFC 5280 requires v3 signing certificates have a BasicConstaints). + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ac:3c:48:cb:8e:9b:00:37:e3:06:36:23:5e:3c: + 24:0b:d2:57:0e:52:8f:53:d0:48:ca:38:67:91:a7: + 10:d3:35:2d:67:f4:ad:2c:9e:c1:ee:f5:6b:62:23: + 34:03:32:76:29:96:fd:db:cc:a4:9a:d8:b6:97:c4: + a9:73:c1:a1:57:2f:cd:80:d1:d9:db:39:82:11:bb: + 95:3e:1b:b3:1e:ac:e7:c0:67:f3:1e:cb:4f:d4:a6: + c7:01:32:c5:45:ca:53:ff:cf:46:e1:b3:4f:55:01: + ef:76:44:92:55:55:d8:a4:db:5c:80:8f:48:51:86: + 6c:d9:b6:b7:5c:74:56:06:00:38:3f:d9:ee:c3:ae: + 78:a0:57:ff:fa:41:02:14:63:00:bb:1f:98:9a:f5: + 39:50:51:50:78:03:5d:13:a2:fd:a3:08:b0:ff:69: + ee:60:c8:af:1c:1e:8a:13:4b:0e:b9:48:29:92:f2: + 95:0a:d9:85:2f:ff:17:ab:c7:6f:e0:32:d1:16:9e: + 66:ae:81:87:b8:7e:70:ac:73:8c:67:de:dd:1a:e0: + 0e:0e:bb:ab:bc:f5:ef:38:d9:37:49:71:d1:7c:e6: + 64:f7:00:10:e4:83:ed:1e:58:05:44:89:f2:a9:a2: + 1d:57:5c:b5:db:bc:55:39:35:d7:f3:a5:b8:28:d1: + 45:5d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 9E:25:C3:B0:61:AE:69:26:DE:05:F4:15:3C:58:B0:7C:6D:91:5C:5B + X509v3 Authority Key Identifier: + keyid:E5:AE:8F:CC:87:F7:B5:85:86:1E:4B:A6:CF:FC:B9:CA:10:C8:79:90 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + c5:3c:97:21:6a:dc:f8:0c:23:76:c2:4e:33:63:f4:7e:d1:61: + bd:f8:cf:6d:b5:ef:d6:f1:96:a0:84:07:42:ab:e2:34:90:3a: + 95:2a:db:f6:19:28:bd:19:22:65:20:b0:25:b0:f0:ca:d0:d3: + 44:41:fe:03:f2:9f:0c:df:02:dc:64:c6:47:13:1e:26:dd:6a: + 5d:52:8a:fe:d3:0a:9a:d1:8c:a5:93:ec:1a:d4:d5:ad:ba:cd: + 6b:c2:99:6b:04:b7:06:98:a8:53:dc:d9:97:97:da:ac:29:bb: + 09:4a:25:ca:08:83:eb:ed:1f:a7:ae:28:fc:51:09:a9:e4:95: + f2:66:97:f2:97:48:9e:01:44:40:5b:4a:91:a5:ed:f9:86:6b: + fb:e2:47:c8:47:aa:ad:8d:aa:79:30:fb:4f:f1:a7:7c:c3:23: + b3:23:4d:15:a3:04:67:ff:26:b1:50:c0:5a:13:f4:8a:61:da: + 98:a2:35:0e:ec:4f:2b:e7:e0:dc:29:0a:07:20:e4:22:97:b1: + da:0d:73:6f:32:03:f1:cd:4b:a2:7b:9b:c3:62:a8:dd:55:02: + 57:6b:2f:a4:d6:46:20:bc:bd:f7:52:e7:44:8e:3d:2c:73:05: + 55:ac:35:8b:af:39:32:a1:07:da:fd:bb:8c:bb:35:e0:e6:bb: + 0c:49:1a:e4 +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsPEjL +jpsAN+MGNiNePCQL0lcOUo9T0EjKOGeRpxDTNS1n9K0snsHu9WtiIzQDMnYplv3b +zKSa2LaXxKlzwaFXL82A0dnbOYIRu5U+G7MerOfAZ/Mey0/UpscBMsVFylP/z0bh +s09VAe92RJJVVdik21yAj0hRhmzZtrdcdFYGADg/2e7DrnigV//6QQIUYwC7H5ia +9TlQUVB4A10Tov2jCLD/ae5gyK8cHooTSw65SCmS8pUK2YUv/xerx2/gMtEWnmau +gYe4fnCsc4xn3t0a4A4Ou6u89e842TdJcdF85mT3ABDkg+0eWAVEifKpoh1XXLXb +vFU5Ndfzpbgo0UVdAgMBAAGjgekwgeYwHQYDVR0OBBYEFJ4lw7Bhrmkm3gX0FTxY +sHxtkVxbMB8GA1UdIwQYMBaAFOWuj8yH97WFhh5Lps/8ucoQyHmQMD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAxTyXIWrc+AwjdsJOM2P0 +ftFhvfjPbbXv1vGWoIQHQqviNJA6lSrb9hkovRkiZSCwJbDwytDTREH+A/KfDN8C +3GTGRxMeJt1qXVKK/tMKmtGMpZPsGtTVrbrNa8KZawS3BpioU9zZl5farCm7CUol +ygiD6+0fp64o/FEJqeSV8maX8pdIngFEQFtKkaXt+YZr++JHyEeqrY2qeTD7T/Gn +fMMjsyNNFaMEZ/8msVDAWhP0imHamKI1DuxPK+fg3CkKByDkIpex2g1zbzID8c1L +onubw2Ko3VUCV2svpNZGILy991LnRI49LHMFVaw1i685MqEH2v27jLs14Oa7DEka +5A== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c5:bf:ce:e4:8e:d2:b9:92:d9:78:eb:36:78:b0: + d4:2b:a9:22:cd:83:57:58:a2:0f:5b:e5:c8:e4:f4: + d6:41:2c:1f:5a:08:6b:12:7b:f6:8f:39:44:0f:f4: + d2:3e:56:cd:63:87:13:b1:88:1a:da:f1:13:2f:4a: + d0:76:78:61:6f:71:08:e0:0c:a2:9a:6a:6b:c7:8c: + 81:6f:e1:ea:22:09:83:fd:09:53:78:f0:1d:4e:f7: + b3:17:17:7e:fc:dc:a5:21:83:7f:46:8c:81:af:07: + 68:91:14:54:43:bf:d2:85:fa:58:91:61:cc:87:bc: + 8d:b3:97:c1:a5:42:de:73:49:29:c9:0c:48:92:15: + d9:0e:6b:3d:4a:4c:50:c6:8b:a5:69:6c:b2:2f:02: + 9e:0a:4f:27:1a:d0:1c:0e:b8:d9:fc:a7:62:92:69: + 0c:40:ec:49:3b:59:a5:38:fc:8e:cb:2f:91:9f:09: + 76:2c:b8:d4:25:7e:83:71:56:89:29:2c:a3:d8:bf: + 95:70:99:f5:cb:20:df:fa:fd:b8:89:e6:42:82:a9: + 01:d8:e0:42:f2:d2:c3:78:26:cc:fb:05:30:90:a0: + 83:bd:ce:b3:6d:bb:01:ae:84:aa:71:4f:d9:37:38: + 7e:07:35:6f:ed:88:c7:52:17:38:ac:c6:44:b5:fe: + 4a:b3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + E5:AE:8F:CC:87:F7:B5:85:86:1E:4B:A6:CF:FC:B9:CA:10:C8:79:90 + X509v3 Authority Key Identifier: + keyid:0F:59:3C:0D:B8:B1:5B:C5:96:9D:B4:E8:4F:CF:4B:A6:B3:AD:33:E7 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha256WithRSAEncryption + 12:11:99:0b:59:f6:cd:61:bf:99:bc:25:83:b2:e7:4b:42:ec: + ee:1d:03:3b:cf:5d:76:95:19:2c:d1:41:d0:f6:5c:08:9d:6f: + 66:50:07:ea:07:fa:88:01:96:05:39:8d:6a:e0:34:27:1e:a2: + 80:c2:9b:91:ba:17:35:49:ef:8c:42:9d:59:ac:42:3f:52:fa: + ef:5f:51:aa:3a:dc:b6:ee:d6:8c:20:89:de:36:7d:a2:e2:ff: + eb:13:9d:dc:99:d1:62:33:c5:82:19:12:18:d4:94:5b:5f:c4: + f7:74:55:f0:be:fa:0e:4d:7a:01:7e:53:b3:2d:4d:09:b6:7b: + 8e:0a:7c:3e:b9:39:a1:ee:b6:3d:3f:e8:4a:b0:1d:e4:ee:7b: + 96:75:19:b5:71:6a:ae:e0:af:14:59:9f:fc:2b:13:dd:70:c9: + da:dd:a9:3c:14:3e:f1:69:3b:ce:42:b4:c5:3f:12:f8:37:eb: + bf:0c:9d:48:a4:6e:4c:9f:e7:3c:4f:a5:91:32:8b:7f:2e:5f: + e7:bf:bc:f4:a0:5f:43:f7:3a:1f:78:a3:0e:8e:c0:46:16:9e: + 58:6a:0f:7e:e0:69:af:94:ec:bc:3a:7f:8b:44:ef:19:f8:14: + 16:a4:1d:bd:49:c6:96:da:ba:11:a8:bc:36:11:c7:ad:ab:e0: + a5:e2:05:77 +-----BEGIN CERTIFICATE----- +MIIDXDCCAkSgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxb/O5I7S +uZLZeOs2eLDUK6kizYNXWKIPW+XI5PTWQSwfWghrEnv2jzlED/TSPlbNY4cTsYga +2vETL0rQdnhhb3EI4Ayimmprx4yBb+HqIgmD/QlTePAdTvezFxd+/NylIYN/RoyB +rwdokRRUQ7/ShfpYkWHMh7yNs5fBpULec0kpyQxIkhXZDms9SkxQxoulaWyyLwKe +Ck8nGtAcDrjZ/KdikmkMQOxJO1mlOPyOyy+Rnwl2LLjUJX6DcVaJKSyj2L+VcJn1 +yyDf+v24ieZCgqkB2OBC8tLDeCbM+wUwkKCDvc6zbbsBroSqcU/ZNzh+BzVv7YjH +Uhc4rMZEtf5KswIDAQABo4G6MIG3MB0GA1UdDgQWBBTlro/Mh/e1hYYeS6bP/LnK +EMh5kDAfBgNVHSMEGDAWgBQPWTwNuLFbxZadtOhPz0ums60z5zA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4IBAQASEZkLWfbNYb+ZvCWDsudL +QuzuHQM7z112lRks0UHQ9lwInW9mUAfqB/qIAZYFOY1q4DQnHqKAwpuRuhc1Se+M +Qp1ZrEI/UvrvX1GqOty27taMIIneNn2i4v/rE53cmdFiM8WCGRIY1JRbX8T3dFXw +vvoOTXoBflOzLU0JtnuOCnw+uTmh7rY9P+hKsB3k7nuWdRm1cWqu4K8UWZ/8KxPd +cMna3ak8FD7xaTvOQrTFPxL4N+u/DJ1IpG5Mn+c8T6WRMot/Ll/nv7z0oF9D9zof +eKMOjsBGFp5Yag9+4GmvlOy8On+LRO8Z+BQWpB29ScaW2roRqLw2Ecetq+Cl4gV3 +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c3:da:da:10:95:78:5c:73:c8:43:66:41:23:8e: + 3e:3f:a1:00:57:de:60:d9:2a:84:57:85:08:c6:60: + 79:65:2d:51:c9:93:c1:e7:fa:5b:1a:eb:6f:79:44: + d5:71:f6:bd:f4:8c:86:0b:d9:e3:49:dd:a6:f3:5d: + 48:8a:25:4a:2a:20:80:c1:83:da:b8:c5:e0:20:de: + 40:67:bc:22:38:51:72:df:e3:b7:82:aa:47:ed:c9: + 74:a0:82:97:71:35:a8:2f:73:01:86:56:43:e8:88: + 42:f9:cc:9b:69:71:09:45:8c:39:82:14:db:2e:08: + 17:85:96:c5:69:46:73:55:9b:d8:12:4b:5f:32:70: + cc:52:4e:7e:77:94:78:0e:f4:dd:40:ff:d7:3b:cc: + f7:df:a9:a7:a1:a3:a3:4e:25:c8:e4:68:1c:e3:90: + c2:c5:bb:66:3a:c1:8b:e3:1b:df:b9:8c:0c:9a:3a: + 6a:a9:8e:8d:b3:54:49:14:af:28:51:29:b2:5b:7b: + 68:34:4c:f3:bb:a5:5d:51:0b:99:6b:b1:fe:b3:16: + d1:ef:2f:18:ee:8a:f8:05:9b:df:0d:92:3a:e0:62: + 7b:1d:bc:fb:60:45:ce:f9:e0:46:f6:16:39:08:a7: + 68:b5:da:e5:9f:7c:db:07:15:dc:47:e6:5d:a3:8c: + 06:7b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 0F:59:3C:0D:B8:B1:5B:C5:96:9D:B4:E8:4F:CF:4B:A6:B3:AD:33:E7 + X509v3 Authority Key Identifier: + keyid:0F:59:3C:0D:B8:B1:5B:C5:96:9D:B4:E8:4F:CF:4B:A6:B3:AD:33:E7 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 3e:f9:8e:c2:1a:d7:ea:b1:71:03:6d:6d:a9:de:e9:45:1d:ab: + a3:26:4c:95:4b:15:ad:9d:be:94:aa:20:57:83:b2:32:96:06: + c1:37:9a:6a:18:41:ad:13:3b:52:23:a1:0a:1f:fc:8c:fa:3b: + 88:43:d1:5e:1e:59:80:06:a5:0a:5e:95:66:3d:3d:cb:4a:b4: + 38:77:a6:fa:04:29:e8:c1:b8:b5:f7:49:07:ae:53:dd:62:64: + 3c:70:4c:64:b5:54:84:4d:04:3f:6d:86:80:9d:e2:2b:a4:88: + 1c:38:74:fc:83:c3:60:c8:86:64:f5:d7:29:f7:e4:8e:02:a9: + 47:a6:e1:46:0f:c4:b5:22:59:f1:a7:1b:ae:86:7c:70:32:d4: + 8c:19:7f:a7:6d:82:0b:f3:42:37:02:b5:3d:f3:41:d5:7d:67: + 97:80:78:9a:e2:06:54:18:bc:b0:7f:5d:77:15:bb:89:cb:4d: + 29:0c:02:ab:b3:b7:40:44:3a:2c:4a:2e:54:43:7f:ff:b0:5f: + da:c5:5f:38:0e:ce:4e:18:ed:f3:f9:99:f0:7c:01:69:ca:0e: + 15:85:1e:ff:b7:2d:04:6c:3b:5b:f9:7f:70:bc:0c:ac:16:b7: + d1:b4:f1:74:84:ad:73:e7:9f:c7:c9:ea:93:d9:f1:c6:a7:59: + bf:92:4e:ec +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMPa2hCVeFxzyENmQSOO +Pj+hAFfeYNkqhFeFCMZgeWUtUcmTwef6Wxrrb3lE1XH2vfSMhgvZ40ndpvNdSIol +SioggMGD2rjF4CDeQGe8IjhRct/jt4KqR+3JdKCCl3E1qC9zAYZWQ+iIQvnMm2lx +CUWMOYIU2y4IF4WWxWlGc1Wb2BJLXzJwzFJOfneUeA703UD/1zvM99+pp6Gjo04l +yORoHOOQwsW7ZjrBi+Mb37mMDJo6aqmOjbNUSRSvKFEpslt7aDRM87ulXVELmWux +/rMW0e8vGO6K+AWb3w2SOuBiex28+2BFzvngRvYWOQinaLXa5Z982wcV3EfmXaOM +BnsCAwEAAaOByzCByDAdBgNVHQ4EFgQUD1k8DbixW8WWnbToT89LprOtM+cwHwYD +VR0jBBgwFoAUD1k8DbixW8WWnbToT89LprOtM+cwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA++Y7CGtfq +sXEDbW2p3ulFHaujJkyVSxWtnb6UqiBXg7IylgbBN5pqGEGtEztSI6EKH/yM+juI +Q9FeHlmABqUKXpVmPT3LSrQ4d6b6BCnowbi190kHrlPdYmQ8cExktVSETQQ/bYaA +neIrpIgcOHT8g8NgyIZk9dcp9+SOAqlHpuFGD8S1IlnxpxuuhnxwMtSMGX+nbYIL +80I3ArU980HVfWeXgHia4gZUGLywf113FbuJy00pDAKrs7dARDosSi5UQ3//sF/a +xV84Ds5OGO3z+ZnwfAFpyg4VhR7/ty0EbDtb+X9wvAysFrfRtPF0hK1z55/HyeqT +2fHGp1m/kk7s +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +RkFJTA== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediate-lacks-signing-key-usage.pem b/net/data/verify_certificate_chain_unittest/intermediate-lacks-signing-key-usage.pem new file mode 100644 index 0000000..536c478 --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/intermediate-lacks-signing-key-usage.pem
@@ -0,0 +1,281 @@ +[Created by: generate-intermediate-lacks-signing-key-usage.py] + +Certificate chain with 1 intermediate and a trusted root. The intermediate +contains a keyUsage extension, HOWEVER it does not contain the keyCertSign bit. +Hence validation is expected to fail. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a3:21:17:35:c0:77:f1:a3:51:77:11:45:3e:92: + 5f:97:65:eb:99:cc:26:e2:8c:f8:4a:d8:3d:71:17: + a2:eb:6a:cf:2f:07:a8:fa:27:c1:f8:c5:50:22:42: + a2:6f:92:4b:67:c3:0c:a7:ec:35:87:05:ac:eb:e3: + 27:cd:62:3d:c4:2e:80:f6:2a:af:31:05:c7:1b:0f: + 3b:71:6d:90:77:0d:b4:48:e7:26:2e:4a:44:af:bb: + 76:e0:62:ec:e6:61:cc:5b:61:ea:03:ce:4d:46:d0: + 96:e2:d5:d9:67:6f:0c:f2:06:e3:9a:14:04:68:82: + 88:d6:8b:c1:7f:fb:81:8c:e6:dc:88:20:f7:53:ef: + d5:56:5b:5e:00:b3:5b:e8:ce:d0:d2:6a:ed:b8:4a: + f2:4b:56:fb:63:75:d4:6b:a3:8a:d4:3f:e6:9e:29: + 1b:a7:23:61:ba:f0:d6:19:fb:8c:ad:40:2f:7c:14: + 36:0f:4b:f1:6e:f0:b8:6e:7d:cc:82:11:63:48:15: + 2f:34:00:99:cd:be:b4:1a:be:d8:73:38:00:ac:c1: + 09:41:a2:c4:ec:74:69:15:52:c4:45:2d:20:ff:b5: + ce:d0:41:be:a2:b2:4d:ef:a7:3b:f1:df:9d:78:1a: + 9d:2c:6c:61:26:2e:f7:82:ab:50:76:6d:a3:d3:33: + 46:07 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 95:3C:F4:24:9F:9C:4A:CB:16:AA:A4:8A:AB:DF:D7:9D:6D:BA:AC:FA + X509v3 Authority Key Identifier: + keyid:29:73:E8:7F:69:DE:63:14:43:C6:6D:55:6C:C2:AE:84:FA:D5:FC:8C + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + a7:dc:31:88:64:26:72:62:34:8d:3a:75:7a:71:d4:ae:7a:2c: + f4:2d:44:e9:e9:e8:c5:4d:79:b2:dc:12:ea:75:60:44:cb:6e: + df:22:47:d5:ae:f6:03:dc:c4:6b:cf:90:75:29:49:50:04:e0: + 94:2a:b3:bf:d4:ae:e2:08:ad:52:22:65:91:33:09:79:cf:c9: + 27:9b:52:dd:a8:0d:f5:21:b6:58:c4:5f:1b:79:72:69:7a:7b: + 49:7d:64:67:d0:d6:1c:21:fe:e9:ae:39:1c:b4:3f:f2:f6:6d: + 7e:30:15:76:a3:af:eb:43:c0:ed:f3:8a:bc:48:5c:47:fc:44: + 09:da:7d:9a:20:f1:e2:1d:4d:40:34:0c:e1:68:16:9e:47:57: + 1a:6a:19:e4:b2:6e:dd:7c:69:5f:b8:2b:bd:e7:cb:e4:9c:9c: + 79:e1:a5:b3:82:a1:c9:5b:fd:73:d6:a8:1d:1d:d8:31:d6:37: + 00:e9:7a:d2:a2:ee:c0:42:21:22:da:70:6e:a8:8c:fa:0c:24: + c9:70:4b:49:0a:c1:db:35:f2:71:d7:30:41:a7:6b:05:92:c6: + cd:8c:d4:de:c2:6b:aa:b8:70:d2:fa:cf:9a:01:af:34:80:95: + ad:ab:59:86:f2:56:6d:d8:43:95:24:e3:f7:7b:b9:83:89:ed: + e7:7a:2f:35 +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCjIRc1 +wHfxo1F3EUU+kl+XZeuZzCbijPhK2D1xF6Lras8vB6j6J8H4xVAiQqJvkktnwwyn +7DWHBazr4yfNYj3ELoD2Kq8xBccbDztxbZB3DbRI5yYuSkSvu3bgYuzmYcxbYeoD +zk1G0Jbi1dlnbwzyBuOaFARogojWi8F/+4GM5tyIIPdT79VWW14As1voztDSau24 +SvJLVvtjddRro4rUP+aeKRunI2G68NYZ+4ytQC98FDYPS/Fu8LhufcyCEWNIFS80 +AJnNvrQavthzOACswQlBosTsdGkVUsRFLSD/tc7QQb6isk3vpzvx3514Gp0sbGEm +LveCq1B2baPTM0YHAgMBAAGjgekwgeYwHQYDVR0OBBYEFJU89CSfnErLFqqkiqvf +151tuqz6MB8GA1UdIwQYMBaAFClz6H9p3mMUQ8ZtVWzCroT61fyMMD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAp9wxiGQmcmI0jTp1enHU +rnos9C1E6enoxU15stwS6nVgRMtu3yJH1a72A9zEa8+QdSlJUATglCqzv9Su4git +UiJlkTMJec/JJ5tS3agN9SG2WMRfG3lyaXp7SX1kZ9DWHCH+6a45HLQ/8vZtfjAV +dqOv60PA7fOKvEhcR/xECdp9miDx4h1NQDQM4WgWnkdXGmoZ5LJu3XxpX7grvefL +5JyceeGls4KhyVv9c9aoHR3YMdY3AOl60qLuwEIhItpwbqiM+gwkyXBLSQrB2zXy +cdcwQadrBZLGzYzU3sJrqrhw0vrPmgGvNICVratZhvJWbdhDlSTj93u5g4nt53ov +NQ== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:cf:bd:56:f0:dc:36:bc:a8:05:9b:fd:e3:c1:86: + da:96:c5:0b:b0:7f:fd:e5:6d:f4:df:44:46:82:ed: + 45:60:4b:5d:c6:27:5a:d8:f1:3c:28:a5:eb:3f:a9: + 5f:bc:b2:a9:20:fe:09:fa:39:76:5f:2a:91:b2:ef: + c9:47:70:c9:d0:ce:66:57:25:d0:72:12:c5:2a:ab: + 5c:bc:b3:9a:ba:c8:e9:cb:81:6a:16:f1:7d:a9:9f: + e8:9a:0a:47:29:53:34:f7:99:70:14:c6:63:4c:aa: + ba:96:7c:78:c4:11:d1:cc:3b:35:56:e8:7f:41:9c: + 41:69:d2:b0:dd:36:00:ed:dd:a2:bd:e2:56:29:c5: + 8d:4e:7b:71:fb:f5:a1:7b:37:df:d2:66:d4:fe:c8: + 24:6d:a3:c4:43:e9:d3:3e:e3:08:78:95:e9:86:e3: + 73:09:f9:04:fe:1a:25:19:5b:7c:a8:da:62:05:aa: + 56:1b:2a:d4:33:ff:4f:a2:fe:34:90:ec:e9:94:f5: + 0a:92:e9:b3:bf:c4:d3:78:80:0a:5e:4e:11:58:94: + 66:a8:52:b8:6e:49:64:cb:45:ee:7c:46:80:d7:3d: + 40:df:9e:69:54:ce:a5:7f:db:6b:73:42:c5:9c:6e: + 7c:b6:9f:ac:b9:8c:cd:7f:da:00:7b:3b:c2:dd:4d: + 44:c7 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 29:73:E8:7F:69:DE:63:14:43:C6:6D:55:6C:C2:AE:84:FA:D5:FC:8C + X509v3 Authority Key Identifier: + keyid:77:B3:BD:49:4D:67:D0:7E:4F:67:C3:26:C7:1E:66:42:F9:6D:E4:08 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + ad:b2:08:36:77:a1:da:aa:e4:31:7d:a8:61:03:be:0a:86:a2: + 15:3b:08:bb:c8:86:eb:f8:52:c0:63:27:db:5c:25:16:98:05: + b1:84:dc:12:74:ce:25:a6:2e:be:32:2c:1f:0a:04:4e:9e:bb: + a1:b6:34:ef:20:2d:a3:fe:cc:b3:40:2e:75:9c:2d:c3:c0:e7: + 8e:aa:9f:18:60:a9:61:18:4f:a5:d8:3d:c7:d3:09:62:6c:b8: + 5a:99:3b:34:70:7b:7d:61:cc:f8:c9:71:97:2c:59:96:d2:1a: + c5:4e:ce:df:65:cf:18:05:bd:9f:bc:86:ba:16:55:79:58:d8: + f7:32:44:b6:59:32:9f:5d:ef:04:25:2a:2d:54:36:9e:62:0f: + c4:df:1c:10:64:02:ba:64:f2:ea:3d:cc:5c:ea:2e:4d:72:fa: + e9:72:0f:77:af:5d:1e:32:b9:64:7c:c5:b2:77:36:64:e5:ba: + d0:a0:8c:97:7d:b3:76:6c:c1:15:70:f8:0c:50:b8:3c:d4:6c: + 4f:33:32:f2:c8:b8:35:cd:80:a2:3a:49:55:ba:2e:5b:c9:9a: + b6:77:fb:0f:01:2e:72:21:bc:88:f6:e3:71:8c:68:59:f3:1b: + d8:e1:d3:e3:6c:15:5d:8d:82:a3:db:84:44:58:3e:2f:a9:88: + 56:2a:a6:4b +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz71W8Nw2 +vKgFm/3jwYbalsULsH/95W3030RGgu1FYEtdxida2PE8KKXrP6lfvLKpIP4J+jl2 +XyqRsu/JR3DJ0M5mVyXQchLFKqtcvLOausjpy4FqFvF9qZ/omgpHKVM095lwFMZj +TKq6lnx4xBHRzDs1Vuh/QZxBadKw3TYA7d2iveJWKcWNTntx+/Whezff0mbU/sgk +baPEQ+nTPuMIeJXphuNzCfkE/holGVt8qNpiBapWGyrUM/9Pov40kOzplPUKkumz +v8TTeIAKXk4RWJRmqFK4bklky0XufEaA1z1A355pVM6lf9trc0LFnG58tp+suYzN +f9oAezvC3U1ExwIDAQABo4HLMIHIMB0GA1UdDgQWBBQpc+h/ad5jFEPGbVVswq6E ++tX8jDAfBgNVHSMEGDAWgBR3s71JTWfQfk9nwybHHmZC+W3kCDA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgWgMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +AK2yCDZ3odqq5DF9qGEDvgqGohU7CLvIhuv4UsBjJ9tcJRaYBbGE3BJ0ziWmLr4y +LB8KBE6eu6G2NO8gLaP+zLNALnWcLcPA546qnxhgqWEYT6XYPcfTCWJsuFqZOzRw +e31hzPjJcZcsWZbSGsVOzt9lzxgFvZ+8hroWVXlY2PcyRLZZMp9d7wQlKi1UNp5i +D8TfHBBkArpk8uo9zFzqLk1y+ulyD3evXR4yuWR8xbJ3NmTlutCgjJd9s3ZswRVw ++AxQuDzUbE8zMvLIuDXNgKI6SVW6LlvJmrZ3+w8BLnIhvIj243GMaFnzG9jh0+Ns +FV2NgqPbhERYPi+piFYqpks= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b3:13:19:f8:ad:c0:ff:5e:86:19:9a:3c:7f:0c: + 04:81:2c:bd:c4:ee:fe:6c:bb:b5:a2:ee:08:10:bd: + bb:b6:d1:6c:0d:e7:49:6a:45:0f:0f:46:2b:b6:49: + 49:92:7d:c8:b8:81:c1:3f:70:80:39:8a:29:de:77: + f0:a3:3e:ef:8f:8d:9c:74:ca:05:c6:5f:12:fc:d4: + 4f:47:64:5d:ea:4d:84:af:f0:d0:88:ff:58:98:ad: + 7f:6f:c0:22:bc:8e:a4:44:7b:2c:d3:3e:08:45:2a: + 13:20:90:1d:b6:0b:2c:4e:a4:40:c3:76:66:6f:eb: + 5c:49:fc:1d:81:8e:a7:cc:a3:91:bd:6f:fa:22:73: + 84:35:99:08:2c:3e:8e:0b:74:a6:16:79:b3:37:2f: + 66:5c:b1:4c:55:76:af:65:9c:cc:e6:af:b0:8c:c3: + 28:24:c9:a0:f2:b4:d0:74:d3:e0:72:af:0d:86:f0: + 21:4a:9e:4a:9f:95:7b:7a:73:4c:a9:b5:0a:ac:23: + f7:63:64:88:fc:00:9b:69:23:33:1a:75:bd:6d:f6: + f2:62:c7:68:19:d0:d1:55:2c:6d:f4:41:d8:3b:79: + 41:5f:44:97:b9:8f:5a:b4:0a:12:b9:94:0e:34:c7: + a7:93:cf:dd:f1:3d:bb:0f:11:33:fc:c8:c4:76:2d: + 9e:cd + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 77:B3:BD:49:4D:67:D0:7E:4F:67:C3:26:C7:1E:66:42:F9:6D:E4:08 + X509v3 Authority Key Identifier: + keyid:77:B3:BD:49:4D:67:D0:7E:4F:67:C3:26:C7:1E:66:42:F9:6D:E4:08 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 5d:bb:5a:36:f5:74:9c:51:8c:7c:b3:e0:71:91:0d:51:59:45: + 92:b8:3c:f1:0a:42:ac:c3:c7:9f:4e:2a:61:09:7d:46:27:c7: + a6:23:09:39:39:18:9e:78:3f:94:cf:d6:44:5e:8e:9f:c4:4e: + fd:b4:ab:4f:56:ea:90:6d:4d:51:88:55:e2:56:c0:03:14:a2: + 99:d2:1d:67:03:75:6d:5c:a0:c5:5c:78:a6:c5:8e:96:6e:7a: + 4f:a1:b0:4e:29:62:92:bc:44:88:a4:72:8d:64:16:da:ff:c4: + e8:4c:d3:eb:a6:03:85:eb:a8:42:ee:ae:c0:87:f2:43:41:05: + 43:e2:d5:ad:b6:59:dd:59:51:6c:2b:77:f3:51:a9:e0:9b:3e: + ba:04:64:d3:f3:ce:59:5a:ad:b1:56:da:91:80:89:d9:62:81: + 99:9c:a4:49:24:7a:bc:91:4e:ab:86:e6:0b:76:0d:34:2d:75: + fa:7b:13:f5:b3:52:22:c1:57:7c:cd:79:0c:2b:ba:8b:87:83: + 52:59:5b:69:55:9d:c4:0a:98:b0:b0:dd:88:86:8c:28:c3:b2: + bd:35:85:b1:f0:78:6a:99:ac:63:52:08:5b:69:97:55:c0:87: + 81:be:bd:09:7f:eb:56:a9:84:9f:f6:9c:df:f2:19:41:60:f1: + 06:d1:77:38 +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALMTGfitwP9ehhmaPH8M +BIEsvcTu/my7taLuCBC9u7bRbA3nSWpFDw9GK7ZJSZJ9yLiBwT9wgDmKKd538KM+ +74+NnHTKBcZfEvzUT0dkXepNhK/w0Ij/WJitf2/AIryOpER7LNM+CEUqEyCQHbYL +LE6kQMN2Zm/rXEn8HYGOp8yjkb1v+iJzhDWZCCw+jgt0phZ5szcvZlyxTFV2r2Wc +zOavsIzDKCTJoPK00HTT4HKvDYbwIUqeSp+Ve3pzTKm1Cqwj92NkiPwAm2kjMxp1 +vW328mLHaBnQ0VUsbfRB2Dt5QV9El7mPWrQKErmUDjTHp5PP3fE9uw8RM/zIxHYt +ns0CAwEAAaOByzCByDAdBgNVHQ4EFgQUd7O9SU1n0H5PZ8Mmxx5mQvlt5AgwHwYD +VR0jBBgwFoAUd7O9SU1n0H5PZ8Mmxx5mQvlt5AgwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBdu1o29XSc +UYx8s+BxkQ1RWUWSuDzxCkKsw8efTiphCX1GJ8emIwk5ORieeD+Uz9ZEXo6fxE79 +tKtPVuqQbU1RiFXiVsADFKKZ0h1nA3VtXKDFXHimxY6WbnpPobBOKWKSvESIpHKN +ZBba/8ToTNPrpgOF66hC7q7Ah/JDQQVD4tWttlndWVFsK3fzUangmz66BGTT885Z +Wq2xVtqRgInZYoGZnKRJJHq8kU6rhuYLdg00LXX6exP1s1IiwVd8zXkMK7qLh4NS +WVtpVZ3ECpiwsN2Ihowow7K9NYWx8HhqmaxjUghbaZdVwIeBvr0Jf+tWqYSf9pzf +8hlBYPEG0Xc4 +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +RkFJTA== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediate-signed-with-md5.pem b/net/data/verify_certificate_chain_unittest/intermediate-signed-with-md5.pem new file mode 100644 index 0000000..f3104f8 --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/intermediate-signed-with-md5.pem
@@ -0,0 +1,281 @@ +[Created by: generate-intermediate-signed-with-md5.py] + +Certificate chain with 1 intermediate and a trusted root. The intermediate +however is signed using the MD5 hash. Verification is expected to fail because +MD5 is too weak. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:bf:20:16:45:28:21:d2:a5:63:de:24:67:38:92: + 4c:f1:a4:c8:45:30:94:b8:aa:5f:7c:1a:3f:6c:28: + 2f:31:7e:a6:bb:af:45:46:68:a2:f2:5d:a4:94:4b: + 9b:c9:4c:e0:5d:be:ce:34:5e:08:df:a7:50:c0:30: + 94:98:0f:52:ec:ec:91:23:91:bc:24:60:65:9d:b7: + 74:38:7f:9d:d4:20:94:5c:1b:6f:71:82:e1:b5:98: + 95:3c:33:48:7e:6a:c6:e0:59:e6:a2:c5:0b:95:78: + 0e:7e:e3:a8:16:93:0a:43:df:ec:d7:03:c0:f1:60: + 13:45:9d:52:b5:37:66:03:79:78:8f:d6:53:87:7c: + dd:50:8a:16:54:33:bb:62:f2:42:a0:fa:49:c3:c1: + e2:c4:c8:d7:db:49:16:43:c8:69:0e:88:e2:f1:2d: + c6:59:c6:5a:e3:d8:57:e9:a7:10:48:73:c8:c8:f7: + a1:6d:57:25:b3:04:43:05:6a:90:1d:87:36:67:7f: + 3e:97:eb:5b:66:03:3a:10:56:32:1d:04:cc:43:90: + 82:9c:ed:d2:b4:4d:ba:d0:ac:23:26:f9:25:5e:63: + 6c:e1:83:07:2b:ec:38:9a:d1:82:bc:38:a0:64:58: + 19:c2:77:3c:e9:bd:20:d5:45:43:8d:ee:51:ba:98: + 95:65 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 7E:D1:A4:40:CE:81:CA:14:BD:C9:25:39:E5:F7:21:B6:24:90:61:1D + X509v3 Authority Key Identifier: + keyid:60:72:15:4D:8C:1A:E1:CD:8F:EF:00:AA:9B:37:4C:00:57:29:66:15 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + 6f:98:46:c6:44:e8:ba:f3:06:49:81:74:87:9e:d5:a1:0c:54: + 66:56:88:7d:89:5e:cd:2f:1a:06:af:d8:c7:ed:9e:ad:8c:7a: + b0:3d:eb:93:3a:59:49:89:ba:ec:27:15:0e:08:d0:cd:ff:40: + 57:3f:c2:77:c1:08:cb:5d:4f:40:ec:20:b3:96:9b:43:fa:96: + 00:42:cd:dc:db:27:3e:98:fd:8a:45:80:ef:5c:86:20:12:a5: + 83:b3:74:66:09:57:1c:4d:7e:0e:00:c4:57:dc:86:c0:2b:db: + fb:3a:77:1c:5f:7d:8f:ae:47:16:96:85:48:a7:95:4c:bc:b1: + 18:09:34:c4:78:76:57:46:db:1e:b7:12:16:78:54:ec:2d:eb: + 44:00:54:48:1d:6b:b0:d1:98:a8:58:ab:3d:f2:f2:5b:06:44: + d1:d5:d6:f5:d1:f2:c4:46:93:9a:9b:29:a8:9f:91:3d:e5:16: + d6:d6:ba:55:76:1c:2d:90:76:2f:92:a1:e4:52:a4:f3:f3:2a: + 3c:b3:11:78:f6:9a:ce:17:c3:8f:da:57:fc:a2:02:06:59:9f: + 18:10:ba:45:b4:0d:3d:64:aa:6c:ae:5b:a6:c8:f3:8b:d0:b0: + b6:1b:4a:cc:6c:fe:f9:d6:e4:15:da:28:1b:22:b3:ce:b4:6f: + bf:39:9b:34 +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/IBZF +KCHSpWPeJGc4kkzxpMhFMJS4ql98Gj9sKC8xfqa7r0VGaKLyXaSUS5vJTOBdvs40 +Xgjfp1DAMJSYD1Ls7JEjkbwkYGWdt3Q4f53UIJRcG29xguG1mJU8M0h+asbgWeai +xQuVeA5+46gWkwpD3+zXA8DxYBNFnVK1N2YDeXiP1lOHfN1QihZUM7ti8kKg+knD +weLEyNfbSRZDyGkOiOLxLcZZxlrj2FfppxBIc8jI96FtVyWzBEMFapAdhzZnfz6X +61tmAzoQVjIdBMxDkIKc7dK0TbrQrCMm+SVeY2zhgwcr7Dia0YK8OKBkWBnCdzzp +vSDVRUON7lG6mJVlAgMBAAGjgekwgeYwHQYDVR0OBBYEFH7RpEDOgcoUvcklOeX3 +IbYkkGEdMB8GA1UdIwQYMBaAFGByFU2MGuHNj+8Aqps3TABXKWYVMD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAb5hGxkTouvMGSYF0h57V +oQxUZlaIfYlezS8aBq/Yx+2erYx6sD3rkzpZSYm67CcVDgjQzf9AVz/Cd8EIy11P +QOwgs5abQ/qWAELN3NsnPpj9ikWA71yGIBKlg7N0ZglXHE1+DgDEV9yGwCvb+zp3 +HF99j65HFpaFSKeVTLyxGAk0xHh2V0bbHrcSFnhU7C3rRABUSB1rsNGYqFirPfLy +WwZE0dXW9dHyxEaTmpspqJ+RPeUW1ta6VXYcLZB2L5Kh5FKk8/MqPLMRePaazhfD +j9pX/KICBlmfGBC6RbQNPWSqbK5bpsjzi9CwthtKzGz++dbkFdooGyKzzrRvvzmb +NA== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: md5WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c7:04:ea:a3:74:51:66:9f:f2:6b:5d:9a:3d:96: + bd:5c:b3:9e:9c:df:64:42:c7:85:1e:56:7a:3e:d5: + 3d:c9:f3:17:46:a3:a0:98:f6:80:df:f4:54:ca:e2: + d5:e9:15:b8:3a:19:4e:1e:26:67:00:80:96:d5:bc: + 1e:af:a4:f3:23:de:15:72:89:1f:50:3f:8c:e1:62: + 6d:e1:0d:42:9f:67:76:aa:f5:20:b4:4d:58:fd:3d: + 63:57:bc:9c:23:fa:db:31:0c:09:37:0d:7c:f4:d1: + 06:c4:7f:b1:22:d1:df:05:43:a4:12:94:e2:02:ee: + b7:ae:cd:48:04:00:39:4f:dc:40:f7:62:a7:d9:3e: + 81:9c:5d:98:6f:8d:0f:da:b6:0e:ad:1d:5b:ff:b6: + 50:90:ab:55:c7:2a:db:d8:67:6c:0f:87:68:8a:2a: + 79:24:a7:64:d8:c1:72:15:ff:6e:ca:31:f1:92:42: + 2e:78:a5:ce:2b:07:8a:4b:a0:80:88:14:76:d6:e1: + ad:b2:75:9d:79:9b:d6:c2:cc:ac:74:67:d2:5b:90: + 6f:c4:8f:50:4c:ce:50:89:a4:69:ab:ca:d4:d1:a4: + 47:ae:0d:46:f3:5f:28:91:66:27:02:f0:7a:da:aa: + 80:be:c2:e7:83:89:06:49:de:9d:60:03:a3:fc:11: + e2:2b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 60:72:15:4D:8C:1A:E1:CD:8F:EF:00:AA:9B:37:4C:00:57:29:66:15 + X509v3 Authority Key Identifier: + keyid:60:B4:95:7F:EA:F1:29:B2:E9:9D:64:83:A9:C8:A3:49:6F:3E:18:53 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + 0b:ea:a8:1e:f0:70:66:9b:e0:48:9a:fa:62:3b:80:b0:9f:41: + e3:60:35:9c:b4:6e:0c:32:17:9d:38:72:b3:de:69:45:69:b1: + 4b:87:2a:e1:68:59:d6:b9:03:c4:88:7e:e0:77:26:3d:c5:ad: + 55:3f:13:bc:13:42:0f:9c:be:f7:70:3e:19:79:96:3b:b8:12: + d6:8a:a2:04:d2:17:ee:bd:78:db:cc:9f:54:87:26:89:61:c9: + f1:3e:8f:2f:19:55:49:05:c0:35:b2:ea:c4:ec:9a:11:d6:88: + f2:4b:ad:68:0a:32:75:42:42:a0:6a:51:cb:0f:63:32:20:4a: + 59:89:e5:f9:61:ee:63:80:e0:71:03:d1:58:ea:d6:31:24:11: + ef:03:44:02:76:86:67:99:a5:71:18:a8:4e:be:fe:78:63:20: + 67:b1:5a:1d:52:2a:48:fb:8a:ee:99:af:8f:57:37:43:67:1c: + 54:00:d0:50:8c:ce:18:e0:ef:7b:cc:e1:13:d1:cc:3f:ea:3c: + ce:cf:07:fc:6e:4a:09:b1:1c:54:70:a4:21:47:5d:70:7d:b4: + 04:3e:30:50:1d:86:2a:a6:67:3f:bd:b0:cb:57:e0:26:81:45: + c0:9a:86:8c:e6:ab:d0:87:9a:05:ee:2c:c5:eb:c6:c7:c0:94: + 68:4a:48:20 +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxwTqo3RR +Zp/ya12aPZa9XLOenN9kQseFHlZ6PtU9yfMXRqOgmPaA3/RUyuLV6RW4OhlOHiZn +AICW1bwer6TzI94VcokfUD+M4WJt4Q1Cn2d2qvUgtE1Y/T1jV7ycI/rbMQwJNw18 +9NEGxH+xItHfBUOkEpTiAu63rs1IBAA5T9xA92Kn2T6BnF2Yb40P2rYOrR1b/7ZQ +kKtVxyrb2GdsD4doiip5JKdk2MFyFf9uyjHxkkIueKXOKweKS6CAiBR21uGtsnWd +eZvWwsysdGfSW5BvxI9QTM5QiaRpq8rU0aRHrg1G818okWYnAvB62qqAvsLng4kG +Sd6dYAOj/BHiKwIDAQABo4HLMIHIMB0GA1UdDgQWBBRgchVNjBrhzY/vAKqbN0wA +VylmFTAfBgNVHSMEGDAWgBRgtJV/6vEpsumdZIOpyKNJbz4YUzA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEB +AAvqqB7wcGab4Eia+mI7gLCfQeNgNZy0bgwyF504crPeaUVpsUuHKuFoWda5A8SI +fuB3Jj3FrVU/E7wTQg+cvvdwPhl5lju4EtaKogTSF+69eNvMn1SHJolhyfE+jy8Z +VUkFwDWy6sTsmhHWiPJLrWgKMnVCQqBqUcsPYzIgSlmJ5flh7mOA4HED0Vjq1jEk +Ee8DRAJ2hmeZpXEYqE6+/nhjIGexWh1SKkj7iu6Zr49XN0NnHFQA0FCMzhjg73vM +4RPRzD/qPM7PB/xuSgmxHFRwpCFHXXB9tAQ+MFAdhiqmZz+9sMtX4CaBRcCahozm +q9CHmgXuLMXrxsfAlGhKSCA= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:d3:ee:d0:8d:92:7d:ce:5f:4e:f2:0c:55:4d:bd: + 2f:b3:ff:6a:ab:2c:28:5e:c6:bd:49:ae:80:f0:e6: + 2c:30:e8:0a:e7:2b:3f:d7:1e:a8:6d:f1:c4:46:0e: + f5:1d:3c:e1:05:5d:a9:91:69:57:43:22:33:bc:c1: + 18:6e:b1:48:1f:13:64:18:03:c1:63:14:97:21:5a: + 65:49:52:6a:57:9d:ad:7b:f6:06:6e:f0:af:a0:6d: + 2c:6d:53:9a:ad:82:56:2a:95:e1:a7:5a:a3:b4:77: + c7:d7:97:39:73:c8:de:a8:19:09:ba:69:69:01:25: + e6:68:e3:d0:5a:84:5d:3e:f0:8a:3b:c6:31:26:34: + 38:ed:8d:40:80:0f:5f:84:d7:e5:4f:24:ca:ff:c1: + 48:f5:74:3a:b3:1e:9f:b5:ef:bb:24:cb:91:f3:81: + 47:bd:80:eb:ef:dd:45:39:fd:d2:c3:be:3e:ba:e6: + 5b:09:e0:88:98:27:91:e5:9a:5b:88:d6:5e:17:7f: + 08:e2:2d:f4:3c:3f:08:54:7b:10:53:f4:7d:ef:67: + 04:6f:d6:74:08:d1:b9:03:2d:89:5d:ca:cf:de:3d: + d0:e5:e2:e5:2a:7f:21:29:23:7e:b2:75:d9:ea:5c: + 73:45:7e:33:83:b6:62:5e:01:3b:dd:11:99:c7:c5: + 7b:65 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 60:B4:95:7F:EA:F1:29:B2:E9:9D:64:83:A9:C8:A3:49:6F:3E:18:53 + X509v3 Authority Key Identifier: + keyid:60:B4:95:7F:EA:F1:29:B2:E9:9D:64:83:A9:C8:A3:49:6F:3E:18:53 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 49:67:dc:58:22:e3:ee:0a:e8:1a:3d:38:1a:13:dd:d7:e0:45: + 67:69:b1:44:49:e2:96:15:86:94:8b:d4:fb:8a:94:d5:22:39: + 20:48:97:d2:09:a7:16:4b:40:f3:3c:37:3e:e8:81:28:08:cf: + 4a:2c:3e:79:d0:0d:90:4d:63:a5:63:ce:24:75:03:41:7f:79: + 17:3f:4d:df:60:98:a5:a3:c1:39:14:4b:7e:b7:0d:8a:9f:d6: + a4:0b:0c:34:c9:fe:3b:c0:89:9e:5e:27:3d:d8:3d:d5:28:46: + e4:b9:f5:28:39:b4:cf:1a:ea:fd:d3:14:bd:8b:87:78:35:80: + a1:bb:4e:59:cc:2a:f7:f7:40:bc:b7:75:cc:35:f5:3d:95:bb: + 32:7a:0c:9d:67:c7:ff:b0:da:e6:05:e6:12:d5:1e:19:3c:69: + 5d:d8:08:5e:bc:fe:df:ab:36:a4:70:3f:2c:6c:1c:8e:e3:f1: + 0b:b3:22:e4:5b:fd:86:23:7a:bd:9b:b9:56:08:e3:a2:6d:2b: + e3:cb:42:93:6f:c8:5f:57:bd:66:41:51:8a:5d:4b:7e:0f:36: + 82:61:8e:e0:4e:2c:9a:7a:45:e3:21:1c:b8:86:cf:a0:35:1b: + bf:55:36:86:05:1c:df:b0:e2:85:3b:a4:c7:7c:69:f9:56:b3: + 20:28:e4:c2 +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANPu0I2Sfc5fTvIMVU29 +L7P/aqssKF7GvUmugPDmLDDoCucrP9ceqG3xxEYO9R084QVdqZFpV0MiM7zBGG6x +SB8TZBgDwWMUlyFaZUlSaledrXv2Bm7wr6BtLG1Tmq2CViqV4adao7R3x9eXOXPI +3qgZCbppaQEl5mjj0FqEXT7wijvGMSY0OO2NQIAPX4TX5U8kyv/BSPV0OrMen7Xv +uyTLkfOBR72A6+/dRTn90sO+PrrmWwngiJgnkeWaW4jWXhd/COIt9Dw/CFR7EFP0 +fe9nBG/WdAjRuQMtiV3Kz9490OXi5Sp/ISkjfrJ12epcc0V+M4O2Yl4BO90RmcfF +e2UCAwEAAaOByzCByDAdBgNVHQ4EFgQUYLSVf+rxKbLpnWSDqcijSW8+GFMwHwYD +VR0jBBgwFoAUYLSVf+rxKbLpnWSDqcijSW8+GFMwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBJZ9xYIuPu +CugaPTgaE93X4EVnabFESeKWFYaUi9T7ipTVIjkgSJfSCacWS0DzPDc+6IEoCM9K +LD550A2QTWOlY84kdQNBf3kXP03fYJilo8E5FEt+tw2Kn9akCww0yf47wImeXic9 +2D3VKEbkufUoObTPGur90xS9i4d4NYChu05ZzCr390C8t3XMNfU9lbsyegydZ8f/ +sNrmBeYS1R4ZPGld2AhevP7fqzakcD8sbByO4/ELsyLkW/2GI3q9m7lWCOOibSvj +y0KTb8hfV71mQVGKXUt+DzaCYY7gTiyaekXjIRy4hs+gNRu/VTaGBRzfsOKFO6TH +fGn5VrMgKOTC +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +RkFJTA== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediate-unknown-critical-extension.pem b/net/data/verify_certificate_chain_unittest/intermediate-unknown-critical-extension.pem new file mode 100644 index 0000000..49aa20d --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/intermediate-unknown-critical-extension.pem
@@ -0,0 +1,284 @@ +[Created by: generate-intermediate-unknown-critical-extension.py] + +Certificate chain with 1 intermediate and a trusted root. The intermediate +has an unknown X.509v3 extension (OID=1.2.3.4) that is marked as critical. +Verifying this certificate chain is expected to fail because there is an +unrecognized critical extension. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c7:8a:82:ba:91:ca:1e:03:94:8f:9d:68:98:8b: + 95:3b:c1:e3:d1:5b:82:45:bf:72:24:cb:6f:de:91: + 2e:e3:49:ba:31:7b:57:db:90:36:32:e6:b4:41:8f: + 38:89:c6:6b:82:60:dc:98:e7:4b:06:55:41:db:9c: + a8:e0:97:15:5a:3c:06:ac:37:89:f5:9b:65:b6:93: + a7:2e:45:f3:b3:15:59:a7:6d:64:d5:cb:93:da:46: + b1:97:8a:79:f6:48:4b:4c:18:d6:38:cf:55:5b:6b: + 78:c2:f5:f0:37:54:67:8d:90:43:81:ec:15:1e:e7: + 75:55:57:7e:6a:74:71:73:6d:b4:d5:37:b5:28:40: + 2e:6f:a6:64:b8:77:fd:2c:6c:25:2c:27:cf:db:fa: + b4:c9:39:c2:d1:1e:e2:a1:73:bb:ec:81:dc:c3:ec: + d0:a0:08:1e:81:53:88:51:d2:83:d2:ba:33:3f:79: + 1e:2a:6f:80:7b:21:d8:bb:80:93:68:ea:f4:a9:d5: + 88:b8:ac:0b:ff:90:bd:cc:8a:6b:e7:e5:27:47:d9: + a0:68:5d:38:3c:b0:a3:4a:ae:5a:d9:a6:f8:51:61: + 28:fb:21:5c:01:aa:72:76:60:f6:e0:88:a1:44:b5: + fa:85:27:45:67:0f:c6:b1:11:00:81:23:3c:aa:a1: + 58:65 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 94:30:C8:2B:C4:EC:EB:81:5B:D2:2B:62:ED:34:29:BB:3C:40:FD:4B + X509v3 Authority Key Identifier: + keyid:C8:5D:13:08:EB:15:BB:7B:35:8E:74:DF:D3:C3:55:51:78:E1:4A:D3 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + ca:46:c4:08:c9:4e:1b:3f:96:fd:d7:9c:89:d6:ea:7f:76:53: + ac:03:55:eb:9a:d5:86:f8:66:cd:39:54:f0:7b:d1:74:62:83: + c7:58:46:b1:ad:da:b7:fd:03:94:3b:b8:a5:4a:01:45:53:2c: + c6:ae:55:52:08:78:de:66:49:a0:40:eb:7d:43:03:00:46:03: + 1d:6d:c5:83:57:f6:92:a5:c6:04:76:f1:de:bf:ec:90:8b:3b: + 99:70:80:41:10:93:07:2c:eb:cd:5b:b5:e6:12:76:41:db:81: + ab:f5:6a:a5:e4:67:45:39:fa:14:bf:0d:e7:e4:a9:f3:9a:57: + 4c:20:4e:68:fd:1a:35:00:66:b7:c6:fd:2f:14:db:7b:28:3a: + 59:31:5a:9d:96:d1:2e:27:d1:7a:c3:eb:b4:28:f1:e2:9a:d1: + 1d:be:6b:9d:81:4e:4c:7f:5d:fe:5f:20:8f:bb:f0:85:ee:bb: + 2d:66:40:bb:ec:40:c1:51:4f:f9:1d:24:4e:64:ad:64:1c:e5: + 68:3f:cb:b2:6c:c5:82:c9:e7:5d:7d:73:8d:ec:d9:b7:af:06: + 71:53:92:dd:aa:23:28:38:f0:06:d6:64:cb:f5:ac:f2:4c:e2: + 5a:55:c3:a6:d7:7e:32:21:19:54:c4:aa:cd:21:60:fd:b7:45: + 81:a1:53:ae +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDHioK6 +kcoeA5SPnWiYi5U7wePRW4JFv3Iky2/ekS7jSboxe1fbkDYy5rRBjziJxmuCYNyY +50sGVUHbnKjglxVaPAasN4n1m2W2k6cuRfOzFVmnbWTVy5PaRrGXinn2SEtMGNY4 +z1Vba3jC9fA3VGeNkEOB7BUe53VVV35qdHFzbbTVN7UoQC5vpmS4d/0sbCUsJ8/b ++rTJOcLRHuKhc7vsgdzD7NCgCB6BU4hR0oPSujM/eR4qb4B7Idi7gJNo6vSp1Yi4 +rAv/kL3Mimvn5SdH2aBoXTg8sKNKrlrZpvhRYSj7IVwBqnJ2YPbgiKFEtfqFJ0Vn +D8axEQCBIzyqoVhlAgMBAAGjgekwgeYwHQYDVR0OBBYEFJQwyCvE7OuBW9IrYu00 +Kbs8QP1LMB8GA1UdIwQYMBaAFMhdEwjrFbt7NY5039PDVVF44UrTMD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAykbECMlOGz+W/decidbq +f3ZTrANV65rVhvhmzTlU8HvRdGKDx1hGsa3at/0DlDu4pUoBRVMsxq5VUgh43mZJ +oEDrfUMDAEYDHW3Fg1f2kqXGBHbx3r/skIs7mXCAQRCTByzrzVu15hJ2QduBq/Vq +peRnRTn6FL8N5+Sp85pXTCBOaP0aNQBmt8b9LxTbeyg6WTFanZbRLifResPrtCjx +4prRHb5rnYFOTH9d/l8gj7vwhe67LWZAu+xAwVFP+R0kTmStZBzlaD/LsmzFgsnn +XX1zjezZt68GcVOS3aojKDjwBtZky/Ws8kziWlXDptd+MiEZVMSqzSFg/bdFgaFT +rg== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:da:1c:0d:74:40:2d:01:10:9c:e0:0c:aa:01:c7: + ed:a4:03:b5:a0:b0:1d:c0:70:70:9a:76:6d:5d:4d: + 16:ed:39:87:76:43:e1:c1:3f:b9:f8:20:63:40:02: + d4:0f:f4:f5:4a:97:eb:46:ad:8c:29:cb:45:a7:33: + 16:b0:10:b3:bc:f6:9e:fb:e6:61:d5:7d:43:ce:27: + 43:ae:4f:b1:d1:47:6b:13:e5:20:66:09:b9:10:83: + a3:d4:40:6d:cc:fb:cb:28:1e:6e:bc:75:46:7b:9d: + f9:b4:5f:c9:43:24:d6:d7:c1:a8:6b:d6:52:1e:6d: + 9d:89:d6:41:eb:9f:db:32:e3:05:21:b1:b7:77:78: + e1:d4:f9:95:c5:84:63:91:88:ce:31:66:2c:51:89: + f3:a4:a3:0d:11:b2:a2:45:fd:59:1b:09:a9:bc:48: + 38:0d:25:c7:dd:c9:6a:15:5f:c5:5f:60:5e:c0:28: + 5d:19:ff:51:17:86:ea:b5:56:f6:1e:cc:ee:80:93: + f2:82:7b:2f:fa:96:1f:4b:15:b0:34:23:81:bb:b9: + a4:83:1a:2f:e0:6d:ee:48:96:4d:f1:7b:09:3e:1f: + 43:c6:76:8f:56:fd:1e:5f:21:6f:6f:49:b0:94:fa: + c9:be:76:61:f6:f8:51:72:40:99:d5:f2:f6:09:f7: + d9:8b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + C8:5D:13:08:EB:15:BB:7B:35:8E:74:DF:D3:C3:55:51:78:E1:4A:D3 + X509v3 Authority Key Identifier: + keyid:3F:B3:AA:13:E1:86:96:B3:E3:8D:20:EC:BE:70:71:D0:1B:F8:67:9A + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + 1.2.3.4: critical + .... + Signature Algorithm: sha256WithRSAEncryption + dc:d2:aa:62:74:fa:cf:eb:4f:b3:cd:aa:a9:52:b0:fe:7a:0d: + 96:e4:07:8f:b6:d4:6d:ad:33:a6:4e:ad:2f:a5:ff:83:a0:75: + d1:ed:fc:c0:80:a6:73:73:49:6d:0d:3f:84:b5:d4:cf:07:74: + 3e:aa:bf:38:59:e4:fa:b6:d2:45:07:b3:a6:0b:b0:43:47:03: + 7e:45:c1:7b:f1:84:10:c3:0b:d7:2f:c9:be:ff:96:da:1b:4b: + cb:fa:05:ca:22:d2:e4:f0:f7:32:91:4f:95:05:6c:5d:be:6c: + 64:7b:cb:6d:a1:a9:d0:9c:5b:1d:3a:bd:4a:50:69:e2:06:fa: + 89:2b:3b:2e:12:f6:3f:d7:79:f1:36:ec:e3:6c:12:67:b2:a3: + b0:89:16:8c:2c:02:04:0d:89:e1:ca:69:d0:86:7e:fd:14:9d: + c8:ef:06:42:fc:46:b9:88:25:e2:b5:b7:8a:6b:ab:d6:1f:ec: + d1:12:b3:28:cd:9e:9f:56:8d:7c:49:6c:06:96:93:66:25:43: + b0:76:b0:9a:59:f8:9c:35:29:8c:db:a7:74:d7:ac:e7:99:ea: + 11:34:0b:6f:cf:bb:5e:28:2a:ab:9a:13:83:44:d7:01:3c:61: + c8:10:dd:0d:ef:66:3d:be:ee:72:70:d3:27:a2:b0:f7:f1:bc: + 50:e1:ac:3e +-----BEGIN CERTIFICATE----- +MIIDfTCCAmWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2hwNdEAt +ARCc4AyqAcftpAO1oLAdwHBwmnZtXU0W7TmHdkPhwT+5+CBjQALUD/T1SpfrRq2M +KctFpzMWsBCzvPae++Zh1X1DzidDrk+x0UdrE+UgZgm5EIOj1EBtzPvLKB5uvHVG +e535tF/JQyTW18Goa9ZSHm2didZB65/bMuMFIbG3d3jh1PmVxYRjkYjOMWYsUYnz +pKMNEbKiRf1ZGwmpvEg4DSXH3clqFV/FX2BewChdGf9RF4bqtVb2HszugJPygnsv ++pYfSxWwNCOBu7mkgxov4G3uSJZN8XsJPh9DxnaPVv0eXyFvb0mwlPrJvnZh9vhR +ckCZ1fL2CffZiwIDAQABo4HbMIHYMB0GA1UdDgQWBBTIXRMI6xW7ezWOdN/Tw1VR +eOFK0zAfBgNVHSMEGDAWgBQ/s6oT4YaWs+ONIOy+cHHQG/hnmjA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDgYDKgMEAQH/BAQBAgMEMA0G +CSqGSIb3DQEBCwUAA4IBAQDc0qpidPrP60+zzaqpUrD+eg2W5AePttRtrTOmTq0v +pf+DoHXR7fzAgKZzc0ltDT+EtdTPB3Q+qr84WeT6ttJFB7OmC7BDRwN+RcF78YQQ +wwvXL8m+/5baG0vL+gXKItLk8PcykU+VBWxdvmxke8ttoanQnFsdOr1KUGniBvqJ +KzsuEvY/13nxNuzjbBJnsqOwiRaMLAIEDYnhymnQhn79FJ3I7wZC/Ea5iCXitbeK +a6vWH+zRErMozZ6fVo18SWwGlpNmJUOwdrCaWficNSmM26d016znmeoRNAtvz7te +KCqrmhODRNcBPGHIEN0N72Y9vu5ycNMnorD38bxQ4aw+ +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e7:de:8d:6f:81:af:35:2d:99:eb:62:b4:41:d8: + dd:55:5f:5a:12:02:46:8f:41:14:fe:f5:b0:32:ab: + fa:96:2a:e2:ba:e6:3a:1d:89:80:8f:20:6a:40:4a: + 5f:97:d3:5d:7f:e8:eb:26:f1:f9:1b:a2:a7:cd:54: + c0:d9:64:77:dc:ba:90:a4:b7:86:3f:8c:72:c2:ad: + 96:6c:f0:c0:30:d8:e0:71:f5:ff:f3:8c:18:34:3a: + 07:b2:79:32:92:91:d4:51:95:c4:bb:62:78:2e:30: + f8:b5:f1:91:26:9a:28:07:27:cc:57:d5:a2:1c:e9: + 20:ac:fa:3d:db:3b:70:81:17:3d:4b:54:a8:fe:2f: + 18:f7:7f:de:cb:4f:ec:70:c8:fa:a9:ed:64:41:36: + c2:74:a7:dd:e6:27:2b:af:79:ce:76:86:57:3a:2c: + d9:52:b8:bf:87:de:f1:5e:80:81:70:10:78:e7:89: + 0a:d1:14:74:f4:f0:93:cf:89:68:66:8f:d4:2a:8a: + c8:ff:96:fb:f6:cc:ee:dd:a6:62:f0:73:43:a6:29: + 7a:51:7e:63:e1:8f:d9:83:10:23:ed:1b:d4:26:2d: + 40:62:c5:ed:c5:af:4f:d9:9b:87:5b:3a:7e:2c:43: + 59:e3:f4:91:2f:ab:d0:04:a3:5e:da:ac:b0:c1:e2: + 15:99 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 3F:B3:AA:13:E1:86:96:B3:E3:8D:20:EC:BE:70:71:D0:1B:F8:67:9A + X509v3 Authority Key Identifier: + keyid:3F:B3:AA:13:E1:86:96:B3:E3:8D:20:EC:BE:70:71:D0:1B:F8:67:9A + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 84:9a:7d:63:f9:44:d8:2c:4e:b0:24:86:af:0c:ba:0e:29:33: + 67:68:7d:a2:1d:46:99:b0:fb:9d:65:69:da:f8:46:67:d9:c4: + 30:72:eb:57:79:4a:e8:2d:7b:57:d4:c2:18:13:19:d1:36:8c: + 45:9f:49:1e:a6:83:c5:41:41:fd:29:ac:a0:12:c7:0f:6e:a6: + 45:70:64:c3:9d:b0:22:2e:ed:c0:8d:6c:68:c0:94:d9:ba:e0: + 2f:5a:1c:29:ed:d0:d6:ec:0e:bb:41:ce:1e:e3:93:c4:85:80: + aa:a1:67:31:76:80:24:a4:70:ec:f3:6e:a3:63:8c:71:fd:38: + 65:1f:56:e9:75:74:15:3c:69:f3:e3:d3:9d:9a:9c:7d:f6:00: + 71:98:61:68:13:7c:23:79:e1:84:68:a6:3d:ce:19:1c:0a:62: + 48:d9:f9:4c:92:ff:b7:5b:e8:1d:e4:66:00:50:4d:38:c8:3a: + e3:e1:8e:ae:aa:32:30:65:78:25:b3:d0:eb:4f:de:ab:9d:51: + 40:7e:6f:d4:15:87:cf:41:7d:be:3d:32:45:a2:f1:a8:7c:11: + 97:90:a4:ea:d8:aa:c2:b7:08:34:a3:62:23:4b:a5:e3:9e:4d: + 90:7f:d7:4c:dc:4f:c8:ac:b2:b6:de:42:fd:05:98:f6:33:90: + 54:c3:6a:3f +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOfejW+BrzUtmetitEHY +3VVfWhICRo9BFP71sDKr+pYq4rrmOh2JgI8gakBKX5fTXX/o6ybx+Ruip81UwNlk +d9y6kKS3hj+McsKtlmzwwDDY4HH1//OMGDQ6B7J5MpKR1FGVxLtieC4w+LXxkSaa +KAcnzFfVohzpIKz6Pds7cIEXPUtUqP4vGPd/3stP7HDI+qntZEE2wnSn3eYnK695 +znaGVzos2VK4v4fe8V6AgXAQeOeJCtEUdPTwk8+JaGaP1CqKyP+W+/bM7t2mYvBz +Q6YpelF+Y+GP2YMQI+0b1CYtQGLF7cWvT9mbh1s6fixDWeP0kS+r0ASjXtqssMHi +FZkCAwEAAaOByzCByDAdBgNVHQ4EFgQUP7OqE+GGlrPjjSDsvnBx0Bv4Z5owHwYD +VR0jBBgwFoAUP7OqE+GGlrPjjSDsvnBx0Bv4Z5owNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCEmn1j+UTY +LE6wJIavDLoOKTNnaH2iHUaZsPudZWna+EZn2cQwcutXeUroLXtX1MIYExnRNoxF +n0kepoPFQUH9KaygEscPbqZFcGTDnbAiLu3AjWxowJTZuuAvWhwp7dDW7A67Qc4e +45PEhYCqoWcxdoAkpHDs826jY4xx/ThlH1bpdXQVPGnz49Odmpx99gBxmGFoE3wj +eeGEaKY9zhkcCmJI2flMkv+3W+gd5GYAUE04yDrj4Y6uqjIwZXgls9DrT96rnVFA +fm/UFYfPQX2+PTJFovGofBGXkKTq2KrCtwg0o2IjS6Xjnk2Qf9dM3E/IrLK23kL9 +BZj2M5BUw2o/ +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +RkFJTA== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/intermediate-unknown-non-critical-extension.pem b/net/data/verify_certificate_chain_unittest/intermediate-unknown-non-critical-extension.pem new file mode 100644 index 0000000..c7892e9 --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/intermediate-unknown-non-critical-extension.pem
@@ -0,0 +1,284 @@ +[Created by: generate-intermediate-unknown-non-critical-extension.py] + +Certificate chain with 1 intermediate and a trusted root. The intermediate +has an unknown X.509v3 extension that is marked as non-critical. Verification +is expected to succeed because although unrecognized, the extension is not +critical. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b6:04:af:e9:58:68:65:f6:6e:cd:e3:fe:93:35: + d3:c0:06:53:75:df:15:59:23:d3:fd:42:8c:36:a1: + df:6b:35:3f:7d:63:57:e4:17:d9:2a:63:77:7f:d6: + f5:b0:85:00:70:ab:f9:5e:f3:00:4d:0f:5e:28:b8: + 56:7b:15:f1:4e:eb:32:e0:bf:e4:83:2b:49:ff:ac: + 3e:09:38:40:75:73:11:ee:0c:8c:d9:e6:c6:d2:44: + ce:99:74:78:8b:90:19:b5:32:75:45:ba:e0:76:55: + 5f:c9:44:27:e2:91:8e:9a:21:aa:3d:be:e7:cf:1e: + af:08:4b:b0:cc:03:b8:c6:2b:92:ae:d6:1e:61:fa: + 18:4e:b5:98:cc:0b:55:16:77:4c:9c:26:99:0f:3b: + 91:22:87:19:36:b9:4f:72:c9:40:bb:d0:2b:8e:d7: + c3:1b:eb:2e:e4:82:a8:0e:7d:45:a1:c7:6a:e9:db: + d2:f7:30:9b:ad:4f:a7:04:17:2b:78:85:15:1a:8f: + f1:77:6c:51:c0:a8:fc:53:70:f0:32:8c:86:09:8b: + 00:9c:3f:32:ff:cc:86:4f:4c:32:6a:f9:53:5d:36: + f9:55:34:8c:e4:0e:56:af:bf:f6:92:25:8a:4e:d5: + 66:53:66:7b:b0:16:08:04:d2:56:de:c6:b0:75:2c: + b5:d5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + A7:25:2F:78:CA:01:CA:68:1D:8F:FF:93:D6:FA:FA:A3:9C:BB:C8:0E + X509v3 Authority Key Identifier: + keyid:D5:16:02:7F:4F:D3:7F:21:1A:9D:CC:55:09:30:CF:EF:6C:08:1F:53 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + 6a:e8:e9:eb:26:54:d4:51:72:d0:4d:a3:7c:e4:5e:8d:bd:c7: + 5e:0a:ab:46:a0:88:20:15:68:56:3f:43:0d:13:60:30:eb:65: + 86:45:5b:0d:8b:c4:b0:7f:2f:18:fe:27:a7:6e:4b:10:99:05: + 25:f8:4b:9a:80:a3:36:f6:35:5e:0a:dc:0a:81:3c:fc:be:32: + 71:fc:ed:8c:d9:77:ce:25:3c:74:af:b7:ad:50:ee:dc:fe:35: + 91:15:cc:79:91:f0:48:74:68:8b:a0:e2:70:95:df:1d:b3:e5: + c5:48:bc:9c:c3:4c:95:50:94:8d:3c:42:9a:13:e3:03:b3:df: + 43:32:bf:0f:cd:50:d9:2c:52:1c:30:9e:5f:30:02:69:66:bc: + e5:92:63:43:ca:62:e8:d2:ae:dd:2a:e1:ac:ce:00:f0:d7:54: + 81:6b:b8:1f:b1:0e:e7:57:2b:71:17:50:4b:fb:e4:f0:37:2a: + da:37:e2:80:4a:87:9b:d6:d5:6d:6b:b4:af:4b:43:c9:08:9d: + 57:f1:98:3c:2a:b6:58:7d:a8:83:d3:f0:b1:df:c5:bd:8b:0c: + a8:48:91:0c:c8:eb:29:f8:54:70:b0:49:b7:f4:e3:80:cc:2e: + 37:23:23:f4:49:21:8d:22:12:8c:3e:24:a2:11:66:15:cd:68: + 96:19:3b:5f +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2BK/p +WGhl9m7N4/6TNdPABlN13xVZI9P9Qow2od9rNT99Y1fkF9kqY3d/1vWwhQBwq/le +8wBND14ouFZ7FfFO6zLgv+SDK0n/rD4JOEB1cxHuDIzZ5sbSRM6ZdHiLkBm1MnVF +uuB2VV/JRCfikY6aIao9vufPHq8IS7DMA7jGK5Ku1h5h+hhOtZjMC1UWd0ycJpkP +O5Eihxk2uU9yyUC70CuO18Mb6y7kgqgOfUWhx2rp29L3MJutT6cEFyt4hRUaj/F3 +bFHAqPxTcPAyjIYJiwCcPzL/zIZPTDJq+VNdNvlVNIzkDlavv/aSJYpO1WZTZnuw +FggE0lbexrB1LLXVAgMBAAGjgekwgeYwHQYDVR0OBBYEFKclL3jKAcpoHY//k9b6 ++qOcu8gOMB8GA1UdIwQYMBaAFNUWAn9P038hGp3MVQkwz+9sCB9TMD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAaujp6yZU1FFy0E2jfORe +jb3HXgqrRqCIIBVoVj9DDRNgMOtlhkVbDYvEsH8vGP4np25LEJkFJfhLmoCjNvY1 +XgrcCoE8/L4ycfztjNl3ziU8dK+3rVDu3P41kRXMeZHwSHRoi6DicJXfHbPlxUi8 +nMNMlVCUjTxCmhPjA7PfQzK/D81Q2SxSHDCeXzACaWa85ZJjQ8pi6NKu3SrhrM4A +8NdUgWu4H7EO51crcRdQS/vk8Dcq2jfigEqHm9bVbWu0r0tDyQidV/GYPCq2WH2o +g9Pwsd/FvYsMqEiRDMjrKfhUcLBJt/TjgMwuNyMj9EkhjSISjD4kohFmFc1olhk7 +Xw== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:94:b0:d4:b6:63:20:79:6f:d7:5f:3e:0a:32:b1: + 79:0a:be:db:d4:86:23:8d:f8:17:0d:3e:b8:49:ed: + d3:6a:39:db:e4:16:6b:f6:c9:03:d6:0f:60:a0:ae: + 6c:86:18:2d:50:06:70:48:5f:9b:14:17:4d:2b:d5: + e4:e9:8c:19:0b:78:19:0e:d9:82:39:8f:92:f8:bc: + 7f:cc:7a:6e:06:7c:75:e3:7e:7e:24:71:7e:19:ba: + 64:2f:7b:60:e5:ab:c0:1a:9a:44:9d:a4:db:eb:d5: + 5b:69:31:ab:9f:86:9c:ec:90:2f:c2:29:ea:19:15: + fb:85:50:89:71:67:28:70:46:f7:e4:1e:6d:e6:81: + 49:15:7e:e9:2e:9f:14:d6:f9:02:c9:91:8f:d1:a9: + 65:8a:cc:29:57:7b:e5:a8:08:db:19:a6:27:2f:89: + 4b:e1:ca:3e:1e:c4:f6:65:4f:b0:26:c4:29:13:44: + 3f:6c:49:ba:b7:99:2c:70:0c:54:7b:c2:9a:06:ce: + 95:51:62:16:a3:0c:9e:2c:34:d0:04:65:32:41:d7: + db:6e:38:e9:12:8c:91:a5:0d:fe:b2:c6:b7:74:f4: + 23:65:d9:ae:88:af:0f:12:6a:28:f0:7b:db:2b:e4: + 6d:1b:74:de:93:e9:f6:72:f1:1c:28:8f:8a:32:37: + a2:65 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + D5:16:02:7F:4F:D3:7F:21:1A:9D:CC:55:09:30:CF:EF:6C:08:1F:53 + X509v3 Authority Key Identifier: + keyid:99:38:AC:DE:DD:17:19:E4:9D:92:02:FD:01:4D:40:C5:2C:4E:B7:4A + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + 1.2.3.4: + .... + Signature Algorithm: sha256WithRSAEncryption + 0b:1e:08:36:25:d9:1b:97:a3:07:63:ca:17:a1:df:42:14:a5: + 6d:75:63:a8:ba:b5:94:b1:59:0b:5c:18:a7:e2:8f:a7:8b:40: + f0:0f:cf:4d:8d:87:a0:77:44:b3:0a:b6:b2:a2:aa:25:0e:a5: + cf:4b:6b:77:6e:e1:e2:06:19:0d:97:d9:a9:95:72:26:24:07: + e5:cd:8c:c8:e1:c5:1f:6c:8e:42:dd:93:da:4c:6e:07:e5:6e: + b2:e0:e6:c2:04:1d:1f:e0:4f:f0:5d:00:63:2c:ea:35:e3:dc: + c3:14:6d:8f:86:23:ab:a8:d1:29:81:98:1e:b7:fb:34:4c:65: + 18:27:fa:f5:5e:54:e6:3e:1e:b9:24:4c:86:cd:94:81:8d:60: + 49:d7:a7:a7:de:a5:4d:30:32:88:0a:95:a9:36:01:51:20:1e: + 2f:e2:1f:b8:fb:fb:14:77:9a:37:c3:96:21:e5:8b:96:a9:a0: + 97:24:b8:1c:f5:dd:a2:1b:bb:04:c4:f3:b0:22:56:38:cc:20: + e1:5b:51:90:7c:14:5c:5e:ce:df:b1:a9:57:a2:3b:d6:0f:56: + 3b:96:94:7e:c5:c7:a8:6e:eb:77:fe:50:1e:21:c8:0b:c2:3f: + 6f:48:d0:dd:d4:f5:29:39:3f:e1:a7:bd:c8:ba:35:d3:28:72: + 92:d4:e6:33 +-----BEGIN CERTIFICATE----- +MIIDejCCAmKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlLDUtmMg +eW/XXz4KMrF5Cr7b1IYjjfgXDT64Se3Tajnb5BZr9skD1g9goK5shhgtUAZwSF+b +FBdNK9Xk6YwZC3gZDtmCOY+S+Lx/zHpuBnx1435+JHF+GbpkL3tg5avAGppEnaTb +69VbaTGrn4ac7JAvwinqGRX7hVCJcWcocEb35B5t5oFJFX7pLp8U1vkCyZGP0all +iswpV3vlqAjbGaYnL4lL4co+HsT2ZU+wJsQpE0Q/bEm6t5kscAxUe8KaBs6VUWIW +owyeLDTQBGUyQdfbbjjpEoyRpQ3+ssa3dPQjZdmuiK8PEmoo8HvbK+RtG3Tek+n2 +cvEcKI+KMjeiZQIDAQABo4HYMIHVMB0GA1UdDgQWBBTVFgJ/T9N/IRqdzFUJMM/v +bAgfUzAfBgNVHSMEGDAWgBSZOKze3RcZ5J2SAv0BTUDFLE63SjA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wCwYDKgMEBAQBAgMEMA0GCSqG +SIb3DQEBCwUAA4IBAQALHgg2Jdkbl6MHY8oXod9CFKVtdWOourWUsVkLXBin4o+n +i0DwD89NjYegd0SzCrayoqolDqXPS2t3buHiBhkNl9mplXImJAflzYzI4cUfbI5C +3ZPaTG4H5W6y4ObCBB0f4E/wXQBjLOo149zDFG2PhiOrqNEpgZget/s0TGUYJ/r1 +XlTmPh65JEyGzZSBjWBJ16en3qVNMDKICpWpNgFRIB4v4h+4+/sUd5o3w5Yh5YuW +qaCXJLgc9d2iG7sExPOwIlY4zCDhW1GQfBRcXs7fsalXojvWD1Y7lpR+xceobut3 +/lAeIcgLwj9vSNDd1PUpOT/hp73IujXTKHKS1OYz +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a3:83:87:29:55:0b:8e:0a:7e:d7:d3:74:4f:6c: + 58:a6:8c:5c:09:8d:13:65:8b:94:04:8e:52:13:93: + 9e:8c:75:2b:37:f7:9f:ca:64:92:f2:42:e9:8d:d6: + 36:19:ab:14:e4:f3:76:16:65:68:3d:3b:51:eb:e5: + d0:33:af:8e:26:5b:f2:5c:4e:3d:7e:11:46:b6:2a: + 6d:fd:3a:54:57:91:8b:6c:e1:fb:8b:08:b8:80:d3: + 0d:2d:d0:b8:2e:1e:f0:b3:33:c5:15:0b:b0:ad:de: + 27:68:a4:3d:3b:6c:8d:4c:a6:d0:5c:7e:58:52:01: + 8f:fe:fb:86:5e:ce:ea:fc:33:77:28:c5:4c:ee:d0: + 0b:cb:a7:97:7f:05:70:53:a3:61:06:fa:b3:9d:7e: + d5:dd:3f:ef:58:04:f8:3c:91:fc:8d:fa:ca:cd:97: + a4:3b:44:ac:dd:64:a7:32:08:87:0f:73:36:d7:14: + e0:1d:b8:29:11:97:cb:9d:79:1f:bc:c8:cc:28:ae: + 8e:9a:2f:39:62:1f:28:aa:b9:c7:81:7c:34:96:44: + 39:e6:00:4b:5b:0e:4b:7a:fd:ca:bf:5d:67:50:91: + 3a:59:89:1b:3a:12:7c:7e:b9:58:54:e5:4f:97:00: + 35:c8:a7:b9:fd:3f:5e:08:5e:ac:0c:ba:61:e8:42: + 34:33 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 99:38:AC:DE:DD:17:19:E4:9D:92:02:FD:01:4D:40:C5:2C:4E:B7:4A + X509v3 Authority Key Identifier: + keyid:99:38:AC:DE:DD:17:19:E4:9D:92:02:FD:01:4D:40:C5:2C:4E:B7:4A + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 47:a7:24:e7:1f:29:34:d7:8e:3a:e1:af:aa:d3:3b:32:f4:d6: + 7d:ec:ab:7c:34:59:0b:b1:33:80:6a:d4:36:4a:78:d3:3a:d6: + 97:0d:8b:81:54:09:91:b5:30:79:78:e7:52:11:ba:e8:57:af: + f3:f8:f0:ff:17:9a:e3:d0:a0:89:81:50:e8:67:47:9b:b5:68: + ed:99:10:1b:d6:31:58:24:dd:74:3c:8b:76:77:46:a3:b9:ca: + b6:4b:3d:ca:b9:5b:ac:e7:92:8c:d3:f2:4a:ba:4b:2f:c6:11: + cf:38:15:59:5a:fa:2d:d2:72:31:8f:54:a4:7e:44:a7:26:9d: + 1b:38:e0:ac:75:72:9c:71:4c:78:54:80:8f:74:b7:11:b0:5c: + c7:69:a5:03:1e:cd:5e:c5:cd:60:0e:80:32:19:02:e0:8c:b4: + 76:e7:00:a1:e5:bc:29:31:61:a6:55:f0:72:92:78:69:6f:26: + 08:96:71:b9:42:a9:eb:cc:54:8e:d6:55:1a:26:2c:a0:b5:a6: + df:52:86:a1:df:26:da:26:86:d5:17:5b:c9:9b:90:c0:6c:ab: + 23:1a:82:2d:ff:b6:83:ae:3c:c1:c3:85:5e:49:aa:d6:ef:fd: + f4:4a:22:7c:90:b8:46:2e:15:63:93:0c:c5:2d:9e:f6:32:03: + 53:10:30:36 +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKODhylVC44KftfTdE9s +WKaMXAmNE2WLlASOUhOTnox1Kzf3n8pkkvJC6Y3WNhmrFOTzdhZlaD07Uevl0DOv +jiZb8lxOPX4RRrYqbf06VFeRi2zh+4sIuIDTDS3QuC4e8LMzxRULsK3eJ2ikPTts +jUym0Fx+WFIBj/77hl7O6vwzdyjFTO7QC8unl38FcFOjYQb6s51+1d0/71gE+DyR +/I36ys2XpDtErN1kpzIIhw9zNtcU4B24KRGXy515H7zIzCiujpovOWIfKKq5x4F8 +NJZEOeYAS1sOS3r9yr9dZ1CROlmJGzoSfH65WFTlT5cANcinuf0/XgherAy6YehC +NDMCAwEAAaOByzCByDAdBgNVHQ4EFgQUmTis3t0XGeSdkgL9AU1AxSxOt0owHwYD +VR0jBBgwFoAUmTis3t0XGeSdkgL9AU1AxSxOt0owNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBHpyTnHyk0 +14464a+q0zsy9NZ97Kt8NFkLsTOAatQ2SnjTOtaXDYuBVAmRtTB5eOdSEbroV6/z ++PD/F5rj0KCJgVDoZ0ebtWjtmRAb1jFYJN10PIt2d0ajucq2Sz3KuVus55KM0/JK +uksvxhHPOBVZWvot0nIxj1SkfkSnJp0bOOCsdXKccUx4VICPdLcRsFzHaaUDHs1e +xc1gDoAyGQLgjLR25wCh5bwpMWGmVfByknhpbyYIlnG5QqnrzFSO1lUaJiygtabf +Uoah3ybaJobVF1vJm5DAbKsjGoIt/7aDrjzBw4VeSarW7/30SiJ8kLhGLhVjkwzF +LZ72MgNTEDA2 +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +U1VDQ0VTUw== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/key-rollover-longrolloverchain.pem b/net/data/verify_certificate_chain_unittest/key-rollover-longrolloverchain.pem index fcd63fa..23a69d8 100644 --- a/net/data/verify_certificate_chain_unittest/key-rollover-longrolloverchain.pem +++ b/net/data/verify_certificate_chain_unittest/key-rollover-longrolloverchain.pem
@@ -1,4 +1,4 @@ -[Created by: ./generate-key-rollover.py] +[Created by: generate-key-rollover.py] A certificate tree with two self-signed root certificates(oldroot, newroot), and a third root certificate (newrootrollover) which has the same key as newroot @@ -48,30 +48,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:be:12:1c:48:e4:73:1f:5c:d2:54:a9:7b:58:1c: - 37:73:c2:49:26:3e:ed:b5:6b:55:17:c9:4c:52:34: - ce:d9:76:86:32:74:74:ae:11:b2:99:1b:51:a0:33: - 48:34:2f:b9:d3:2b:06:c2:5c:29:53:35:ce:7c:a6: - 67:b2:6a:d4:33:c3:13:62:30:a1:53:5f:45:78:5b: - bb:47:ad:07:a4:98:9a:e9:e3:b1:3b:e6:33:c2:c1: - 5c:95:d7:c8:b9:a6:72:27:7a:79:da:c4:c8:5a:1a: - 3e:5e:5e:a6:62:64:c6:72:86:b1:78:98:5b:63:27: - 70:15:04:6b:b1:0f:11:9c:4d:3b:5c:e7:8d:c0:be: - d5:84:46:6c:bd:11:1e:21:c1:82:9c:d0:aa:2d:2f: - f8:2a:e9:3b:e4:35:15:6d:c7:4a:dd:a8:65:69:b8: - 16:a1:8a:04:a2:44:68:40:b6:99:ae:61:df:9f:6c: - 40:ef:79:c9:a3:6d:e4:2d:07:01:68:f1:21:4e:0e: - 28:a7:fd:2f:ad:ee:7d:65:cf:36:fd:4f:1b:ba:10: - 8e:86:fd:ec:37:67:0c:20:71:66:48:64:f3:82:af: - f5:e1:73:c9:09:36:03:3f:c2:47:7a:f2:33:b9:f9: - 9f:53:9b:24:5e:c3:cc:05:d9:a9:ed:d7:b2:2a:c5: - b7:39 + 00:ab:ca:16:55:35:25:9b:de:8e:fc:e9:5a:f9:04: + 3e:0e:6c:06:1e:1c:86:20:18:4f:41:da:3a:6d:16: + 9e:4e:3c:9b:11:67:bc:5a:3d:84:b2:79:05:d2:25: + 9a:6a:a8:80:6c:55:28:f2:5a:43:5f:c5:ef:e9:e3: + 1a:64:24:7e:57:4d:11:60:d7:e6:a9:2b:73:c7:93: + bb:67:b1:41:d5:df:21:5c:bd:98:93:a3:7d:0d:b0: + 86:5f:87:a9:d9:ab:ad:97:89:c5:12:c4:0f:71:d3: + 5b:79:18:53:64:7f:0a:a1:36:5e:00:5c:b9:ee:5e: + 14:10:17:f2:2a:60:0f:f7:ec:aa:d7:ad:d3:dc:8a: + 44:59:cf:c8:11:e7:42:1c:88:30:d7:1e:37:86:91: + 6b:ce:2a:bc:bb:f5:4a:cc:72:1a:9d:4f:5f:0e:c4: + c5:f7:b6:24:09:1c:22:f8:f7:a2:3d:45:c2:29:4d: + a3:f3:db:7a:a4:93:a2:48:d6:2b:90:da:0c:2b:d9: + 96:f0:d6:c7:eb:d0:eb:a8:08:72:55:a8:10:65:8f: + 38:6a:22:0c:9c:3d:68:1a:cd:16:da:73:24:2e:14: + 5d:08:05:fb:07:d1:52:53:4e:51:e4:b2:f3:17:4d: + f1:d0:c3:23:51:86:fb:a4:b9:09:37:9c:13:69:65: + 51:45 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - C9:45:0B:2A:F2:D8:8D:2A:D7:CE:AF:56:BF:82:B0:84:0C:C8:2E:F4 + 90:8D:89:42:17:BF:F6:98:D1:AA:8C:BF:AF:C2:74:60:AB:ED:90:0F X509v3 Authority Key Identifier: - keyid:B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + keyid:A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 Authority Information Access: CA Issuers - URI:http://url-for-aia/Intermediate.cer @@ -86,42 +86,42 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 63:66:9e:6c:34:8c:5d:74:ae:90:25:55:ae:86:49:b9:3d:fd: - 27:bc:4f:69:7b:70:cb:25:0e:a3:8c:7a:7d:9c:4f:0b:7c:f2: - 85:a5:ea:82:d2:37:c2:74:a2:ae:a8:bf:62:f4:5f:d4:c6:41: - 45:0c:cc:27:53:aa:8f:66:58:e9:b0:de:ae:98:14:bd:92:df: - 9b:0f:f2:c5:3b:d2:bc:1c:3e:80:b4:09:0f:c1:9f:d6:3a:29: - 52:71:b6:1a:92:95:5a:18:dc:b4:30:dc:61:61:93:54:d1:55: - 83:92:5d:c0:c7:dc:ab:d7:08:dd:8a:44:cf:92:f9:4d:86:25: - aa:ac:52:f6:0e:17:99:0b:31:d2:75:5e:33:f9:f5:b6:77:42: - 07:62:a9:53:cc:f3:79:84:57:d9:14:3f:ab:4c:8b:ae:c7:9f: - cf:7a:1f:bf:7e:1d:44:bd:76:b4:cd:8d:c8:1d:75:f7:3b:b5: - bc:35:8b:3f:29:b1:cb:67:a4:17:af:a4:ca:9f:2b:e7:15:66: - e4:c8:c1:7c:08:78:9e:5d:4b:c3:c6:58:66:96:42:e8:e6:40: - fd:dc:24:ce:3b:58:11:38:40:0e:fc:a9:c0:2c:0f:e5:cc:bb: - 02:32:31:b9:bc:6f:2d:1d:f6:2b:7c:d3:f8:24:f6:60:38:8a: - 1f:dd:e1:50 + 74:15:69:e0:48:a6:e3:fa:20:b6:3f:90:d7:61:d3:ea:b7:47: + 61:c7:81:6b:42:95:44:ac:1e:6f:3d:df:ad:2c:33:0d:e8:94: + 5b:d1:24:89:56:27:76:e4:6c:09:26:a7:e5:62:c9:96:83:ce: + 9d:08:f5:ee:c4:3d:fe:77:29:ae:8d:9f:7f:d5:81:b6:5d:b5: + 54:a0:1f:6c:54:1e:dd:a7:4e:78:e0:6c:60:1d:e8:1f:97:77: + 67:8d:57:80:00:17:80:cd:ab:ce:31:87:6e:9e:bf:3f:38:b9: + da:96:a3:d2:22:63:43:dd:5c:e8:42:ea:2d:eb:ab:81:33:e5: + 95:36:46:3c:dd:8e:ad:e2:43:40:6f:3c:ce:73:4d:52:71:9d: + 54:59:f4:73:a2:5a:48:a5:c7:bc:dd:f9:9f:91:39:b1:bc:ad: + 9a:59:ea:f6:33:42:72:66:2f:e9:78:8f:b6:09:15:35:d8:e6: + 70:0d:d3:da:a7:7e:55:d9:05:88:47:16:1d:cd:54:1c:15:11: + a6:d3:35:2a:4e:c5:0f:f7:b0:98:24:bf:7e:78:3e:5f:56:0c: + 87:72:c2:d1:7d:3e:3c:c6:98:50:a9:c7:cd:6f:0e:12:b4:32: + 7a:b8:01:6c:88:1c:8a:c2:19:24:1e:34:9b:da:45:eb:0a:f9: + 99:6e:54:c6 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+EhxI -5HMfXNJUqXtYHDdzwkkmPu21a1UXyUxSNM7ZdoYydHSuEbKZG1GgM0g0L7nTKwbC -XClTNc58pmeyatQzwxNiMKFTX0V4W7tHrQekmJrp47E75jPCwVyV18i5pnInenna -xMhaGj5eXqZiZMZyhrF4mFtjJ3AVBGuxDxGcTTtc543AvtWERmy9ER4hwYKc0Kot -L/gq6TvkNRVtx0rdqGVpuBahigSiRGhAtpmuYd+fbEDvecmjbeQtBwFo8SFODiin -/S+t7n1lzzb9Txu6EI6G/ew3ZwwgcWZIZPOCr/Xhc8kJNgM/wkd68jO5+Z9TmyRe -w8wF2ant17Iqxbc5AgMBAAGjgekwgeYwHQYDVR0OBBYEFMlFCyry2I0q186vVr+C -sIQMyC70MB8GA1UdIwQYMBaAFLE5eRM10ANr6cRjK8zWYcOC7BTBMD8GCCsGAQUF +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCryhZV +NSWb3o786Vr5BD4ObAYeHIYgGE9B2jptFp5OPJsRZ7xaPYSyeQXSJZpqqIBsVSjy +WkNfxe/p4xpkJH5XTRFg1+apK3PHk7tnsUHV3yFcvZiTo30NsIZfh6nZq62XicUS +xA9x01t5GFNkfwqhNl4AXLnuXhQQF/IqYA/37KrXrdPcikRZz8gR50IciDDXHjeG +kWvOKry79UrMchqdT18OxMX3tiQJHCL496I9RcIpTaPz23qkk6JI1iuQ2gwr2Zbw +1sfr0OuoCHJVqBBljzhqIgycPWgazRbacyQuFF0IBfsH0VJTTlHksvMXTfHQwyNR +hvukuQk3nBNpZVFFAgMBAAGjgekwgeYwHQYDVR0OBBYEFJCNiUIXv/aY0aqMv6/C +dGCr7ZAPMB8GA1UdIwQYMBaAFKUljsMUnIYZMPUFxarINxL2lEpGMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAY2aebDSMXXSukCVVroZJ -uT39J7xPaXtwyyUOo4x6fZxPC3zyhaXqgtI3wnSirqi/YvRf1MZBRQzMJ1Oqj2ZY -6bDerpgUvZLfmw/yxTvSvBw+gLQJD8Gf1jopUnG2GpKVWhjctDDcYWGTVNFVg5Jd -wMfcq9cI3YpEz5L5TYYlqqxS9g4XmQsx0nVeM/n1tndCB2KpU8zzeYRX2RQ/q0yL -rsefz3ofv34dRL12tM2NyB119zu1vDWLPymxy2ekF6+kyp8r5xVm5MjBfAh4nl1L -w8ZYZpZC6OZA/dwkzjtYEThADvypwCwP5cy7AjIxubxvLR32K3zT+CT2YDiKH93h -UA== +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAdBVp4Eim4/ogtj+Q12HT +6rdHYceBa0KVRKwebz3frSwzDeiUW9EkiVYnduRsCSan5WLJloPOnQj17sQ9/ncp +ro2ff9WBtl21VKAfbFQe3adOeOBsYB3oH5d3Z41XgAAXgM2rzjGHbp6/Pzi52paj +0iJjQ91c6ELqLeurgTPllTZGPN2OreJDQG88znNNUnGdVFn0c6JaSKXHvN35n5E5 +sbytmlnq9jNCcmYv6XiPtgkVNdjmcA3T2qd+VdkFiEcWHc1UHBURptM1Kk7FD/ew +mCS/fng+X1YMh3LC0X0+PMaYUKnHzW8OErQyergBbIgcisIZJB40m9pF6wr5mW5U +xg== -----END CERTIFICATE----- Certificate: @@ -138,30 +138,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:9c:d0:2e:3b:06:d6:ea:65:bd:dd:b2:d3:e8:88: - ea:08:73:01:42:ac:ca:38:28:17:32:93:5e:16:a8: - c1:79:44:9a:db:24:08:ba:81:52:63:9c:b4:ed:57: - d4:b2:ac:54:64:3b:70:39:7e:37:da:11:e1:8c:ba: - 09:bc:1a:9b:e7:fe:6d:75:f8:71:31:f0:ca:52:89: - 2a:9e:d5:53:db:b8:c0:76:cf:bf:58:58:e1:bb:81: - de:62:bb:06:58:1f:9b:64:03:75:7d:ee:76:6f:39: - 47:cb:8e:34:32:07:83:89:b0:83:2a:78:d0:ac:e2: - 86:0a:a8:ab:3b:97:81:de:9d:36:b4:03:b7:d5:06: - 05:53:d7:80:03:44:86:53:72:db:7a:5f:c5:20:dd: - c7:44:58:3b:40:7f:0e:39:bc:be:0d:ca:6a:f6:82: - a2:97:a2:17:79:51:6f:42:5d:0d:6a:b7:a0:de:5f: - 6a:00:be:e7:5a:b7:91:e9:fc:77:fd:75:88:8d:52: - 76:3d:0e:91:4b:c7:db:96:a4:5f:39:59:55:62:65: - 3b:15:7a:bc:7b:09:9f:3e:75:d9:9e:c5:00:b3:19: - d4:26:7e:eb:db:62:07:c2:f5:b6:4e:87:2d:eb:56: - 8b:5a:68:6c:85:2f:b4:3e:1d:dd:5d:31:49:98:8b: - 06:55 + 00:ad:d7:63:a2:51:33:32:fd:aa:73:2c:32:30:ac: + 2f:8d:37:5f:08:b2:9b:02:1a:f7:3c:eb:c2:9e:82: + d9:a2:0e:02:14:28:bc:18:e2:92:8e:db:66:14:36: + 3f:ef:43:47:ac:b4:e2:be:92:82:14:9a:bd:97:d7: + 19:6f:88:29:b1:85:68:bd:13:d5:93:2c:a0:c8:bb: + 76:9d:ad:f5:da:e8:55:ca:87:6d:07:20:f4:22:cf: + 5a:51:ea:e1:7b:c3:7e:f9:a8:85:95:c5:e9:88:bf: + 7b:5e:fd:49:d4:c4:ed:ce:b7:d2:71:23:59:00:a7: + 6f:85:40:a0:38:c6:2b:88:99:68:e9:97:7e:2f:92: + 97:18:0a:19:c2:4e:0a:28:2c:b3:b4:67:26:eb:1d: + 03:f6:16:58:20:88:81:ee:a8:ea:19:ae:25:e9:34: + 8d:87:f3:d2:3b:0e:b2:d8:31:14:ee:bd:c6:01:ec: + d4:41:f0:06:7b:3e:20:7b:06:88:86:29:d1:77:9a: + c0:bc:69:63:3f:2b:20:ac:aa:17:33:29:78:0a:11: + ff:92:f2:b3:4a:58:29:96:d3:f4:4f:70:ef:9c:81: + 55:1c:21:20:bf:54:5a:dd:60:b7:6e:53:41:a2:19: + 55:b5:f9:b8:6e:63:37:73:a0:b8:d4:c5:c1:a2:4e: + 0e:11 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 X509v3 Authority Key Identifier: - keyid:15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + keyid:83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -176,41 +176,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - a8:ad:48:d8:6e:1d:24:09:d2:b3:29:3c:48:60:27:7f:37:64: - d5:f1:3b:b3:5c:43:de:7c:b4:5f:ee:3a:f2:1a:25:24:0a:8a: - 25:6d:19:5b:dc:0c:4e:48:61:2f:60:d3:6b:f3:9c:03:2c:d3: - fa:c8:9b:99:e7:2e:c5:43:c0:5f:14:cd:8b:92:62:4f:e5:3a: - cd:b5:0a:d8:b2:01:c7:44:b4:3a:86:66:bf:fa:11:a5:f8:24: - 3f:d1:1a:e8:eb:1e:ad:f0:70:31:6f:bc:21:cf:db:ce:63:4e: - 84:e9:52:9e:bb:1b:c4:72:ae:e0:6c:88:9e:99:dc:79:d9:fd: - 83:26:8e:f6:19:70:d9:5e:fc:f4:0c:d1:17:6f:af:10:f6:64: - 16:08:d8:72:ba:3a:2d:66:28:5a:41:0d:f3:47:87:a7:9c:78: - c6:cd:5e:25:71:0b:f2:93:b8:26:17:b2:19:17:cc:03:ed:c0: - 6e:06:e2:4b:4a:57:5f:23:02:2a:69:06:7a:c4:b7:3e:2f:e8: - f0:03:ae:b8:2d:df:63:22:20:73:23:75:d9:3c:d7:22:e4:b4: - 65:65:ed:b9:e6:02:1d:b5:51:11:9c:db:92:e4:fe:8c:1d:bb: - c5:95:87:5b:38:ee:ff:e4:01:d1:5d:84:b9:73:d3:da:23:ca: - 5e:05:d3:7d + 7f:a1:7c:8f:ea:d9:b9:63:e1:b0:31:0a:2e:1c:8e:e9:d0:23: + ee:3e:8e:50:55:db:ba:10:93:a4:93:0b:bb:c1:a5:3d:32:90: + ee:40:bf:0f:df:25:f1:65:b3:30:6d:39:9b:d2:c1:b8:b7:a8: + 7e:23:dc:6a:c3:5a:9e:53:d7:86:4c:82:de:98:23:1a:6f:f9: + 0d:6d:b9:35:55:b9:94:03:8d:b7:6c:2e:64:79:ea:85:84:7e: + 51:18:37:42:80:f5:d4:16:3f:a0:a9:6b:bf:17:d1:19:99:ea: + 8d:5a:c9:30:b0:ca:c8:2c:17:ce:14:75:b3:c9:19:df:16:1b: + 9a:97:ae:50:69:a5:6c:02:57:84:f4:7f:30:90:ed:89:bb:0e: + c9:7b:34:d0:41:58:00:20:29:6b:f0:e8:97:81:92:3d:ba:e0: + 65:e9:7c:cb:5c:7b:50:c8:0f:d3:20:ab:42:2f:0d:44:6d:99: + c2:1d:42:e8:b2:10:82:9b:86:ba:a8:45:d2:2c:13:53:cf:ad: + 37:ac:ce:f3:e7:49:fe:59:d5:b6:5f:8b:6b:fd:5f:e0:f2:91: + ef:e3:f7:e0:b6:ee:e7:ae:77:0e:66:12:40:55:75:77:2a:05: + d4:bd:ab:7e:5a:67:d8:81:8b:15:fd:4c:60:63:c7:f7:5f:fa: + d4:d8:d9:d2 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMjEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnNAuOwbW -6mW93bLT6IjqCHMBQqzKOCgXMpNeFqjBeUSa2yQIuoFSY5y07VfUsqxUZDtwOX43 -2hHhjLoJvBqb5/5tdfhxMfDKUokqntVT27jAds+/WFjhu4HeYrsGWB+bZAN1fe52 -bzlHy440MgeDibCDKnjQrOKGCqirO5eB3p02tAO31QYFU9eAA0SGU3Lbel/FIN3H -RFg7QH8OOby+Dcpq9oKil6IXeVFvQl0Nareg3l9qAL7nWreR6fx3/XWIjVJ2PQ6R -S8fblqRfOVlVYmU7FXq8ewmfPnXZnsUAsxnUJn7r22IHwvW2Toct61aLWmhshS+0 -Ph3dXTFJmIsGVQIDAQABo4HLMIHIMB0GA1UdDgQWBBSxOXkTNdADa+nEYyvM1mHD -guwUwTAfBgNVHSMEGDAWgBQVnqat9Z+KocEImb9mb8/Kcs0MNDA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArddjolEz +Mv2qcywyMKwvjTdfCLKbAhr3POvCnoLZog4CFCi8GOKSjttmFDY/70NHrLTivpKC +FJq9l9cZb4gpsYVovRPVkyygyLt2na312uhVyodtByD0Is9aUerhe8N++aiFlcXp +iL97Xv1J1MTtzrfScSNZAKdvhUCgOMYriJlo6Zd+L5KXGAoZwk4KKCyztGcm6x0D +9hZYIIiB7qjqGa4l6TSNh/PSOw6y2DEU7r3GAezUQfAGez4gewaIhinRd5rAvGlj +PysgrKoXMyl4ChH/kvKzSlgpltP0T3DvnIFVHCEgv1Ra3WC3blNBohlVtfm4bmM3 +c6C41MXBok4OEQIDAQABo4HLMIHIMB0GA1UdDgQWBBSlJY7DFJyGGTD1BcWqyDcS +9pRKRjAfBgNVHSMEGDAWgBSD+ZPVKfnEuqFf5Ml0GODfDhcYUDA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AKitSNhuHSQJ0rMpPEhgJ383ZNXxO7NcQ958tF/uOvIaJSQKiiVtGVvcDE5IYS9g -02vznAMs0/rIm5nnLsVDwF8UzYuSYk/lOs21CtiyAcdEtDqGZr/6EaX4JD/RGujr -Hq3wcDFvvCHP285jToTpUp67G8RyruBsiJ6Z3HnZ/YMmjvYZcNle/PQM0RdvrxD2 -ZBYI2HK6Oi1mKFpBDfNHh6eceMbNXiVxC/KTuCYXshkXzAPtwG4G4ktKV18jAipp -BnrEtz4v6PADrrgt32MiIHMjddk81yLktGVl7bnmAh21URGc25Lk/owdu8WVh1s4 -7v/kAdFdhLlz09ojyl4F030= +AH+hfI/q2blj4bAxCi4cjunQI+4+jlBV27oQk6STC7vBpT0ykO5Avw/fJfFlszBt +OZvSwbi3qH4j3GrDWp5T14ZMgt6YIxpv+Q1tuTVVuZQDjbdsLmR56oWEflEYN0KA +9dQWP6Cpa78X0RmZ6o1ayTCwysgsF84UdbPJGd8WG5qXrlBppWwCV4T0fzCQ7Ym7 +Dsl7NNBBWAAgKWvw6JeBkj264GXpfMtce1DID9Mgq0IvDURtmcIdQuiyEIKbhrqo +RdIsE1PPrTeszvPnSf5Z1bZfi2v9X+Dyke/j9+C27ueudw5mEkBVdXcqBdS9q35a +Z9iBixX9TGBjx/df+tTY2dI= -----END CERTIFICATE----- Certificate: @@ -227,30 +227,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ae:ea:3b:3f:b6:e9:3d:ea:eb:3d:dd:e8:4d:45: - 83:63:78:ea:07:90:3a:3c:4f:92:54:2b:2d:02:1b: - eb:9e:81:72:68:2e:73:f8:4a:a1:de:0c:d6:f0:c2: - 61:26:90:0b:48:59:ab:23:25:8f:e4:4a:6b:c9:2d: - ba:a7:35:c4:22:df:76:99:d8:7b:f7:6d:ca:9b:da: - d2:ed:7e:c8:93:b2:a7:f6:f0:05:6a:5d:c6:e1:79: - d0:25:59:a9:50:1e:65:eb:1c:c9:cd:4e:6a:3a:2a: - a4:1a:fa:81:a3:e7:ae:d7:de:43:d9:e8:0b:5c:b0: - 6b:46:39:c5:9c:4a:6d:59:bf:da:70:2e:80:ac:c8: - 80:e3:83:d1:71:7b:a7:0b:92:bf:a8:81:ad:5c:b2: - d5:e9:b9:5f:b5:4f:93:43:67:72:36:b3:f7:17:b9: - 1b:da:2a:13:83:70:36:ae:59:03:3d:f0:71:de:a2: - 7a:41:ad:b5:e9:a2:51:e4:18:ec:88:ad:48:f1:df: - 17:04:43:54:2a:af:3c:c0:f5:84:39:43:d1:a7:d2: - 52:0f:3c:dd:ef:13:58:8c:1d:d4:dd:2e:6d:1a:e7: - 73:9b:8b:f3:41:7b:9a:53:4e:0d:92:d3:5d:3f:fc: - c3:61:dc:5f:a0:93:3c:08:cc:b4:9b:ce:9d:78:e3: - 77:c9 + 00:c8:01:d6:aa:f0:22:fa:55:68:e4:56:fa:87:9f: + 03:a4:78:36:40:64:b2:60:f7:20:25:47:92:b0:cb: + c7:9d:4c:c6:4d:78:0f:91:9e:a8:f1:0b:84:58:b1: + a9:06:2d:7d:09:82:f4:1a:60:67:7b:c3:47:69:05: + b5:59:90:02:2a:53:27:25:21:4d:9a:5f:b6:7b:58: + 25:77:b3:46:64:fc:ed:04:c0:e2:62:e5:96:f9:8a: + 8d:9a:e8:8d:bf:d9:19:38:97:52:ab:31:3c:1c:a2: + b9:21:ec:5f:aa:8c:21:44:c6:73:7f:0b:72:c9:61: + 1c:a7:cd:46:bb:da:5b:a7:1b:e2:18:fb:ff:18:81: + 5f:fb:75:29:21:9c:92:e0:d3:03:f5:b8:58:94:36: + 32:7a:9a:a7:ec:49:ab:ef:d4:8c:c4:65:aa:23:40: + 96:76:47:4b:06:0b:21:c4:44:9f:8d:12:ab:05:05: + e7:97:d9:9d:c0:f9:4d:77:14:0b:c5:d5:82:0c:d7: + 14:54:fa:07:dd:a3:78:30:5d:95:83:e4:1c:7f:c2: + 13:c6:b1:8b:10:87:9b:e9:3e:4f:d6:b6:b9:a8:9f: + 4c:47:f8:40:67:7d:4e:9b:87:4a:b6:92:eb:33:f1: + 73:a3:70:d6:fc:37:32:2a:b4:b8:56:90:63:5e:ec: + b7:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + 83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 X509v3 Authority Key Identifier: - keyid:15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + keyid:83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -265,41 +265,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 58:4b:60:7e:0b:c2:3d:20:f3:49:34:91:55:d3:5f:5b:ce:81: - 31:da:71:9f:72:d7:f4:cc:be:cf:58:b8:97:aa:99:87:3d:34: - 12:ac:40:1c:8e:02:46:83:ee:04:e1:7e:5e:57:ca:a4:ae:e1: - d0:b4:12:e9:65:33:f5:4e:c4:f6:49:00:7f:83:6d:75:67:84: - b2:db:52:5a:a2:3e:5d:2d:5c:f3:45:fe:6a:d3:c4:0a:76:52: - c6:9b:b0:89:01:b9:b6:be:30:60:d9:b4:2e:1d:1e:bf:ef:d8: - 12:90:9f:cb:67:29:20:61:9f:1a:67:64:88:4c:43:ec:10:7d: - 87:11:00:44:6a:ce:37:af:73:f4:fa:d2:22:2f:24:3a:6f:79: - 09:6c:8d:de:b5:71:0e:6e:b7:64:a9:be:73:a8:c1:c8:50:74: - d2:c4:2b:ef:4f:25:20:8f:41:f0:1f:6e:52:77:eb:a0:1a:94: - 87:7c:35:11:37:5c:33:f5:83:47:e0:f2:0e:97:af:23:61:23: - 25:0b:92:6c:3b:30:a1:aa:c6:dc:4a:05:6e:43:76:58:82:66: - cd:f6:d6:ef:9b:80:36:d6:95:b7:d1:ec:5c:53:f7:78:84:ef: - 48:6a:2c:f7:93:97:f2:7a:ce:ec:f3:eb:63:e1:5a:e0:69:02: - 5d:34:36:93 + a9:e8:26:5f:c8:9e:6b:fc:cd:4d:d2:9e:de:f5:f1:08:04:66: + 23:6a:7e:ee:92:9f:eb:71:53:ea:97:8e:db:e4:47:72:7a:08: + 17:1c:72:4a:37:00:f5:e3:a8:77:d2:b1:d4:89:45:b2:e9:ba: + 00:61:6e:cb:03:b4:21:aa:ec:e4:f3:a4:41:b7:90:41:08:0f: + 0d:90:bd:55:4a:bc:1c:7f:2e:c1:97:6d:34:d1:8d:da:39:46: + 55:49:97:4c:f7:eb:29:62:b3:ed:ad:24:d8:05:9a:93:82:f2: + 12:34:24:78:60:a4:7b:a9:94:97:75:10:20:57:42:83:32:0d: + 19:d0:15:3b:55:84:d8:49:9b:a4:66:14:c9:90:f4:89:bc:23: + 2a:45:dd:19:25:68:6e:fe:44:60:c0:19:75:61:3f:85:4b:90: + 8c:45:3b:2e:9b:41:12:43:ee:2f:61:96:ff:af:4b:11:fe:af: + 02:af:0d:69:0d:ae:11:bc:eb:34:de:ac:24:3b:08:6e:b3:b2: + 1a:8e:46:d9:6b:91:08:4e:c3:5b:f6:3c:3f:90:8d:95:01:b9: + d9:30:aa:2d:79:00:bb:99:a1:ed:0a:1c:28:fc:5c:12:1c:3d: + 53:33:c8:ca:b1:9c:13:a2:2a:c7:1d:ce:b7:1e:2c:35:37:e8: + 10:af:0c:e6 -----BEGIN CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMjEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK7qOz+26T3q6z3d6E1F -g2N46geQOjxPklQrLQIb656Bcmguc/hKod4M1vDCYSaQC0hZqyMlj+RKa8ktuqc1 -xCLfdpnYe/dtypva0u1+yJOyp/bwBWpdxuF50CVZqVAeZescyc1OajoqpBr6gaPn -rtfeQ9noC1ywa0Y5xZxKbVm/2nAugKzIgOOD0XF7pwuSv6iBrVyy1em5X7VPk0Nn -cjaz9xe5G9oqE4NwNq5ZAz3wcd6iekGttemiUeQY7IitSPHfFwRDVCqvPMD1hDlD -0afSUg883e8TWIwd1N0ubRrnc5uL80F7mlNODZLTXT/8w2HcX6CTPAjMtJvOnXjj -d8kCAwEAAaOByzCByDAdBgNVHQ4EFgQUFZ6mrfWfiqHBCJm/Zm/PynLNDDQwHwYD -VR0jBBgwFoAUFZ6mrfWfiqHBCJm/Zm/PynLNDDQwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMgB1qrwIvpVaORW+oef +A6R4NkBksmD3ICVHkrDLx51Mxk14D5GeqPELhFixqQYtfQmC9BpgZ3vDR2kFtVmQ +AipTJyUhTZpftntYJXezRmT87QTA4mLllvmKjZrojb/ZGTiXUqsxPByiuSHsX6qM +IUTGc38LcslhHKfNRrvaW6cb4hj7/xiBX/t1KSGckuDTA/W4WJQ2Mnqap+xJq+/U +jMRlqiNAlnZHSwYLIcREn40SqwUF55fZncD5TXcUC8XVggzXFFT6B92jeDBdlYPk +HH/CE8axixCHm+k+T9a2uaifTEf4QGd9TpuHSraS6zPxc6Nw1vw3Miq0uFaQY17s +t7cCAwEAAaOByzCByDAdBgNVHQ4EFgQUg/mT1Sn5xLqhX+TJdBjg3w4XGFAwHwYD +VR0jBBgwFoAUg/mT1Sn5xLqhX+TJdBjg3w4XGFAwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBYS2B+C8I9 -IPNJNJFV019bzoEx2nGfctf0zL7PWLiXqpmHPTQSrEAcjgJGg+4E4X5eV8qkruHQ -tBLpZTP1TsT2SQB/g211Z4Sy21Jaoj5dLVzzRf5q08QKdlLGm7CJAbm2vjBg2bQu -HR6/79gSkJ/LZykgYZ8aZ2SITEPsEH2HEQBEas43r3P0+tIiLyQ6b3kJbI3etXEO -brdkqb5zqMHIUHTSxCvvTyUgj0HwH25Sd+ugGpSHfDURN1wz9YNH4PIOl68jYSMl -C5JsOzChqsbcSgVuQ3ZYgmbN9tbvm4A21pW30excU/d4hO9Iaiz3k5fyes7s8+tj -4VrgaQJdNDaT +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCp6CZfyJ5r +/M1N0p7e9fEIBGYjan7ukp/rcVPql47b5EdyeggXHHJKNwD146h30rHUiUWy6boA +YW7LA7Qhquzk86RBt5BBCA8NkL1VSrwcfy7Bl2000Y3aOUZVSZdM9+spYrPtrSTY +BZqTgvISNCR4YKR7qZSXdRAgV0KDMg0Z0BU7VYTYSZukZhTJkPSJvCMqRd0ZJWhu +/kRgwBl1YT+FS5CMRTsum0ESQ+4vYZb/r0sR/q8Crw1pDa4RvOs03qwkOwhus7Ia +jkbZa5EITsNb9jw/kI2VAbnZMKoteQC7maHtChwo/FwSHD1TM8jKsZwToirHHc63 +Hiw1N+gQrwzm -----END CERTIFICATE----- Certificate: @@ -316,30 +316,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ae:ea:3b:3f:b6:e9:3d:ea:eb:3d:dd:e8:4d:45: - 83:63:78:ea:07:90:3a:3c:4f:92:54:2b:2d:02:1b: - eb:9e:81:72:68:2e:73:f8:4a:a1:de:0c:d6:f0:c2: - 61:26:90:0b:48:59:ab:23:25:8f:e4:4a:6b:c9:2d: - ba:a7:35:c4:22:df:76:99:d8:7b:f7:6d:ca:9b:da: - d2:ed:7e:c8:93:b2:a7:f6:f0:05:6a:5d:c6:e1:79: - d0:25:59:a9:50:1e:65:eb:1c:c9:cd:4e:6a:3a:2a: - a4:1a:fa:81:a3:e7:ae:d7:de:43:d9:e8:0b:5c:b0: - 6b:46:39:c5:9c:4a:6d:59:bf:da:70:2e:80:ac:c8: - 80:e3:83:d1:71:7b:a7:0b:92:bf:a8:81:ad:5c:b2: - d5:e9:b9:5f:b5:4f:93:43:67:72:36:b3:f7:17:b9: - 1b:da:2a:13:83:70:36:ae:59:03:3d:f0:71:de:a2: - 7a:41:ad:b5:e9:a2:51:e4:18:ec:88:ad:48:f1:df: - 17:04:43:54:2a:af:3c:c0:f5:84:39:43:d1:a7:d2: - 52:0f:3c:dd:ef:13:58:8c:1d:d4:dd:2e:6d:1a:e7: - 73:9b:8b:f3:41:7b:9a:53:4e:0d:92:d3:5d:3f:fc: - c3:61:dc:5f:a0:93:3c:08:cc:b4:9b:ce:9d:78:e3: - 77:c9 + 00:c8:01:d6:aa:f0:22:fa:55:68:e4:56:fa:87:9f: + 03:a4:78:36:40:64:b2:60:f7:20:25:47:92:b0:cb: + c7:9d:4c:c6:4d:78:0f:91:9e:a8:f1:0b:84:58:b1: + a9:06:2d:7d:09:82:f4:1a:60:67:7b:c3:47:69:05: + b5:59:90:02:2a:53:27:25:21:4d:9a:5f:b6:7b:58: + 25:77:b3:46:64:fc:ed:04:c0:e2:62:e5:96:f9:8a: + 8d:9a:e8:8d:bf:d9:19:38:97:52:ab:31:3c:1c:a2: + b9:21:ec:5f:aa:8c:21:44:c6:73:7f:0b:72:c9:61: + 1c:a7:cd:46:bb:da:5b:a7:1b:e2:18:fb:ff:18:81: + 5f:fb:75:29:21:9c:92:e0:d3:03:f5:b8:58:94:36: + 32:7a:9a:a7:ec:49:ab:ef:d4:8c:c4:65:aa:23:40: + 96:76:47:4b:06:0b:21:c4:44:9f:8d:12:ab:05:05: + e7:97:d9:9d:c0:f9:4d:77:14:0b:c5:d5:82:0c:d7: + 14:54:fa:07:dd:a3:78:30:5d:95:83:e4:1c:7f:c2: + 13:c6:b1:8b:10:87:9b:e9:3e:4f:d6:b6:b9:a8:9f: + 4c:47:f8:40:67:7d:4e:9b:87:4a:b6:92:eb:33:f1: + 73:a3:70:d6:fc:37:32:2a:b4:b8:56:90:63:5e:ec: + b7:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + 83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 X509v3 Authority Key Identifier: - keyid:02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + keyid:BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -354,41 +354,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 51:9b:dd:56:f2:b1:2b:e5:36:c8:2f:1d:a9:53:1f:89:e1:24: - 33:bd:ac:56:c1:c3:1a:38:a6:7e:fc:61:9a:ae:7c:1f:13:3e: - 37:e4:e6:a9:11:9e:2b:6e:ce:dd:12:0c:c1:b2:b7:eb:48:0e: - c7:a5:65:f0:86:49:8a:dc:cf:1b:6d:33:af:af:96:51:49:01: - e4:82:d6:e6:5a:d0:41:c7:05:9f:16:eb:06:bd:bc:ab:fe:a0: - d7:ac:de:62:d1:71:7e:69:82:31:03:e3:60:28:e6:18:3b:e5: - 93:2b:58:ee:d5:0b:7b:b6:af:f2:4f:22:eb:4d:b7:a6:74:68: - b7:82:68:7f:a9:b6:ee:a0:20:d7:c6:16:0e:9c:1c:39:ea:24: - 5e:60:12:fc:39:60:0d:54:3e:aa:b3:43:e1:0f:ef:d7:8f:3e: - 09:a9:55:95:e9:3d:0c:4f:ad:cb:c2:f3:2c:10:43:67:54:f9: - 66:54:81:ff:62:61:94:05:b0:42:af:f0:c5:ac:00:91:28:5c: - aa:a3:61:44:ba:c2:a6:ab:f8:1d:7e:02:69:33:48:fe:ac:93: - 7f:4c:99:91:d9:18:37:f9:70:3f:56:2a:ee:4a:e0:4d:f3:60: - 12:5d:30:d8:37:bf:ca:40:85:29:0c:a7:8f:ab:ad:03:6d:7b: - ba:62:7f:58 + a4:6f:3a:2b:4c:55:63:68:09:a1:73:eb:b1:b6:69:07:de:8a: + 44:7d:10:bd:05:bf:a9:ef:06:af:c1:90:a6:75:1d:a8:51:e2: + f7:9a:4e:d7:23:6b:c1:34:83:64:9c:6d:15:0a:cc:b0:99:13: + 53:1f:0b:ef:23:82:6d:32:e1:ea:08:ce:65:21:d4:09:6a:6a: + d4:05:1b:96:2b:34:44:89:31:4e:14:11:b2:ff:ae:cf:60:56: + 2a:37:2f:18:2b:ae:aa:74:bb:d5:88:fb:3f:d4:ee:4c:f5:f3: + 4a:fa:6f:34:78:b7:bd:b1:d0:77:da:86:02:ce:a7:c3:11:f2: + 09:bf:3c:17:61:d2:4c:c5:26:07:ec:92:0a:ab:9e:6a:ae:72: + 66:34:a3:45:94:76:8c:e7:7c:f8:d3:43:41:b0:70:57:78:56: + ee:bc:54:8f:ba:ac:07:dd:cb:3d:a0:1a:79:cb:5b:20:4a:9b: + 1a:8d:93:3a:5e:38:11:ae:60:dd:1c:5f:63:5a:dd:06:a6:c3: + a1:20:4d:1e:a1:6a:a6:92:7c:1e:b4:01:a7:e3:6c:94:c8:30: + a6:bb:a7:2e:d7:66:2b:7f:a6:0b:3f:44:b5:62:2e:32:44:12: + 96:f0:bb:49:8a:49:f6:78:05:60:ed:64:13:93:67:35:4f:c8: + 38:98:2f:e5 -----BEGIN CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBAzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMjEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK7qOz+26T3q6z3d6E1F -g2N46geQOjxPklQrLQIb656Bcmguc/hKod4M1vDCYSaQC0hZqyMlj+RKa8ktuqc1 -xCLfdpnYe/dtypva0u1+yJOyp/bwBWpdxuF50CVZqVAeZescyc1OajoqpBr6gaPn -rtfeQ9noC1ywa0Y5xZxKbVm/2nAugKzIgOOD0XF7pwuSv6iBrVyy1em5X7VPk0Nn -cjaz9xe5G9oqE4NwNq5ZAz3wcd6iekGttemiUeQY7IitSPHfFwRDVCqvPMD1hDlD -0afSUg883e8TWIwd1N0ubRrnc5uL80F7mlNODZLTXT/8w2HcX6CTPAjMtJvOnXjj -d8kCAwEAAaOByzCByDAdBgNVHQ4EFgQUFZ6mrfWfiqHBCJm/Zm/PynLNDDQwHwYD -VR0jBBgwFoAUAs72rBo5HoXoctGKxh3oeo+dFWswNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMgB1qrwIvpVaORW+oef +A6R4NkBksmD3ICVHkrDLx51Mxk14D5GeqPELhFixqQYtfQmC9BpgZ3vDR2kFtVmQ +AipTJyUhTZpftntYJXezRmT87QTA4mLllvmKjZrojb/ZGTiXUqsxPByiuSHsX6qM +IUTGc38LcslhHKfNRrvaW6cb4hj7/xiBX/t1KSGckuDTA/W4WJQ2Mnqap+xJq+/U +jMRlqiNAlnZHSwYLIcREn40SqwUF55fZncD5TXcUC8XVggzXFFT6B92jeDBdlYPk +HH/CE8axixCHm+k+T9a2uaifTEf4QGd9TpuHSraS6zPxc6Nw1vw3Miq0uFaQY17s +t7cCAwEAAaOByzCByDAdBgNVHQ4EFgQUg/mT1Sn5xLqhX+TJdBjg3w4XGFAwHwYD +VR0jBBgwFoAUvslrrJS1H+SNxpCdwNcSFl5QRxYwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBRm91W8rEr -5TbILx2pUx+J4SQzvaxWwcMaOKZ+/GGarnwfEz435OapEZ4rbs7dEgzBsrfrSA7H -pWXwhkmK3M8bbTOvr5ZRSQHkgtbmWtBBxwWfFusGvbyr/qDXrN5i0XF+aYIxA+Ng -KOYYO+WTK1ju1Qt7tq/yTyLrTbemdGi3gmh/qbbuoCDXxhYOnBw56iReYBL8OWAN -VD6qs0PhD+/Xjz4JqVWV6T0MT63LwvMsEENnVPlmVIH/YmGUBbBCr/DFrACRKFyq -o2FEusKmq/gdfgJpM0j+rJN/TJmR2Rg3+XA/ViruSuBN82ASXTDYN7/KQIUpDKeP -q60DbXu6Yn9Y +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCkbzorTFVj +aAmhc+uxtmkH3opEfRC9Bb+p7wavwZCmdR2oUeL3mk7XI2vBNINknG0VCsywmRNT +HwvvI4JtMuHqCM5lIdQJamrUBRuWKzREiTFOFBGy/67PYFYqNy8YK66qdLvViPs/ +1O5M9fNK+m80eLe9sdB32oYCzqfDEfIJvzwXYdJMxSYH7JIKq55qrnJmNKNFlHaM +53z400NBsHBXeFbuvFSPuqwH3cs9oBp5y1sgSpsajZM6XjgRrmDdHF9jWt0GpsOh +IE0eoWqmknwetAGn42yUyDCmu6cu12Yrf6YLP0S1Yi4yRBKW8LtJikn2eAVg7WQT +k2c1T8g4mC/l -----END CERTIFICATE----- Certificate: @@ -405,30 +405,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a6:44:ec:a7:15:00:1f:89:ac:91:f8:ec:7b:03: - 46:0b:53:15:ed:23:40:35:94:f3:96:80:27:d3:4a: - 84:92:68:c9:0c:e0:14:32:c7:31:67:49:29:58:77: - ea:ce:8a:72:5b:93:b1:a0:a8:e5:84:c6:52:9d:5a: - c0:41:bf:98:5f:18:5d:aa:d1:65:79:fb:e9:b0:84: - 92:9d:2c:58:bc:f1:c4:29:59:ed:bc:ac:85:ce:d7: - 0e:aa:08:e8:2d:90:25:cb:91:9d:7d:91:74:42:a0: - ae:77:d2:11:7b:57:49:04:24:c0:94:f4:20:54:60: - d9:1b:76:76:0b:2c:23:3c:67:90:8c:06:ed:4e:df: - ac:24:22:26:f7:26:8f:5a:d2:5b:79:8a:6f:6e:53: - 27:60:10:cb:c7:b4:9f:60:2d:8f:32:69:4b:01:d1: - f0:6d:69:1a:22:14:06:66:63:97:e8:fc:79:41:8d: - 15:44:44:d1:43:2a:37:5e:77:e4:06:e6:a9:85:13: - e9:24:63:9d:09:d0:f5:13:d5:ba:59:2e:1c:d2:70: - 06:b1:80:f7:57:d7:30:f7:14:f3:18:06:7f:84:38: - b6:81:46:9f:a2:36:87:0e:5f:1a:45:38:b7:20:16: - b7:c6:e1:91:3b:0e:0c:ab:b7:4e:3d:a4:6d:66:d8: - 85:fb + 00:ef:e6:e9:e0:b4:83:30:dc:21:a0:1f:9d:c3:81: + 9d:a2:a1:ce:e5:ef:1f:94:e3:f0:14:05:12:2a:97: + 5e:00:ba:6a:c3:09:b3:06:a1:9e:da:6f:9d:f8:45: + a2:6c:1e:7d:a3:10:d2:db:38:24:ed:80:25:36:9c: + db:d3:07:af:39:f8:82:48:a3:cd:7f:f3:57:dd:f9: + fd:7c:03:d5:8e:5d:35:ae:ed:af:c6:a1:89:ca:2e: + 2e:cf:77:5a:26:c6:e4:1d:9d:97:c7:a7:cf:93:aa: + 24:22:d9:82:d5:98:47:c9:33:ba:77:7e:6a:a3:35: + 43:1c:56:a5:94:2d:48:0f:47:2d:33:cd:c4:46:2d: + 54:61:dd:b8:bc:8d:1c:97:7d:4b:f4:fc:6b:3e:4d: + 28:17:7f:9a:e9:e5:6d:6f:c4:1c:75:8d:a6:0d:b7: + 5e:37:de:e1:1a:b2:e5:a6:d6:79:e4:df:1f:d3:f6: + 68:ed:30:a3:9e:8d:ed:8b:55:3d:12:3f:0f:3f:90: + 4f:b5:74:02:b0:1f:40:ae:32:d9:8e:a5:3b:74:e0: + f3:1e:4e:4c:63:fd:37:4b:b8:2f:70:41:64:4f:ee: + 6b:2f:33:40:2f:8a:c6:5f:e3:6a:e4:a0:62:53:99: + de:8c:ca:b5:34:ca:c0:20:9e:16:73:13:e1:c9:dc: + 22:b3 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 X509v3 Authority Key Identifier: - keyid:02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + keyid:BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -443,41 +443,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 0e:00:56:5c:72:31:88:bd:95:13:f7:64:96:1c:63:c2:1c:11: - 60:04:d2:c3:5f:7c:a2:d7:d1:33:6d:51:6b:77:61:78:a8:70: - 2e:50:97:5d:c1:e8:9b:dd:c6:61:a7:d3:e1:2c:83:07:85:5c: - c9:d7:1e:22:c2:5f:76:83:19:d7:de:4a:5e:82:0f:43:80:45: - 02:d7:d0:3d:ca:c3:c0:fc:04:c8:f6:89:32:d7:47:c6:bf:1f: - c6:bd:71:e1:07:00:90:12:ec:61:63:1b:6c:e9:58:2c:fc:4c: - a9:8f:58:e1:b1:6e:a5:ca:4d:be:7e:32:16:74:5f:fd:35:e4: - 37:aa:1a:c5:33:21:20:8a:3e:1c:af:da:f3:c7:a2:22:d3:93: - 6c:5e:ac:0a:65:d5:db:e4:8b:11:5e:ca:eb:8f:da:c4:5d:2f: - 7a:98:e8:3c:d1:89:15:05:02:86:ef:eb:17:18:81:28:ca:d6: - 58:87:bd:d4:e2:50:41:92:d9:7f:b1:f7:53:8f:f3:cc:f3:1e: - 1d:e4:5a:c2:60:1b:17:42:78:53:e9:2d:5d:bb:f9:21:50:ff: - 87:53:be:5f:e6:d4:8f:25:7f:d7:83:d7:f8:4d:c1:7c:7a:40: - 0b:11:f1:d9:c6:eb:97:45:00:d6:6b:84:1c:4f:fc:8e:1f:5b: - b5:3d:60:0c + 0b:b4:ba:9b:02:15:72:58:48:09:c8:66:c4:7c:6e:07:5e:bf: + e1:a5:97:42:fd:5f:8f:5f:35:e7:60:78:73:a8:18:f8:c2:91: + b1:d4:1b:cb:11:17:e0:d5:30:69:90:b8:9a:f9:a1:95:47:c9: + 85:dd:6d:b9:56:a2:fb:16:2f:09:8c:c0:66:6d:af:7b:f2:42: + 67:0f:a3:b9:e8:69:36:89:92:1e:c8:54:11:fe:39:3f:71:85: + d9:65:30:0c:2a:b1:a6:b8:df:b0:40:7b:56:98:3d:c3:66:76: + be:85:ec:f2:6c:30:de:ce:b3:84:70:74:83:2b:20:42:5a:f0: + 9b:31:98:81:16:71:cf:cf:66:57:36:dd:13:cd:f0:74:0c:2f: + a1:26:71:1e:50:ce:57:c9:85:71:47:08:b2:a6:b4:2a:2f:6b: + 5f:1f:80:09:3d:b1:5e:ab:aa:e7:08:86:c7:75:2d:36:b1:f3: + 2c:e1:91:8c:1c:6b:0a:fe:80:38:34:61:f8:a2:ee:3e:9a:e4: + 38:95:dd:3d:21:1e:61:5c:53:a7:30:b8:2b:10:72:d8:5d:54: + a3:47:9c:6c:69:d6:42:a6:56:f2:b3:3e:98:22:c2:b0:6b:2e: + f3:3a:b8:71:52:53:b5:32:a5:a4:38:35:fc:f2:ed:9a:e3:52: + 57:75:df:07 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKZE7KcVAB+JrJH47HsD -RgtTFe0jQDWU85aAJ9NKhJJoyQzgFDLHMWdJKVh36s6KcluTsaCo5YTGUp1awEG/ -mF8YXarRZXn76bCEkp0sWLzxxClZ7byshc7XDqoI6C2QJcuRnX2RdEKgrnfSEXtX -SQQkwJT0IFRg2Rt2dgssIzxnkIwG7U7frCQiJvcmj1rSW3mKb25TJ2AQy8e0n2At -jzJpSwHR8G1pGiIUBmZjl+j8eUGNFURE0UMqN1535AbmqYUT6SRjnQnQ9RPVulku -HNJwBrGA91fXMPcU8xgGf4Q4toFGn6I2hw5fGkU4tyAWt8bhkTsODKu3Tj2kbWbY -hfsCAwEAAaOByzCByDAdBgNVHQ4EFgQUAs72rBo5HoXoctGKxh3oeo+dFWswHwYD -VR0jBBgwFoAUAs72rBo5HoXoctGKxh3oeo+dFWswNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO/m6eC0gzDcIaAfncOB +naKhzuXvH5Tj8BQFEiqXXgC6asMJswahntpvnfhFomwefaMQ0ts4JO2AJTac29MH +rzn4gkijzX/zV935/XwD1Y5dNa7tr8ahicouLs93WibG5B2dl8enz5OqJCLZgtWY +R8kzund+aqM1QxxWpZQtSA9HLTPNxEYtVGHduLyNHJd9S/T8az5NKBd/munlbW/E +HHWNpg23Xjfe4Rqy5abWeeTfH9P2aO0wo56N7YtVPRI/Dz+QT7V0ArAfQK4y2Y6l +O3Tg8x5OTGP9N0u4L3BBZE/uay8zQC+Kxl/jauSgYlOZ3ozKtTTKwCCeFnMT4cnc +IrMCAwEAAaOByzCByDAdBgNVHQ4EFgQUvslrrJS1H+SNxpCdwNcSFl5QRxYwHwYD +VR0jBBgwFoAUvslrrJS1H+SNxpCdwNcSFl5QRxYwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAOAFZccjGI -vZUT92SWHGPCHBFgBNLDX3yi19EzbVFrd2F4qHAuUJddweib3cZhp9PhLIMHhVzJ -1x4iwl92gxnX3kpegg9DgEUC19A9ysPA/ATI9oky10fGvx/GvXHhBwCQEuxhYxts -6Vgs/Eypj1jhsW6lyk2+fjIWdF/9NeQ3qhrFMyEgij4cr9rzx6Ii05NsXqwKZdXb -5IsRXsrrj9rEXS96mOg80YkVBQKG7+sXGIEoytZYh73U4lBBktl/sfdTj/PM8x4d -5FrCYBsXQnhT6S1du/khUP+HU75f5tSPJX/Xg9f4TcF8ekALEfHZxuuXRQDWa4Qc -T/yOH1u1PWAM +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQALtLqbAhVy +WEgJyGbEfG4HXr/hpZdC/V+PXzXnYHhzqBj4wpGx1BvLERfg1TBpkLia+aGVR8mF +3W25VqL7Fi8JjMBmba978kJnD6O56Gk2iZIeyFQR/jk/cYXZZTAMKrGmuN+wQHtW +mD3DZna+hezybDDezrOEcHSDKyBCWvCbMZiBFnHPz2ZXNt0TzfB0DC+hJnEeUM5X +yYVxRwiyprQqL2tfH4AJPbFeq6rnCIbHdS02sfMs4ZGMHGsK/oA4NGH4ou4+muQ4 +ld09IR5hXFOnMLgrEHLYXVSjR5xsadZCplbysz6YIsKway7zOrhxUlO1MqWkODX8 +8u2a41JXdd8H -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/key-rollover-newchain.pem b/net/data/verify_certificate_chain_unittest/key-rollover-newchain.pem index 97d56749..b5b54e7 100644 --- a/net/data/verify_certificate_chain_unittest/key-rollover-newchain.pem +++ b/net/data/verify_certificate_chain_unittest/key-rollover-newchain.pem
@@ -1,4 +1,4 @@ -[Created by: ./generate-key-rollover.py] +[Created by: generate-key-rollover.py] A certificate tree with two self-signed root certificates(oldroot, newroot), and a third root certificate (newrootrollover) which has the same key as newroot @@ -48,30 +48,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:be:12:1c:48:e4:73:1f:5c:d2:54:a9:7b:58:1c: - 37:73:c2:49:26:3e:ed:b5:6b:55:17:c9:4c:52:34: - ce:d9:76:86:32:74:74:ae:11:b2:99:1b:51:a0:33: - 48:34:2f:b9:d3:2b:06:c2:5c:29:53:35:ce:7c:a6: - 67:b2:6a:d4:33:c3:13:62:30:a1:53:5f:45:78:5b: - bb:47:ad:07:a4:98:9a:e9:e3:b1:3b:e6:33:c2:c1: - 5c:95:d7:c8:b9:a6:72:27:7a:79:da:c4:c8:5a:1a: - 3e:5e:5e:a6:62:64:c6:72:86:b1:78:98:5b:63:27: - 70:15:04:6b:b1:0f:11:9c:4d:3b:5c:e7:8d:c0:be: - d5:84:46:6c:bd:11:1e:21:c1:82:9c:d0:aa:2d:2f: - f8:2a:e9:3b:e4:35:15:6d:c7:4a:dd:a8:65:69:b8: - 16:a1:8a:04:a2:44:68:40:b6:99:ae:61:df:9f:6c: - 40:ef:79:c9:a3:6d:e4:2d:07:01:68:f1:21:4e:0e: - 28:a7:fd:2f:ad:ee:7d:65:cf:36:fd:4f:1b:ba:10: - 8e:86:fd:ec:37:67:0c:20:71:66:48:64:f3:82:af: - f5:e1:73:c9:09:36:03:3f:c2:47:7a:f2:33:b9:f9: - 9f:53:9b:24:5e:c3:cc:05:d9:a9:ed:d7:b2:2a:c5: - b7:39 + 00:ab:ca:16:55:35:25:9b:de:8e:fc:e9:5a:f9:04: + 3e:0e:6c:06:1e:1c:86:20:18:4f:41:da:3a:6d:16: + 9e:4e:3c:9b:11:67:bc:5a:3d:84:b2:79:05:d2:25: + 9a:6a:a8:80:6c:55:28:f2:5a:43:5f:c5:ef:e9:e3: + 1a:64:24:7e:57:4d:11:60:d7:e6:a9:2b:73:c7:93: + bb:67:b1:41:d5:df:21:5c:bd:98:93:a3:7d:0d:b0: + 86:5f:87:a9:d9:ab:ad:97:89:c5:12:c4:0f:71:d3: + 5b:79:18:53:64:7f:0a:a1:36:5e:00:5c:b9:ee:5e: + 14:10:17:f2:2a:60:0f:f7:ec:aa:d7:ad:d3:dc:8a: + 44:59:cf:c8:11:e7:42:1c:88:30:d7:1e:37:86:91: + 6b:ce:2a:bc:bb:f5:4a:cc:72:1a:9d:4f:5f:0e:c4: + c5:f7:b6:24:09:1c:22:f8:f7:a2:3d:45:c2:29:4d: + a3:f3:db:7a:a4:93:a2:48:d6:2b:90:da:0c:2b:d9: + 96:f0:d6:c7:eb:d0:eb:a8:08:72:55:a8:10:65:8f: + 38:6a:22:0c:9c:3d:68:1a:cd:16:da:73:24:2e:14: + 5d:08:05:fb:07:d1:52:53:4e:51:e4:b2:f3:17:4d: + f1:d0:c3:23:51:86:fb:a4:b9:09:37:9c:13:69:65: + 51:45 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - C9:45:0B:2A:F2:D8:8D:2A:D7:CE:AF:56:BF:82:B0:84:0C:C8:2E:F4 + 90:8D:89:42:17:BF:F6:98:D1:AA:8C:BF:AF:C2:74:60:AB:ED:90:0F X509v3 Authority Key Identifier: - keyid:B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + keyid:A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 Authority Information Access: CA Issuers - URI:http://url-for-aia/Intermediate.cer @@ -86,42 +86,42 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 63:66:9e:6c:34:8c:5d:74:ae:90:25:55:ae:86:49:b9:3d:fd: - 27:bc:4f:69:7b:70:cb:25:0e:a3:8c:7a:7d:9c:4f:0b:7c:f2: - 85:a5:ea:82:d2:37:c2:74:a2:ae:a8:bf:62:f4:5f:d4:c6:41: - 45:0c:cc:27:53:aa:8f:66:58:e9:b0:de:ae:98:14:bd:92:df: - 9b:0f:f2:c5:3b:d2:bc:1c:3e:80:b4:09:0f:c1:9f:d6:3a:29: - 52:71:b6:1a:92:95:5a:18:dc:b4:30:dc:61:61:93:54:d1:55: - 83:92:5d:c0:c7:dc:ab:d7:08:dd:8a:44:cf:92:f9:4d:86:25: - aa:ac:52:f6:0e:17:99:0b:31:d2:75:5e:33:f9:f5:b6:77:42: - 07:62:a9:53:cc:f3:79:84:57:d9:14:3f:ab:4c:8b:ae:c7:9f: - cf:7a:1f:bf:7e:1d:44:bd:76:b4:cd:8d:c8:1d:75:f7:3b:b5: - bc:35:8b:3f:29:b1:cb:67:a4:17:af:a4:ca:9f:2b:e7:15:66: - e4:c8:c1:7c:08:78:9e:5d:4b:c3:c6:58:66:96:42:e8:e6:40: - fd:dc:24:ce:3b:58:11:38:40:0e:fc:a9:c0:2c:0f:e5:cc:bb: - 02:32:31:b9:bc:6f:2d:1d:f6:2b:7c:d3:f8:24:f6:60:38:8a: - 1f:dd:e1:50 + 74:15:69:e0:48:a6:e3:fa:20:b6:3f:90:d7:61:d3:ea:b7:47: + 61:c7:81:6b:42:95:44:ac:1e:6f:3d:df:ad:2c:33:0d:e8:94: + 5b:d1:24:89:56:27:76:e4:6c:09:26:a7:e5:62:c9:96:83:ce: + 9d:08:f5:ee:c4:3d:fe:77:29:ae:8d:9f:7f:d5:81:b6:5d:b5: + 54:a0:1f:6c:54:1e:dd:a7:4e:78:e0:6c:60:1d:e8:1f:97:77: + 67:8d:57:80:00:17:80:cd:ab:ce:31:87:6e:9e:bf:3f:38:b9: + da:96:a3:d2:22:63:43:dd:5c:e8:42:ea:2d:eb:ab:81:33:e5: + 95:36:46:3c:dd:8e:ad:e2:43:40:6f:3c:ce:73:4d:52:71:9d: + 54:59:f4:73:a2:5a:48:a5:c7:bc:dd:f9:9f:91:39:b1:bc:ad: + 9a:59:ea:f6:33:42:72:66:2f:e9:78:8f:b6:09:15:35:d8:e6: + 70:0d:d3:da:a7:7e:55:d9:05:88:47:16:1d:cd:54:1c:15:11: + a6:d3:35:2a:4e:c5:0f:f7:b0:98:24:bf:7e:78:3e:5f:56:0c: + 87:72:c2:d1:7d:3e:3c:c6:98:50:a9:c7:cd:6f:0e:12:b4:32: + 7a:b8:01:6c:88:1c:8a:c2:19:24:1e:34:9b:da:45:eb:0a:f9: + 99:6e:54:c6 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+EhxI -5HMfXNJUqXtYHDdzwkkmPu21a1UXyUxSNM7ZdoYydHSuEbKZG1GgM0g0L7nTKwbC -XClTNc58pmeyatQzwxNiMKFTX0V4W7tHrQekmJrp47E75jPCwVyV18i5pnInenna -xMhaGj5eXqZiZMZyhrF4mFtjJ3AVBGuxDxGcTTtc543AvtWERmy9ER4hwYKc0Kot -L/gq6TvkNRVtx0rdqGVpuBahigSiRGhAtpmuYd+fbEDvecmjbeQtBwFo8SFODiin -/S+t7n1lzzb9Txu6EI6G/ew3ZwwgcWZIZPOCr/Xhc8kJNgM/wkd68jO5+Z9TmyRe -w8wF2ant17Iqxbc5AgMBAAGjgekwgeYwHQYDVR0OBBYEFMlFCyry2I0q186vVr+C -sIQMyC70MB8GA1UdIwQYMBaAFLE5eRM10ANr6cRjK8zWYcOC7BTBMD8GCCsGAQUF +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCryhZV +NSWb3o786Vr5BD4ObAYeHIYgGE9B2jptFp5OPJsRZ7xaPYSyeQXSJZpqqIBsVSjy +WkNfxe/p4xpkJH5XTRFg1+apK3PHk7tnsUHV3yFcvZiTo30NsIZfh6nZq62XicUS +xA9x01t5GFNkfwqhNl4AXLnuXhQQF/IqYA/37KrXrdPcikRZz8gR50IciDDXHjeG +kWvOKry79UrMchqdT18OxMX3tiQJHCL496I9RcIpTaPz23qkk6JI1iuQ2gwr2Zbw +1sfr0OuoCHJVqBBljzhqIgycPWgazRbacyQuFF0IBfsH0VJTTlHksvMXTfHQwyNR +hvukuQk3nBNpZVFFAgMBAAGjgekwgeYwHQYDVR0OBBYEFJCNiUIXv/aY0aqMv6/C +dGCr7ZAPMB8GA1UdIwQYMBaAFKUljsMUnIYZMPUFxarINxL2lEpGMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAY2aebDSMXXSukCVVroZJ -uT39J7xPaXtwyyUOo4x6fZxPC3zyhaXqgtI3wnSirqi/YvRf1MZBRQzMJ1Oqj2ZY -6bDerpgUvZLfmw/yxTvSvBw+gLQJD8Gf1jopUnG2GpKVWhjctDDcYWGTVNFVg5Jd -wMfcq9cI3YpEz5L5TYYlqqxS9g4XmQsx0nVeM/n1tndCB2KpU8zzeYRX2RQ/q0yL -rsefz3ofv34dRL12tM2NyB119zu1vDWLPymxy2ekF6+kyp8r5xVm5MjBfAh4nl1L -w8ZYZpZC6OZA/dwkzjtYEThADvypwCwP5cy7AjIxubxvLR32K3zT+CT2YDiKH93h -UA== +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAdBVp4Eim4/ogtj+Q12HT +6rdHYceBa0KVRKwebz3frSwzDeiUW9EkiVYnduRsCSan5WLJloPOnQj17sQ9/ncp +ro2ff9WBtl21VKAfbFQe3adOeOBsYB3oH5d3Z41XgAAXgM2rzjGHbp6/Pzi52paj +0iJjQ91c6ELqLeurgTPllTZGPN2OreJDQG88znNNUnGdVFn0c6JaSKXHvN35n5E5 +sbytmlnq9jNCcmYv6XiPtgkVNdjmcA3T2qd+VdkFiEcWHc1UHBURptM1Kk7FD/ew +mCS/fng+X1YMh3LC0X0+PMaYUKnHzW8OErQyergBbIgcisIZJB40m9pF6wr5mW5U +xg== -----END CERTIFICATE----- Certificate: @@ -138,30 +138,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:9c:d0:2e:3b:06:d6:ea:65:bd:dd:b2:d3:e8:88: - ea:08:73:01:42:ac:ca:38:28:17:32:93:5e:16:a8: - c1:79:44:9a:db:24:08:ba:81:52:63:9c:b4:ed:57: - d4:b2:ac:54:64:3b:70:39:7e:37:da:11:e1:8c:ba: - 09:bc:1a:9b:e7:fe:6d:75:f8:71:31:f0:ca:52:89: - 2a:9e:d5:53:db:b8:c0:76:cf:bf:58:58:e1:bb:81: - de:62:bb:06:58:1f:9b:64:03:75:7d:ee:76:6f:39: - 47:cb:8e:34:32:07:83:89:b0:83:2a:78:d0:ac:e2: - 86:0a:a8:ab:3b:97:81:de:9d:36:b4:03:b7:d5:06: - 05:53:d7:80:03:44:86:53:72:db:7a:5f:c5:20:dd: - c7:44:58:3b:40:7f:0e:39:bc:be:0d:ca:6a:f6:82: - a2:97:a2:17:79:51:6f:42:5d:0d:6a:b7:a0:de:5f: - 6a:00:be:e7:5a:b7:91:e9:fc:77:fd:75:88:8d:52: - 76:3d:0e:91:4b:c7:db:96:a4:5f:39:59:55:62:65: - 3b:15:7a:bc:7b:09:9f:3e:75:d9:9e:c5:00:b3:19: - d4:26:7e:eb:db:62:07:c2:f5:b6:4e:87:2d:eb:56: - 8b:5a:68:6c:85:2f:b4:3e:1d:dd:5d:31:49:98:8b: - 06:55 + 00:ad:d7:63:a2:51:33:32:fd:aa:73:2c:32:30:ac: + 2f:8d:37:5f:08:b2:9b:02:1a:f7:3c:eb:c2:9e:82: + d9:a2:0e:02:14:28:bc:18:e2:92:8e:db:66:14:36: + 3f:ef:43:47:ac:b4:e2:be:92:82:14:9a:bd:97:d7: + 19:6f:88:29:b1:85:68:bd:13:d5:93:2c:a0:c8:bb: + 76:9d:ad:f5:da:e8:55:ca:87:6d:07:20:f4:22:cf: + 5a:51:ea:e1:7b:c3:7e:f9:a8:85:95:c5:e9:88:bf: + 7b:5e:fd:49:d4:c4:ed:ce:b7:d2:71:23:59:00:a7: + 6f:85:40:a0:38:c6:2b:88:99:68:e9:97:7e:2f:92: + 97:18:0a:19:c2:4e:0a:28:2c:b3:b4:67:26:eb:1d: + 03:f6:16:58:20:88:81:ee:a8:ea:19:ae:25:e9:34: + 8d:87:f3:d2:3b:0e:b2:d8:31:14:ee:bd:c6:01:ec: + d4:41:f0:06:7b:3e:20:7b:06:88:86:29:d1:77:9a: + c0:bc:69:63:3f:2b:20:ac:aa:17:33:29:78:0a:11: + ff:92:f2:b3:4a:58:29:96:d3:f4:4f:70:ef:9c:81: + 55:1c:21:20:bf:54:5a:dd:60:b7:6e:53:41:a2:19: + 55:b5:f9:b8:6e:63:37:73:a0:b8:d4:c5:c1:a2:4e: + 0e:11 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 X509v3 Authority Key Identifier: - keyid:15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + keyid:83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -176,41 +176,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - a8:ad:48:d8:6e:1d:24:09:d2:b3:29:3c:48:60:27:7f:37:64: - d5:f1:3b:b3:5c:43:de:7c:b4:5f:ee:3a:f2:1a:25:24:0a:8a: - 25:6d:19:5b:dc:0c:4e:48:61:2f:60:d3:6b:f3:9c:03:2c:d3: - fa:c8:9b:99:e7:2e:c5:43:c0:5f:14:cd:8b:92:62:4f:e5:3a: - cd:b5:0a:d8:b2:01:c7:44:b4:3a:86:66:bf:fa:11:a5:f8:24: - 3f:d1:1a:e8:eb:1e:ad:f0:70:31:6f:bc:21:cf:db:ce:63:4e: - 84:e9:52:9e:bb:1b:c4:72:ae:e0:6c:88:9e:99:dc:79:d9:fd: - 83:26:8e:f6:19:70:d9:5e:fc:f4:0c:d1:17:6f:af:10:f6:64: - 16:08:d8:72:ba:3a:2d:66:28:5a:41:0d:f3:47:87:a7:9c:78: - c6:cd:5e:25:71:0b:f2:93:b8:26:17:b2:19:17:cc:03:ed:c0: - 6e:06:e2:4b:4a:57:5f:23:02:2a:69:06:7a:c4:b7:3e:2f:e8: - f0:03:ae:b8:2d:df:63:22:20:73:23:75:d9:3c:d7:22:e4:b4: - 65:65:ed:b9:e6:02:1d:b5:51:11:9c:db:92:e4:fe:8c:1d:bb: - c5:95:87:5b:38:ee:ff:e4:01:d1:5d:84:b9:73:d3:da:23:ca: - 5e:05:d3:7d + 7f:a1:7c:8f:ea:d9:b9:63:e1:b0:31:0a:2e:1c:8e:e9:d0:23: + ee:3e:8e:50:55:db:ba:10:93:a4:93:0b:bb:c1:a5:3d:32:90: + ee:40:bf:0f:df:25:f1:65:b3:30:6d:39:9b:d2:c1:b8:b7:a8: + 7e:23:dc:6a:c3:5a:9e:53:d7:86:4c:82:de:98:23:1a:6f:f9: + 0d:6d:b9:35:55:b9:94:03:8d:b7:6c:2e:64:79:ea:85:84:7e: + 51:18:37:42:80:f5:d4:16:3f:a0:a9:6b:bf:17:d1:19:99:ea: + 8d:5a:c9:30:b0:ca:c8:2c:17:ce:14:75:b3:c9:19:df:16:1b: + 9a:97:ae:50:69:a5:6c:02:57:84:f4:7f:30:90:ed:89:bb:0e: + c9:7b:34:d0:41:58:00:20:29:6b:f0:e8:97:81:92:3d:ba:e0: + 65:e9:7c:cb:5c:7b:50:c8:0f:d3:20:ab:42:2f:0d:44:6d:99: + c2:1d:42:e8:b2:10:82:9b:86:ba:a8:45:d2:2c:13:53:cf:ad: + 37:ac:ce:f3:e7:49:fe:59:d5:b6:5f:8b:6b:fd:5f:e0:f2:91: + ef:e3:f7:e0:b6:ee:e7:ae:77:0e:66:12:40:55:75:77:2a:05: + d4:bd:ab:7e:5a:67:d8:81:8b:15:fd:4c:60:63:c7:f7:5f:fa: + d4:d8:d9:d2 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMjEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnNAuOwbW -6mW93bLT6IjqCHMBQqzKOCgXMpNeFqjBeUSa2yQIuoFSY5y07VfUsqxUZDtwOX43 -2hHhjLoJvBqb5/5tdfhxMfDKUokqntVT27jAds+/WFjhu4HeYrsGWB+bZAN1fe52 -bzlHy440MgeDibCDKnjQrOKGCqirO5eB3p02tAO31QYFU9eAA0SGU3Lbel/FIN3H -RFg7QH8OOby+Dcpq9oKil6IXeVFvQl0Nareg3l9qAL7nWreR6fx3/XWIjVJ2PQ6R -S8fblqRfOVlVYmU7FXq8ewmfPnXZnsUAsxnUJn7r22IHwvW2Toct61aLWmhshS+0 -Ph3dXTFJmIsGVQIDAQABo4HLMIHIMB0GA1UdDgQWBBSxOXkTNdADa+nEYyvM1mHD -guwUwTAfBgNVHSMEGDAWgBQVnqat9Z+KocEImb9mb8/Kcs0MNDA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArddjolEz +Mv2qcywyMKwvjTdfCLKbAhr3POvCnoLZog4CFCi8GOKSjttmFDY/70NHrLTivpKC +FJq9l9cZb4gpsYVovRPVkyygyLt2na312uhVyodtByD0Is9aUerhe8N++aiFlcXp +iL97Xv1J1MTtzrfScSNZAKdvhUCgOMYriJlo6Zd+L5KXGAoZwk4KKCyztGcm6x0D +9hZYIIiB7qjqGa4l6TSNh/PSOw6y2DEU7r3GAezUQfAGez4gewaIhinRd5rAvGlj +PysgrKoXMyl4ChH/kvKzSlgpltP0T3DvnIFVHCEgv1Ra3WC3blNBohlVtfm4bmM3 +c6C41MXBok4OEQIDAQABo4HLMIHIMB0GA1UdDgQWBBSlJY7DFJyGGTD1BcWqyDcS +9pRKRjAfBgNVHSMEGDAWgBSD+ZPVKfnEuqFf5Ml0GODfDhcYUDA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AKitSNhuHSQJ0rMpPEhgJ383ZNXxO7NcQ958tF/uOvIaJSQKiiVtGVvcDE5IYS9g -02vznAMs0/rIm5nnLsVDwF8UzYuSYk/lOs21CtiyAcdEtDqGZr/6EaX4JD/RGujr -Hq3wcDFvvCHP285jToTpUp67G8RyruBsiJ6Z3HnZ/YMmjvYZcNle/PQM0RdvrxD2 -ZBYI2HK6Oi1mKFpBDfNHh6eceMbNXiVxC/KTuCYXshkXzAPtwG4G4ktKV18jAipp -BnrEtz4v6PADrrgt32MiIHMjddk81yLktGVl7bnmAh21URGc25Lk/owdu8WVh1s4 -7v/kAdFdhLlz09ojyl4F030= +AH+hfI/q2blj4bAxCi4cjunQI+4+jlBV27oQk6STC7vBpT0ykO5Avw/fJfFlszBt +OZvSwbi3qH4j3GrDWp5T14ZMgt6YIxpv+Q1tuTVVuZQDjbdsLmR56oWEflEYN0KA +9dQWP6Cpa78X0RmZ6o1ayTCwysgsF84UdbPJGd8WG5qXrlBppWwCV4T0fzCQ7Ym7 +Dsl7NNBBWAAgKWvw6JeBkj264GXpfMtce1DID9Mgq0IvDURtmcIdQuiyEIKbhrqo +RdIsE1PPrTeszvPnSf5Z1bZfi2v9X+Dyke/j9+C27ueudw5mEkBVdXcqBdS9q35a +Z9iBixX9TGBjx/df+tTY2dI= -----END CERTIFICATE----- Certificate: @@ -227,30 +227,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ae:ea:3b:3f:b6:e9:3d:ea:eb:3d:dd:e8:4d:45: - 83:63:78:ea:07:90:3a:3c:4f:92:54:2b:2d:02:1b: - eb:9e:81:72:68:2e:73:f8:4a:a1:de:0c:d6:f0:c2: - 61:26:90:0b:48:59:ab:23:25:8f:e4:4a:6b:c9:2d: - ba:a7:35:c4:22:df:76:99:d8:7b:f7:6d:ca:9b:da: - d2:ed:7e:c8:93:b2:a7:f6:f0:05:6a:5d:c6:e1:79: - d0:25:59:a9:50:1e:65:eb:1c:c9:cd:4e:6a:3a:2a: - a4:1a:fa:81:a3:e7:ae:d7:de:43:d9:e8:0b:5c:b0: - 6b:46:39:c5:9c:4a:6d:59:bf:da:70:2e:80:ac:c8: - 80:e3:83:d1:71:7b:a7:0b:92:bf:a8:81:ad:5c:b2: - d5:e9:b9:5f:b5:4f:93:43:67:72:36:b3:f7:17:b9: - 1b:da:2a:13:83:70:36:ae:59:03:3d:f0:71:de:a2: - 7a:41:ad:b5:e9:a2:51:e4:18:ec:88:ad:48:f1:df: - 17:04:43:54:2a:af:3c:c0:f5:84:39:43:d1:a7:d2: - 52:0f:3c:dd:ef:13:58:8c:1d:d4:dd:2e:6d:1a:e7: - 73:9b:8b:f3:41:7b:9a:53:4e:0d:92:d3:5d:3f:fc: - c3:61:dc:5f:a0:93:3c:08:cc:b4:9b:ce:9d:78:e3: - 77:c9 + 00:c8:01:d6:aa:f0:22:fa:55:68:e4:56:fa:87:9f: + 03:a4:78:36:40:64:b2:60:f7:20:25:47:92:b0:cb: + c7:9d:4c:c6:4d:78:0f:91:9e:a8:f1:0b:84:58:b1: + a9:06:2d:7d:09:82:f4:1a:60:67:7b:c3:47:69:05: + b5:59:90:02:2a:53:27:25:21:4d:9a:5f:b6:7b:58: + 25:77:b3:46:64:fc:ed:04:c0:e2:62:e5:96:f9:8a: + 8d:9a:e8:8d:bf:d9:19:38:97:52:ab:31:3c:1c:a2: + b9:21:ec:5f:aa:8c:21:44:c6:73:7f:0b:72:c9:61: + 1c:a7:cd:46:bb:da:5b:a7:1b:e2:18:fb:ff:18:81: + 5f:fb:75:29:21:9c:92:e0:d3:03:f5:b8:58:94:36: + 32:7a:9a:a7:ec:49:ab:ef:d4:8c:c4:65:aa:23:40: + 96:76:47:4b:06:0b:21:c4:44:9f:8d:12:ab:05:05: + e7:97:d9:9d:c0:f9:4d:77:14:0b:c5:d5:82:0c:d7: + 14:54:fa:07:dd:a3:78:30:5d:95:83:e4:1c:7f:c2: + 13:c6:b1:8b:10:87:9b:e9:3e:4f:d6:b6:b9:a8:9f: + 4c:47:f8:40:67:7d:4e:9b:87:4a:b6:92:eb:33:f1: + 73:a3:70:d6:fc:37:32:2a:b4:b8:56:90:63:5e:ec: + b7:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + 83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 X509v3 Authority Key Identifier: - keyid:15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + keyid:83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -265,41 +265,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 58:4b:60:7e:0b:c2:3d:20:f3:49:34:91:55:d3:5f:5b:ce:81: - 31:da:71:9f:72:d7:f4:cc:be:cf:58:b8:97:aa:99:87:3d:34: - 12:ac:40:1c:8e:02:46:83:ee:04:e1:7e:5e:57:ca:a4:ae:e1: - d0:b4:12:e9:65:33:f5:4e:c4:f6:49:00:7f:83:6d:75:67:84: - b2:db:52:5a:a2:3e:5d:2d:5c:f3:45:fe:6a:d3:c4:0a:76:52: - c6:9b:b0:89:01:b9:b6:be:30:60:d9:b4:2e:1d:1e:bf:ef:d8: - 12:90:9f:cb:67:29:20:61:9f:1a:67:64:88:4c:43:ec:10:7d: - 87:11:00:44:6a:ce:37:af:73:f4:fa:d2:22:2f:24:3a:6f:79: - 09:6c:8d:de:b5:71:0e:6e:b7:64:a9:be:73:a8:c1:c8:50:74: - d2:c4:2b:ef:4f:25:20:8f:41:f0:1f:6e:52:77:eb:a0:1a:94: - 87:7c:35:11:37:5c:33:f5:83:47:e0:f2:0e:97:af:23:61:23: - 25:0b:92:6c:3b:30:a1:aa:c6:dc:4a:05:6e:43:76:58:82:66: - cd:f6:d6:ef:9b:80:36:d6:95:b7:d1:ec:5c:53:f7:78:84:ef: - 48:6a:2c:f7:93:97:f2:7a:ce:ec:f3:eb:63:e1:5a:e0:69:02: - 5d:34:36:93 + a9:e8:26:5f:c8:9e:6b:fc:cd:4d:d2:9e:de:f5:f1:08:04:66: + 23:6a:7e:ee:92:9f:eb:71:53:ea:97:8e:db:e4:47:72:7a:08: + 17:1c:72:4a:37:00:f5:e3:a8:77:d2:b1:d4:89:45:b2:e9:ba: + 00:61:6e:cb:03:b4:21:aa:ec:e4:f3:a4:41:b7:90:41:08:0f: + 0d:90:bd:55:4a:bc:1c:7f:2e:c1:97:6d:34:d1:8d:da:39:46: + 55:49:97:4c:f7:eb:29:62:b3:ed:ad:24:d8:05:9a:93:82:f2: + 12:34:24:78:60:a4:7b:a9:94:97:75:10:20:57:42:83:32:0d: + 19:d0:15:3b:55:84:d8:49:9b:a4:66:14:c9:90:f4:89:bc:23: + 2a:45:dd:19:25:68:6e:fe:44:60:c0:19:75:61:3f:85:4b:90: + 8c:45:3b:2e:9b:41:12:43:ee:2f:61:96:ff:af:4b:11:fe:af: + 02:af:0d:69:0d:ae:11:bc:eb:34:de:ac:24:3b:08:6e:b3:b2: + 1a:8e:46:d9:6b:91:08:4e:c3:5b:f6:3c:3f:90:8d:95:01:b9: + d9:30:aa:2d:79:00:bb:99:a1:ed:0a:1c:28:fc:5c:12:1c:3d: + 53:33:c8:ca:b1:9c:13:a2:2a:c7:1d:ce:b7:1e:2c:35:37:e8: + 10:af:0c:e6 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMjEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK7qOz+26T3q6z3d6E1F -g2N46geQOjxPklQrLQIb656Bcmguc/hKod4M1vDCYSaQC0hZqyMlj+RKa8ktuqc1 -xCLfdpnYe/dtypva0u1+yJOyp/bwBWpdxuF50CVZqVAeZescyc1OajoqpBr6gaPn -rtfeQ9noC1ywa0Y5xZxKbVm/2nAugKzIgOOD0XF7pwuSv6iBrVyy1em5X7VPk0Nn -cjaz9xe5G9oqE4NwNq5ZAz3wcd6iekGttemiUeQY7IitSPHfFwRDVCqvPMD1hDlD -0afSUg883e8TWIwd1N0ubRrnc5uL80F7mlNODZLTXT/8w2HcX6CTPAjMtJvOnXjj -d8kCAwEAAaOByzCByDAdBgNVHQ4EFgQUFZ6mrfWfiqHBCJm/Zm/PynLNDDQwHwYD -VR0jBBgwFoAUFZ6mrfWfiqHBCJm/Zm/PynLNDDQwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMgB1qrwIvpVaORW+oef +A6R4NkBksmD3ICVHkrDLx51Mxk14D5GeqPELhFixqQYtfQmC9BpgZ3vDR2kFtVmQ +AipTJyUhTZpftntYJXezRmT87QTA4mLllvmKjZrojb/ZGTiXUqsxPByiuSHsX6qM +IUTGc38LcslhHKfNRrvaW6cb4hj7/xiBX/t1KSGckuDTA/W4WJQ2Mnqap+xJq+/U +jMRlqiNAlnZHSwYLIcREn40SqwUF55fZncD5TXcUC8XVggzXFFT6B92jeDBdlYPk +HH/CE8axixCHm+k+T9a2uaifTEf4QGd9TpuHSraS6zPxc6Nw1vw3Miq0uFaQY17s +t7cCAwEAAaOByzCByDAdBgNVHQ4EFgQUg/mT1Sn5xLqhX+TJdBjg3w4XGFAwHwYD +VR0jBBgwFoAUg/mT1Sn5xLqhX+TJdBjg3w4XGFAwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBYS2B+C8I9 -IPNJNJFV019bzoEx2nGfctf0zL7PWLiXqpmHPTQSrEAcjgJGg+4E4X5eV8qkruHQ -tBLpZTP1TsT2SQB/g211Z4Sy21Jaoj5dLVzzRf5q08QKdlLGm7CJAbm2vjBg2bQu -HR6/79gSkJ/LZykgYZ8aZ2SITEPsEH2HEQBEas43r3P0+tIiLyQ6b3kJbI3etXEO -brdkqb5zqMHIUHTSxCvvTyUgj0HwH25Sd+ugGpSHfDURN1wz9YNH4PIOl68jYSMl -C5JsOzChqsbcSgVuQ3ZYgmbN9tbvm4A21pW30excU/d4hO9Iaiz3k5fyes7s8+tj -4VrgaQJdNDaT +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCp6CZfyJ5r +/M1N0p7e9fEIBGYjan7ukp/rcVPql47b5EdyeggXHHJKNwD146h30rHUiUWy6boA +YW7LA7Qhquzk86RBt5BBCA8NkL1VSrwcfy7Bl2000Y3aOUZVSZdM9+spYrPtrSTY +BZqTgvISNCR4YKR7qZSXdRAgV0KDMg0Z0BU7VYTYSZukZhTJkPSJvCMqRd0ZJWhu +/kRgwBl1YT+FS5CMRTsum0ESQ+4vYZb/r0sR/q8Crw1pDa4RvOs03qwkOwhus7Ia +jkbZa5EITsNb9jw/kI2VAbnZMKoteQC7maHtChwo/FwSHD1TM8jKsZwToirHHc63 +Hiw1N+gQrwzm -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/key-rollover-oldchain.pem b/net/data/verify_certificate_chain_unittest/key-rollover-oldchain.pem index 6669c2a..f262083 100644 --- a/net/data/verify_certificate_chain_unittest/key-rollover-oldchain.pem +++ b/net/data/verify_certificate_chain_unittest/key-rollover-oldchain.pem
@@ -1,4 +1,4 @@ -[Created by: ./generate-key-rollover.py] +[Created by: generate-key-rollover.py] A certificate tree with two self-signed root certificates(oldroot, newroot), and a third root certificate (newrootrollover) which has the same key as newroot @@ -48,30 +48,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:be:12:1c:48:e4:73:1f:5c:d2:54:a9:7b:58:1c: - 37:73:c2:49:26:3e:ed:b5:6b:55:17:c9:4c:52:34: - ce:d9:76:86:32:74:74:ae:11:b2:99:1b:51:a0:33: - 48:34:2f:b9:d3:2b:06:c2:5c:29:53:35:ce:7c:a6: - 67:b2:6a:d4:33:c3:13:62:30:a1:53:5f:45:78:5b: - bb:47:ad:07:a4:98:9a:e9:e3:b1:3b:e6:33:c2:c1: - 5c:95:d7:c8:b9:a6:72:27:7a:79:da:c4:c8:5a:1a: - 3e:5e:5e:a6:62:64:c6:72:86:b1:78:98:5b:63:27: - 70:15:04:6b:b1:0f:11:9c:4d:3b:5c:e7:8d:c0:be: - d5:84:46:6c:bd:11:1e:21:c1:82:9c:d0:aa:2d:2f: - f8:2a:e9:3b:e4:35:15:6d:c7:4a:dd:a8:65:69:b8: - 16:a1:8a:04:a2:44:68:40:b6:99:ae:61:df:9f:6c: - 40:ef:79:c9:a3:6d:e4:2d:07:01:68:f1:21:4e:0e: - 28:a7:fd:2f:ad:ee:7d:65:cf:36:fd:4f:1b:ba:10: - 8e:86:fd:ec:37:67:0c:20:71:66:48:64:f3:82:af: - f5:e1:73:c9:09:36:03:3f:c2:47:7a:f2:33:b9:f9: - 9f:53:9b:24:5e:c3:cc:05:d9:a9:ed:d7:b2:2a:c5: - b7:39 + 00:ab:ca:16:55:35:25:9b:de:8e:fc:e9:5a:f9:04: + 3e:0e:6c:06:1e:1c:86:20:18:4f:41:da:3a:6d:16: + 9e:4e:3c:9b:11:67:bc:5a:3d:84:b2:79:05:d2:25: + 9a:6a:a8:80:6c:55:28:f2:5a:43:5f:c5:ef:e9:e3: + 1a:64:24:7e:57:4d:11:60:d7:e6:a9:2b:73:c7:93: + bb:67:b1:41:d5:df:21:5c:bd:98:93:a3:7d:0d:b0: + 86:5f:87:a9:d9:ab:ad:97:89:c5:12:c4:0f:71:d3: + 5b:79:18:53:64:7f:0a:a1:36:5e:00:5c:b9:ee:5e: + 14:10:17:f2:2a:60:0f:f7:ec:aa:d7:ad:d3:dc:8a: + 44:59:cf:c8:11:e7:42:1c:88:30:d7:1e:37:86:91: + 6b:ce:2a:bc:bb:f5:4a:cc:72:1a:9d:4f:5f:0e:c4: + c5:f7:b6:24:09:1c:22:f8:f7:a2:3d:45:c2:29:4d: + a3:f3:db:7a:a4:93:a2:48:d6:2b:90:da:0c:2b:d9: + 96:f0:d6:c7:eb:d0:eb:a8:08:72:55:a8:10:65:8f: + 38:6a:22:0c:9c:3d:68:1a:cd:16:da:73:24:2e:14: + 5d:08:05:fb:07:d1:52:53:4e:51:e4:b2:f3:17:4d: + f1:d0:c3:23:51:86:fb:a4:b9:09:37:9c:13:69:65: + 51:45 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - C9:45:0B:2A:F2:D8:8D:2A:D7:CE:AF:56:BF:82:B0:84:0C:C8:2E:F4 + 90:8D:89:42:17:BF:F6:98:D1:AA:8C:BF:AF:C2:74:60:AB:ED:90:0F X509v3 Authority Key Identifier: - keyid:B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + keyid:A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 Authority Information Access: CA Issuers - URI:http://url-for-aia/Intermediate.cer @@ -86,42 +86,42 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 63:66:9e:6c:34:8c:5d:74:ae:90:25:55:ae:86:49:b9:3d:fd: - 27:bc:4f:69:7b:70:cb:25:0e:a3:8c:7a:7d:9c:4f:0b:7c:f2: - 85:a5:ea:82:d2:37:c2:74:a2:ae:a8:bf:62:f4:5f:d4:c6:41: - 45:0c:cc:27:53:aa:8f:66:58:e9:b0:de:ae:98:14:bd:92:df: - 9b:0f:f2:c5:3b:d2:bc:1c:3e:80:b4:09:0f:c1:9f:d6:3a:29: - 52:71:b6:1a:92:95:5a:18:dc:b4:30:dc:61:61:93:54:d1:55: - 83:92:5d:c0:c7:dc:ab:d7:08:dd:8a:44:cf:92:f9:4d:86:25: - aa:ac:52:f6:0e:17:99:0b:31:d2:75:5e:33:f9:f5:b6:77:42: - 07:62:a9:53:cc:f3:79:84:57:d9:14:3f:ab:4c:8b:ae:c7:9f: - cf:7a:1f:bf:7e:1d:44:bd:76:b4:cd:8d:c8:1d:75:f7:3b:b5: - bc:35:8b:3f:29:b1:cb:67:a4:17:af:a4:ca:9f:2b:e7:15:66: - e4:c8:c1:7c:08:78:9e:5d:4b:c3:c6:58:66:96:42:e8:e6:40: - fd:dc:24:ce:3b:58:11:38:40:0e:fc:a9:c0:2c:0f:e5:cc:bb: - 02:32:31:b9:bc:6f:2d:1d:f6:2b:7c:d3:f8:24:f6:60:38:8a: - 1f:dd:e1:50 + 74:15:69:e0:48:a6:e3:fa:20:b6:3f:90:d7:61:d3:ea:b7:47: + 61:c7:81:6b:42:95:44:ac:1e:6f:3d:df:ad:2c:33:0d:e8:94: + 5b:d1:24:89:56:27:76:e4:6c:09:26:a7:e5:62:c9:96:83:ce: + 9d:08:f5:ee:c4:3d:fe:77:29:ae:8d:9f:7f:d5:81:b6:5d:b5: + 54:a0:1f:6c:54:1e:dd:a7:4e:78:e0:6c:60:1d:e8:1f:97:77: + 67:8d:57:80:00:17:80:cd:ab:ce:31:87:6e:9e:bf:3f:38:b9: + da:96:a3:d2:22:63:43:dd:5c:e8:42:ea:2d:eb:ab:81:33:e5: + 95:36:46:3c:dd:8e:ad:e2:43:40:6f:3c:ce:73:4d:52:71:9d: + 54:59:f4:73:a2:5a:48:a5:c7:bc:dd:f9:9f:91:39:b1:bc:ad: + 9a:59:ea:f6:33:42:72:66:2f:e9:78:8f:b6:09:15:35:d8:e6: + 70:0d:d3:da:a7:7e:55:d9:05:88:47:16:1d:cd:54:1c:15:11: + a6:d3:35:2a:4e:c5:0f:f7:b0:98:24:bf:7e:78:3e:5f:56:0c: + 87:72:c2:d1:7d:3e:3c:c6:98:50:a9:c7:cd:6f:0e:12:b4:32: + 7a:b8:01:6c:88:1c:8a:c2:19:24:1e:34:9b:da:45:eb:0a:f9: + 99:6e:54:c6 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+EhxI -5HMfXNJUqXtYHDdzwkkmPu21a1UXyUxSNM7ZdoYydHSuEbKZG1GgM0g0L7nTKwbC -XClTNc58pmeyatQzwxNiMKFTX0V4W7tHrQekmJrp47E75jPCwVyV18i5pnInenna -xMhaGj5eXqZiZMZyhrF4mFtjJ3AVBGuxDxGcTTtc543AvtWERmy9ER4hwYKc0Kot -L/gq6TvkNRVtx0rdqGVpuBahigSiRGhAtpmuYd+fbEDvecmjbeQtBwFo8SFODiin -/S+t7n1lzzb9Txu6EI6G/ew3ZwwgcWZIZPOCr/Xhc8kJNgM/wkd68jO5+Z9TmyRe -w8wF2ant17Iqxbc5AgMBAAGjgekwgeYwHQYDVR0OBBYEFMlFCyry2I0q186vVr+C -sIQMyC70MB8GA1UdIwQYMBaAFLE5eRM10ANr6cRjK8zWYcOC7BTBMD8GCCsGAQUF +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCryhZV +NSWb3o786Vr5BD4ObAYeHIYgGE9B2jptFp5OPJsRZ7xaPYSyeQXSJZpqqIBsVSjy +WkNfxe/p4xpkJH5XTRFg1+apK3PHk7tnsUHV3yFcvZiTo30NsIZfh6nZq62XicUS +xA9x01t5GFNkfwqhNl4AXLnuXhQQF/IqYA/37KrXrdPcikRZz8gR50IciDDXHjeG +kWvOKry79UrMchqdT18OxMX3tiQJHCL496I9RcIpTaPz23qkk6JI1iuQ2gwr2Zbw +1sfr0OuoCHJVqBBljzhqIgycPWgazRbacyQuFF0IBfsH0VJTTlHksvMXTfHQwyNR +hvukuQk3nBNpZVFFAgMBAAGjgekwgeYwHQYDVR0OBBYEFJCNiUIXv/aY0aqMv6/C +dGCr7ZAPMB8GA1UdIwQYMBaAFKUljsMUnIYZMPUFxarINxL2lEpGMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAY2aebDSMXXSukCVVroZJ -uT39J7xPaXtwyyUOo4x6fZxPC3zyhaXqgtI3wnSirqi/YvRf1MZBRQzMJ1Oqj2ZY -6bDerpgUvZLfmw/yxTvSvBw+gLQJD8Gf1jopUnG2GpKVWhjctDDcYWGTVNFVg5Jd -wMfcq9cI3YpEz5L5TYYlqqxS9g4XmQsx0nVeM/n1tndCB2KpU8zzeYRX2RQ/q0yL -rsefz3ofv34dRL12tM2NyB119zu1vDWLPymxy2ekF6+kyp8r5xVm5MjBfAh4nl1L -w8ZYZpZC6OZA/dwkzjtYEThADvypwCwP5cy7AjIxubxvLR32K3zT+CT2YDiKH93h -UA== +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAdBVp4Eim4/ogtj+Q12HT +6rdHYceBa0KVRKwebz3frSwzDeiUW9EkiVYnduRsCSan5WLJloPOnQj17sQ9/ncp +ro2ff9WBtl21VKAfbFQe3adOeOBsYB3oH5d3Z41XgAAXgM2rzjGHbp6/Pzi52paj +0iJjQ91c6ELqLeurgTPllTZGPN2OreJDQG88znNNUnGdVFn0c6JaSKXHvN35n5E5 +sbytmlnq9jNCcmYv6XiPtgkVNdjmcA3T2qd+VdkFiEcWHc1UHBURptM1Kk7FD/ew +mCS/fng+X1YMh3LC0X0+PMaYUKnHzW8OErQyergBbIgcisIZJB40m9pF6wr5mW5U +xg== -----END CERTIFICATE----- Certificate: @@ -138,30 +138,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:9c:d0:2e:3b:06:d6:ea:65:bd:dd:b2:d3:e8:88: - ea:08:73:01:42:ac:ca:38:28:17:32:93:5e:16:a8: - c1:79:44:9a:db:24:08:ba:81:52:63:9c:b4:ed:57: - d4:b2:ac:54:64:3b:70:39:7e:37:da:11:e1:8c:ba: - 09:bc:1a:9b:e7:fe:6d:75:f8:71:31:f0:ca:52:89: - 2a:9e:d5:53:db:b8:c0:76:cf:bf:58:58:e1:bb:81: - de:62:bb:06:58:1f:9b:64:03:75:7d:ee:76:6f:39: - 47:cb:8e:34:32:07:83:89:b0:83:2a:78:d0:ac:e2: - 86:0a:a8:ab:3b:97:81:de:9d:36:b4:03:b7:d5:06: - 05:53:d7:80:03:44:86:53:72:db:7a:5f:c5:20:dd: - c7:44:58:3b:40:7f:0e:39:bc:be:0d:ca:6a:f6:82: - a2:97:a2:17:79:51:6f:42:5d:0d:6a:b7:a0:de:5f: - 6a:00:be:e7:5a:b7:91:e9:fc:77:fd:75:88:8d:52: - 76:3d:0e:91:4b:c7:db:96:a4:5f:39:59:55:62:65: - 3b:15:7a:bc:7b:09:9f:3e:75:d9:9e:c5:00:b3:19: - d4:26:7e:eb:db:62:07:c2:f5:b6:4e:87:2d:eb:56: - 8b:5a:68:6c:85:2f:b4:3e:1d:dd:5d:31:49:98:8b: - 06:55 + 00:ad:d7:63:a2:51:33:32:fd:aa:73:2c:32:30:ac: + 2f:8d:37:5f:08:b2:9b:02:1a:f7:3c:eb:c2:9e:82: + d9:a2:0e:02:14:28:bc:18:e2:92:8e:db:66:14:36: + 3f:ef:43:47:ac:b4:e2:be:92:82:14:9a:bd:97:d7: + 19:6f:88:29:b1:85:68:bd:13:d5:93:2c:a0:c8:bb: + 76:9d:ad:f5:da:e8:55:ca:87:6d:07:20:f4:22:cf: + 5a:51:ea:e1:7b:c3:7e:f9:a8:85:95:c5:e9:88:bf: + 7b:5e:fd:49:d4:c4:ed:ce:b7:d2:71:23:59:00:a7: + 6f:85:40:a0:38:c6:2b:88:99:68:e9:97:7e:2f:92: + 97:18:0a:19:c2:4e:0a:28:2c:b3:b4:67:26:eb:1d: + 03:f6:16:58:20:88:81:ee:a8:ea:19:ae:25:e9:34: + 8d:87:f3:d2:3b:0e:b2:d8:31:14:ee:bd:c6:01:ec: + d4:41:f0:06:7b:3e:20:7b:06:88:86:29:d1:77:9a: + c0:bc:69:63:3f:2b:20:ac:aa:17:33:29:78:0a:11: + ff:92:f2:b3:4a:58:29:96:d3:f4:4f:70:ef:9c:81: + 55:1c:21:20:bf:54:5a:dd:60:b7:6e:53:41:a2:19: + 55:b5:f9:b8:6e:63:37:73:a0:b8:d4:c5:c1:a2:4e: + 0e:11 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 X509v3 Authority Key Identifier: - keyid:02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + keyid:BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -176,41 +176,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 56:90:dd:ae:50:4b:18:56:7f:e9:1c:e4:29:7c:60:7e:87:27: - b5:cd:2b:00:67:2b:f7:a2:32:db:38:92:18:46:00:22:c4:2d: - 1f:ff:32:5f:62:69:30:db:c8:aa:63:68:6a:0f:db:2d:13:15: - 8f:74:22:54:67:fb:95:19:35:49:66:1e:a1:65:67:3c:71:02: - 85:34:f7:3b:20:51:03:e9:a1:b9:7d:9b:3b:21:d4:7a:28:6e: - bd:01:50:a6:7e:2b:a0:bc:ad:d5:55:63:3d:04:f3:f0:aa:c3: - 4e:b3:aa:b8:68:89:a0:8c:b7:9e:38:37:81:2c:01:57:93:7c: - 3f:aa:54:2e:35:66:a4:c0:81:ca:06:5c:c6:ab:72:f4:38:08: - cd:60:40:53:42:48:71:0a:e7:f5:82:3c:bb:51:89:a4:8b:1e: - c9:44:4c:7f:10:7d:d3:f4:60:04:07:36:b2:44:82:b2:0a:3c: - e9:82:55:4a:37:cf:47:b6:d3:ea:e5:fc:b8:49:4c:6b:77:a6: - 42:29:1c:1f:97:78:18:f7:88:da:52:42:87:19:e4:13:0d:91: - 73:cc:98:6a:22:70:e2:5c:54:d0:96:b7:94:37:3c:0f:f6:9a: - e3:02:fb:95:63:5a:87:d4:0d:16:16:bd:95:fa:88:c3:a8:e4: - d0:91:dd:be + e0:0c:55:1f:da:4b:3e:e7:ec:e0:41:89:52:3d:0e:be:9d:31: + 1d:53:82:7a:99:d3:9d:35:65:97:4d:ba:67:c4:27:db:19:40: + d9:0b:15:0d:6a:44:86:be:59:07:14:dc:1a:2c:94:41:2d:eb: + 70:be:c8:54:89:18:e7:27:fb:bb:4f:41:a6:60:70:1d:7f:bf: + ea:87:01:df:7f:67:68:8a:8f:ff:89:89:b3:c0:95:a6:74:63: + 83:ba:b1:55:6d:1a:16:64:94:47:c2:6a:05:c2:62:eb:22:d5: + ae:1a:a2:fb:93:0d:ca:a1:8a:39:32:25:97:a4:b2:72:73:7c: + 81:30:33:18:a4:fd:b6:e1:b6:6b:53:ac:26:31:ea:19:b6:d3: + bb:31:6e:7a:91:01:e2:22:4a:f8:a5:38:9b:12:c6:e5:4a:bb: + e4:49:35:59:07:1b:6a:25:58:b2:aa:04:02:90:fd:0a:55:cf: + 0e:1d:95:c6:d0:c1:c7:fa:a0:c4:e3:9e:75:58:f0:c6:63:d7: + 10:b3:ac:45:7e:60:86:cc:95:ab:7b:46:72:27:12:05:5d:ea: + c8:09:47:b1:9a:6c:ef:d9:1a:0b:01:bb:6d:a4:f3:35:50:09: + 9a:86:68:a0:34:4c:7d:70:55:9d:88:d8:9a:3d:28:fb:8b:3c: + 53:96:8c:e9 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnNAuOwbW -6mW93bLT6IjqCHMBQqzKOCgXMpNeFqjBeUSa2yQIuoFSY5y07VfUsqxUZDtwOX43 -2hHhjLoJvBqb5/5tdfhxMfDKUokqntVT27jAds+/WFjhu4HeYrsGWB+bZAN1fe52 -bzlHy440MgeDibCDKnjQrOKGCqirO5eB3p02tAO31QYFU9eAA0SGU3Lbel/FIN3H -RFg7QH8OOby+Dcpq9oKil6IXeVFvQl0Nareg3l9qAL7nWreR6fx3/XWIjVJ2PQ6R -S8fblqRfOVlVYmU7FXq8ewmfPnXZnsUAsxnUJn7r22IHwvW2Toct61aLWmhshS+0 -Ph3dXTFJmIsGVQIDAQABo4HLMIHIMB0GA1UdDgQWBBSxOXkTNdADa+nEYyvM1mHD -guwUwTAfBgNVHSMEGDAWgBQCzvasGjkehehy0YrGHeh6j50VazA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArddjolEz +Mv2qcywyMKwvjTdfCLKbAhr3POvCnoLZog4CFCi8GOKSjttmFDY/70NHrLTivpKC +FJq9l9cZb4gpsYVovRPVkyygyLt2na312uhVyodtByD0Is9aUerhe8N++aiFlcXp +iL97Xv1J1MTtzrfScSNZAKdvhUCgOMYriJlo6Zd+L5KXGAoZwk4KKCyztGcm6x0D +9hZYIIiB7qjqGa4l6TSNh/PSOw6y2DEU7r3GAezUQfAGez4gewaIhinRd5rAvGlj +PysgrKoXMyl4ChH/kvKzSlgpltP0T3DvnIFVHCEgv1Ra3WC3blNBohlVtfm4bmM3 +c6C41MXBok4OEQIDAQABo4HLMIHIMB0GA1UdDgQWBBSlJY7DFJyGGTD1BcWqyDcS +9pRKRjAfBgNVHSMEGDAWgBS+yWuslLUf5I3GkJ3A1xIWXlBHFjA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AFaQ3a5QSxhWf+kc5Cl8YH6HJ7XNKwBnK/eiMts4khhGACLELR//Ml9iaTDbyKpj -aGoP2y0TFY90IlRn+5UZNUlmHqFlZzxxAoU09zsgUQPpobl9mzsh1Hoobr0BUKZ+ -K6C8rdVVYz0E8/Cqw06zqrhoiaCMt544N4EsAVeTfD+qVC41ZqTAgcoGXMarcvQ4 -CM1gQFNCSHEK5/WCPLtRiaSLHslETH8QfdP0YAQHNrJEgrIKPOmCVUo3z0e20+rl -/LhJTGt3pkIpHB+XeBj3iNpSQocZ5BMNkXPMmGoicOJcVNCWt5Q3PA/2muMC+5Vj -WofUDRYWvZX6iMOo5NCR3b4= +AOAMVR/aSz7n7OBBiVI9Dr6dMR1TgnqZ0501ZZdNumfEJ9sZQNkLFQ1qRIa+WQcU +3BoslEEt63C+yFSJGOcn+7tPQaZgcB1/v+qHAd9/Z2iKj/+JibPAlaZ0Y4O6sVVt +GhZklEfCagXCYusi1a4aovuTDcqhijkyJZeksnJzfIEwMxik/bbhtmtTrCYx6hm2 +07sxbnqRAeIiSvilOJsSxuVKu+RJNVkHG2olWLKqBAKQ/QpVzw4dlcbQwcf6oMTj +nnVY8MZj1xCzrEV+YIbMlat7RnInEgVd6sgJR7GabO/ZGgsBu22k8zVQCZqGaKA0 +TH1wVZ2I2Jo9KPuLPFOWjOk= -----END CERTIFICATE----- Certificate: @@ -227,30 +227,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a6:44:ec:a7:15:00:1f:89:ac:91:f8:ec:7b:03: - 46:0b:53:15:ed:23:40:35:94:f3:96:80:27:d3:4a: - 84:92:68:c9:0c:e0:14:32:c7:31:67:49:29:58:77: - ea:ce:8a:72:5b:93:b1:a0:a8:e5:84:c6:52:9d:5a: - c0:41:bf:98:5f:18:5d:aa:d1:65:79:fb:e9:b0:84: - 92:9d:2c:58:bc:f1:c4:29:59:ed:bc:ac:85:ce:d7: - 0e:aa:08:e8:2d:90:25:cb:91:9d:7d:91:74:42:a0: - ae:77:d2:11:7b:57:49:04:24:c0:94:f4:20:54:60: - d9:1b:76:76:0b:2c:23:3c:67:90:8c:06:ed:4e:df: - ac:24:22:26:f7:26:8f:5a:d2:5b:79:8a:6f:6e:53: - 27:60:10:cb:c7:b4:9f:60:2d:8f:32:69:4b:01:d1: - f0:6d:69:1a:22:14:06:66:63:97:e8:fc:79:41:8d: - 15:44:44:d1:43:2a:37:5e:77:e4:06:e6:a9:85:13: - e9:24:63:9d:09:d0:f5:13:d5:ba:59:2e:1c:d2:70: - 06:b1:80:f7:57:d7:30:f7:14:f3:18:06:7f:84:38: - b6:81:46:9f:a2:36:87:0e:5f:1a:45:38:b7:20:16: - b7:c6:e1:91:3b:0e:0c:ab:b7:4e:3d:a4:6d:66:d8: - 85:fb + 00:ef:e6:e9:e0:b4:83:30:dc:21:a0:1f:9d:c3:81: + 9d:a2:a1:ce:e5:ef:1f:94:e3:f0:14:05:12:2a:97: + 5e:00:ba:6a:c3:09:b3:06:a1:9e:da:6f:9d:f8:45: + a2:6c:1e:7d:a3:10:d2:db:38:24:ed:80:25:36:9c: + db:d3:07:af:39:f8:82:48:a3:cd:7f:f3:57:dd:f9: + fd:7c:03:d5:8e:5d:35:ae:ed:af:c6:a1:89:ca:2e: + 2e:cf:77:5a:26:c6:e4:1d:9d:97:c7:a7:cf:93:aa: + 24:22:d9:82:d5:98:47:c9:33:ba:77:7e:6a:a3:35: + 43:1c:56:a5:94:2d:48:0f:47:2d:33:cd:c4:46:2d: + 54:61:dd:b8:bc:8d:1c:97:7d:4b:f4:fc:6b:3e:4d: + 28:17:7f:9a:e9:e5:6d:6f:c4:1c:75:8d:a6:0d:b7: + 5e:37:de:e1:1a:b2:e5:a6:d6:79:e4:df:1f:d3:f6: + 68:ed:30:a3:9e:8d:ed:8b:55:3d:12:3f:0f:3f:90: + 4f:b5:74:02:b0:1f:40:ae:32:d9:8e:a5:3b:74:e0: + f3:1e:4e:4c:63:fd:37:4b:b8:2f:70:41:64:4f:ee: + 6b:2f:33:40:2f:8a:c6:5f:e3:6a:e4:a0:62:53:99: + de:8c:ca:b5:34:ca:c0:20:9e:16:73:13:e1:c9:dc: + 22:b3 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 X509v3 Authority Key Identifier: - keyid:02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + keyid:BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -265,41 +265,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 0e:00:56:5c:72:31:88:bd:95:13:f7:64:96:1c:63:c2:1c:11: - 60:04:d2:c3:5f:7c:a2:d7:d1:33:6d:51:6b:77:61:78:a8:70: - 2e:50:97:5d:c1:e8:9b:dd:c6:61:a7:d3:e1:2c:83:07:85:5c: - c9:d7:1e:22:c2:5f:76:83:19:d7:de:4a:5e:82:0f:43:80:45: - 02:d7:d0:3d:ca:c3:c0:fc:04:c8:f6:89:32:d7:47:c6:bf:1f: - c6:bd:71:e1:07:00:90:12:ec:61:63:1b:6c:e9:58:2c:fc:4c: - a9:8f:58:e1:b1:6e:a5:ca:4d:be:7e:32:16:74:5f:fd:35:e4: - 37:aa:1a:c5:33:21:20:8a:3e:1c:af:da:f3:c7:a2:22:d3:93: - 6c:5e:ac:0a:65:d5:db:e4:8b:11:5e:ca:eb:8f:da:c4:5d:2f: - 7a:98:e8:3c:d1:89:15:05:02:86:ef:eb:17:18:81:28:ca:d6: - 58:87:bd:d4:e2:50:41:92:d9:7f:b1:f7:53:8f:f3:cc:f3:1e: - 1d:e4:5a:c2:60:1b:17:42:78:53:e9:2d:5d:bb:f9:21:50:ff: - 87:53:be:5f:e6:d4:8f:25:7f:d7:83:d7:f8:4d:c1:7c:7a:40: - 0b:11:f1:d9:c6:eb:97:45:00:d6:6b:84:1c:4f:fc:8e:1f:5b: - b5:3d:60:0c + 0b:b4:ba:9b:02:15:72:58:48:09:c8:66:c4:7c:6e:07:5e:bf: + e1:a5:97:42:fd:5f:8f:5f:35:e7:60:78:73:a8:18:f8:c2:91: + b1:d4:1b:cb:11:17:e0:d5:30:69:90:b8:9a:f9:a1:95:47:c9: + 85:dd:6d:b9:56:a2:fb:16:2f:09:8c:c0:66:6d:af:7b:f2:42: + 67:0f:a3:b9:e8:69:36:89:92:1e:c8:54:11:fe:39:3f:71:85: + d9:65:30:0c:2a:b1:a6:b8:df:b0:40:7b:56:98:3d:c3:66:76: + be:85:ec:f2:6c:30:de:ce:b3:84:70:74:83:2b:20:42:5a:f0: + 9b:31:98:81:16:71:cf:cf:66:57:36:dd:13:cd:f0:74:0c:2f: + a1:26:71:1e:50:ce:57:c9:85:71:47:08:b2:a6:b4:2a:2f:6b: + 5f:1f:80:09:3d:b1:5e:ab:aa:e7:08:86:c7:75:2d:36:b1:f3: + 2c:e1:91:8c:1c:6b:0a:fe:80:38:34:61:f8:a2:ee:3e:9a:e4: + 38:95:dd:3d:21:1e:61:5c:53:a7:30:b8:2b:10:72:d8:5d:54: + a3:47:9c:6c:69:d6:42:a6:56:f2:b3:3e:98:22:c2:b0:6b:2e: + f3:3a:b8:71:52:53:b5:32:a5:a4:38:35:fc:f2:ed:9a:e3:52: + 57:75:df:07 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKZE7KcVAB+JrJH47HsD -RgtTFe0jQDWU85aAJ9NKhJJoyQzgFDLHMWdJKVh36s6KcluTsaCo5YTGUp1awEG/ -mF8YXarRZXn76bCEkp0sWLzxxClZ7byshc7XDqoI6C2QJcuRnX2RdEKgrnfSEXtX -SQQkwJT0IFRg2Rt2dgssIzxnkIwG7U7frCQiJvcmj1rSW3mKb25TJ2AQy8e0n2At -jzJpSwHR8G1pGiIUBmZjl+j8eUGNFURE0UMqN1535AbmqYUT6SRjnQnQ9RPVulku -HNJwBrGA91fXMPcU8xgGf4Q4toFGn6I2hw5fGkU4tyAWt8bhkTsODKu3Tj2kbWbY -hfsCAwEAAaOByzCByDAdBgNVHQ4EFgQUAs72rBo5HoXoctGKxh3oeo+dFWswHwYD -VR0jBBgwFoAUAs72rBo5HoXoctGKxh3oeo+dFWswNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO/m6eC0gzDcIaAfncOB +naKhzuXvH5Tj8BQFEiqXXgC6asMJswahntpvnfhFomwefaMQ0ts4JO2AJTac29MH +rzn4gkijzX/zV935/XwD1Y5dNa7tr8ahicouLs93WibG5B2dl8enz5OqJCLZgtWY +R8kzund+aqM1QxxWpZQtSA9HLTPNxEYtVGHduLyNHJd9S/T8az5NKBd/munlbW/E +HHWNpg23Xjfe4Rqy5abWeeTfH9P2aO0wo56N7YtVPRI/Dz+QT7V0ArAfQK4y2Y6l +O3Tg8x5OTGP9N0u4L3BBZE/uay8zQC+Kxl/jauSgYlOZ3ozKtTTKwCCeFnMT4cnc +IrMCAwEAAaOByzCByDAdBgNVHQ4EFgQUvslrrJS1H+SNxpCdwNcSFl5QRxYwHwYD +VR0jBBgwFoAUvslrrJS1H+SNxpCdwNcSFl5QRxYwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAOAFZccjGI -vZUT92SWHGPCHBFgBNLDX3yi19EzbVFrd2F4qHAuUJddweib3cZhp9PhLIMHhVzJ -1x4iwl92gxnX3kpegg9DgEUC19A9ysPA/ATI9oky10fGvx/GvXHhBwCQEuxhYxts -6Vgs/Eypj1jhsW6lyk2+fjIWdF/9NeQ3qhrFMyEgij4cr9rzx6Ii05NsXqwKZdXb -5IsRXsrrj9rEXS96mOg80YkVBQKG7+sXGIEoytZYh73U4lBBktl/sfdTj/PM8x4d -5FrCYBsXQnhT6S1du/khUP+HU75f5tSPJX/Xg9f4TcF8ekALEfHZxuuXRQDWa4Qc -T/yOH1u1PWAM +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQALtLqbAhVy +WEgJyGbEfG4HXr/hpZdC/V+PXzXnYHhzqBj4wpGx1BvLERfg1TBpkLia+aGVR8mF +3W25VqL7Fi8JjMBmba978kJnD6O56Gk2iZIeyFQR/jk/cYXZZTAMKrGmuN+wQHtW +mD3DZna+hezybDDezrOEcHSDKyBCWvCbMZiBFnHPz2ZXNt0TzfB0DC+hJnEeUM5X +yYVxRwiyprQqL2tfH4AJPbFeq6rnCIbHdS02sfMs4ZGMHGsK/oA4NGH4ou4+muQ4 +ld09IR5hXFOnMLgrEHLYXVSjR5xsadZCplbysz6YIsKway7zOrhxUlO1MqWkODX8 +8u2a41JXdd8H -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/key-rollover-rolloverchain.pem b/net/data/verify_certificate_chain_unittest/key-rollover-rolloverchain.pem index 94105ff..d4cad40 100644 --- a/net/data/verify_certificate_chain_unittest/key-rollover-rolloverchain.pem +++ b/net/data/verify_certificate_chain_unittest/key-rollover-rolloverchain.pem
@@ -1,4 +1,4 @@ -[Created by: ./generate-key-rollover.py] +[Created by: generate-key-rollover.py] A certificate tree with two self-signed root certificates(oldroot, newroot), and a third root certificate (newrootrollover) which has the same key as newroot @@ -48,30 +48,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:be:12:1c:48:e4:73:1f:5c:d2:54:a9:7b:58:1c: - 37:73:c2:49:26:3e:ed:b5:6b:55:17:c9:4c:52:34: - ce:d9:76:86:32:74:74:ae:11:b2:99:1b:51:a0:33: - 48:34:2f:b9:d3:2b:06:c2:5c:29:53:35:ce:7c:a6: - 67:b2:6a:d4:33:c3:13:62:30:a1:53:5f:45:78:5b: - bb:47:ad:07:a4:98:9a:e9:e3:b1:3b:e6:33:c2:c1: - 5c:95:d7:c8:b9:a6:72:27:7a:79:da:c4:c8:5a:1a: - 3e:5e:5e:a6:62:64:c6:72:86:b1:78:98:5b:63:27: - 70:15:04:6b:b1:0f:11:9c:4d:3b:5c:e7:8d:c0:be: - d5:84:46:6c:bd:11:1e:21:c1:82:9c:d0:aa:2d:2f: - f8:2a:e9:3b:e4:35:15:6d:c7:4a:dd:a8:65:69:b8: - 16:a1:8a:04:a2:44:68:40:b6:99:ae:61:df:9f:6c: - 40:ef:79:c9:a3:6d:e4:2d:07:01:68:f1:21:4e:0e: - 28:a7:fd:2f:ad:ee:7d:65:cf:36:fd:4f:1b:ba:10: - 8e:86:fd:ec:37:67:0c:20:71:66:48:64:f3:82:af: - f5:e1:73:c9:09:36:03:3f:c2:47:7a:f2:33:b9:f9: - 9f:53:9b:24:5e:c3:cc:05:d9:a9:ed:d7:b2:2a:c5: - b7:39 + 00:ab:ca:16:55:35:25:9b:de:8e:fc:e9:5a:f9:04: + 3e:0e:6c:06:1e:1c:86:20:18:4f:41:da:3a:6d:16: + 9e:4e:3c:9b:11:67:bc:5a:3d:84:b2:79:05:d2:25: + 9a:6a:a8:80:6c:55:28:f2:5a:43:5f:c5:ef:e9:e3: + 1a:64:24:7e:57:4d:11:60:d7:e6:a9:2b:73:c7:93: + bb:67:b1:41:d5:df:21:5c:bd:98:93:a3:7d:0d:b0: + 86:5f:87:a9:d9:ab:ad:97:89:c5:12:c4:0f:71:d3: + 5b:79:18:53:64:7f:0a:a1:36:5e:00:5c:b9:ee:5e: + 14:10:17:f2:2a:60:0f:f7:ec:aa:d7:ad:d3:dc:8a: + 44:59:cf:c8:11:e7:42:1c:88:30:d7:1e:37:86:91: + 6b:ce:2a:bc:bb:f5:4a:cc:72:1a:9d:4f:5f:0e:c4: + c5:f7:b6:24:09:1c:22:f8:f7:a2:3d:45:c2:29:4d: + a3:f3:db:7a:a4:93:a2:48:d6:2b:90:da:0c:2b:d9: + 96:f0:d6:c7:eb:d0:eb:a8:08:72:55:a8:10:65:8f: + 38:6a:22:0c:9c:3d:68:1a:cd:16:da:73:24:2e:14: + 5d:08:05:fb:07:d1:52:53:4e:51:e4:b2:f3:17:4d: + f1:d0:c3:23:51:86:fb:a4:b9:09:37:9c:13:69:65: + 51:45 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - C9:45:0B:2A:F2:D8:8D:2A:D7:CE:AF:56:BF:82:B0:84:0C:C8:2E:F4 + 90:8D:89:42:17:BF:F6:98:D1:AA:8C:BF:AF:C2:74:60:AB:ED:90:0F X509v3 Authority Key Identifier: - keyid:B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + keyid:A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 Authority Information Access: CA Issuers - URI:http://url-for-aia/Intermediate.cer @@ -86,42 +86,42 @@ X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 63:66:9e:6c:34:8c:5d:74:ae:90:25:55:ae:86:49:b9:3d:fd: - 27:bc:4f:69:7b:70:cb:25:0e:a3:8c:7a:7d:9c:4f:0b:7c:f2: - 85:a5:ea:82:d2:37:c2:74:a2:ae:a8:bf:62:f4:5f:d4:c6:41: - 45:0c:cc:27:53:aa:8f:66:58:e9:b0:de:ae:98:14:bd:92:df: - 9b:0f:f2:c5:3b:d2:bc:1c:3e:80:b4:09:0f:c1:9f:d6:3a:29: - 52:71:b6:1a:92:95:5a:18:dc:b4:30:dc:61:61:93:54:d1:55: - 83:92:5d:c0:c7:dc:ab:d7:08:dd:8a:44:cf:92:f9:4d:86:25: - aa:ac:52:f6:0e:17:99:0b:31:d2:75:5e:33:f9:f5:b6:77:42: - 07:62:a9:53:cc:f3:79:84:57:d9:14:3f:ab:4c:8b:ae:c7:9f: - cf:7a:1f:bf:7e:1d:44:bd:76:b4:cd:8d:c8:1d:75:f7:3b:b5: - bc:35:8b:3f:29:b1:cb:67:a4:17:af:a4:ca:9f:2b:e7:15:66: - e4:c8:c1:7c:08:78:9e:5d:4b:c3:c6:58:66:96:42:e8:e6:40: - fd:dc:24:ce:3b:58:11:38:40:0e:fc:a9:c0:2c:0f:e5:cc:bb: - 02:32:31:b9:bc:6f:2d:1d:f6:2b:7c:d3:f8:24:f6:60:38:8a: - 1f:dd:e1:50 + 74:15:69:e0:48:a6:e3:fa:20:b6:3f:90:d7:61:d3:ea:b7:47: + 61:c7:81:6b:42:95:44:ac:1e:6f:3d:df:ad:2c:33:0d:e8:94: + 5b:d1:24:89:56:27:76:e4:6c:09:26:a7:e5:62:c9:96:83:ce: + 9d:08:f5:ee:c4:3d:fe:77:29:ae:8d:9f:7f:d5:81:b6:5d:b5: + 54:a0:1f:6c:54:1e:dd:a7:4e:78:e0:6c:60:1d:e8:1f:97:77: + 67:8d:57:80:00:17:80:cd:ab:ce:31:87:6e:9e:bf:3f:38:b9: + da:96:a3:d2:22:63:43:dd:5c:e8:42:ea:2d:eb:ab:81:33:e5: + 95:36:46:3c:dd:8e:ad:e2:43:40:6f:3c:ce:73:4d:52:71:9d: + 54:59:f4:73:a2:5a:48:a5:c7:bc:dd:f9:9f:91:39:b1:bc:ad: + 9a:59:ea:f6:33:42:72:66:2f:e9:78:8f:b6:09:15:35:d8:e6: + 70:0d:d3:da:a7:7e:55:d9:05:88:47:16:1d:cd:54:1c:15:11: + a6:d3:35:2a:4e:c5:0f:f7:b0:98:24:bf:7e:78:3e:5f:56:0c: + 87:72:c2:d1:7d:3e:3c:c6:98:50:a9:c7:cd:6f:0e:12:b4:32: + 7a:b8:01:6c:88:1c:8a:c2:19:24:1e:34:9b:da:45:eb:0a:f9: + 99:6e:54:c6 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+EhxI -5HMfXNJUqXtYHDdzwkkmPu21a1UXyUxSNM7ZdoYydHSuEbKZG1GgM0g0L7nTKwbC -XClTNc58pmeyatQzwxNiMKFTX0V4W7tHrQekmJrp47E75jPCwVyV18i5pnInenna -xMhaGj5eXqZiZMZyhrF4mFtjJ3AVBGuxDxGcTTtc543AvtWERmy9ER4hwYKc0Kot -L/gq6TvkNRVtx0rdqGVpuBahigSiRGhAtpmuYd+fbEDvecmjbeQtBwFo8SFODiin -/S+t7n1lzzb9Txu6EI6G/ew3ZwwgcWZIZPOCr/Xhc8kJNgM/wkd68jO5+Z9TmyRe -w8wF2ant17Iqxbc5AgMBAAGjgekwgeYwHQYDVR0OBBYEFMlFCyry2I0q186vVr+C -sIQMyC70MB8GA1UdIwQYMBaAFLE5eRM10ANr6cRjK8zWYcOC7BTBMD8GCCsGAQUF +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCryhZV +NSWb3o786Vr5BD4ObAYeHIYgGE9B2jptFp5OPJsRZ7xaPYSyeQXSJZpqqIBsVSjy +WkNfxe/p4xpkJH5XTRFg1+apK3PHk7tnsUHV3yFcvZiTo30NsIZfh6nZq62XicUS +xA9x01t5GFNkfwqhNl4AXLnuXhQQF/IqYA/37KrXrdPcikRZz8gR50IciDDXHjeG +kWvOKry79UrMchqdT18OxMX3tiQJHCL496I9RcIpTaPz23qkk6JI1iuQ2gwr2Zbw +1sfr0OuoCHJVqBBljzhqIgycPWgazRbacyQuFF0IBfsH0VJTTlHksvMXTfHQwyNR +hvukuQk3nBNpZVFFAgMBAAGjgekwgeYwHQYDVR0OBBYEFJCNiUIXv/aY0aqMv6/C +dGCr7ZAPMB8GA1UdIwQYMBaAFKUljsMUnIYZMPUFxarINxL2lEpGMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAY2aebDSMXXSukCVVroZJ -uT39J7xPaXtwyyUOo4x6fZxPC3zyhaXqgtI3wnSirqi/YvRf1MZBRQzMJ1Oqj2ZY -6bDerpgUvZLfmw/yxTvSvBw+gLQJD8Gf1jopUnG2GpKVWhjctDDcYWGTVNFVg5Jd -wMfcq9cI3YpEz5L5TYYlqqxS9g4XmQsx0nVeM/n1tndCB2KpU8zzeYRX2RQ/q0yL -rsefz3ofv34dRL12tM2NyB119zu1vDWLPymxy2ekF6+kyp8r5xVm5MjBfAh4nl1L -w8ZYZpZC6OZA/dwkzjtYEThADvypwCwP5cy7AjIxubxvLR32K3zT+CT2YDiKH93h -UA== +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAdBVp4Eim4/ogtj+Q12HT +6rdHYceBa0KVRKwebz3frSwzDeiUW9EkiVYnduRsCSan5WLJloPOnQj17sQ9/ncp +ro2ff9WBtl21VKAfbFQe3adOeOBsYB3oH5d3Z41XgAAXgM2rzjGHbp6/Pzi52paj +0iJjQ91c6ELqLeurgTPllTZGPN2OreJDQG88znNNUnGdVFn0c6JaSKXHvN35n5E5 +sbytmlnq9jNCcmYv6XiPtgkVNdjmcA3T2qd+VdkFiEcWHc1UHBURptM1Kk7FD/ew +mCS/fng+X1YMh3LC0X0+PMaYUKnHzW8OErQyergBbIgcisIZJB40m9pF6wr5mW5U +xg== -----END CERTIFICATE----- Certificate: @@ -138,30 +138,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:9c:d0:2e:3b:06:d6:ea:65:bd:dd:b2:d3:e8:88: - ea:08:73:01:42:ac:ca:38:28:17:32:93:5e:16:a8: - c1:79:44:9a:db:24:08:ba:81:52:63:9c:b4:ed:57: - d4:b2:ac:54:64:3b:70:39:7e:37:da:11:e1:8c:ba: - 09:bc:1a:9b:e7:fe:6d:75:f8:71:31:f0:ca:52:89: - 2a:9e:d5:53:db:b8:c0:76:cf:bf:58:58:e1:bb:81: - de:62:bb:06:58:1f:9b:64:03:75:7d:ee:76:6f:39: - 47:cb:8e:34:32:07:83:89:b0:83:2a:78:d0:ac:e2: - 86:0a:a8:ab:3b:97:81:de:9d:36:b4:03:b7:d5:06: - 05:53:d7:80:03:44:86:53:72:db:7a:5f:c5:20:dd: - c7:44:58:3b:40:7f:0e:39:bc:be:0d:ca:6a:f6:82: - a2:97:a2:17:79:51:6f:42:5d:0d:6a:b7:a0:de:5f: - 6a:00:be:e7:5a:b7:91:e9:fc:77:fd:75:88:8d:52: - 76:3d:0e:91:4b:c7:db:96:a4:5f:39:59:55:62:65: - 3b:15:7a:bc:7b:09:9f:3e:75:d9:9e:c5:00:b3:19: - d4:26:7e:eb:db:62:07:c2:f5:b6:4e:87:2d:eb:56: - 8b:5a:68:6c:85:2f:b4:3e:1d:dd:5d:31:49:98:8b: - 06:55 + 00:ad:d7:63:a2:51:33:32:fd:aa:73:2c:32:30:ac: + 2f:8d:37:5f:08:b2:9b:02:1a:f7:3c:eb:c2:9e:82: + d9:a2:0e:02:14:28:bc:18:e2:92:8e:db:66:14:36: + 3f:ef:43:47:ac:b4:e2:be:92:82:14:9a:bd:97:d7: + 19:6f:88:29:b1:85:68:bd:13:d5:93:2c:a0:c8:bb: + 76:9d:ad:f5:da:e8:55:ca:87:6d:07:20:f4:22:cf: + 5a:51:ea:e1:7b:c3:7e:f9:a8:85:95:c5:e9:88:bf: + 7b:5e:fd:49:d4:c4:ed:ce:b7:d2:71:23:59:00:a7: + 6f:85:40:a0:38:c6:2b:88:99:68:e9:97:7e:2f:92: + 97:18:0a:19:c2:4e:0a:28:2c:b3:b4:67:26:eb:1d: + 03:f6:16:58:20:88:81:ee:a8:ea:19:ae:25:e9:34: + 8d:87:f3:d2:3b:0e:b2:d8:31:14:ee:bd:c6:01:ec: + d4:41:f0:06:7b:3e:20:7b:06:88:86:29:d1:77:9a: + c0:bc:69:63:3f:2b:20:ac:aa:17:33:29:78:0a:11: + ff:92:f2:b3:4a:58:29:96:d3:f4:4f:70:ef:9c:81: + 55:1c:21:20:bf:54:5a:dd:60:b7:6e:53:41:a2:19: + 55:b5:f9:b8:6e:63:37:73:a0:b8:d4:c5:c1:a2:4e: + 0e:11 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B1:39:79:13:35:D0:03:6B:E9:C4:63:2B:CC:D6:61:C3:82:EC:14:C1 + A5:25:8E:C3:14:9C:86:19:30:F5:05:C5:AA:C8:37:12:F6:94:4A:46 X509v3 Authority Key Identifier: - keyid:15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + keyid:83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -176,41 +176,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - a8:ad:48:d8:6e:1d:24:09:d2:b3:29:3c:48:60:27:7f:37:64: - d5:f1:3b:b3:5c:43:de:7c:b4:5f:ee:3a:f2:1a:25:24:0a:8a: - 25:6d:19:5b:dc:0c:4e:48:61:2f:60:d3:6b:f3:9c:03:2c:d3: - fa:c8:9b:99:e7:2e:c5:43:c0:5f:14:cd:8b:92:62:4f:e5:3a: - cd:b5:0a:d8:b2:01:c7:44:b4:3a:86:66:bf:fa:11:a5:f8:24: - 3f:d1:1a:e8:eb:1e:ad:f0:70:31:6f:bc:21:cf:db:ce:63:4e: - 84:e9:52:9e:bb:1b:c4:72:ae:e0:6c:88:9e:99:dc:79:d9:fd: - 83:26:8e:f6:19:70:d9:5e:fc:f4:0c:d1:17:6f:af:10:f6:64: - 16:08:d8:72:ba:3a:2d:66:28:5a:41:0d:f3:47:87:a7:9c:78: - c6:cd:5e:25:71:0b:f2:93:b8:26:17:b2:19:17:cc:03:ed:c0: - 6e:06:e2:4b:4a:57:5f:23:02:2a:69:06:7a:c4:b7:3e:2f:e8: - f0:03:ae:b8:2d:df:63:22:20:73:23:75:d9:3c:d7:22:e4:b4: - 65:65:ed:b9:e6:02:1d:b5:51:11:9c:db:92:e4:fe:8c:1d:bb: - c5:95:87:5b:38:ee:ff:e4:01:d1:5d:84:b9:73:d3:da:23:ca: - 5e:05:d3:7d + 7f:a1:7c:8f:ea:d9:b9:63:e1:b0:31:0a:2e:1c:8e:e9:d0:23: + ee:3e:8e:50:55:db:ba:10:93:a4:93:0b:bb:c1:a5:3d:32:90: + ee:40:bf:0f:df:25:f1:65:b3:30:6d:39:9b:d2:c1:b8:b7:a8: + 7e:23:dc:6a:c3:5a:9e:53:d7:86:4c:82:de:98:23:1a:6f:f9: + 0d:6d:b9:35:55:b9:94:03:8d:b7:6c:2e:64:79:ea:85:84:7e: + 51:18:37:42:80:f5:d4:16:3f:a0:a9:6b:bf:17:d1:19:99:ea: + 8d:5a:c9:30:b0:ca:c8:2c:17:ce:14:75:b3:c9:19:df:16:1b: + 9a:97:ae:50:69:a5:6c:02:57:84:f4:7f:30:90:ed:89:bb:0e: + c9:7b:34:d0:41:58:00:20:29:6b:f0:e8:97:81:92:3d:ba:e0: + 65:e9:7c:cb:5c:7b:50:c8:0f:d3:20:ab:42:2f:0d:44:6d:99: + c2:1d:42:e8:b2:10:82:9b:86:ba:a8:45:d2:2c:13:53:cf:ad: + 37:ac:ce:f3:e7:49:fe:59:d5:b6:5f:8b:6b:fd:5f:e0:f2:91: + ef:e3:f7:e0:b6:ee:e7:ae:77:0e:66:12:40:55:75:77:2a:05: + d4:bd:ab:7e:5a:67:d8:81:8b:15:fd:4c:60:63:c7:f7:5f:fa: + d4:d8:d9:d2 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMjEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnNAuOwbW -6mW93bLT6IjqCHMBQqzKOCgXMpNeFqjBeUSa2yQIuoFSY5y07VfUsqxUZDtwOX43 -2hHhjLoJvBqb5/5tdfhxMfDKUokqntVT27jAds+/WFjhu4HeYrsGWB+bZAN1fe52 -bzlHy440MgeDibCDKnjQrOKGCqirO5eB3p02tAO31QYFU9eAA0SGU3Lbel/FIN3H -RFg7QH8OOby+Dcpq9oKil6IXeVFvQl0Nareg3l9qAL7nWreR6fx3/XWIjVJ2PQ6R -S8fblqRfOVlVYmU7FXq8ewmfPnXZnsUAsxnUJn7r22IHwvW2Toct61aLWmhshS+0 -Ph3dXTFJmIsGVQIDAQABo4HLMIHIMB0GA1UdDgQWBBSxOXkTNdADa+nEYyvM1mHD -guwUwTAfBgNVHSMEGDAWgBQVnqat9Z+KocEImb9mb8/Kcs0MNDA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArddjolEz +Mv2qcywyMKwvjTdfCLKbAhr3POvCnoLZog4CFCi8GOKSjttmFDY/70NHrLTivpKC +FJq9l9cZb4gpsYVovRPVkyygyLt2na312uhVyodtByD0Is9aUerhe8N++aiFlcXp +iL97Xv1J1MTtzrfScSNZAKdvhUCgOMYriJlo6Zd+L5KXGAoZwk4KKCyztGcm6x0D +9hZYIIiB7qjqGa4l6TSNh/PSOw6y2DEU7r3GAezUQfAGez4gewaIhinRd5rAvGlj +PysgrKoXMyl4ChH/kvKzSlgpltP0T3DvnIFVHCEgv1Ra3WC3blNBohlVtfm4bmM3 +c6C41MXBok4OEQIDAQABo4HLMIHIMB0GA1UdDgQWBBSlJY7DFJyGGTD1BcWqyDcS +9pRKRjAfBgNVHSMEGDAWgBSD+ZPVKfnEuqFf5Ml0GODfDhcYUDA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AKitSNhuHSQJ0rMpPEhgJ383ZNXxO7NcQ958tF/uOvIaJSQKiiVtGVvcDE5IYS9g -02vznAMs0/rIm5nnLsVDwF8UzYuSYk/lOs21CtiyAcdEtDqGZr/6EaX4JD/RGujr -Hq3wcDFvvCHP285jToTpUp67G8RyruBsiJ6Z3HnZ/YMmjvYZcNle/PQM0RdvrxD2 -ZBYI2HK6Oi1mKFpBDfNHh6eceMbNXiVxC/KTuCYXshkXzAPtwG4G4ktKV18jAipp -BnrEtz4v6PADrrgt32MiIHMjddk81yLktGVl7bnmAh21URGc25Lk/owdu8WVh1s4 -7v/kAdFdhLlz09ojyl4F030= +AH+hfI/q2blj4bAxCi4cjunQI+4+jlBV27oQk6STC7vBpT0ykO5Avw/fJfFlszBt +OZvSwbi3qH4j3GrDWp5T14ZMgt6YIxpv+Q1tuTVVuZQDjbdsLmR56oWEflEYN0KA +9dQWP6Cpa78X0RmZ6o1ayTCwysgsF84UdbPJGd8WG5qXrlBppWwCV4T0fzCQ7Ym7 +Dsl7NNBBWAAgKWvw6JeBkj264GXpfMtce1DID9Mgq0IvDURtmcIdQuiyEIKbhrqo +RdIsE1PPrTeszvPnSf5Z1bZfi2v9X+Dyke/j9+C27ueudw5mEkBVdXcqBdS9q35a +Z9iBixX9TGBjx/df+tTY2dI= -----END CERTIFICATE----- Certificate: @@ -227,30 +227,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ae:ea:3b:3f:b6:e9:3d:ea:eb:3d:dd:e8:4d:45: - 83:63:78:ea:07:90:3a:3c:4f:92:54:2b:2d:02:1b: - eb:9e:81:72:68:2e:73:f8:4a:a1:de:0c:d6:f0:c2: - 61:26:90:0b:48:59:ab:23:25:8f:e4:4a:6b:c9:2d: - ba:a7:35:c4:22:df:76:99:d8:7b:f7:6d:ca:9b:da: - d2:ed:7e:c8:93:b2:a7:f6:f0:05:6a:5d:c6:e1:79: - d0:25:59:a9:50:1e:65:eb:1c:c9:cd:4e:6a:3a:2a: - a4:1a:fa:81:a3:e7:ae:d7:de:43:d9:e8:0b:5c:b0: - 6b:46:39:c5:9c:4a:6d:59:bf:da:70:2e:80:ac:c8: - 80:e3:83:d1:71:7b:a7:0b:92:bf:a8:81:ad:5c:b2: - d5:e9:b9:5f:b5:4f:93:43:67:72:36:b3:f7:17:b9: - 1b:da:2a:13:83:70:36:ae:59:03:3d:f0:71:de:a2: - 7a:41:ad:b5:e9:a2:51:e4:18:ec:88:ad:48:f1:df: - 17:04:43:54:2a:af:3c:c0:f5:84:39:43:d1:a7:d2: - 52:0f:3c:dd:ef:13:58:8c:1d:d4:dd:2e:6d:1a:e7: - 73:9b:8b:f3:41:7b:9a:53:4e:0d:92:d3:5d:3f:fc: - c3:61:dc:5f:a0:93:3c:08:cc:b4:9b:ce:9d:78:e3: - 77:c9 + 00:c8:01:d6:aa:f0:22:fa:55:68:e4:56:fa:87:9f: + 03:a4:78:36:40:64:b2:60:f7:20:25:47:92:b0:cb: + c7:9d:4c:c6:4d:78:0f:91:9e:a8:f1:0b:84:58:b1: + a9:06:2d:7d:09:82:f4:1a:60:67:7b:c3:47:69:05: + b5:59:90:02:2a:53:27:25:21:4d:9a:5f:b6:7b:58: + 25:77:b3:46:64:fc:ed:04:c0:e2:62:e5:96:f9:8a: + 8d:9a:e8:8d:bf:d9:19:38:97:52:ab:31:3c:1c:a2: + b9:21:ec:5f:aa:8c:21:44:c6:73:7f:0b:72:c9:61: + 1c:a7:cd:46:bb:da:5b:a7:1b:e2:18:fb:ff:18:81: + 5f:fb:75:29:21:9c:92:e0:d3:03:f5:b8:58:94:36: + 32:7a:9a:a7:ec:49:ab:ef:d4:8c:c4:65:aa:23:40: + 96:76:47:4b:06:0b:21:c4:44:9f:8d:12:ab:05:05: + e7:97:d9:9d:c0:f9:4d:77:14:0b:c5:d5:82:0c:d7: + 14:54:fa:07:dd:a3:78:30:5d:95:83:e4:1c:7f:c2: + 13:c6:b1:8b:10:87:9b:e9:3e:4f:d6:b6:b9:a8:9f: + 4c:47:f8:40:67:7d:4e:9b:87:4a:b6:92:eb:33:f1: + 73:a3:70:d6:fc:37:32:2a:b4:b8:56:90:63:5e:ec: + b7:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 15:9E:A6:AD:F5:9F:8A:A1:C1:08:99:BF:66:6F:CF:CA:72:CD:0C:34 + 83:F9:93:D5:29:F9:C4:BA:A1:5F:E4:C9:74:18:E0:DF:0E:17:18:50 X509v3 Authority Key Identifier: - keyid:02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + keyid:BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -265,41 +265,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 51:9b:dd:56:f2:b1:2b:e5:36:c8:2f:1d:a9:53:1f:89:e1:24: - 33:bd:ac:56:c1:c3:1a:38:a6:7e:fc:61:9a:ae:7c:1f:13:3e: - 37:e4:e6:a9:11:9e:2b:6e:ce:dd:12:0c:c1:b2:b7:eb:48:0e: - c7:a5:65:f0:86:49:8a:dc:cf:1b:6d:33:af:af:96:51:49:01: - e4:82:d6:e6:5a:d0:41:c7:05:9f:16:eb:06:bd:bc:ab:fe:a0: - d7:ac:de:62:d1:71:7e:69:82:31:03:e3:60:28:e6:18:3b:e5: - 93:2b:58:ee:d5:0b:7b:b6:af:f2:4f:22:eb:4d:b7:a6:74:68: - b7:82:68:7f:a9:b6:ee:a0:20:d7:c6:16:0e:9c:1c:39:ea:24: - 5e:60:12:fc:39:60:0d:54:3e:aa:b3:43:e1:0f:ef:d7:8f:3e: - 09:a9:55:95:e9:3d:0c:4f:ad:cb:c2:f3:2c:10:43:67:54:f9: - 66:54:81:ff:62:61:94:05:b0:42:af:f0:c5:ac:00:91:28:5c: - aa:a3:61:44:ba:c2:a6:ab:f8:1d:7e:02:69:33:48:fe:ac:93: - 7f:4c:99:91:d9:18:37:f9:70:3f:56:2a:ee:4a:e0:4d:f3:60: - 12:5d:30:d8:37:bf:ca:40:85:29:0c:a7:8f:ab:ad:03:6d:7b: - ba:62:7f:58 + a4:6f:3a:2b:4c:55:63:68:09:a1:73:eb:b1:b6:69:07:de:8a: + 44:7d:10:bd:05:bf:a9:ef:06:af:c1:90:a6:75:1d:a8:51:e2: + f7:9a:4e:d7:23:6b:c1:34:83:64:9c:6d:15:0a:cc:b0:99:13: + 53:1f:0b:ef:23:82:6d:32:e1:ea:08:ce:65:21:d4:09:6a:6a: + d4:05:1b:96:2b:34:44:89:31:4e:14:11:b2:ff:ae:cf:60:56: + 2a:37:2f:18:2b:ae:aa:74:bb:d5:88:fb:3f:d4:ee:4c:f5:f3: + 4a:fa:6f:34:78:b7:bd:b1:d0:77:da:86:02:ce:a7:c3:11:f2: + 09:bf:3c:17:61:d2:4c:c5:26:07:ec:92:0a:ab:9e:6a:ae:72: + 66:34:a3:45:94:76:8c:e7:7c:f8:d3:43:41:b0:70:57:78:56: + ee:bc:54:8f:ba:ac:07:dd:cb:3d:a0:1a:79:cb:5b:20:4a:9b: + 1a:8d:93:3a:5e:38:11:ae:60:dd:1c:5f:63:5a:dd:06:a6:c3: + a1:20:4d:1e:a1:6a:a6:92:7c:1e:b4:01:a7:e3:6c:94:c8:30: + a6:bb:a7:2e:d7:66:2b:7f:a6:0b:3f:44:b5:62:2e:32:44:12: + 96:f0:bb:49:8a:49:f6:78:05:60:ed:64:13:93:67:35:4f:c8: + 38:98:2f:e5 -----BEGIN CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBAzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMjEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK7qOz+26T3q6z3d6E1F -g2N46geQOjxPklQrLQIb656Bcmguc/hKod4M1vDCYSaQC0hZqyMlj+RKa8ktuqc1 -xCLfdpnYe/dtypva0u1+yJOyp/bwBWpdxuF50CVZqVAeZescyc1OajoqpBr6gaPn -rtfeQ9noC1ywa0Y5xZxKbVm/2nAugKzIgOOD0XF7pwuSv6iBrVyy1em5X7VPk0Nn -cjaz9xe5G9oqE4NwNq5ZAz3wcd6iekGttemiUeQY7IitSPHfFwRDVCqvPMD1hDlD -0afSUg883e8TWIwd1N0ubRrnc5uL80F7mlNODZLTXT/8w2HcX6CTPAjMtJvOnXjj -d8kCAwEAAaOByzCByDAdBgNVHQ4EFgQUFZ6mrfWfiqHBCJm/Zm/PynLNDDQwHwYD -VR0jBBgwFoAUAs72rBo5HoXoctGKxh3oeo+dFWswNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMgB1qrwIvpVaORW+oef +A6R4NkBksmD3ICVHkrDLx51Mxk14D5GeqPELhFixqQYtfQmC9BpgZ3vDR2kFtVmQ +AipTJyUhTZpftntYJXezRmT87QTA4mLllvmKjZrojb/ZGTiXUqsxPByiuSHsX6qM +IUTGc38LcslhHKfNRrvaW6cb4hj7/xiBX/t1KSGckuDTA/W4WJQ2Mnqap+xJq+/U +jMRlqiNAlnZHSwYLIcREn40SqwUF55fZncD5TXcUC8XVggzXFFT6B92jeDBdlYPk +HH/CE8axixCHm+k+T9a2uaifTEf4QGd9TpuHSraS6zPxc6Nw1vw3Miq0uFaQY17s +t7cCAwEAAaOByzCByDAdBgNVHQ4EFgQUg/mT1Sn5xLqhX+TJdBjg3w4XGFAwHwYD +VR0jBBgwFoAUvslrrJS1H+SNxpCdwNcSFl5QRxYwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBRm91W8rEr -5TbILx2pUx+J4SQzvaxWwcMaOKZ+/GGarnwfEz435OapEZ4rbs7dEgzBsrfrSA7H -pWXwhkmK3M8bbTOvr5ZRSQHkgtbmWtBBxwWfFusGvbyr/qDXrN5i0XF+aYIxA+Ng -KOYYO+WTK1ju1Qt7tq/yTyLrTbemdGi3gmh/qbbuoCDXxhYOnBw56iReYBL8OWAN -VD6qs0PhD+/Xjz4JqVWV6T0MT63LwvMsEENnVPlmVIH/YmGUBbBCr/DFrACRKFyq -o2FEusKmq/gdfgJpM0j+rJN/TJmR2Rg3+XA/ViruSuBN82ASXTDYN7/KQIUpDKeP -q60DbXu6Yn9Y +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCkbzorTFVj +aAmhc+uxtmkH3opEfRC9Bb+p7wavwZCmdR2oUeL3mk7XI2vBNINknG0VCsywmRNT +HwvvI4JtMuHqCM5lIdQJamrUBRuWKzREiTFOFBGy/67PYFYqNy8YK66qdLvViPs/ +1O5M9fNK+m80eLe9sdB32oYCzqfDEfIJvzwXYdJMxSYH7JIKq55qrnJmNKNFlHaM +53z400NBsHBXeFbuvFSPuqwH3cs9oBp5y1sgSpsajZM6XjgRrmDdHF9jWt0GpsOh +IE0eoWqmknwetAGn42yUyDCmu6cu12Yrf6YLP0S1Yi4yRBKW8LtJikn2eAVg7WQT +k2c1T8g4mC/l -----END CERTIFICATE----- Certificate: @@ -316,30 +316,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a6:44:ec:a7:15:00:1f:89:ac:91:f8:ec:7b:03: - 46:0b:53:15:ed:23:40:35:94:f3:96:80:27:d3:4a: - 84:92:68:c9:0c:e0:14:32:c7:31:67:49:29:58:77: - ea:ce:8a:72:5b:93:b1:a0:a8:e5:84:c6:52:9d:5a: - c0:41:bf:98:5f:18:5d:aa:d1:65:79:fb:e9:b0:84: - 92:9d:2c:58:bc:f1:c4:29:59:ed:bc:ac:85:ce:d7: - 0e:aa:08:e8:2d:90:25:cb:91:9d:7d:91:74:42:a0: - ae:77:d2:11:7b:57:49:04:24:c0:94:f4:20:54:60: - d9:1b:76:76:0b:2c:23:3c:67:90:8c:06:ed:4e:df: - ac:24:22:26:f7:26:8f:5a:d2:5b:79:8a:6f:6e:53: - 27:60:10:cb:c7:b4:9f:60:2d:8f:32:69:4b:01:d1: - f0:6d:69:1a:22:14:06:66:63:97:e8:fc:79:41:8d: - 15:44:44:d1:43:2a:37:5e:77:e4:06:e6:a9:85:13: - e9:24:63:9d:09:d0:f5:13:d5:ba:59:2e:1c:d2:70: - 06:b1:80:f7:57:d7:30:f7:14:f3:18:06:7f:84:38: - b6:81:46:9f:a2:36:87:0e:5f:1a:45:38:b7:20:16: - b7:c6:e1:91:3b:0e:0c:ab:b7:4e:3d:a4:6d:66:d8: - 85:fb + 00:ef:e6:e9:e0:b4:83:30:dc:21:a0:1f:9d:c3:81: + 9d:a2:a1:ce:e5:ef:1f:94:e3:f0:14:05:12:2a:97: + 5e:00:ba:6a:c3:09:b3:06:a1:9e:da:6f:9d:f8:45: + a2:6c:1e:7d:a3:10:d2:db:38:24:ed:80:25:36:9c: + db:d3:07:af:39:f8:82:48:a3:cd:7f:f3:57:dd:f9: + fd:7c:03:d5:8e:5d:35:ae:ed:af:c6:a1:89:ca:2e: + 2e:cf:77:5a:26:c6:e4:1d:9d:97:c7:a7:cf:93:aa: + 24:22:d9:82:d5:98:47:c9:33:ba:77:7e:6a:a3:35: + 43:1c:56:a5:94:2d:48:0f:47:2d:33:cd:c4:46:2d: + 54:61:dd:b8:bc:8d:1c:97:7d:4b:f4:fc:6b:3e:4d: + 28:17:7f:9a:e9:e5:6d:6f:c4:1c:75:8d:a6:0d:b7: + 5e:37:de:e1:1a:b2:e5:a6:d6:79:e4:df:1f:d3:f6: + 68:ed:30:a3:9e:8d:ed:8b:55:3d:12:3f:0f:3f:90: + 4f:b5:74:02:b0:1f:40:ae:32:d9:8e:a5:3b:74:e0: + f3:1e:4e:4c:63:fd:37:4b:b8:2f:70:41:64:4f:ee: + 6b:2f:33:40:2f:8a:c6:5f:e3:6a:e4:a0:62:53:99: + de:8c:ca:b5:34:ca:c0:20:9e:16:73:13:e1:c9:dc: + 22:b3 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 X509v3 Authority Key Identifier: - keyid:02:CE:F6:AC:1A:39:1E:85:E8:72:D1:8A:C6:1D:E8:7A:8F:9D:15:6B + keyid:BE:C9:6B:AC:94:B5:1F:E4:8D:C6:90:9D:C0:D7:12:16:5E:50:47:16 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -354,41 +354,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 0e:00:56:5c:72:31:88:bd:95:13:f7:64:96:1c:63:c2:1c:11: - 60:04:d2:c3:5f:7c:a2:d7:d1:33:6d:51:6b:77:61:78:a8:70: - 2e:50:97:5d:c1:e8:9b:dd:c6:61:a7:d3:e1:2c:83:07:85:5c: - c9:d7:1e:22:c2:5f:76:83:19:d7:de:4a:5e:82:0f:43:80:45: - 02:d7:d0:3d:ca:c3:c0:fc:04:c8:f6:89:32:d7:47:c6:bf:1f: - c6:bd:71:e1:07:00:90:12:ec:61:63:1b:6c:e9:58:2c:fc:4c: - a9:8f:58:e1:b1:6e:a5:ca:4d:be:7e:32:16:74:5f:fd:35:e4: - 37:aa:1a:c5:33:21:20:8a:3e:1c:af:da:f3:c7:a2:22:d3:93: - 6c:5e:ac:0a:65:d5:db:e4:8b:11:5e:ca:eb:8f:da:c4:5d:2f: - 7a:98:e8:3c:d1:89:15:05:02:86:ef:eb:17:18:81:28:ca:d6: - 58:87:bd:d4:e2:50:41:92:d9:7f:b1:f7:53:8f:f3:cc:f3:1e: - 1d:e4:5a:c2:60:1b:17:42:78:53:e9:2d:5d:bb:f9:21:50:ff: - 87:53:be:5f:e6:d4:8f:25:7f:d7:83:d7:f8:4d:c1:7c:7a:40: - 0b:11:f1:d9:c6:eb:97:45:00:d6:6b:84:1c:4f:fc:8e:1f:5b: - b5:3d:60:0c + 0b:b4:ba:9b:02:15:72:58:48:09:c8:66:c4:7c:6e:07:5e:bf: + e1:a5:97:42:fd:5f:8f:5f:35:e7:60:78:73:a8:18:f8:c2:91: + b1:d4:1b:cb:11:17:e0:d5:30:69:90:b8:9a:f9:a1:95:47:c9: + 85:dd:6d:b9:56:a2:fb:16:2f:09:8c:c0:66:6d:af:7b:f2:42: + 67:0f:a3:b9:e8:69:36:89:92:1e:c8:54:11:fe:39:3f:71:85: + d9:65:30:0c:2a:b1:a6:b8:df:b0:40:7b:56:98:3d:c3:66:76: + be:85:ec:f2:6c:30:de:ce:b3:84:70:74:83:2b:20:42:5a:f0: + 9b:31:98:81:16:71:cf:cf:66:57:36:dd:13:cd:f0:74:0c:2f: + a1:26:71:1e:50:ce:57:c9:85:71:47:08:b2:a6:b4:2a:2f:6b: + 5f:1f:80:09:3d:b1:5e:ab:aa:e7:08:86:c7:75:2d:36:b1:f3: + 2c:e1:91:8c:1c:6b:0a:fe:80:38:34:61:f8:a2:ee:3e:9a:e4: + 38:95:dd:3d:21:1e:61:5c:53:a7:30:b8:2b:10:72:d8:5d:54: + a3:47:9c:6c:69:d6:42:a6:56:f2:b3:3e:98:22:c2:b0:6b:2e: + f3:3a:b8:71:52:53:b5:32:a5:a4:38:35:fc:f2:ed:9a:e3:52: + 57:75:df:07 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKZE7KcVAB+JrJH47HsD -RgtTFe0jQDWU85aAJ9NKhJJoyQzgFDLHMWdJKVh36s6KcluTsaCo5YTGUp1awEG/ -mF8YXarRZXn76bCEkp0sWLzxxClZ7byshc7XDqoI6C2QJcuRnX2RdEKgrnfSEXtX -SQQkwJT0IFRg2Rt2dgssIzxnkIwG7U7frCQiJvcmj1rSW3mKb25TJ2AQy8e0n2At -jzJpSwHR8G1pGiIUBmZjl+j8eUGNFURE0UMqN1535AbmqYUT6SRjnQnQ9RPVulku -HNJwBrGA91fXMPcU8xgGf4Q4toFGn6I2hw5fGkU4tyAWt8bhkTsODKu3Tj2kbWbY -hfsCAwEAAaOByzCByDAdBgNVHQ4EFgQUAs72rBo5HoXoctGKxh3oeo+dFWswHwYD -VR0jBBgwFoAUAs72rBo5HoXoctGKxh3oeo+dFWswNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO/m6eC0gzDcIaAfncOB +naKhzuXvH5Tj8BQFEiqXXgC6asMJswahntpvnfhFomwefaMQ0ts4JO2AJTac29MH +rzn4gkijzX/zV935/XwD1Y5dNa7tr8ahicouLs93WibG5B2dl8enz5OqJCLZgtWY +R8kzund+aqM1QxxWpZQtSA9HLTPNxEYtVGHduLyNHJd9S/T8az5NKBd/munlbW/E +HHWNpg23Xjfe4Rqy5abWeeTfH9P2aO0wo56N7YtVPRI/Dz+QT7V0ArAfQK4y2Y6l +O3Tg8x5OTGP9N0u4L3BBZE/uay8zQC+Kxl/jauSgYlOZ3ozKtTTKwCCeFnMT4cnc +IrMCAwEAAaOByzCByDAdBgNVHQ4EFgQUvslrrJS1H+SNxpCdwNcSFl5QRxYwHwYD +VR0jBBgwFoAUvslrrJS1H+SNxpCdwNcSFl5QRxYwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAOAFZccjGI -vZUT92SWHGPCHBFgBNLDX3yi19EzbVFrd2F4qHAuUJddweib3cZhp9PhLIMHhVzJ -1x4iwl92gxnX3kpegg9DgEUC19A9ysPA/ATI9oky10fGvx/GvXHhBwCQEuxhYxts -6Vgs/Eypj1jhsW6lyk2+fjIWdF/9NeQ3qhrFMyEgij4cr9rzx6Ii05NsXqwKZdXb -5IsRXsrrj9rEXS96mOg80YkVBQKG7+sXGIEoytZYh73U4lBBktl/sfdTj/PM8x4d -5FrCYBsXQnhT6S1du/khUP+HU75f5tSPJX/Xg9f4TcF8ekALEfHZxuuXRQDWa4Qc -T/yOH1u1PWAM +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQALtLqbAhVy +WEgJyGbEfG4HXr/hpZdC/V+PXzXnYHhzqBj4wpGx1BvLERfg1TBpkLia+aGVR8mF +3W25VqL7Fi8JjMBmba978kJnD6O56Gk2iZIeyFQR/jk/cYXZZTAMKrGmuN+wQHtW +mD3DZna+hezybDDezrOEcHSDKyBCWvCbMZiBFnHPz2ZXNt0TzfB0DC+hJnEeUM5X +yYVxRwiyprQqL2tfH4AJPbFeq6rnCIbHdS02sfMs4ZGMHGsK/oA4NGH4ou4+muQ4 +ld09IR5hXFOnMLgrEHLYXVSjR5xsadZCplbysz6YIsKway7zOrhxUlO1MqWkODX8 +8u2a41JXdd8H -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/non-self-signed-root.pem b/net/data/verify_certificate_chain_unittest/non-self-signed-root.pem index 11dddad..f80c4c89 100644 --- a/net/data/verify_certificate_chain_unittest/non-self-signed-root.pem +++ b/net/data/verify_certificate_chain_unittest/non-self-signed-root.pem
@@ -1,6 +1,6 @@ -[Created by: ./generate-non-self-signed-root.py] +[Created by: generate-non-self-signed-root.py] -Certificate chain with 1 intermediary and a trusted root. The trusted root +Certificate chain with 1 intermediate and a trusted root. The trusted root is NOT self signed, however its issuer is not included in the chain or root store. Verification is expected to succeed since the root is trusted. @@ -9,7 +9,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,80 +18,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c2:27:87:8d:77:16:37:79:6a:b5:5d:e7:ee:9f: - a4:5e:f6:f3:9e:a0:f9:9c:05:1a:5f:67:d8:72:c7: - 89:73:a5:21:d5:d6:df:39:0d:f7:e7:cb:1e:82:ec: - ae:15:ee:5a:bf:57:12:29:b2:44:8b:40:4b:d6:ea: - a5:34:05:34:5f:37:2e:32:c0:ed:6a:0c:21:ac:c5: - 16:80:61:96:e1:82:e3:15:62:34:23:0a:de:ca:ee: - 43:f8:3a:e7:42:5f:3a:79:f4:bc:cf:e7:da:c4:3a: - d6:d0:5f:bf:13:58:e7:69:0f:bc:38:7c:05:82:a9: - 92:b8:eb:f5:fb:2a:53:ef:5d:12:5e:dc:55:12:b1: - 66:67:3f:7c:00:89:b9:50:ea:9c:7f:90:48:02:40: - b3:f5:98:0d:73:ca:d8:f7:3d:0b:48:fe:99:12:90: - 92:37:93:34:5b:75:60:1c:16:c2:98:ec:2f:9a:f8: - e3:1f:8d:56:ea:c6:35:14:67:66:21:e5:83:69:59: - ce:c3:a6:f5:1e:94:e8:14:ce:73:83:52:af:ed:df: - 63:58:d2:45:07:87:18:ec:7c:11:85:c8:22:b8:ff: - b2:6d:05:2c:70:86:d1:5b:f9:8a:94:22:73:58:f1: - 9e:b2:4f:ea:50:7e:7c:db:2e:6a:ab:bc:b5:73:b5: - 49:3f + 00:a5:fd:12:f2:87:40:5c:07:a7:7c:a8:7a:2c:2c: + 9e:de:bc:e5:8e:c6:55:90:ce:5d:a9:e6:c8:7d:5a: + 9f:b1:f7:32:b4:90:9c:80:12:a2:43:fa:71:95:54: + 76:45:b3:28:cc:93:05:f1:f4:e9:5d:1d:4e:5d:1a: + a1:ad:a5:4b:4f:50:7a:c2:cd:63:2c:de:5d:54:74: + 09:8b:d2:5b:1f:0e:49:b4:ce:cc:24:f4:9d:f7:ca: + 65:6e:58:02:c0:8d:06:35:81:01:b1:2d:37:07:1e: + 9b:07:fa:a3:12:6b:32:bb:98:f1:41:03:2f:17:b5: + 5a:d3:bd:b0:2a:0c:be:2f:34:29:ba:87:44:a5:d9: + b7:1c:c0:ff:c5:dd:bf:21:78:38:71:ce:7a:54:d1: + 97:d9:aa:86:84:eb:2c:17:bf:61:1b:4b:10:54:a2: + a1:a6:ec:01:04:f8:f3:c8:6c:2f:30:15:e0:da:94: + 49:98:01:de:e6:c4:04:57:bb:f5:6d:09:53:e1:ff: + 76:94:cc:ba:2c:74:70:b7:f9:d4:10:35:8a:b0:8c: + 4c:5b:5f:5c:db:e3:a5:b6:c9:d5:b4:13:7c:17:77: + fd:ac:0d:65:fb:0a:a4:d4:0e:a5:2e:8f:ef:0d:5c: + c1:9b:00:c1:dd:0d:4f:c3:7e:3b:3b:a7:4a:d2:99: + f0:e3 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 0B:2F:1A:F2:F7:59:E8:BE:B9:20:D5:71:5F:D3:A1:CA:FB:88:4B:65 + 8E:F7:4C:4C:A6:3A:4A:DA:FB:BE:DE:D3:24:D2:56:B5:3D:55:43:18 X509v3 Authority Key Identifier: - keyid:A5:03:4B:C2:60:A5:9F:86:00:2A:8E:36:33:89:B2:7B:17:24:C2:BC + keyid:25:1D:DB:44:41:CD:DE:76:AA:96:3B:9B:5B:17:24:39:86:B7:DD:E0 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 12:45:9a:a3:e1:5b:0d:8f:1c:b7:39:60:63:7a:e0:fd:34:46: - 7e:44:1b:32:44:c7:7f:03:fb:94:68:a2:6b:a1:7f:06:c2:60: - 8d:be:65:fc:a3:45:f9:15:2c:17:16:25:98:03:a2:85:88:b6: - 4b:4d:86:26:ae:8a:0b:43:46:cd:cc:a3:28:5f:44:3c:92:8a: - ae:f3:de:02:93:1b:b7:a3:8e:6e:79:d5:a0:09:d2:c4:65:ff: - 1b:f5:80:16:66:20:c7:1d:0c:af:32:ff:ec:f6:a4:0f:53:79: - 41:0c:b6:57:9f:b9:1b:81:9c:56:29:3e:62:f6:f5:75:9f:97: - ff:0a:9f:5c:c8:58:f5:d0:e7:ad:c1:4b:ba:62:c1:a3:c6:59: - 9a:01:11:46:40:c1:54:b6:23:ae:33:58:f9:05:6b:f2:32:0d: - 09:2e:5f:ff:74:c5:7d:ce:c9:96:a5:8d:ba:4c:d7:49:3c:8b: - 13:73:36:05:12:56:bf:f8:ad:b5:7a:0a:82:ca:bc:b4:00:d2: - 9f:39:88:2b:b8:d0:c0:49:8a:f6:3a:e3:3e:3e:fe:b4:4e:20: - 1e:60:e8:cb:4d:18:80:94:26:47:bf:be:49:8a:2d:e2:41:4a: - cd:c3:7e:23:82:90:ba:43:a6:8b:7e:b3:57:f8:ec:59:3c:97: - 38:52:a0:0d + 6e:29:ba:73:d2:ce:13:e8:a8:61:cc:1c:c9:63:c3:e5:62:72: + 3d:bd:19:d9:10:ce:04:5c:b4:1a:0c:52:c6:57:4d:d0:a7:2d: + a7:11:90:78:72:8c:1c:56:4f:e4:be:4e:de:6e:f3:e1:eb:7e: + 9c:05:86:e4:f2:22:69:7b:7d:43:df:4e:a9:11:4d:8a:68:33: + a3:7d:9b:b1:04:9c:c2:bf:d4:9f:78:d9:8f:a5:51:9a:20:8a: + 79:c8:40:49:e4:30:d1:b9:9b:09:5e:3d:5e:93:f5:84:e5:2b: + 9f:1e:56:1c:2d:ef:09:34:8c:db:a0:b6:f0:91:88:91:6b:1f: + 4e:86:11:b6:62:33:63:8b:03:b2:40:d2:b8:28:33:e1:33:5d: + ae:e4:0c:08:4b:ab:05:08:6c:4a:b2:b7:cd:cd:28:7f:4a:5c: + 4c:9d:fa:93:c7:00:fa:47:4e:00:ca:2d:2b:c9:ed:da:e8:33: + 23:b6:98:f1:e5:6f:1b:cc:8b:e2:27:b2:1d:46:53:39:29:45: + 46:1a:50:94:c0:e7:5e:a4:ef:a3:ee:13:7a:81:89:e2:4e:f9: + 5e:1c:e3:ee:fe:d9:6d:7b:85:c6:99:ed:b0:30:d4:ef:16:65: + 1f:37:d9:f9:c1:54:c2:d9:18:3f:e9:89:a3:28:6a:ad:fc:a2: + 01:b8:82:d3 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDCJ4eN -dxY3eWq1Xefun6Re9vOeoPmcBRpfZ9hyx4lzpSHV1t85Dffnyx6C7K4V7lq/VxIp -skSLQEvW6qU0BTRfNy4ywO1qDCGsxRaAYZbhguMVYjQjCt7K7kP4OudCXzp59LzP -59rEOtbQX78TWOdpD7w4fAWCqZK46/X7KlPvXRJe3FUSsWZnP3wAiblQ6px/kEgC -QLP1mA1zytj3PQtI/pkSkJI3kzRbdWAcFsKY7C+a+OMfjVbqxjUUZ2Yh5YNpWc7D -pvUelOgUznODUq/t32NY0kUHhxjsfBGFyCK4/7JtBSxwhtFb+YqUInNY8Z6yT+pQ -fnzbLmqrvLVztUk/AgMBAAGjgekwgeYwHQYDVR0OBBYEFAsvGvL3Wei+uSDVcV/T -ocr7iEtlMB8GA1UdIwQYMBaAFKUDS8JgpZ+GACqONjOJsnsXJMK8MD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCl/RLy +h0BcB6d8qHosLJ7evOWOxlWQzl2p5sh9Wp+x9zK0kJyAEqJD+nGVVHZFsyjMkwXx +9OldHU5dGqGtpUtPUHrCzWMs3l1UdAmL0lsfDkm0zswk9J33ymVuWALAjQY1gQGx +LTcHHpsH+qMSazK7mPFBAy8XtVrTvbAqDL4vNCm6h0Sl2bccwP/F3b8heDhxznpU +0ZfZqoaE6ywXv2EbSxBUoqGm7AEE+PPIbC8wFeDalEmYAd7mxARXu/VtCVPh/3aU +zLosdHC3+dQQNYqwjExbX1zb46W2ydW0E3wXd/2sDWX7CqTUDqUuj+8NXMGbAMHd +DU/Dfjs7p0rSmfDjAgMBAAGjgekwgeYwHQYDVR0OBBYEFI73TEymOkra+77e0yTS +VrU9VUMYMB8GA1UdIwQYMBaAFCUd20RBzd52qpY7m1sXJDmGt93gMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAEkWao+FbDY8ctzlgY3rg -/TRGfkQbMkTHfwP7lGiia6F/BsJgjb5l/KNF+RUsFxYlmAOihYi2S02GJq6KC0NG -zcyjKF9EPJKKrvPeApMbt6OObnnVoAnSxGX/G/WAFmYgxx0MrzL/7PakD1N5QQy2 -V5+5G4GcVik+Yvb1dZ+X/wqfXMhY9dDnrcFLumLBo8ZZmgERRkDBVLYjrjNY+QVr -8jINCS5f/3TFfc7JlqWNukzXSTyLE3M2BRJWv/ittXoKgsq8tADSnzmIK7jQwEmK -9jrjPj7+tE4gHmDoy00YgJQmR7++SYot4kFKzcN+I4KQukOmi36zV/jsWTyXOFKg -DQ== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAbim6c9LOE+ioYcwcyWPD +5WJyPb0Z2RDOBFy0GgxSxldN0KctpxGQeHKMHFZP5L5O3m7z4et+nAWG5PIiaXt9 +Q99OqRFNimgzo32bsQScwr/Un3jZj6VRmiCKechASeQw0bmbCV49XpP1hOUrnx5W +HC3vCTSM26C28JGIkWsfToYRtmIzY4sDskDSuCgz4TNdruQMCEurBQhsSrK3zc0o +f0pcTJ36k8cA+kdOAMotK8nt2ugzI7aY8eVvG8yL4ieyHUZTOSlFRhpQlMDnXqTv +o+4TeoGJ4k75Xhzj7v7ZbXuFxpntsDDU7xZlHzfZ+cFUwtkYP+mJoyhqrfyiAbiC +0w== -----END CERTIFICATE----- Certificate: @@ -103,35 +103,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b0:65:a4:4b:a6:56:90:82:42:cf:e8:65:86:d1: - 96:7f:13:8d:b9:46:5a:16:ce:c2:fa:0d:52:ae:93: - 62:dc:72:05:a2:31:b7:29:88:77:31:c3:2e:3f:4d: - 17:16:08:3a:96:d2:49:1b:bf:0f:a0:56:ac:d2:5a: - b8:ff:e3:46:f1:56:83:c3:72:32:8a:7d:f6:55:a5: - 05:8a:68:ca:2e:9b:2a:80:63:4d:fd:46:f2:9f:c9: - 95:43:06:79:c4:88:78:b3:73:fb:05:0c:4f:57:75: - 9c:ef:eb:9f:b3:5e:65:b6:b3:b1:b7:8d:1c:c4:d9: - 03:76:72:4f:b8:4f:dc:36:19:4c:62:d8:0c:e4:c1: - 9b:9f:0c:3e:e2:54:69:f5:a6:53:a1:16:88:be:ee: - a8:3e:20:28:3d:a9:3c:12:41:cc:91:ca:b7:fc:d7: - 15:d3:1c:63:9e:7b:1d:c4:b4:08:65:2e:bc:b5:61: - b8:84:de:3b:69:05:9c:52:6e:60:d1:79:17:36:69: - 06:21:ed:43:07:bf:21:28:0a:6b:48:79:53:21:da: - 02:07:79:b6:30:4c:f2:6f:9f:30:55:a2:20:ae:cf: - 8c:ac:c6:b0:30:b0:01:80:83:ed:b0:5a:9b:92:35: - d9:7d:51:c5:f5:76:1e:c5:53:c1:33:71:41:35:40: - 55:d7 + 00:dd:9f:7d:91:ef:30:35:17:fe:58:20:b0:99:23: + d3:ce:e4:f6:b2:05:82:69:5b:4c:e4:94:40:41:ad: + d6:6b:b3:44:08:50:be:9f:b3:f4:26:d6:10:50:52: + e3:a4:71:bd:3d:ed:f0:a8:30:da:21:06:aa:d9:ae: + 62:51:ed:06:c1:6e:f5:e2:23:a8:62:db:04:b7:0f: + 69:84:39:1f:3d:46:28:ae:a0:56:fe:aa:9b:68:0e: + 30:65:6a:38:f8:a6:66:12:78:99:cc:8e:c9:80:15: + ab:5a:66:75:71:42:4d:8c:32:2c:15:a7:6d:c9:51: + c8:d8:88:28:56:03:e4:ab:98:3b:52:d9:01:f0:4d: + 18:71:cf:d3:82:cb:62:af:6c:12:8a:a2:4b:44:c7: + a7:61:fd:d6:34:89:c6:f0:6e:2c:77:fd:cc:93:a9: + 90:5b:85:e7:46:1c:04:41:3d:df:02:79:c3:e6:98: + 66:28:b0:39:9b:59:ce:5e:8c:d1:63:b1:28:a3:05: + a3:79:93:3a:dd:92:8b:d2:07:15:96:61:27:98:ae: + 53:78:3f:da:79:09:01:e7:dc:03:c4:05:8f:e5:52: + b3:bc:d8:8f:6d:0a:89:21:a6:cf:b5:db:1c:65:67: + 4c:5f:5e:33:24:d7:3c:3e:61:ce:9a:4e:6e:e7:a5: + 30:9f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A5:03:4B:C2:60:A5:9F:86:00:2A:8E:36:33:89:B2:7B:17:24:C2:BC + 25:1D:DB:44:41:CD:DE:76:AA:96:3B:9B:5B:17:24:39:86:B7:DD:E0 X509v3 Authority Key Identifier: - keyid:D4:83:FC:D5:EF:E0:C4:8E:32:6D:A2:30:65:12:B4:CD:3A:B2:95:88 + keyid:63:A2:D5:4E:83:BA:38:5F:50:C5:93:E5:5C:93:9D:DE:55:08:73:A9 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -146,41 +146,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 67:ed:d6:55:16:b2:0d:af:79:6e:53:48:70:4c:93:be:5e:ed: - 50:ea:d7:92:e4:7c:6c:78:05:0c:00:90:15:de:10:18:e5:cc: - 50:24:23:e6:3e:5f:b0:f4:6f:f9:74:44:db:38:d1:45:c5:84: - 59:58:cc:b6:f9:e9:1f:ed:41:e8:b9:aa:4b:d8:6e:88:76:d9: - 2f:44:bf:5d:4f:6e:72:8f:b8:35:d3:e6:a3:a2:ef:3d:e6:f3: - be:90:73:a8:80:ed:72:bb:ac:20:96:38:c6:3f:d1:fe:64:3e: - 1a:ce:21:65:cd:1f:28:54:4a:fb:44:dc:43:cc:b4:61:dd:58: - 83:1b:08:0c:31:f6:bc:bf:02:99:45:16:88:84:68:91:13:aa: - af:f6:6d:4e:8d:dd:26:1d:3a:35:ab:75:7e:f7:64:62:8c:b7: - 34:f9:5b:73:9b:e9:40:12:1c:f2:32:b9:e0:8c:86:fc:f2:b0: - 33:6d:56:f2:a0:f7:9c:ea:d7:45:41:8d:de:49:26:90:45:32: - 35:cf:e2:ce:43:b0:af:28:35:6a:0f:86:87:2b:57:eb:88:92: - 89:7a:9d:b5:f3:3c:46:11:56:2e:fc:73:32:56:a9:4b:c1:87: - f7:f8:46:d5:5d:ad:b2:e7:a2:88:5d:7d:b5:68:b4:ea:a7:1f: - 35:1d:f9:a6 + c5:e9:f1:a5:8e:03:ae:78:a2:51:87:0b:ee:26:02:97:5e:31: + 41:72:f2:7c:00:46:1b:45:51:02:03:4e:16:d0:69:61:e9:7e: + aa:fc:5f:5e:6b:63:99:98:c0:cf:36:96:ae:82:56:70:13:33: + 8d:f2:00:7a:b3:50:c7:15:ad:56:1b:ab:1a:6f:27:a4:e1:65: + da:22:4c:11:32:02:23:30:f8:7c:63:4d:c6:3b:5f:5b:55:37: + 82:29:0d:74:ff:49:4c:10:25:60:4b:3f:e8:06:1f:47:67:38: + 26:df:c4:92:d8:c4:9a:c8:bd:e6:1f:b9:52:2e:70:f7:21:48: + 43:6b:f5:40:07:c7:fd:15:51:80:54:c6:c8:74:14:a9:56:bd: + ad:b4:d4:da:a3:1d:b4:c4:91:73:0a:3d:1e:71:e0:97:e2:d4: + 79:8d:00:42:a7:8a:28:a2:2c:49:94:3f:23:e6:66:75:42:88: + 66:e5:98:14:b0:8d:76:d3:80:32:60:e9:05:18:65:ff:c8:4d: + 3b:ea:b3:d1:77:1b:7f:d1:99:c9:b5:58:72:ea:49:d4:31:68: + 28:2d:04:3c:49:99:f0:3a:74:11:91:0e:82:46:84:c7:54:7c: + 0b:9b:1a:64:ea:e3:9c:d4:c2:b9:90:e8:0e:2c:82:8b:2a:e1: + d1:03:32:77 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsGWkS6ZW -kIJCz+hlhtGWfxONuUZaFs7C+g1SrpNi3HIFojG3KYh3McMuP00XFgg6ltJJG78P -oFas0lq4/+NG8VaDw3Iyin32VaUFimjKLpsqgGNN/Ubyn8mVQwZ5xIh4s3P7BQxP -V3Wc7+ufs15ltrOxt40cxNkDdnJPuE/cNhlMYtgM5MGbnww+4lRp9aZToRaIvu6o -PiAoPak8EkHMkcq3/NcV0xxjnnsdxLQIZS68tWG4hN47aQWcUm5g0XkXNmkGIe1D -B78hKAprSHlTIdoCB3m2MEzyb58wVaIgrs+MrMawMLABgIPtsFqbkjXZfVHF9XYe -xVPBM3FBNUBV1wIDAQABo4HLMIHIMB0GA1UdDgQWBBSlA0vCYKWfhgAqjjYzibJ7 -FyTCvDAfBgNVHSMEGDAWgBTUg/zV7+DEjjJtojBlErTNOrKViDA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3Z99ke8w +NRf+WCCwmSPTzuT2sgWCaVtM5JRAQa3Wa7NECFC+n7P0JtYQUFLjpHG9Pe3wqDDa +IQaq2a5iUe0GwW714iOoYtsEtw9phDkfPUYorqBW/qqbaA4wZWo4+KZmEniZzI7J +gBWrWmZ1cUJNjDIsFadtyVHI2IgoVgPkq5g7UtkB8E0Ycc/Tgstir2wSiqJLRMen +Yf3WNInG8G4sd/3Mk6mQW4XnRhwEQT3fAnnD5phmKLA5m1nOXozRY7EoowWjeZM6 +3ZKL0gcVlmEnmK5TeD/aeQkB59wDxAWP5VKzvNiPbQqJIabPtdscZWdMX14zJNc8 +PmHOmk5u56UwnwIDAQABo4HLMIHIMB0GA1UdDgQWBBQlHdtEQc3edqqWO5tbFyQ5 +hrfd4DAfBgNVHSMEGDAWgBRjotVOg7o4X1DFk+Vck53eVQhzqTA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AGft1lUWsg2veW5TSHBMk75e7VDq15LkfGx4BQwAkBXeEBjlzFAkI+Y+X7D0b/l0 -RNs40UXFhFlYzLb56R/tQei5qkvYboh22S9Ev11PbnKPuDXT5qOi7z3m876Qc6iA -7XK7rCCWOMY/0f5kPhrOIWXNHyhUSvtE3EPMtGHdWIMbCAwx9ry/AplFFoiEaJET -qq/2bU6N3SYdOjWrdX73ZGKMtzT5W3Ob6UASHPIyueCMhvzysDNtVvKg95zq10VB -jd5JJpBFMjXP4s5DsK8oNWoPhocrV+uIkol6nbXzPEYRVi78czJWqUvBh/f4RtVd -rbLnoohdfbVotOqnHzUd+aY= +AMXp8aWOA654olGHC+4mApdeMUFy8nwARhtFUQIDThbQaWHpfqr8X15rY5mYwM82 +lq6CVnATM43yAHqzUMcVrVYbqxpvJ6ThZdoiTBEyAiMw+HxjTcY7X1tVN4IpDXT/ +SUwQJWBLP+gGH0dnOCbfxJLYxJrIveYfuVIucPchSENr9UAHx/0VUYBUxsh0FKlW +va201NqjHbTEkXMKPR5x4Jfi1HmNAEKniiiiLEmUPyPmZnVCiGblmBSwjXbTgDJg +6QUYZf/ITTvqs9F3G3/Rmcm1WHLqSdQxaCgtBDxJmfA6dBGRDoJGhMdUfAubGmTq +45zUwrmQ6A4sgosq4dEDMnc= -----END CERTIFICATE----- Certificate: @@ -197,30 +197,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a6:37:9c:ac:42:96:1c:fb:44:86:df:16:85:d2: - de:49:73:74:b8:5b:3e:8c:34:4b:42:57:7e:7a:9a: - fd:cf:7f:03:c7:39:22:02:3f:44:1b:62:4b:4a:1b: - 9b:d8:8e:7b:a5:b5:92:39:a1:03:bc:3c:1a:1f:5f: - 36:54:9d:b4:6d:98:c2:24:a9:fd:f7:6e:8e:41:18: - e1:9b:ae:ef:61:98:5f:91:53:f0:8a:8e:d4:18:cf: - 4f:dd:ff:75:01:16:10:f1:76:10:28:ba:70:96:8b: - b7:ac:df:17:68:61:03:56:77:e5:bd:04:58:d8:44: - d6:65:21:97:28:46:5d:a3:62:6d:3d:a1:03:6d:da: - f7:46:f5:76:5c:1a:cd:19:b4:25:cd:17:d7:0e:ac: - 6a:3c:d1:35:a0:20:cc:5e:62:7b:e1:11:d6:92:09: - 34:3e:1d:d7:d5:27:b9:3b:5b:42:1e:11:f4:1a:2f: - de:93:81:2f:6b:d1:9f:40:9f:d7:8e:7c:9b:37:7b: - d8:3f:ba:e3:00:d7:f7:3c:20:0e:81:b4:df:cc:46: - 3c:10:0d:04:8a:b5:ef:ba:e7:ec:7e:0b:98:a1:18: - fb:39:db:2c:76:ae:1b:91:94:22:f4:35:b0:1a:73: - 4d:7b:eb:c5:b3:80:80:74:90:79:b9:2f:fd:35:39: - 02:ad + 00:d4:fa:c0:4f:fa:75:57:2e:07:a4:26:6d:43:48: + a2:47:06:03:dd:a3:f2:10:d1:66:21:4f:fa:28:42: + b9:4f:c1:f5:4c:fa:dc:ad:92:30:50:2a:ce:ac:db: + 05:cd:c2:19:26:b8:de:46:0e:ec:14:9b:27:92:71: + bd:e9:a5:28:55:eb:27:71:dc:ff:d7:2b:ea:ed:f0: + 5b:e3:38:bc:35:f8:7b:ec:5d:ba:67:8d:d8:8a:95: + bb:a2:01:32:3e:a6:d2:d3:a2:c7:70:f5:7c:fb:53: + 6f:b8:11:48:af:0c:a0:60:87:98:43:87:ff:d2:c2: + 18:b5:50:67:18:ee:06:8f:80:ff:4b:02:c6:c3:01: + 34:e2:7e:fa:60:62:23:2c:8a:68:ae:5a:0f:ad:1a: + 52:1f:7f:58:ae:9a:50:6e:fb:c7:53:1a:b6:b7:92: + 5d:ba:65:53:4c:73:b4:ed:c5:b5:b4:3a:f6:cb:79: + b3:87:f9:69:ac:29:e5:e4:bb:54:89:bf:45:bf:0c: + b9:83:6c:31:3e:a5:6e:7d:50:f1:68:f8:3d:ca:c2: + 3f:9f:5c:61:35:21:bc:6a:a2:77:2c:53:22:71:2e: + 96:70:f9:c2:c3:f6:3a:8c:3a:a4:00:f9:55:d4:01: + 6e:be:fc:f9:9a:2b:78:7e:3c:25:e9:09:87:47:5e: + a5:4d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - D4:83:FC:D5:EF:E0:C4:8E:32:6D:A2:30:65:12:B4:CD:3A:B2:95:88 + 63:A2:D5:4E:83:BA:38:5F:50:C5:93:E5:5C:93:9D:DE:55:08:73:A9 X509v3 Authority Key Identifier: - keyid:EE:5C:5F:80:3F:59:C4:A6:5B:70:C2:1C:BA:E4:5D:40:F9:E9:60:8D + keyid:F9:8A:EA:DF:3D:59:DD:70:5F:B5:B8:D5:24:99:76:02:DC:6E:30:8F Authority Information Access: CA Issuers - URI:http://url-for-aia/ShadowRoot.cer @@ -235,41 +235,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 8c:2a:1f:ee:90:15:b8:41:8b:cc:b4:45:2b:6f:5b:9e:49:f7: - a1:9f:9e:2a:ce:8a:c3:ae:57:95:62:b5:f2:c9:a4:6a:57:49: - 39:00:32:c4:23:4c:b8:15:21:4a:8f:0a:83:98:d8:ba:83:dc: - da:88:4c:7e:60:21:1a:ed:75:6d:5e:5d:83:90:e0:71:23:13: - 4f:2d:94:c0:fb:91:7f:b6:59:41:d6:b3:3e:42:ef:31:02:23: - 18:a6:d2:9b:00:c6:8c:5a:3d:2c:cb:5e:dc:53:69:ac:71:b8: - 68:90:62:5a:ba:2f:1f:20:9d:77:f3:b0:aa:2e:52:61:a5:60: - 53:5b:5c:ab:c9:56:7e:01:4c:bf:26:ab:13:47:c1:28:72:13: - a5:d8:b8:4c:65:09:9f:7f:a1:67:93:fc:0d:71:a3:4c:1d:3f: - 95:9c:4a:28:8d:52:0d:48:fe:34:04:c2:d2:80:61:86:1c:e6: - 18:cd:bb:62:ca:d2:e6:76:a8:f3:14:e3:41:75:5d:3b:e7:5a: - 29:6c:6e:2c:bc:53:6f:39:e8:82:ab:73:d1:d5:b9:d3:f8:30: - 5c:d7:19:d3:49:11:25:7c:01:3a:2a:a6:7f:19:b3:08:bf:0f: - dc:4f:7b:fa:5b:20:b8:7e:eb:ea:8f:0a:56:c4:16:cd:e1:2b: - a2:bb:66:f0 + ce:fc:9e:82:80:f8:42:20:0d:93:e5:35:7d:8b:44:89:7b:dd: + a6:2b:dd:69:ee:16:da:2c:98:76:31:ae:7e:b3:c2:30:e5:9d: + 6b:be:11:48:70:d8:bd:d6:01:22:93:c7:14:da:0f:46:2f:98: + e7:b1:0b:33:10:75:77:3e:3a:e4:ba:ee:10:98:bd:b3:0a:34: + f7:85:09:d2:73:d4:7f:61:e1:5d:e4:eb:d6:7b:c6:f3:a9:a0: + 4d:15:46:f9:de:c5:31:10:5b:87:c4:58:99:51:64:7e:0b:31: + 22:73:ca:54:34:bd:e6:30:44:0a:59:01:ba:1a:7a:e6:83:76: + 3c:5e:8b:d4:06:72:b6:a8:62:07:eb:01:97:02:2d:69:95:4a: + 2b:77:27:a3:30:e5:22:7d:96:81:c9:ba:90:22:f4:fe:6c:bc: + a2:eb:96:81:4c:1a:83:4f:af:9e:21:77:5e:68:87:f3:eb:f8: + 10:7d:38:00:9b:83:0c:2d:9f:7f:b8:93:23:c4:f4:b2:77:c7: + cf:1d:bb:12:e4:30:f3:bb:5c:ec:82:1c:47:bf:31:93:93:b2: + a0:6f:f8:d2:ec:67:7e:95:4e:f5:eb:d4:64:c5:32:2c:0f:b4: + 6c:e4:64:ef:b5:a5:07:cf:f8:b2:f1:c9:67:10:e6:1a:0d:a3: + 9c:44:65:6e -----BEGIN TRUSTED_CERTIFICATE----- MIIDdzCCAl+gAwIBAgIBAjANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDDApTaGFk b3dSb290MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UE -AwwEUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKY3nKxClhz7 -RIbfFoXS3klzdLhbPow0S0JXfnqa/c9/A8c5IgI/RBtiS0obm9iOe6W1kjmhA7w8 -Gh9fNlSdtG2YwiSp/fdujkEY4Zuu72GYX5FT8IqO1BjPT93/dQEWEPF2ECi6cJaL -t6zfF2hhA1Z35b0EWNhE1mUhlyhGXaNibT2hA23a90b1dlwazRm0Jc0X1w6sajzR -NaAgzF5ie+ER1pIJND4d19UnuTtbQh4R9Bov3pOBL2vRn0Cf1458mzd72D+64wDX -9zwgDoG038xGPBANBIq177rn7H4LmKEY+znbLHauG5GUIvQ1sBpzTXvrxbOAgHSQ -ebkv/TU5Aq0CAwEAAaOB1zCB1DAdBgNVHQ4EFgQU1IP81e/gxI4ybaIwZRK0zTqy -lYgwHwYDVR0jBBgwFoAU7lxfgD9ZxKZbcMIcuuRdQPnpYI0wPQYIKwYBBQUHAQEE +AwwEUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANT6wE/6dVcu +B6QmbUNIokcGA92j8hDRZiFP+ihCuU/B9Uz63K2SMFAqzqzbBc3CGSa43kYO7BSb +J5JxvemlKFXrJ3Hc/9cr6u3wW+M4vDX4e+xdumeN2IqVu6IBMj6m0tOix3D1fPtT +b7gRSK8MoGCHmEOH/9LCGLVQZxjuBo+A/0sCxsMBNOJ++mBiIyyKaK5aD60aUh9/ +WK6aUG77x1MatreSXbplU0xztO3FtbQ69st5s4f5aawp5eS7VIm/Rb8MuYNsMT6l +bn1Q8Wj4PcrCP59cYTUhvGqidyxTInEulnD5wsP2Oow6pAD5VdQBbr78+ZoreH48 +JekJh0depU0CAwEAAaOB1zCB1DAdBgNVHQ4EFgQUY6LVToO6OF9QxZPlXJOd3lUI +c6kwHwYDVR0jBBgwFoAU+Yrq3z1Z3XBftbjVJJl2AtxuMI8wPQYIKwYBBQUHAQEE MTAvMC0GCCsGAQUFBzAChiFodHRwOi8vdXJsLWZvci1haWEvU2hhZG93Um9vdC5j ZXIwMgYDVR0fBCswKTAnoCWgI4YhaHR0cDovL3VybC1mb3ItY3JsL1NoYWRvd1Jv b3QuY3JsMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3 -DQEBCwUAA4IBAQCMKh/ukBW4QYvMtEUrb1ueSfehn54qzorDrleVYrXyyaRqV0k5 -ADLEI0y4FSFKjwqDmNi6g9zaiEx+YCEa7XVtXl2DkOBxIxNPLZTA+5F/tllB1rM+ -Qu8xAiMYptKbAMaMWj0sy17cU2mscbhokGJaui8fIJ1387CqLlJhpWBTW1yryVZ+ -AUy/JqsTR8EochOl2LhMZQmff6Fnk/wNcaNMHT+VnEoojVINSP40BMLSgGGGHOYY -zbtiytLmdqjzFONBdV0751opbG4svFNvOeiCq3PR1bnT+DBc1xnTSRElfAE6KqZ/ -GbMIvw/cT3v6WyC4fuvqjwpWxBbN4Suiu2bw +DQEBCwUAA4IBAQDO/J6CgPhCIA2T5TV9i0SJe92mK91p7hbaLJh2Ma5+s8Iw5Z1r +vhFIcNi91gEik8cU2g9GL5jnsQszEHV3Pjrkuu4QmL2zCjT3hQnSc9R/YeFd5OvW +e8bzqaBNFUb53sUxEFuHxFiZUWR+CzEic8pUNL3mMEQKWQG6Gnrmg3Y8XovUBnK2 +qGIH6wGXAi1plUordyejMOUifZaBybqQIvT+bLyi65aBTBqDT6+eIXdeaIfz6/gQ +fTgAm4MMLZ9/uJMjxPSyd8fPHbsS5DDzu1zsghxHvzGTk7Kgb/jS7Gd+lU7169Rk +xTIsD7Rs5GTvtaUHz/iy8clnEOYaDaOcRGVu -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-and-intermediary.pem b/net/data/verify_certificate_chain_unittest/target-and-intermediary.pem deleted file mode 100644 index 51446ab..0000000 --- a/net/data/verify_certificate_chain_unittest/target-and-intermediary.pem +++ /dev/null
@@ -1,280 +0,0 @@ -[Created by: generate-target-and-intermediary.py] - -Certificate chain with 1 intermediary and a trusted root. Verification is -expected to succeed. - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Target - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:dc:50:a0:d0:af:3b:b6:d5:af:48:be:31:08:db: - 91:81:c5:c8:d7:22:88:d4:74:1e:12:de:7a:79:79: - 10:71:de:b5:8a:4e:d1:1d:46:6b:46:62:e8:de:f8: - 01:f5:9d:6b:35:f6:a6:b7:f2:7f:4c:5f:f9:ad:10: - f6:7e:9c:87:dc:27:e5:3f:19:1c:f0:c5:69:06:51: - 96:bf:d0:c5:ef:b8:e3:2c:47:6a:8f:44:68:70:ed: - 18:b9:f1:85:7b:2e:42:bc:44:5d:e3:d3:df:95:93: - 8c:1d:ad:bc:9e:45:ad:6e:4f:78:68:6e:8f:ee:16: - a9:6e:9d:50:6b:9c:72:a0:d7:fe:ff:68:4b:1c:df: - 18:fd:26:fb:65:be:c9:63:30:30:15:7d:f9:83:95: - c4:5e:2e:e5:d1:f0:ce:9c:5e:4a:6c:ec:6f:26:f6: - 79:38:bc:15:e2:50:68:f0:46:c2:7f:7d:0a:c2:79: - 08:b7:ea:41:18:d5:65:29:3e:6d:bb:80:8e:a2:0d: - c3:c4:8a:e2:dd:3c:19:01:e9:ea:0c:bb:db:6c:c7: - ed:6d:c5:7e:78:5f:5d:e2:87:d9:fa:90:3a:1d:c3: - b6:d8:7f:78:77:7b:e8:2c:bb:ed:04:18:72:a7:0f: - b2:ef:96:65:b4:39:a0:e9:59:b3:64:f4:db:9d:53: - 42:9f - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 86:F0:37:63:2C:67:7D:F8:D4:71:4D:9B:A3:47:47:BA:F5:F0:0E:90 - X509v3 Authority Key Identifier: - keyid:42:1A:C3:C4:D6:79:39:E2:20:E5:63:13:EB:41:7B:8C:0E:28:72:8E - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Intermediary.crl - - X509v3 Key Usage: critical - Digital Signature, Key Encipherment - X509v3 Extended Key Usage: - TLS Web Server Authentication, TLS Web Client Authentication - Signature Algorithm: sha256WithRSAEncryption - 4e:86:be:e0:4b:d5:15:99:49:09:6c:9a:6d:9a:82:e2:41:3e: - 99:a5:e3:23:dd:43:d7:22:8d:c6:4f:4c:51:47:cb:32:44:b8: - 3a:f0:b6:88:0c:fd:08:d1:ea:0d:b0:72:fe:a0:48:6b:5d:a2: - 9e:f2:2d:12:6a:bf:68:ce:2e:d0:35:5f:da:32:c9:74:4b:29: - 53:81:69:a1:a1:1a:de:c8:5e:c1:73:21:b6:02:81:d8:57:ef: - 68:c3:24:f7:05:fa:ae:ed:d7:8a:62:e3:09:bf:fc:d0:41:93: - e8:12:a5:fc:c3:46:d8:2b:f6:e3:cc:36:a7:39:cd:32:9e:9d: - e1:79:68:ff:15:b9:10:5f:86:ad:4d:a0:dc:60:2f:1f:36:6f: - d3:7a:60:81:c5:38:71:d0:fa:28:ae:ba:80:0e:cf:9c:ef:4d: - 1f:d4:0c:27:0f:55:a8:49:65:c1:d6:af:6d:b1:1d:fb:90:38: - ad:8b:5e:ba:82:68:60:2a:e4:7a:b8:07:aa:91:37:84:d6:18: - 38:ba:37:a6:d9:bb:3b:45:da:59:8c:c5:90:11:1d:85:fe:af: - fa:62:87:84:5d:5a:90:91:c3:6c:53:e1:d3:74:e7:51:19:b6: - b5:e7:12:1a:73:35:34:16:dd:e4:31:62:58:de:3a:fb:40:80: - 21:4f:f5:13 ------BEGIN CERTIFICATE----- -MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDcUKDQ -rzu21a9IvjEI25GBxcjXIojUdB4S3np5eRBx3rWKTtEdRmtGYuje+AH1nWs19qa3 -8n9MX/mtEPZ+nIfcJ+U/GRzwxWkGUZa/0MXvuOMsR2qPRGhw7Ri58YV7LkK8RF3j -09+Vk4wdrbyeRa1uT3hobo/uFqlunVBrnHKg1/7/aEsc3xj9JvtlvsljMDAVffmD -lcReLuXR8M6cXkps7G8m9nk4vBXiUGjwRsJ/fQrCeQi36kEY1WUpPm27gI6iDcPE -iuLdPBkB6eoMu9tsx+1txX54X13ih9n6kDodw7bYf3h3e+gsu+0EGHKnD7LvlmW0 -OaDpWbNk9NudU0KfAgMBAAGjgekwgeYwHQYDVR0OBBYEFIbwN2MsZ3341HFNm6NH -R7r18A6QMB8GA1UdIwQYMBaAFEIaw8TWeTniIOVjE+tBe4wOKHKOMD8GCCsGAQUF -BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAToa+4EvVFZlJCWyabZqC -4kE+maXjI91D1yKNxk9MUUfLMkS4OvC2iAz9CNHqDbBy/qBIa12invItEmq/aM4u -0DVf2jLJdEspU4FpoaEa3shewXMhtgKB2FfvaMMk9wX6ru3XimLjCb/80EGT6BKl -/MNG2Cv248w2pznNMp6d4Xlo/xW5EF+GrU2g3GAvHzZv03pggcU4cdD6KK66gA7P -nO9NH9QMJw9VqEllwdavbbEd+5A4rYteuoJoYCrkergHqpE3hNYYOLo3ptm7O0Xa -WYzFkBEdhf6v+mKHhF1akJHDbFPh03TnURm2tecSGnM1NBbd5DFiWN46+0CAIU/1 -Ew== ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:a4:16:0d:45:92:8b:7b:8e:42:07:a1:f4:01:dc: - 31:0e:68:b4:3f:f3:b7:0d:8f:08:f4:f0:bb:2b:45: - 37:98:b4:3b:6f:61:7c:23:2e:6e:cf:33:a3:d1:09: - 16:74:3f:ac:4f:59:f1:92:42:35:e6:8a:e9:98:5e: - 39:a2:0d:45:26:8f:7d:bb:ad:bf:f8:66:a3:b0:eb: - 7f:eb:79:60:9a:70:03:5d:9f:46:a8:47:64:7d:a9: - eb:a7:7d:77:60:3a:f5:5f:e8:bc:54:f3:d7:25:5e: - 5b:62:3a:4a:df:f3:21:df:e4:bc:89:69:26:fa:d7: - 24:16:f1:06:d0:57:a1:a0:aa:f2:bd:9f:0c:59:50: - 57:c2:5d:25:24:05:eb:91:58:bb:1a:82:df:eb:03: - ec:55:ed:d4:46:b5:fe:2e:fa:08:14:d7:76:71:99: - 2b:34:10:2d:20:21:ed:78:91:f9:05:04:14:42:a0: - ed:95:46:a3:a2:e6:55:1e:87:0b:1b:57:8e:e4:7c: - c5:c5:39:83:b1:c6:91:e1:54:8a:6f:6a:9b:a5:80: - 93:ec:00:81:6f:20:70:6c:31:95:42:76:a3:82:17: - d8:d2:ff:3a:09:53:be:76:ea:e1:a9:fb:a9:a5:5f: - 2b:5f:f9:5a:78:97:2e:f9:9d:31:42:2a:f9:1c:26: - 16:7d - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 42:1A:C3:C4:D6:79:39:E2:20:E5:63:13:EB:41:7B:8C:0E:28:72:8E - X509v3 Authority Key Identifier: - keyid:FE:3F:EE:E8:53:09:31:CA:D4:66:C1:C7:FE:E0:74:C3:D7:81:44:5F - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - af:11:72:82:33:e5:f9:b1:10:fc:c2:4a:9e:c8:8e:b4:16:51: - 62:8d:b5:e3:e3:c7:30:32:52:52:55:aa:6b:c4:c2:67:de:71: - 37:2d:85:68:80:c8:b7:9b:4b:05:6f:97:e1:82:03:f4:b7:07: - b8:c2:a8:02:7a:60:34:c8:07:9b:7e:c3:02:bd:11:26:51:b4: - 4d:e2:6c:e4:38:bc:4c:e7:35:91:24:f1:40:6e:69:7f:ac:b4: - ee:12:8a:1c:41:f6:96:13:93:67:c4:11:18:67:80:e6:41:ef: - 2b:3e:47:1a:57:b1:66:ac:87:93:ed:6c:fe:a2:c4:5a:47:75: - d0:1b:01:b6:74:b6:f8:7b:aa:e3:91:c3:45:56:2b:a4:d2:67: - 94:18:71:e7:ea:41:14:bb:12:4e:56:d8:5a:95:89:bc:e6:89: - be:9a:03:8c:b8:2b:18:56:7c:41:db:2d:e3:86:b5:de:aa:cb: - 11:da:91:8f:f2:75:1d:d2:b6:0b:bd:d6:b5:65:a5:96:1a:44: - fd:66:80:89:bf:a5:a9:c4:fb:3f:2b:cc:f5:e7:a6:e6:bd:5f: - e3:df:51:76:e3:e8:1c:e5:53:e9:6e:cf:e8:54:5f:f3:7f:ca: - 3a:b2:b2:07:7d:6c:29:a9:01:17:cf:f9:e8:0a:13:88:13:d3: - ad:ac:be:ad ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApBYNRZKL -e45CB6H0AdwxDmi0P/O3DY8I9PC7K0U3mLQ7b2F8Iy5uzzOj0QkWdD+sT1nxkkI1 -5orpmF45og1FJo99u62/+GajsOt/63lgmnADXZ9GqEdkfanrp313YDr1X+i8VPPX -JV5bYjpK3/Mh3+S8iWkm+tckFvEG0FehoKryvZ8MWVBXwl0lJAXrkVi7GoLf6wPs -Ve3URrX+LvoIFNd2cZkrNBAtICHteJH5BQQUQqDtlUajouZVHocLG1eO5HzFxTmD -scaR4VSKb2qbpYCT7ACBbyBwbDGVQnajghfY0v86CVO+durhqfuppV8rX/laeJcu -+Z0xQir5HCYWfQIDAQABo4HLMIHIMB0GA1UdDgQWBBRCGsPE1nk54iDlYxPrQXuM -DihyjjAfBgNVHSMEGDAWgBT+P+7oUwkxytRmwcf+4HTD14FEXzA3BggrBgEFBQcB -AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs -BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD -VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AK8RcoIz5fmxEPzCSp7IjrQWUWKNtePjxzAyUlJVqmvEwmfecTcthWiAyLebSwVv -l+GCA/S3B7jCqAJ6YDTIB5t+wwK9ESZRtE3ibOQ4vEznNZEk8UBuaX+stO4SihxB -9pYTk2fEERhngOZB7ys+RxpXsWash5PtbP6ixFpHddAbAbZ0tvh7quORw0VWK6TS -Z5QYcefqQRS7Ek5W2FqVibzmib6aA4y4KxhWfEHbLeOGtd6qyxHakY/ydR3Stgu9 -1rVlpZYaRP1mgIm/panE+z8rzPXnpua9X+PfUXbj6BzlU+luz+hUX/N/yjqysgd9 -bCmpARfP+egKE4gT062svq0= ------END CERTIFICATE----- - -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Root - Validity - Not Before: Jan 1 12:00:00 2015 GMT - Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:ea:28:d6:83:e1:ad:7f:df:9a:70:91:b6:2a:45: - 28:bb:1a:00:d2:1f:0c:6e:14:10:27:c0:65:c9:90: - 40:45:83:6c:af:9a:66:ed:cb:59:2f:f7:82:67:74: - aa:1d:73:ec:f3:98:cb:38:9c:f6:6b:4f:bc:6b:5d: - f7:15:89:ed:02:f8:ed:17:69:df:a2:8d:ee:f5:d1: - 84:92:42:b8:9f:fe:77:fd:d5:06:7b:6f:59:8a:2a: - c7:32:f5:ff:ad:f9:8a:59:e7:93:11:79:fe:f6:2a: - cb:99:db:a9:d7:05:a8:be:af:db:2e:b1:8a:56:8e: - f7:ec:b4:b0:a3:a4:96:39:79:69:3c:3b:ce:fe:42: - 15:a8:56:bb:88:94:42:a5:0b:04:b4:e9:fa:c9:1a: - 14:7d:c0:82:d5:d8:3a:de:ec:6f:a6:be:5c:43:6d: - 85:f8:84:57:cd:06:b0:e1:63:a5:ab:05:14:2f:2d: - fb:04:99:fb:7e:ce:06:cf:3b:29:27:7a:70:1a:6b: - fb:6a:f3:a6:23:31:dd:93:80:67:b9:09:03:92:e2: - a9:c4:71:85:1b:a5:f9:1c:ff:86:b0:72:e3:23:58: - 15:6c:4e:55:7f:89:91:35:0a:b3:41:ba:3c:17:76: - da:e6:39:6e:58:92:67:9d:06:c5:c8:84:e0:61:49: - ea:b3 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - FE:3F:EE:E8:53:09:31:CA:D4:66:C1:C7:FE:E0:74:C3:D7:81:44:5F - X509v3 Authority Key Identifier: - keyid:FE:3F:EE:E8:53:09:31:CA:D4:66:C1:C7:FE:E0:74:C3:D7:81:44:5F - - Authority Information Access: - CA Issuers - URI:http://url-for-aia/Root.cer - - X509v3 CRL Distribution Points: - - Full Name: - URI:http://url-for-crl/Root.crl - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha256WithRSAEncryption - 9f:ae:51:c1:f5:31:bf:30:6c:e1:b5:38:07:b5:c2:56:38:6b: - 3c:f3:49:50:93:5f:75:9e:94:15:5c:15:0a:91:87:6a:c1:fa: - 36:d6:4a:72:6f:cd:8c:9d:77:e7:61:96:14:88:4f:b2:71:d7: - 81:8f:06:9f:c7:14:49:0c:de:7c:73:ba:00:c8:44:58:ac:0a: - 4b:27:bb:3d:cb:fd:4d:14:dd:f7:61:b7:a0:f4:00:8a:ff:54: - 6b:c0:6a:6d:21:43:b8:9b:cb:f9:ad:9d:fe:2a:09:3d:a1:dd: - de:17:7d:6f:74:44:79:0c:12:4e:d0:68:4f:b2:35:60:ef:95: - da:a5:25:f8:e4:4c:ea:83:38:c1:26:83:db:13:78:58:1c:50: - e3:20:93:b0:c8:5e:a0:76:5f:c2:fe:cc:16:3d:f6:2f:33:08: - fe:61:af:57:cd:c6:ae:8a:d2:7b:98:e8:eb:98:9b:89:ff:47: - 24:d6:bf:a3:29:f6:e3:7e:e2:08:0b:a6:06:11:36:07:ea:61: - 5f:58:16:d3:c1:29:b4:c8:39:7c:32:98:17:82:e7:8c:0f:2e: - 34:bc:a3:78:62:15:29:95:4e:ca:c4:40:8b:29:2e:5c:8c:9b: - 14:ee:90:68:08:91:ef:64:fe:8f:61:89:cd:6b:44:dd:24:cf: - 7c:3d:a3:86 ------BEGIN TRUSTED_CERTIFICATE----- -MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 -MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOoo1oPhrX/fmnCRtipF -KLsaANIfDG4UECfAZcmQQEWDbK+aZu3LWS/3gmd0qh1z7POYyzic9mtPvGtd9xWJ -7QL47Rdp36KN7vXRhJJCuJ/+d/3VBntvWYoqxzL1/635ilnnkxF5/vYqy5nbqdcF -qL6v2y6xilaO9+y0sKOkljl5aTw7zv5CFahWu4iUQqULBLTp+skaFH3AgtXYOt7s -b6a+XENthfiEV80GsOFjpasFFC8t+wSZ+37OBs87KSd6cBpr+2rzpiMx3ZOAZ7kJ -A5LiqcRxhRul+Rz/hrBy4yNYFWxOVX+JkTUKs0G6PBd22uY5bliSZ50GxciE4GFJ -6rMCAwEAAaOByzCByDAdBgNVHQ4EFgQU/j/u6FMJMcrUZsHH/uB0w9eBRF8wHwYD -VR0jBBgwFoAU/j/u6FMJMcrUZsHH/uB0w9eBRF8wNwYIKwYBBQUHAQEEKzApMCcG -CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw -IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCfrlHB9TG/ -MGzhtTgHtcJWOGs880lQk191npQVXBUKkYdqwfo21kpyb82MnXfnYZYUiE+ycdeB -jwafxxRJDN58c7oAyERYrApLJ7s9y/1NFN33Ybeg9ACK/1RrwGptIUO4m8v5rZ3+ -Kgk9od3eF31vdER5DBJO0GhPsjVg75XapSX45EzqgzjBJoPbE3hYHFDjIJOwyF6g -dl/C/swWPfYvMwj+Ya9XzcauitJ7mOjrmJuJ/0ck1r+jKfbjfuIIC6YGETYH6mFf -WBbTwSm0yDl8MpgXgueMDy40vKN4YhUplU7KxECLKS5cjJsU7pBoCJHvZP6PYYnN -a0TdJM98PaOG ------END TRUSTED_CERTIFICATE----- - ------BEGIN TIME----- -MTUwMzAyMTIwMDAwWg== ------END TIME----- - ------BEGIN VERIFY_RESULT----- -U1VDQ0VTUw== ------END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/target-and-intermediate.pem b/net/data/verify_certificate_chain_unittest/target-and-intermediate.pem new file mode 100644 index 0000000..89ff641c --- /dev/null +++ b/net/data/verify_certificate_chain_unittest/target-and-intermediate.pem
@@ -0,0 +1,280 @@ +[Created by: generate-target-and-intermediate.py] + +Certificate chain with 1 intermediate and a trusted root. Verification is +expected to succeed. + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Target + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:99:a4:c0:d4:dd:a9:aa:60:8b:ae:df:d6:20:ae: + b9:f2:f2:ae:44:0e:1f:13:9c:cc:bb:03:81:36:91: + 75:72:b4:f8:36:61:2b:7d:70:a9:da:e5:35:7e:e5: + 39:a6:fa:da:45:37:fd:77:04:af:21:c3:43:c4:15: + 9e:07:a1:4e:19:04:66:e7:bf:ae:76:b1:95:8a:9b: + b8:79:12:b7:ca:d3:ec:72:16:4b:47:08:89:1f:d5: + 5d:cf:e2:a6:1e:c3:c9:28:54:41:f6:68:e4:01:a9: + df:4a:f1:ab:d5:45:26:1a:4e:f9:f7:11:1e:c2:43: + 52:d9:2e:95:52:35:71:dc:6a:eb:56:ee:81:73:6a: + 86:5b:bd:4f:a6:8f:4b:b3:4e:35:06:d5:35:8a:aa: + d5:f7:bd:6a:e1:79:6a:61:37:dc:a8:06:d9:5a:31: + ea:3b:2e:8c:8f:de:1e:47:02:c7:ca:27:00:b9:49: + 7b:29:c4:f4:82:f2:bc:58:52:bb:f2:36:1c:10:4f: + a7:93:fa:46:d0:92:80:15:e7:b9:da:1d:70:21:2b: + 9c:47:9c:17:5a:26:2d:94:8a:ce:ae:ba:ac:cb:31: + 96:a9:e8:9e:51:73:4f:8c:bf:8c:57:d8:c8:61:0e: + c0:45:09:e4:56:a0:47:f9:df:97:af:9c:76:63:54: + c6:9b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 05:BE:F6:16:F8:E7:6A:1B:E6:6D:6D:5A:A4:AF:01:89:8B:98:88:E3 + X509v3 Authority Key Identifier: + keyid:6E:35:75:BC:3A:85:BC:B6:F7:B8:01:75:BD:9E:A8:36:8D:1E:C7:D9 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + a4:7d:30:26:06:98:4b:33:c7:b7:84:04:cb:1b:1f:29:1c:b4: + 44:6e:6f:b2:5e:40:ce:e9:5d:e5:3d:ed:5c:a4:34:67:08:c0: + 10:55:f3:c8:90:43:65:d9:fc:b9:64:43:1a:fc:cb:6c:3f:fc: + 2a:48:87:60:6b:95:a6:4f:d6:6f:ac:e3:39:19:54:5d:96:6b: + 80:15:db:e3:9f:84:90:4d:23:b1:74:f2:f8:d1:4e:8e:6b:05: + 2c:28:94:05:03:90:04:98:08:e3:73:34:b6:05:1e:8e:b0:52: + 33:cf:41:ff:99:cd:26:70:12:b1:0a:5c:c7:ed:d3:87:be:fa: + f1:24:34:42:22:35:a0:e5:7c:ef:18:b8:61:ce:a1:0a:99:7a: + 2d:3f:b9:48:36:a2:3c:5e:70:e4:36:32:a2:9d:1d:3a:37:fa: + bf:e4:b4:89:0d:48:e7:9d:f5:9f:48:13:ec:6a:8b:e6:b3:3f: + 23:f7:94:b1:2d:cf:b4:26:f4:1b:b5:01:3b:92:bb:63:4e:d6: + ee:ed:c0:2e:77:53:5b:3e:a5:8c:c6:b9:40:67:bb:cd:67:65: + 6b:41:46:7e:90:f9:2a:a7:5f:09:92:37:13:23:19:2d:66:cb: + 73:7e:a3:42:dd:da:ed:f6:08:8a:8a:97:ef:4b:f7:5d:22:81: + 82:95:87:7c +-----BEGIN CERTIFICATE----- +MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCZpMDU +3amqYIuu39Ygrrny8q5EDh8TnMy7A4E2kXVytPg2YSt9cKna5TV+5Tmm+tpFN/13 +BK8hw0PEFZ4HoU4ZBGbnv652sZWKm7h5ErfK0+xyFktHCIkf1V3P4qYew8koVEH2 +aOQBqd9K8avVRSYaTvn3ER7CQ1LZLpVSNXHcautW7oFzaoZbvU+mj0uzTjUG1TWK +qtX3vWrheWphN9yoBtlaMeo7LoyP3h5HAsfKJwC5SXspxPSC8rxYUrvyNhwQT6eT ++kbQkoAV57naHXAhK5xHnBdaJi2Uis6uuqzLMZap6J5Rc0+Mv4xX2MhhDsBFCeRW +oEf535evnHZjVMabAgMBAAGjgekwgeYwHQYDVR0OBBYEFAW+9hb452ob5m1tWqSv +AYmLmIjjMB8GA1UdIwQYMBaAFG41dbw6hby297gBdb2eqDaNHsfZMD8GCCsGAQUF +BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEApH0wJgaYSzPHt4QEyxsf +KRy0RG5vsl5Azuld5T3tXKQ0ZwjAEFXzyJBDZdn8uWRDGvzLbD/8KkiHYGuVpk/W +b6zjORlUXZZrgBXb45+EkE0jsXTy+NFOjmsFLCiUBQOQBJgI43M0tgUejrBSM89B +/5nNJnASsQpcx+3Th7768SQ0QiI1oOV87xi4Yc6hCpl6LT+5SDaiPF5w5DYyop0d +Ojf6v+S0iQ1I5531n0gT7GqL5rM/I/eUsS3PtCb0G7UBO5K7Y07W7u3ALndTWz6l +jMa5QGe7zWdla0FGfpD5KqdfCZI3EyMZLWbLc36jQt3a7fYIioqX70v3XSKBgpWH +fA== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:d2:ee:b5:26:40:84:3d:98:ee:bc:3e:62:1a:09: + 5e:53:b1:72:28:f6:70:c0:a1:08:65:6f:54:24:4c: + fc:bf:fe:14:25:fa:5d:a5:17:f1:00:64:b3:33:6f: + 09:3a:0f:cc:25:87:f6:20:e4:f4:49:f3:5a:5d:a4: + d5:02:e7:db:20:c9:66:b4:cf:44:4d:58:4b:48:13: + 7b:83:60:14:28:f7:5a:5b:f8:f5:34:40:81:32:bd: + d2:8c:34:4f:d6:5d:5f:65:dd:74:56:7a:07:7a:82: + c3:0b:42:d5:cb:09:30:76:41:6e:08:28:ad:0c:27: + 51:9c:86:e1:fe:e8:85:68:aa:59:d0:f8:39:c2:59: + 6e:95:90:de:c9:f8:df:77:5e:56:3f:d5:9d:f8:09: + 29:ed:7c:cc:92:e7:c3:40:27:76:fc:08:4f:ae:98: + c9:7c:95:43:05:cc:1f:f5:b2:0b:51:ec:09:cd:22: + 3d:7e:e4:5a:b9:4f:86:62:76:d7:c0:42:23:bb:97: + e1:b3:ae:af:9d:56:89:00:68:01:b0:cb:11:cc:f4: + ea:cd:1e:7d:32:81:d9:93:20:00:22:ed:31:78:3c: + 62:de:73:3f:1d:38:17:4e:04:a2:58:45:36:26:95: + 93:ab:36:f1:54:01:81:b1:c2:70:f5:06:17:47:40: + 0e:fb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 6E:35:75:BC:3A:85:BC:B6:F7:B8:01:75:BD:9E:A8:36:8D:1E:C7:D9 + X509v3 Authority Key Identifier: + keyid:4F:DE:F3:E5:5E:F5:98:0D:CA:3A:20:2B:E9:C8:B4:5D:D0:1D:86:BF + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 10:e4:01:2e:8b:a4:ea:e0:cc:ac:c2:57:68:b7:97:98:e2:57: + d6:ff:e2:70:d9:de:bd:7e:44:59:da:3c:cc:1e:62:5d:a8:77: + 70:b5:fc:4c:21:50:b1:5f:4d:d8:dc:18:bf:d7:1e:40:fa:11: + 8e:40:e6:b8:38:87:a3:10:ed:97:93:ae:a6:7f:6c:cf:75:43: + e1:88:b9:84:b3:f3:73:05:fb:24:de:2b:f1:20:65:3f:70:25: + 87:4d:e0:66:73:ca:29:52:60:88:e9:e3:5f:cc:2b:83:1c:b3: + 8c:4d:12:7b:35:70:fd:d1:1a:08:85:94:77:39:3c:b0:c5:d7: + 7e:a5:71:f3:ca:a7:98:30:69:62:f6:96:d4:f9:30:07:aa:56: + da:ba:16:fc:1b:57:24:a0:f1:84:e2:4a:a2:97:a4:a1:82:05: + 1a:02:c7:41:2f:98:c8:e5:27:b4:85:98:72:d0:a0:e1:b5:c1: + 57:ab:aa:6b:71:79:d0:4d:91:68:18:25:f8:b4:b7:cb:1d:0c: + 74:6a:77:66:48:3f:24:b0:92:d9:22:6f:6e:54:b7:f8:8c:21: + 57:0e:a9:cc:52:ff:56:2e:42:fa:08:2e:fe:29:3c:f1:86:8b: + 74:88:68:82:3f:16:2d:06:12:57:a6:e2:b1:b7:1b:5d:3a:a1: + 75:c7:24:d7 +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0u61JkCE +PZjuvD5iGgleU7FyKPZwwKEIZW9UJEz8v/4UJfpdpRfxAGSzM28JOg/MJYf2IOT0 +SfNaXaTVAufbIMlmtM9ETVhLSBN7g2AUKPdaW/j1NECBMr3SjDRP1l1fZd10VnoH +eoLDC0LVywkwdkFuCCitDCdRnIbh/uiFaKpZ0Pg5wllulZDeyfjfd15WP9Wd+Akp +7XzMkufDQCd2/AhPrpjJfJVDBcwf9bILUewJzSI9fuRauU+GYnbXwEIju5fhs66v +nVaJAGgBsMsRzPTqzR59MoHZkyAAIu0xeDxi3nM/HTgXTgSiWEU2JpWTqzbxVAGB +scJw9QYXR0AO+wIDAQABo4HLMIHIMB0GA1UdDgQWBBRuNXW8OoW8tve4AXW9nqg2 +jR7H2TAfBgNVHSMEGDAWgBRP3vPlXvWYDco6ICvpyLRd0B2GvzA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +ABDkAS6LpOrgzKzCV2i3l5jiV9b/4nDZ3r1+RFnaPMweYl2od3C1/EwhULFfTdjc +GL/XHkD6EY5A5rg4h6MQ7ZeTrqZ/bM91Q+GIuYSz83MF+yTeK/EgZT9wJYdN4GZz +yilSYIjp41/MK4Mcs4xNEns1cP3RGgiFlHc5PLDF136lcfPKp5gwaWL2ltT5MAeq +Vtq6FvwbVySg8YTiSqKXpKGCBRoCx0EvmMjlJ7SFmHLQoOG1wVerqmtxedBNkWgY +Jfi0t8sdDHRqd2ZIPySwktkib25Ut/iMIVcOqcxS/1YuQvoILv4pPPGGi3SIaII/ +Fi0GElem4rG3G106oXXHJNc= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2016 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ba:0d:d2:51:af:0c:48:94:37:cf:ea:83:8f:d6: + 39:b5:c9:58:fe:59:5b:e5:61:b6:21:98:86:16:a0: + 85:e6:cd:c8:21:81:65:4c:65:97:55:72:76:2f:c6: + 0d:25:f8:c8:28:9f:20:d1:56:4c:06:99:ff:6d:0f: + 24:d3:92:f1:31:25:5a:13:6c:be:4b:19:6a:65:af: + 2f:32:be:a9:0f:f8:9b:6d:6f:10:7c:e9:24:61:4d: + fe:ba:e9:b5:b4:54:5e:82:f7:02:7a:e2:e2:d7:53: + 6a:69:f4:9a:41:27:0f:50:dc:64:a1:47:84:53:3f: + f1:38:cd:80:a3:5a:2b:dd:96:81:8a:ea:e3:94:72: + f7:aa:f8:2f:cc:a9:d0:9e:36:9f:56:0c:45:ec:dd: + 6a:05:52:85:60:99:d7:94:9f:76:7e:1d:8f:3f:50: + fb:33:bc:ca:f8:10:2e:db:15:b2:49:57:d8:f4:59: + fa:73:3b:03:32:86:a7:f1:46:a1:62:ac:67:10:73: + 70:51:07:ff:d2:04:33:d8:7c:e2:a8:ff:8e:53:24: + e8:e4:96:da:fb:d1:ea:2f:9c:a9:b5:8f:c5:50:fb: + 90:67:b1:8c:5b:8d:f7:5f:af:da:a4:fa:3c:fb:4f: + 05:bf:56:4c:dd:d6:6e:43:54:fd:f4:a0:c9:13:93: + 55:07 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 4F:DE:F3:E5:5E:F5:98:0D:CA:3A:20:2B:E9:C8:B4:5D:D0:1D:86:BF + X509v3 Authority Key Identifier: + keyid:4F:DE:F3:E5:5E:F5:98:0D:CA:3A:20:2B:E9:C8:B4:5D:D0:1D:86:BF + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 75:4e:86:e1:25:9e:a8:7b:0e:65:db:bb:ca:49:e3:0c:70:df: + 07:bd:1a:83:d8:48:e1:b7:0b:39:ed:da:61:a0:98:1d:de:9b: + 5f:66:a6:33:79:43:46:1b:7d:bf:b4:e4:37:8c:96:5e:89:a8: + 8f:92:04:0f:c5:e4:0d:81:a3:76:98:c1:b0:b2:70:70:11:f6: + 8e:34:3a:82:ae:6b:7d:e9:ff:b4:58:85:20:b0:85:fc:86:89: + 40:08:62:e5:0f:34:83:82:90:da:2a:59:e4:53:53:ee:61:ac: + 46:51:ab:cb:81:1d:c1:f7:f0:c2:64:55:b9:fd:2a:67:44:3a: + 6a:af:f9:c2:55:c8:35:e6:8b:3a:d1:06:82:8f:14:ee:f1:11: + 25:db:a2:98:cc:be:bd:63:21:65:77:6e:6a:f8:d1:7e:a1:c6: + df:48:0e:74:0d:e3:03:51:ff:f9:98:92:3c:f8:36:75:90:5e: + 09:6c:7f:3f:c1:5e:40:03:72:de:ab:ed:6f:bb:fe:f7:9d:14: + 92:5c:69:13:ba:cf:7a:d8:4b:f1:29:04:6e:bc:5f:c9:8e:52: + b6:db:58:41:bb:8d:32:e7:5b:4b:74:bf:4c:8d:ec:07:0b:7d: + 3c:d6:2f:4d:27:11:31:15:6f:38:0d:ba:2a:53:76:2a:47:e6: + 32:52:df:ea +-----BEGIN TRUSTED_CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALoN0lGvDEiUN8/qg4/W +ObXJWP5ZW+VhtiGYhhaghebNyCGBZUxll1Vydi/GDSX4yCifINFWTAaZ/20PJNOS +8TElWhNsvksZamWvLzK+qQ/4m21vEHzpJGFN/rrptbRUXoL3Anri4tdTamn0mkEn +D1DcZKFHhFM/8TjNgKNaK92WgYrq45Ry96r4L8yp0J42n1YMRezdagVShWCZ15Sf +dn4djz9Q+zO8yvgQLtsVsklX2PRZ+nM7AzKGp/FGoWKsZxBzcFEH/9IEM9h84qj/ +jlMk6OSW2vvR6i+cqbWPxVD7kGexjFuN91+v2qT6PPtPBb9WTN3WbkNU/fSgyROT +VQcCAwEAAaOByzCByDAdBgNVHQ4EFgQUT97z5V71mA3KOiAr6ci0XdAdhr8wHwYD +VR0jBBgwFoAUT97z5V71mA3KOiAr6ci0XdAdhr8wNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB1TobhJZ6o +ew5l27vKSeMMcN8HvRqD2Ejhtws57dphoJgd3ptfZqYzeUNGG32/tOQ3jJZeiaiP +kgQPxeQNgaN2mMGwsnBwEfaONDqCrmt96f+0WIUgsIX8holACGLlDzSDgpDaKlnk +U1PuYaxGUavLgR3B9/DCZFW5/SpnRDpqr/nCVcg15os60QaCjxTu8REl26KYzL69 +YyFld25q+NF+ocbfSA50DeMDUf/5mJI8+DZ1kF4JbH8/wV5AA3Leq+1vu/73nRSS +XGkTus962EvxKQRuvF/JjlK221hBu40y51tLdL9MjewHC3081i9NJxExFW84Dboq +U3YqR+YyUt/q +-----END TRUSTED_CERTIFICATE----- + +-----BEGIN TIME----- +MTUwMzAyMTIwMDAwWg== +-----END TIME----- + +-----BEGIN VERIFY_RESULT----- +U1VDQ0VTUw== +-----END VERIFY_RESULT-----
diff --git a/net/data/verify_certificate_chain_unittest/target-has-keycertsign-but-not-ca.pem b/net/data/verify_certificate_chain_unittest/target-has-keycertsign-but-not-ca.pem index f008c4e..2cfe408 100644 --- a/net/data/verify_certificate_chain_unittest/target-has-keycertsign-but-not-ca.pem +++ b/net/data/verify_certificate_chain_unittest/target-has-keycertsign-but-not-ca.pem
@@ -1,6 +1,6 @@ -[Created by: ./generate-target-has-keycertsign-but-not-ca.py] +[Created by: generate-target-has-keycertsign-but-not-ca.py] -Certificate chain with 1 intermediary, a trusted root, and a target +Certificate chain with 1 intermediate, a trusted root, and a target certificate that is not a CA, and yet has the keyCertSign bit set. Verification is expected to fail, since keyCertSign should only be asserted when CA is true. @@ -10,7 +10,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -19,80 +19,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a6:ec:9f:55:56:11:c4:7a:fc:00:75:b9:b4:bb: - 08:8f:8f:88:ad:df:22:e4:5d:b4:f1:7d:af:a4:62: - df:64:86:46:34:cb:a4:32:21:b0:53:7c:94:5e:8a: - e6:6d:56:8b:28:93:23:79:ef:0b:7f:96:5a:19:09: - 3a:b7:30:77:e3:db:54:a5:c0:f7:df:3c:bd:f5:26: - 9f:ab:73:f9:c5:02:e8:67:cf:4d:d5:0e:31:4d:ab: - b7:d5:55:1a:f2:dc:1a:87:45:61:3c:ea:56:19:a3: - a7:f7:34:82:30:6f:48:54:fd:ce:05:cc:fe:95:2b: - a3:d8:b5:8f:20:26:60:e9:22:07:2e:e3:54:22:fe: - e2:2e:fc:33:2b:9d:6d:ed:1f:56:6d:7b:4a:69:15: - c0:f3:d5:0a:f8:c2:9b:82:b0:91:36:7c:5a:06:6b: - eb:02:85:58:5c:15:14:c4:c9:72:8c:21:29:29:e7: - 23:ca:56:07:7e:28:fa:f0:99:69:ad:10:bc:6c:43: - 31:1c:d1:bc:79:51:dd:92:54:f9:f3:0c:f8:ee:a4: - 8a:96:1d:17:ef:70:64:71:f4:30:54:b5:77:53:26: - 11:80:ce:dc:cb:38:98:98:69:20:e1:ae:f7:1b:61: - 53:32:59:27:8d:e9:84:b8:6f:c1:9f:03:95:ac:9a: - 8c:35 + 00:aa:e6:1b:b4:96:49:1d:88:99:c3:be:30:44:ed: + 2a:6e:80:18:66:5a:66:26:44:14:8f:1a:1d:69:81: + 8b:44:fb:ee:76:a1:c6:6d:e1:c1:ad:50:aa:99:a2: + d5:ce:ac:f4:86:04:93:02:d9:33:aa:24:ef:36:ef: + 5c:93:9a:69:00:45:95:c3:82:37:67:df:25:3e:ea: + dc:d0:fb:08:7f:89:aa:ad:df:a6:b6:c8:09:a3:74: + dc:17:12:b4:03:7d:7d:86:7d:57:1e:ff:d2:16:f7: + 9f:85:79:6e:5c:01:e3:cf:64:9d:55:e1:77:2c:43: + 89:30:d1:eb:d0:2e:68:e6:d1:c1:2a:92:58:c8:e2: + 9b:95:be:f6:d0:42:2d:38:fe:c8:17:a3:cf:37:76: + af:b1:0e:32:a5:6d:58:c9:de:4b:f4:2f:fa:8c:e4: + 9c:c6:1c:88:7c:55:01:4b:48:81:b0:0f:4f:19:f7: + fa:12:e7:9e:27:27:85:47:e6:b8:07:d9:59:a3:9a: + ac:3f:7d:a6:14:16:c8:8b:8d:70:d7:7b:fa:46:d4: + 32:fc:50:c7:83:82:e3:18:69:a5:a4:56:df:24:a3: + c5:7d:d5:f3:24:a4:67:22:4c:c8:b6:93:c2:05:fc: + 01:1b:ae:9d:a4:76:f4:bb:d6:b6:a9:32:2c:3a:fe: + 91:93 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 64:67:70:1F:EA:D4:3D:30:5E:54:D3:BF:DF:83:3D:14:94:C3:DD:58 + 55:B5:67:E4:CD:8D:51:AD:5E:A2:25:B0:94:40:72:52:F4:17:24:4E X509v3 Authority Key Identifier: - keyid:F3:98:98:C6:42:9E:AB:03:53:76:3F:43:FB:C9:9D:E4:0B:FF:BF:B5 + keyid:71:AE:42:1C:8C:C1:FB:35:F7:C0:9F:63:95:A7:7B:4F:9D:8E:D2:7A Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment, Certificate Sign X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 65:55:d3:04:1b:96:89:b8:44:32:01:15:ee:43:85:c0:c9:ee: - f9:19:6c:ef:f4:5a:92:22:b2:62:b1:18:38:c5:42:06:e5:c7: - be:83:9c:96:6b:72:d7:2a:0c:68:40:d6:30:91:4b:4e:e1:d4: - 13:05:c5:5a:91:c1:11:ce:57:2e:31:87:2a:f3:70:e4:77:3a: - 60:82:fa:58:56:18:1f:bf:4a:dd:89:48:c6:ab:4c:01:06:d5: - ec:8d:aa:55:eb:07:0f:bd:bd:2b:67:f6:3f:43:15:c7:a4:77: - 88:fa:f8:9f:3b:fa:0b:a2:fe:55:7c:f1:0b:49:da:b7:08:24: - 34:68:db:a8:76:37:60:02:be:32:54:29:b4:b7:69:c4:05:66: - 60:a4:86:9f:a1:13:d7:c3:f6:ed:a0:97:37:17:35:97:05:c9: - ce:f9:af:e0:42:c3:e5:32:15:d7:1e:6c:3b:41:93:df:ba:b0: - aa:60:e8:66:46:55:b3:00:65:e2:1c:70:85:c7:81:21:3f:8e: - 41:69:19:a0:ac:8b:54:bc:d0:4b:78:db:f8:11:d7:93:eb:a4: - 48:04:1b:76:96:e2:ae:d5:2b:dd:ea:e4:a5:02:ca:02:86:11: - 82:cc:3c:70:10:3a:35:81:0e:52:ad:71:11:be:d9:f2:9c:3f: - 85:53:b8:df + 25:e8:87:e7:07:ba:bd:47:c3:dd:5a:3c:29:bc:af:cb:fb:cd: + c6:55:e6:9c:7b:cd:0e:8f:1a:0a:e4:cb:06:db:42:44:02:e5: + 37:6e:1a:a3:7d:23:96:c6:b2:67:cb:5a:1e:71:a1:e3:4f:15: + 80:7f:a1:0d:59:60:b0:6f:c9:ab:0f:ef:20:d3:c2:45:e0:99: + aa:7e:e1:b7:31:dc:4b:b2:16:78:c5:06:27:a8:5e:c5:7b:3b: + dc:81:81:0d:eb:31:13:d5:4b:23:2e:4e:2c:86:fd:ce:58:96: + b5:cc:33:80:5c:7b:8a:ce:74:97:aa:df:fc:7c:1e:42:7d:12: + 58:bb:84:0f:2d:30:7c:a9:0c:1e:5c:c4:c6:ce:2b:c0:9d:bb: + 7d:c2:51:04:5d:70:c3:63:43:59:57:40:e4:69:52:be:72:79: + b4:c5:74:51:30:af:9c:30:8e:33:89:be:69:69:4a:01:03:07: + d9:df:8b:0c:69:ff:cc:57:45:7c:c6:23:e5:4a:1f:19:94:19: + 25:9d:eb:87:04:51:06:ba:9c:6b:72:da:2b:05:ef:72:21:e9: + 95:5e:61:83:6a:7a:b6:30:f8:97:a1:99:dd:12:ea:47:50:ee: + 26:02:3b:81:94:a8:19:29:a7:ad:b6:7c:28:10:53:09:53:a4: + 61:74:57:ed -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCm7J9V -VhHEevwAdbm0uwiPj4it3yLkXbTxfa+kYt9khkY0y6QyIbBTfJReiuZtVosokyN5 -7wt/lloZCTq3MHfj21SlwPffPL31Jp+rc/nFAuhnz03VDjFNq7fVVRry3BqHRWE8 -6lYZo6f3NIIwb0hU/c4FzP6VK6PYtY8gJmDpIgcu41Qi/uIu/DMrnW3tH1Zte0pp -FcDz1Qr4wpuCsJE2fFoGa+sChVhcFRTEyXKMISkp5yPKVgd+KPrwmWmtELxsQzEc -0bx5Ud2SVPnzDPjupIqWHRfvcGRx9DBUtXdTJhGAztzLOJiYaSDhrvcbYVMyWSeN -6YS4b8GfA5Wsmow1AgMBAAGjgekwgeYwHQYDVR0OBBYEFGRncB/q1D0wXlTTv9+D -PRSUw91YMB8GA1UdIwQYMBaAFPOYmMZCnqsDU3Y/Q/vJneQL/7+1MD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq5hu0 +lkkdiJnDvjBE7SpugBhmWmYmRBSPGh1pgYtE++52ocZt4cGtUKqZotXOrPSGBJMC +2TOqJO8271yTmmkARZXDgjdn3yU+6tzQ+wh/iaqt36a2yAmjdNwXErQDfX2GfVce +/9IW95+FeW5cAePPZJ1V4XcsQ4kw0evQLmjm0cEqkljI4puVvvbQQi04/sgXo883 +dq+xDjKlbVjJ3kv0L/qM5JzGHIh8VQFLSIGwD08Z9/oS554nJ4VH5rgH2Vmjmqw/ +faYUFsiLjXDXe/pG1DL8UMeDguMYaaWkVt8ko8V91fMkpGciTMi2k8IF/AEbrp2k +dvS71rapMiw6/pGTAgMBAAGjgekwgeYwHQYDVR0OBBYEFFW1Z+TNjVGtXqIlsJRA +clL0FyROMB8GA1UdIwQYMBaAFHGuQhyMwfs198CfY5Wne0+djtJ6MD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgKkMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAZVXTBBuWibhEMgEV7kOF -wMnu+Rls7/RakiKyYrEYOMVCBuXHvoOclmty1yoMaEDWMJFLTuHUEwXFWpHBEc5X -LjGHKvNw5Hc6YIL6WFYYH79K3YlIxqtMAQbV7I2qVesHD729K2f2P0MVx6R3iPr4 -nzv6C6L+VXzxC0natwgkNGjbqHY3YAK+MlQptLdpxAVmYKSGn6ET18P27aCXNxc1 -lwXJzvmv4ELD5TIV1x5sO0GT37qwqmDoZkZVswBl4hxwhceBIT+OQWkZoKyLVLzQ -S3jb+BHXk+ukSAQbdpbirtUr3erkpQLKAoYRgsw8cBA6NYEOUq1xEb7Z8pw/hVO4 -3w== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgKkMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAJeiH5we6vUfD3Vo8Kbyv +y/vNxlXmnHvNDo8aCuTLBttCRALlN24ao30jlsayZ8taHnGh408VgH+hDVlgsG/J +qw/vINPCReCZqn7htzHcS7IWeMUGJ6hexXs73IGBDesxE9VLIy5OLIb9zliWtcwz +gFx7is50l6rf/HweQn0SWLuEDy0wfKkMHlzExs4rwJ27fcJRBF1ww2NDWVdA5GlS +vnJ5tMV0UTCvnDCOM4m+aWlKAQMH2d+LDGn/zFdFfMYj5UofGZQZJZ3rhwRRBrqc +a3LaKwXvciHplV5hg2p6tjD4l6GZ3RLqR1DuJgI7gZSoGSmnrbZ8KBBTCVOkYXRX +7Q== -----END CERTIFICATE----- Certificate: @@ -104,35 +104,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a8:d0:63:48:13:03:82:fe:27:31:f5:c0:25:67: - 0e:46:56:3b:d0:db:01:06:88:ae:64:12:2a:b3:8f: - 79:c1:20:87:75:e7:11:2d:97:09:b4:55:e6:c4:14: - 7e:61:4e:98:6c:1d:dc:ec:2c:ef:16:40:99:d1:29: - dd:0d:74:77:c7:f9:2f:5f:bd:55:63:35:3c:a2:36: - e1:42:12:49:a1:83:0b:7b:53:f1:9d:53:02:97:3e: - cf:27:50:2e:41:63:3a:6f:c2:b0:2a:b6:f9:bd:bb: - d8:0a:42:0d:99:e5:5a:ea:c8:26:bc:54:6f:b6:36: - d2:28:d4:d6:53:b5:f6:0e:8d:dd:e0:46:98:32:61: - 42:20:ee:44:f0:a1:06:e4:9e:8c:c3:b6:cd:1b:7e: - ef:3c:68:d6:80:5e:49:b4:66:3f:2a:5c:e1:c3:fd: - 43:ce:b7:c7:ec:fa:1f:1d:94:e4:21:4e:51:5f:5d: - 5a:fd:3f:84:a5:15:2a:64:2c:d5:70:4f:24:dd:96: - 67:43:c6:1d:62:53:ed:2f:ef:64:8c:a9:b2:c3:c7: - f3:a2:55:08:ed:dc:2a:5f:51:50:05:59:e8:e2:0e: - cf:8d:06:5b:7b:19:56:b9:3b:dc:75:ce:b0:4e:74: - 62:d7:31:a4:7b:1f:44:ca:3f:79:8d:5c:b7:41:a6: - c0:bf + 00:c4:8f:d1:37:69:c5:65:2a:c8:df:6e:82:4d:1a: + ea:2c:59:9d:43:07:8b:d1:c3:01:3a:1d:7a:9f:81: + ad:b8:fb:10:35:ae:84:80:07:69:5b:47:eb:af:1c: + 7b:43:21:f3:3c:13:8a:3b:62:c0:20:fa:96:06:9b: + 50:04:82:05:c2:7a:e3:53:d1:34:ab:2e:94:a9:6b: + 5f:6c:a9:66:0d:df:d0:73:79:f0:bd:ac:9c:99:68: + e7:1c:25:6f:c6:68:36:07:99:57:23:17:a8:8e:4e: + 8c:b9:41:ef:25:7e:92:3d:08:8a:82:c2:de:fe:a3: + cc:05:ed:b5:8b:b8:2f:09:eb:87:29:4d:55:f1:4e: + ee:3a:91:54:dc:6f:6a:9e:d8:17:2a:3a:46:00:65: + f4:4d:ae:26:35:72:97:06:41:ef:4e:bd:af:83:ec: + 9b:e2:96:24:61:2b:88:71:77:a7:e8:cf:2e:3e:79: + 5b:a2:33:11:94:aa:e7:65:6b:06:a2:4e:94:c8:d7: + 56:0f:cc:12:b9:9c:c1:b5:f6:bf:2a:a0:f8:b1:74: + 34:54:0e:cb:f0:87:87:f6:93:3f:f4:5f:10:81:90: + 78:51:ae:41:19:6e:c9:89:8c:9d:d9:85:64:18:de: + e5:d6:8c:a8:5a:4b:60:b0:44:5f:7a:1e:f4:d1:5b: + 94:97 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - F3:98:98:C6:42:9E:AB:03:53:76:3F:43:FB:C9:9D:E4:0B:FF:BF:B5 + 71:AE:42:1C:8C:C1:FB:35:F7:C0:9F:63:95:A7:7B:4F:9D:8E:D2:7A X509v3 Authority Key Identifier: - keyid:97:E9:16:F3:C4:AD:14:F3:56:CD:F3:E6:E5:60:D4:8F:EF:F7:BA:06 + keyid:F7:A4:4C:CA:BB:81:7B:10:63:6B:CC:BC:73:ED:C6:1C:56:55:40:1C Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -147,41 +147,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 05:1f:e8:41:f2:76:1f:cd:2a:92:f9:cc:61:a9:6f:14:40:12: - 69:19:1c:44:1d:3e:2e:c5:d0:a8:25:e3:bc:62:a3:6c:0f:e8: - b9:dc:b0:92:cd:7a:ae:1d:4e:de:cc:90:3f:97:98:d4:d4:b0: - a2:73:f7:b4:83:94:fb:ac:83:d3:39:af:13:64:61:bd:80:8d: - dc:de:af:50:1a:15:12:c2:99:04:d4:c6:b8:31:12:2c:15:0a: - 7c:13:ad:c8:be:37:fb:fa:43:ae:70:fd:64:70:a8:fb:77:fd: - 09:7e:7e:e1:ff:27:e6:91:d8:c4:62:54:ad:cd:04:51:b0:da: - 09:df:99:ac:91:0b:f8:31:e3:2e:18:64:f4:76:55:dd:d9:b3: - 90:3a:07:91:e5:89:f7:83:48:15:5d:b3:bb:76:e6:d6:4a:1f: - 3b:a4:3e:89:36:de:a8:80:09:2c:1f:23:a7:8a:cb:c3:e7:46: - f3:f3:1e:0f:8b:88:bb:a9:87:9e:a7:64:2e:64:be:48:c1:91: - d2:ef:c1:82:b9:1a:f4:08:d9:b1:a0:1f:ff:16:af:c4:b2:bc: - 01:0f:e4:a0:f0:eb:81:aa:37:32:70:61:16:52:01:f6:39:10: - a3:b0:8c:ec:2c:3f:ac:1b:cd:12:91:44:2f:6a:2e:4f:d4:8d: - 92:a5:55:1b + 7b:29:bd:b8:c7:76:7f:09:90:d3:5d:e7:20:9e:f6:a0:bd:dc: + a1:cb:7c:c8:c8:17:d5:80:81:79:6a:88:e5:e8:c8:e3:56:37: + 60:3f:9c:2a:14:86:fe:e0:79:2f:d6:ec:67:51:d4:d8:65:9d: + ce:3b:59:b6:42:06:7b:c8:2a:79:7f:40:2f:ed:fb:50:d3:78: + 9e:99:fe:1d:fe:a1:4f:1d:58:c9:2d:b4:75:72:3f:6a:7a:db: + 2e:7b:81:3b:00:3f:e4:95:47:63:42:90:fd:25:ba:db:53:0a: + 01:37:28:78:7d:c6:cf:54:5e:2b:94:88:79:bb:4c:f7:06:e3: + 7a:be:44:29:c3:2e:17:ea:61:c4:8f:16:f0:b6:e0:60:fe:19: + 08:48:fd:a8:bf:95:ef:e5:32:1c:cf:e5:59:6b:04:1d:4c:6d: + ea:9b:4d:b4:f9:14:c2:00:a3:32:d6:1b:54:00:5a:17:29:8f: + 85:0c:eb:ed:41:70:6f:52:f8:37:92:ed:2b:ae:8c:b8:e4:51: + aa:68:62:12:9b:97:62:1a:5b:27:46:b5:5f:8c:0e:c9:93:15: + d7:d8:85:99:67:56:ef:31:4a:55:1f:67:7c:09:fc:03:c9:a0: + 67:b8:ed:32:d7:c0:0b:bd:b6:47:b9:50:78:f2:0a:ec:1d:bd: + d5:e9:06:b3 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqNBjSBMD -gv4nMfXAJWcORlY70NsBBoiuZBIqs495wSCHdecRLZcJtFXmxBR+YU6YbB3c7Czv -FkCZ0SndDXR3x/kvX71VYzU8ojbhQhJJoYMLe1PxnVMClz7PJ1AuQWM6b8KwKrb5 -vbvYCkINmeVa6sgmvFRvtjbSKNTWU7X2Do3d4EaYMmFCIO5E8KEG5J6Mw7bNG37v -PGjWgF5JtGY/Klzhw/1DzrfH7PofHZTkIU5RX11a/T+EpRUqZCzVcE8k3ZZnQ8Yd -YlPtL+9kjKmyw8fzolUI7dwqX1FQBVno4g7PjQZbexlWuTvcdc6wTnRi1zGkex9E -yj95jVy3QabAvwIDAQABo4HLMIHIMB0GA1UdDgQWBBTzmJjGQp6rA1N2P0P7yZ3k -C/+/tTAfBgNVHSMEGDAWgBSX6RbzxK0U81bN8+blYNSP7/e6BjA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxI/RN2nF +ZSrI326CTRrqLFmdQweL0cMBOh16n4GtuPsQNa6EgAdpW0frrxx7QyHzPBOKO2LA +IPqWBptQBIIFwnrjU9E0qy6UqWtfbKlmDd/Qc3nwvaycmWjnHCVvxmg2B5lXIxeo +jk6MuUHvJX6SPQiKgsLe/qPMBe21i7gvCeuHKU1V8U7uOpFU3G9qntgXKjpGAGX0 +Ta4mNXKXBkHvTr2vg+yb4pYkYSuIcXen6M8uPnlbojMRlKrnZWsGok6UyNdWD8wS +uZzBtfa/KqD4sXQ0VA7L8IeH9pM/9F8QgZB4Ua5BGW7JiYyd2YVkGN7l1oyoWktg +sERfeh700VuUlwIDAQABo4HLMIHIMB0GA1UdDgQWBBRxrkIcjMH7NffAn2OVp3tP +nY7SejAfBgNVHSMEGDAWgBT3pEzKu4F7EGNrzLxz7cYcVlVAHDA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AAUf6EHydh/NKpL5zGGpbxRAEmkZHEQdPi7F0Kgl47xio2wP6LncsJLNeq4dTt7M -kD+XmNTUsKJz97SDlPusg9M5rxNkYb2Ajdzer1AaFRLCmQTUxrgxEiwVCnwTrci+ -N/v6Q65w/WRwqPt3/Ql+fuH/J+aR2MRiVK3NBFGw2gnfmayRC/gx4y4YZPR2Vd3Z -s5A6B5HlifeDSBVds7t25tZKHzukPok23qiACSwfI6eKy8PnRvPzHg+LiLuph56n -ZC5kvkjBkdLvwYK5GvQI2bGgH/8Wr8SyvAEP5KDw64GqNzJwYRZSAfY5EKOwjOws -P6wbzRKRRC9qLk/UjZKlVRs= +AHspvbjHdn8JkNNd5yCe9qC93KHLfMjIF9WAgXlqiOXoyONWN2A/nCoUhv7geS/W +7GdR1Nhlnc47WbZCBnvIKnl/QC/t+1DTeJ6Z/h3+oU8dWMkttHVyP2p62y57gTsA +P+SVR2NCkP0luttTCgE3KHh9xs9UXiuUiHm7TPcG43q+RCnDLhfqYcSPFvC24GD+ +GQhI/ai/le/lMhzP5VlrBB1MbeqbTbT5FMIAozLWG1QAWhcpj4UM6+1BcG9S+DeS +7SuujLjkUapoYhKbl2IaWydGtV+MDsmTFdfYhZlnVu8xSlUfZ3wJ/APJoGe47TLX +wAu9tke5UHjyCuwdvdXpBrM= -----END CERTIFICATE----- Certificate: @@ -198,30 +198,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ba:52:6a:89:3e:75:9b:d6:ed:f4:d1:1c:fb:aa: - 99:8f:5e:89:59:2a:75:5a:54:77:9c:b5:91:d5:2a: - f8:8a:a3:74:d2:75:39:24:cc:c5:f7:42:83:11:a7: - 6c:cd:c2:2b:e1:18:84:b6:26:d8:12:fd:e2:a8:6a: - 4d:4d:8f:a1:25:07:08:d2:73:a0:17:c7:54:11:a5: - fb:0e:36:cd:e2:24:a8:dc:85:a1:22:a2:7c:c3:20: - 02:60:ec:40:ba:1e:5b:03:51:68:d7:f2:28:f6:3d: - 3f:b3:30:34:0e:33:6c:44:c4:31:a9:ee:cf:42:96: - c2:eb:06:52:92:86:80:b9:0b:99:41:4b:64:aa:b7: - 55:2b:21:25:92:46:1d:e2:31:3d:0b:54:ad:a9:c7: - 2a:29:be:5c:bb:ba:99:59:69:70:71:75:bb:9a:a1: - 7c:fa:36:79:bd:b4:f3:6c:4b:6c:c9:ea:32:03:dd: - 64:9e:94:82:33:d1:d9:f8:48:04:ae:79:35:5c:a4: - 43:54:c1:ec:3c:97:bf:3a:40:f6:e6:9d:7b:bf:a1: - 67:b0:59:de:78:ff:33:94:f2:2b:15:d0:0a:89:0c: - 2c:ee:9f:dc:f8:48:f0:68:0c:19:59:86:86:41:1c: - 19:02:89:4f:0c:ea:43:b2:a8:b9:c9:c1:1d:76:c0: - 3d:19 + 00:cd:6b:8f:1c:b6:4c:54:b3:0d:f7:e0:b8:5a:a6: + d3:cc:0b:63:89:cb:3a:5a:87:3c:39:65:aa:63:32: + 79:fe:5c:67:f6:00:8c:32:b6:75:01:2f:7b:45:d3: + a4:53:f4:7a:47:7e:2d:ca:5a:d2:22:eb:22:8c:02: + e3:c1:91:ad:71:f8:67:43:62:8f:f1:60:17:77:ea: + a3:d6:78:64:b2:58:c2:fd:20:e0:a2:06:d5:18:a8: + 36:9e:2e:b0:97:20:c7:72:a4:51:0d:d5:f0:f0:1f: + b2:05:8e:82:98:9e:b5:67:dd:55:bb:c1:03:e1:9f: + 45:73:74:d7:11:aa:5b:de:c1:5d:5e:f2:29:85:29: + 03:e3:14:fa:e8:91:f5:29:a3:8c:c0:78:1c:4c:18: + 2b:49:2b:20:31:1e:bf:e1:55:7f:ed:76:25:4d:95: + a5:40:4c:cc:f4:8e:de:85:d3:88:0a:86:27:95:f4: + c8:4b:00:8d:16:b7:33:e9:76:12:aa:85:43:1e:89: + bb:ae:16:f2:f1:26:c4:a7:b9:44:89:76:1b:1a:2c: + 34:50:4b:e0:68:bc:f1:fb:be:22:14:b0:2b:67:78: + 22:f0:71:07:43:21:a3:24:d7:4e:28:a0:7d:04:16: + b1:a2:d8:35:2a:2b:2e:13:8e:6b:e9:c9:7f:78:7e: + 98:df Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 97:E9:16:F3:C4:AD:14:F3:56:CD:F3:E6:E5:60:D4:8F:EF:F7:BA:06 + F7:A4:4C:CA:BB:81:7B:10:63:6B:CC:BC:73:ED:C6:1C:56:55:40:1C X509v3 Authority Key Identifier: - keyid:97:E9:16:F3:C4:AD:14:F3:56:CD:F3:E6:E5:60:D4:8F:EF:F7:BA:06 + keyid:F7:A4:4C:CA:BB:81:7B:10:63:6B:CC:BC:73:ED:C6:1C:56:55:40:1C Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -236,41 +236,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - a5:32:dc:be:9a:58:7d:66:69:99:07:13:d9:ec:20:99:72:37: - c1:8b:4d:e1:8e:79:0b:7f:ed:1c:89:a1:9b:18:66:bd:1b:fe: - ec:74:f6:aa:7b:57:71:06:07:ea:02:41:6e:83:b4:68:39:15: - c8:c5:16:d7:4e:10:75:f5:05:b4:f2:c6:e4:bd:b4:64:21:16: - c8:14:dd:06:88:f7:81:89:76:44:c8:70:99:70:f2:67:e6:4c: - 72:3e:75:24:d7:2f:83:b2:4e:6b:f8:4d:f0:e7:16:25:02:16: - c3:fa:8a:9c:c2:75:60:6b:ed:40:1d:b2:14:97:6a:26:a1:72: - b9:53:f1:95:fb:6e:d9:11:b3:d4:67:ff:ba:0a:06:c3:5b:fb: - 84:e7:b1:48:07:fb:db:d7:6f:c9:7e:6f:e6:b4:3b:8c:e0:3c: - 73:fe:80:8e:cd:35:3c:4f:51:f8:ac:fc:b4:d0:0a:5e:b9:d7: - 95:f2:e6:fb:a8:de:25:ab:20:da:d5:e6:e2:d3:5b:6b:9b:db: - 2c:77:0e:59:01:7a:29:07:1f:53:72:2b:f3:06:86:1b:04:a0: - 01:82:aa:59:4f:a5:e6:8b:2a:01:24:8b:77:5b:bb:8d:36:94: - 4a:02:ab:61:5c:0a:ba:87:ee:53:53:a7:5d:e3:6a:bc:73:9f: - fe:e9:fc:9f + 50:5f:b0:32:ec:41:85:3d:75:ff:8d:05:17:be:20:98:81:da: + 48:39:17:20:24:a7:31:cf:63:35:90:29:26:d0:60:29:e1:68: + fe:35:fd:6c:61:c0:3a:cd:08:92:9b:cc:ad:73:d4:dd:a5:51: + 0e:a9:65:04:7d:16:77:8b:b8:b4:9d:fb:c4:7a:4a:ab:8a:9e: + d0:70:47:45:74:a4:57:ab:c2:cd:b3:c5:44:6b:7e:3b:78:8f: + 5b:7f:f0:f7:c3:ef:24:a2:40:fe:c6:71:cd:a8:a6:ac:63:22: + 57:39:f5:98:c3:91:79:bf:47:6a:0b:c6:b1:61:c6:35:1b:1c: + 10:cc:e7:bc:20:83:f6:48:26:4a:80:47:e0:22:fa:04:1f:b0: + 06:9c:54:fa:46:45:9b:d5:20:a2:f0:ee:be:b5:a2:83:92:86: + 5d:f5:40:f5:32:d0:85:35:eb:af:5d:9b:04:5d:21:b3:35:90: + e8:5f:0a:6c:90:85:eb:86:31:e4:89:81:c6:aa:73:4d:1e:3e: + af:40:07:f1:38:ae:30:ab:2d:aa:6d:2f:b2:1d:ff:d8:18:2e: + f3:d0:74:8e:ff:6d:24:97:30:cb:b6:e5:6f:cb:6b:c2:27:5e: + a5:f1:63:c0:d9:0d:c5:08:7f:86:8c:47:c4:9b:cb:e2:d9:da: + 17:51:5b:12 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALpSaok+dZvW7fTRHPuq -mY9eiVkqdVpUd5y1kdUq+IqjdNJ1OSTMxfdCgxGnbM3CK+EYhLYm2BL94qhqTU2P -oSUHCNJzoBfHVBGl+w42zeIkqNyFoSKifMMgAmDsQLoeWwNRaNfyKPY9P7MwNA4z -bETEManuz0KWwusGUpKGgLkLmUFLZKq3VSshJZJGHeIxPQtUranHKim+XLu6mVlp -cHF1u5qhfPo2eb2082xLbMnqMgPdZJ6UgjPR2fhIBK55NVykQ1TB7DyXvzpA9uad -e7+hZ7BZ3nj/M5TyKxXQCokMLO6f3PhI8GgMGVmGhkEcGQKJTwzqQ7KoucnBHXbA -PRkCAwEAAaOByzCByDAdBgNVHQ4EFgQUl+kW88StFPNWzfPm5WDUj+/3ugYwHwYD -VR0jBBgwFoAUl+kW88StFPNWzfPm5WDUj+/3ugYwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM1rjxy2TFSzDffguFqm +08wLY4nLOlqHPDllqmMyef5cZ/YAjDK2dQEve0XTpFP0ekd+Lcpa0iLrIowC48GR +rXH4Z0Nij/FgF3fqo9Z4ZLJYwv0g4KIG1RioNp4usJcgx3KkUQ3V8PAfsgWOgpie +tWfdVbvBA+GfRXN01xGqW97BXV7yKYUpA+MU+uiR9SmjjMB4HEwYK0krIDEev+FV +f+12JU2VpUBMzPSO3oXTiAqGJ5X0yEsAjRa3M+l2EqqFQx6Ju64W8vEmxKe5RIl2 +GxosNFBL4Gi88fu+IhSwK2d4IvBxB0MhoyTXTiigfQQWsaLYNSorLhOOa+nJf3h+ +mN8CAwEAAaOByzCByDAdBgNVHQ4EFgQU96RMyruBexBja8y8c+3GHFZVQBwwHwYD +VR0jBBgwFoAU96RMyruBexBja8y8c+3GHFZVQBwwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQClMty+mlh9 -ZmmZBxPZ7CCZcjfBi03hjnkLf+0ciaGbGGa9G/7sdPaqe1dxBgfqAkFug7RoORXI -xRbXThB19QW08sbkvbRkIRbIFN0GiPeBiXZEyHCZcPJn5kxyPnUk1y+Dsk5r+E3w -5xYlAhbD+oqcwnVga+1AHbIUl2omoXK5U/GV+27ZEbPUZ/+6CgbDW/uE57FIB/vb -12/Jfm/mtDuM4Dxz/oCOzTU8T1H4rPy00ApeudeV8ub7qN4lqyDa1ebi01trm9ss -dw5ZAXopBx9TcivzBoYbBKABgqpZT6XmiyoBJIt3W7uNNpRKAqthXAq6h+5TU6dd -42q8c5/+6fyf +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBQX7Ay7EGF +PXX/jQUXviCYgdpIORcgJKcxz2M1kCkm0GAp4Wj+Nf1sYcA6zQiSm8ytc9TdpVEO +qWUEfRZ3i7i0nfvEekqrip7QcEdFdKRXq8LNs8VEa347eI9bf/D3w+8kokD+xnHN +qKasYyJXOfWYw5F5v0dqC8axYcY1GxwQzOe8IIP2SCZKgEfgIvoEH7AGnFT6RkWb +1SCi8O6+taKDkoZd9UD1MtCFNeuvXZsEXSGzNZDoXwpskIXrhjHkiYHGqnNNHj6v +QAfxOK4wqy2qbS+yHf/YGC7z0HSO/20klzDLtuVvy2vCJ16l8WPA2Q3FCH+GjEfE +m8vi2doXUVsS -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-has-pathlen-but-not-ca.pem b/net/data/verify_certificate_chain_unittest/target-has-pathlen-but-not-ca.pem index 34c777c0..0628545 100644 --- a/net/data/verify_certificate_chain_unittest/target-has-pathlen-but-not-ca.pem +++ b/net/data/verify_certificate_chain_unittest/target-has-pathlen-but-not-ca.pem
@@ -1,6 +1,6 @@ -[Created by: ./generate-target-has-pathlen-but-not-ca.py] +[Created by: generate-target-has-pathlen-but-not-ca.py] -Certificate chain with 1 intermediary, a trusted root, and a target +Certificate chain with 1 intermediate, a trusted root, and a target certificate that is not a CA, and yet has a pathlen set. Verification is expected to fail, since pathlen should only be set for CAs. @@ -9,7 +9,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,82 +18,82 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:e4:03:84:57:5e:99:af:4e:fe:20:15:48:81:f8: - 76:01:11:a3:33:b0:2e:ff:3d:ec:69:be:76:8d:9b: - c6:9b:5d:cb:b1:a6:eb:84:60:8e:99:fd:31:c1:66: - 9f:bb:3d:bb:16:e0:c8:d8:f5:cd:23:10:8a:c5:96: - e7:df:ed:96:d9:76:eb:82:23:e2:8c:7d:00:a9:71: - ff:71:df:2e:14:b4:ab:3e:29:e8:11:c2:44:75:f9: - 9f:e9:cd:cf:2f:0c:db:7b:47:b2:80:c1:90:45:a8: - 01:6d:26:88:ff:3b:d8:54:7b:cd:ff:dc:aa:bd:38: - 49:b0:02:d8:80:e2:79:07:33:5a:74:cd:ce:8e:df: - 75:33:41:e7:5e:fb:25:c0:45:fb:48:32:78:47:1a: - 70:03:d6:56:66:32:6e:2d:35:6b:76:8c:a6:33:4c: - 1d:60:91:10:5f:70:f3:13:ec:b4:03:4f:cf:99:f9: - 8e:e8:99:85:23:0b:cc:3d:17:5b:ec:df:aa:eb:8a: - a7:52:67:10:dd:66:c5:b2:95:9f:72:2b:4e:fa:19: - 31:99:62:d7:60:fd:9d:9e:e0:ca:29:13:ec:e3:c6: - af:47:e0:84:73:ab:3b:2d:58:f5:d8:d1:0c:ee:f6: - 23:b1:5c:55:1e:33:40:87:84:f9:d8:8a:ac:ac:46: - ed:93 + 00:ca:73:f9:c5:cb:c6:2c:26:07:85:8f:4b:a4:ac: + 52:18:84:42:ca:cb:34:59:92:5a:d8:f7:1f:df:51: + ed:6a:d5:e2:e1:dc:06:fb:72:0d:f3:e7:9f:38:0d: + 46:f4:19:77:31:33:4c:5b:ac:dd:6c:8c:06:68:4c: + 48:84:e2:c7:17:28:a9:0b:4e:07:07:b6:7b:cc:a9: + ef:6c:ae:22:6e:03:d6:d4:5b:f1:d9:aa:9e:61:54: + c7:14:79:cb:d6:c2:8f:da:87:e8:ae:d2:b3:66:4f: + d3:4c:56:b8:e0:80:f8:45:b7:11:35:53:ec:d4:49: + f8:05:70:f3:5b:56:b2:05:6d:3e:46:f8:be:67:71: + 48:a6:65:dd:55:62:a3:23:b0:94:e1:f2:3b:17:54: + 40:cc:37:90:d9:78:5a:d8:29:99:3f:02:16:a8:5b: + 5e:64:f4:f2:84:ad:25:c6:cf:2c:5b:e7:6c:bf:88: + 63:0c:8a:9b:fb:d9:b1:30:5a:21:74:1f:e4:5a:54: + 23:3a:a1:02:34:97:2c:a2:af:08:05:f0:db:52:58: + 7f:86:80:12:a3:f9:78:c0:ad:d6:8b:12:53:72:55: + 24:ca:3e:70:f2:7f:78:8f:b7:a1:32:f1:2c:7f:23: + db:7b:ce:79:cf:cc:6d:d8:f7:14:54:5c:e0:db:7d: + 60:b3 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 3F:B5:B3:28:77:02:A4:B0:9D:4B:DE:37:42:2E:E6:59:0A:D8:38:84 + 99:D8:C1:91:A6:13:EB:0F:B4:6F:F2:B0:C4:0C:D9:0A:25:8E:53:10 X509v3 Authority Key Identifier: - keyid:77:62:DF:59:FD:79:52:7B:9A:CF:99:3C:7C:BD:87:CE:41:27:57:F6 + keyid:5B:9F:DF:D5:C6:FF:4F:39:52:EA:EF:97:5B:C1:ED:E1:CC:44:4E:B6 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical - Digital Signature, Key Encipherment, Certificate Sign + Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication X509v3 Basic Constraints: critical CA:FALSE, pathlen:1 Signature Algorithm: sha256WithRSAEncryption - 0f:6a:84:9e:41:23:9d:77:90:68:4b:93:39:8e:74:cc:f5:3f: - 0a:1c:8f:d9:45:bc:5d:42:d1:23:11:e6:a6:2f:52:58:23:5f: - ba:ef:a2:3a:c7:3e:bd:24:a3:47:d3:5a:f7:00:37:0d:a4:c8: - cd:ee:92:73:67:4c:d0:3f:63:08:c4:90:a8:42:5f:0e:cb:1e: - 96:ae:c7:16:5f:4d:69:e4:3c:8c:a9:47:7e:ad:aa:52:dd:b3: - 77:d8:f6:bf:f3:e3:c5:46:ec:c3:21:af:52:62:76:e5:99:0a: - ba:a2:1c:54:62:8f:3f:0b:b8:c1:9e:e3:6e:50:4e:36:17:d0: - ee:e1:a2:2e:29:c0:1e:a3:94:a3:69:1f:4d:13:50:4c:44:5c: - 0f:c3:80:94:3f:6f:60:02:98:da:4f:3a:40:e4:ee:01:af:f1: - b3:7b:4a:2e:3a:57:3b:8e:9c:8a:0c:3e:4c:49:e2:22:09:ef: - dc:ea:fc:e2:04:20:5c:8e:a5:82:a9:0e:83:b3:ef:cc:09:ff: - a9:bc:fa:47:0f:61:3f:7f:d6:df:ec:57:b2:da:16:70:42:8e: - 68:28:f5:4d:cb:fb:85:16:e4:78:3b:5e:8a:96:f0:73:d6:f7: - b0:ce:4d:18:6a:b9:1b:99:33:01:15:ce:90:c2:13:8e:14:e6: - 0e:32:84:28 + 70:43:96:4c:98:6f:28:18:8a:59:39:82:cc:24:47:f8:58:f8: + f8:43:04:09:1e:a6:51:59:bc:60:36:ff:a1:41:51:e1:4c:40: + 6b:5e:8b:73:3c:c4:37:65:f4:b0:57:01:8f:c6:ba:0c:5b:97: + a1:6b:3a:ea:53:79:8f:9a:99:f8:ca:01:a5:15:ac:60:4c:a7: + a7:68:07:72:3c:ed:06:70:d8:a4:d0:c0:5f:88:f2:6a:c0:a1: + 2b:e7:58:68:23:d3:7e:f0:98:99:7d:3d:91:25:e3:84:4f:ef: + 55:a4:ee:f7:1f:dc:f2:af:a8:74:96:6c:26:c4:d8:b6:84:dc: + b7:e7:7d:9d:2b:7b:3b:e6:e4:ad:76:e0:aa:ea:a4:26:97:4b: + 20:cd:b1:bd:a8:6e:b3:08:47:31:a2:01:7b:b5:6c:72:d0:f0: + 12:ac:bd:4f:be:de:23:cb:34:14:d2:11:42:3f:d5:70:76:4c: + 99:db:ce:bc:0e:d5:2e:4b:6f:c3:1b:5d:c6:58:89:74:5f:1d: + 62:cf:df:1e:4c:13:08:88:cb:66:6f:00:c2:c5:6f:bb:b4:9e: + 1f:8a:7d:9d:0b:a6:11:6f:28:bb:5e:46:ab:71:d4:eb:00:8c: + 71:6b:32:85:3d:17:ca:d0:15:90:66:7a:b2:96:0c:c1:9d:2e: + 53:36:97:5b -----BEGIN CERTIFICATE----- MIIDnjCCAoagAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkA4RX -XpmvTv4gFUiB+HYBEaMzsC7/PexpvnaNm8abXcuxpuuEYI6Z/THBZp+7PbsW4MjY -9c0jEIrFluff7ZbZduuCI+KMfQCpcf9x3y4UtKs+KegRwkR1+Z/pzc8vDNt7R7KA -wZBFqAFtJoj/O9hUe83/3Kq9OEmwAtiA4nkHM1p0zc6O33UzQede+yXARftIMnhH -GnAD1lZmMm4tNWt2jKYzTB1gkRBfcPMT7LQDT8+Z+Y7omYUjC8w9F1vs36rriqdS -ZxDdZsWylZ9yK076GTGZYtdg/Z2e4MopE+zjxq9H4IRzqzstWPXY0Qzu9iOxXFUe -M0CHhPnYiqysRu2TAgMBAAGjgfowgfcwHQYDVR0OBBYEFD+1syh3AqSwnUveN0Iu -5lkK2DiEMB8GA1UdIwQYMBaAFHdi31n9eVJ7ms+ZPHy9h85BJ1f2MD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKc/nF +y8YsJgeFj0ukrFIYhELKyzRZklrY9x/fUe1q1eLh3Ab7cg3z5584DUb0GXcxM0xb +rN1sjAZoTEiE4scXKKkLTgcHtnvMqe9sriJuA9bUW/HZqp5hVMcUecvWwo/ah+iu +0rNmT9NMVrjggPhFtxE1U+zUSfgFcPNbVrIFbT5G+L5ncUimZd1VYqMjsJTh8jsX +VEDMN5DZeFrYKZk/AhaoW15k9PKErSXGzyxb52y/iGMMipv72bEwWiF0H+RaVCM6 +oQI0lyyirwgF8NtSWH+GgBKj+XjArdaLElNyVSTKPnDyf3iPt6Ey8Sx/I9t7znnP +zG3Y9xRUXODbfWCzAgMBAAGjgfowgfcwHQYDVR0OBBYEFJnYwZGmE+sPtG/ysMQM +2QoljlMQMB8GA1UdIwQYMBaAFFuf39XG/085Uurvl1vB7eHMRE62MD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgKkMB0GA1UdJQQWMBQGCCsGAQUF +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF BwMBBggrBgEFBQcDAjAPBgNVHRMBAf8EBTADAgEBMA0GCSqGSIb3DQEBCwUAA4IB -AQAPaoSeQSOdd5BoS5M5jnTM9T8KHI/ZRbxdQtEjEeamL1JYI1+676I6xz69JKNH -01r3ADcNpMjN7pJzZ0zQP2MIxJCoQl8Oyx6WrscWX01p5DyMqUd+rapS3bN32Pa/ -8+PFRuzDIa9SYnblmQq6ohxUYo8/C7jBnuNuUE42F9Du4aIuKcAeo5SjaR9NE1BM -RFwPw4CUP29gApjaTzpA5O4Br/Gze0ouOlc7jpyKDD5MSeIiCe/c6vziBCBcjqWC -qQ6Ds+/MCf+pvPpHD2E/f9bf7Fey2hZwQo5oKPVNy/uFFuR4O16KlvBz1vewzk0Y -arkbmTMBFc6QwhOOFOYOMoQo +AQBwQ5ZMmG8oGIpZOYLMJEf4WPj4QwQJHqZRWbxgNv+hQVHhTEBrXotzPMQ3ZfSw +VwGPxroMW5ehazrqU3mPmpn4ygGlFaxgTKenaAdyPO0GcNik0MBfiPJqwKEr51ho +I9N+8JiZfT2RJeOET+9VpO73H9zyr6h0lmwmxNi2hNy3532dK3s75uStduCq6qQm +l0sgzbG9qG6zCEcxogF7tWxy0PASrL1Pvt4jyzQU0hFCP9VwdkyZ2868DtUuS2/D +G13GWIl0Xx1iz98eTBMIiMtmbwDCxW+7tJ4fin2dC6YRbyi7XkarcdTrAIxxazKF +PRfK0BWQZnqylgzBnS5TNpdb -----END CERTIFICATE----- Certificate: @@ -105,35 +105,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:cd:be:5e:d6:3b:af:1c:51:0b:b8:31:41:16:86: - a1:04:5b:d4:c3:d1:e8:16:12:b0:7a:f8:d4:b6:61: - 9b:5a:51:bb:7d:a5:e6:cf:70:48:1d:4e:21:74:de: - f8:de:c7:8d:b2:e1:b5:a0:b9:4a:7c:76:b1:24:e6: - 6d:7b:17:79:28:99:85:44:d5:9c:c7:b3:7c:64:fd: - 3a:97:76:94:88:aa:dc:eb:c3:6e:ab:43:42:d2:89: - b3:cb:56:dc:89:f6:4c:65:e0:be:1e:72:01:c7:c6: - 50:e6:5b:df:a2:de:4f:43:9d:3d:e8:c8:25:2e:50: - 1b:61:0e:2c:45:22:f0:93:7b:d6:05:9f:a4:23:fb: - 78:b1:15:49:fe:eb:73:29:b0:eb:9f:e8:6e:3b:92: - 86:c0:d0:20:e7:4c:b7:69:7f:d3:0f:54:39:05:3a: - 46:9b:47:4d:fa:7e:8c:ce:45:a5:1f:2c:6f:f7:33: - 36:10:bc:67:d9:b6:15:86:71:5f:7a:7a:af:4e:71: - 59:1d:46:d1:76:96:d8:4b:fc:a0:b9:11:e4:5f:5d: - fe:f4:bf:c8:48:54:66:60:be:4b:8b:70:4a:33:e0: - ea:02:7a:cd:a1:37:3d:67:ad:93:f3:d0:a5:9e:f2: - a4:ff:18:3e:77:97:d2:2c:58:12:a5:d6:55:03:6d: - a1:cb + 00:c8:43:a7:fe:04:ff:78:d4:be:60:bd:16:7d:46: + a2:cf:a8:74:42:6b:2b:49:13:61:2e:78:e7:7c:49: + 52:0b:df:bf:b0:e1:5e:dd:f5:39:99:11:ff:d2:14: + 8f:db:de:10:55:90:29:05:b3:49:db:80:87:d1:82: + 6b:15:97:4b:da:5e:d7:da:11:0c:84:1e:db:d9:57: + 4d:52:cf:31:a0:1f:bd:4f:79:22:7a:ee:5a:ae:9d: + 22:df:71:d3:20:12:e5:c8:7e:1e:76:d3:6f:07:6e: + 5c:c3:89:11:a2:35:50:05:4d:6f:30:d8:3c:ef:38: + 80:51:e3:ee:7d:66:81:7f:7c:c4:e7:d0:d4:53:1d: + 00:3d:03:cb:87:f4:3d:b9:13:cd:16:ef:b2:51:3f: + 1c:96:0a:71:90:ca:25:c4:10:71:aa:ba:27:c8:67: + 94:af:63:7c:29:2a:2e:a8:4e:03:7e:6c:5c:2f:96: + 8d:9d:ca:c5:6f:f1:e7:8d:92:a9:ed:aa:87:3a:74: + 12:c7:ea:3f:ad:a2:6a:76:d8:f6:c9:96:27:6e:8b: + a3:b8:cc:d4:2b:9b:61:be:2b:11:c5:bb:da:ef:14: + 23:5d:5d:96:69:c0:a7:7a:16:db:3a:4e:e4:22:84: + 55:02:26:7b:a5:8e:84:12:e4:36:fc:c5:07:d9:ee: + c5:19 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 77:62:DF:59:FD:79:52:7B:9A:CF:99:3C:7C:BD:87:CE:41:27:57:F6 + 5B:9F:DF:D5:C6:FF:4F:39:52:EA:EF:97:5B:C1:ED:E1:CC:44:4E:B6 X509v3 Authority Key Identifier: - keyid:AA:16:BC:F9:7E:AD:F4:71:D6:D4:94:D9:61:4B:01:38:B2:95:8B:84 + keyid:8A:85:CE:7E:DC:AF:15:B7:01:C2:5C:81:3F:3D:14:49:D2:38:08:AB Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -148,41 +148,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 4f:dc:80:b5:cb:13:5d:2d:af:b6:6d:7b:51:4e:81:36:16:d1: - 36:bb:5d:37:be:6e:4d:40:87:57:5e:db:a9:75:ae:46:e4:74: - c4:dc:e5:fd:bc:04:2f:ca:7f:b4:67:db:65:f7:d6:37:94:74: - a4:f9:8a:e2:da:d5:64:9e:00:4d:85:39:07:6f:e0:96:d7:2b: - ef:73:d3:a4:77:6b:e1:ee:d4:f7:54:ba:30:23:a3:95:2c:c8: - 38:21:0c:14:fb:f4:44:27:9a:f3:81:2f:89:59:3e:12:52:52: - bf:4e:7c:93:7c:db:b7:df:9b:fb:b6:3c:70:fc:67:07:a6:42: - 99:6d:95:c0:64:f8:99:50:aa:2f:b6:19:d8:63:80:0f:22:c3: - b4:d6:b0:09:9b:62:a0:37:0e:21:e5:ef:c2:61:ed:7e:2f:f5: - 7d:09:19:f4:6f:8a:c8:7a:0e:0a:44:41:9b:22:01:d4:7c:c9: - a8:da:d5:91:d9:a6:1f:1f:b8:4a:6a:bd:bc:7e:36:33:7a:e0: - 9c:58:c1:75:71:9f:14:04:ce:c9:1f:e6:dc:40:95:ee:ed:b3: - 6c:77:5c:31:9a:90:bd:99:80:ab:8f:ef:8d:a6:e0:64:ba:16: - 03:a2:21:5d:75:bd:d9:50:7f:d2:02:44:58:9e:b5:c2:1d:37: - 50:8f:27:21 + 14:37:73:58:3c:37:40:b3:ff:a3:e4:f3:2d:f1:26:6b:c9:82: + 17:c5:97:4d:bd:84:6a:19:25:08:20:a9:7d:38:fb:3d:a4:7f: + 06:80:7e:fb:6e:7e:bf:26:90:4b:96:ab:a7:f9:49:a5:d6:77: + 67:b5:ab:bb:ad:ea:84:5a:43:13:f9:b3:1a:80:b1:59:cc:d4: + 1d:33:e8:0d:b0:af:9a:80:44:0e:a6:01:f3:a4:e2:87:2b:db: + 47:be:0f:28:08:d9:ab:7c:d9:4c:86:d0:ba:bc:1b:dc:99:9b: + 33:ea:a7:3e:ef:52:b8:70:a8:27:e7:83:59:cd:57:38:7f:a1: + 36:53:4f:a0:1b:69:7d:e4:fa:9f:2b:52:50:09:23:62:c6:c0: + 01:a6:85:76:45:80:6a:b6:54:bd:60:5d:5a:3a:04:92:ab:e3: + bd:0c:94:7f:5f:79:9c:3f:6e:12:c3:96:b0:78:44:9b:03:1e: + 79:11:fb:8d:a5:1d:55:c9:b3:e5:a0:26:18:10:68:92:b8:54: + 68:d0:2d:e1:99:0c:08:9c:cc:40:50:34:69:9f:13:e6:d7:87: + 85:e7:57:63:3e:17:0f:ce:02:7b:78:e5:18:ef:1a:55:b1:6a: + 55:f8:44:3e:92:1d:08:a1:7d:bb:fc:00:be:e3:1b:83:aa:b8: + 75:f0:05:45 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzb5e1juv -HFELuDFBFoahBFvUw9HoFhKwevjUtmGbWlG7faXmz3BIHU4hdN743seNsuG1oLlK -fHaxJOZtexd5KJmFRNWcx7N8ZP06l3aUiKrc68Nuq0NC0omzy1bcifZMZeC+HnIB -x8ZQ5lvfot5PQ5096MglLlAbYQ4sRSLwk3vWBZ+kI/t4sRVJ/utzKbDrn+huO5KG -wNAg50y3aX/TD1Q5BTpGm0dN+n6MzkWlHyxv9zM2ELxn2bYVhnFfenqvTnFZHUbR -dpbYS/yguRHkX13+9L/ISFRmYL5Li3BKM+DqAnrNoTc9Z62T89ClnvKk/xg+d5fS -LFgSpdZVA22hywIDAQABo4HLMIHIMB0GA1UdDgQWBBR3Yt9Z/XlSe5rPmTx8vYfO -QSdX9jAfBgNVHSMEGDAWgBSqFrz5fq30cdbUlNlhSwE4spWLhDA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyEOn/gT/ +eNS+YL0WfUaiz6h0QmsrSRNhLnjnfElSC9+/sOFe3fU5mRH/0hSP294QVZApBbNJ +24CH0YJrFZdL2l7X2hEMhB7b2VdNUs8xoB+9T3kieu5arp0i33HTIBLlyH4edtNv +B25cw4kRojVQBU1vMNg87ziAUePufWaBf3zE59DUUx0APQPLh/Q9uRPNFu+yUT8c +lgpxkMolxBBxqronyGeUr2N8KSouqE4DfmxcL5aNncrFb/HnjZKp7aqHOnQSx+o/ +raJqdtj2yZYnboujuMzUK5thvisRxbva7xQjXV2WacCnehbbOk7kIoRVAiZ7pY6E +EuQ2/MUH2e7FGQIDAQABo4HLMIHIMB0GA1UdDgQWBBRbn9/Vxv9POVLq75dbwe3h +zEROtjAfBgNVHSMEGDAWgBSKhc5+3K8VtwHCXIE/PRRJ0jgIqzA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AE/cgLXLE10tr7Zte1FOgTYW0Ta7XTe+bk1Ah1de26l1rkbkdMTc5f28BC/Kf7Rn -22X31jeUdKT5iuLa1WSeAE2FOQdv4JbXK+9z06R3a+Hu1PdUujAjo5UsyDghDBT7 -9EQnmvOBL4lZPhJSUr9OfJN827ffm/u2PHD8ZwemQpltlcBk+JlQqi+2GdhjgA8i -w7TWsAmbYqA3DiHl78Jh7X4v9X0JGfRvish6DgpEQZsiAdR8yaja1ZHZph8fuEpq -vbx+NjN64JxYwXVxnxQEzskf5txAle7ts2x3XDGakL2ZgKuP742m4GS6FgOiIV11 -vdlQf9ICRFietcIdN1CPJyE= +ABQ3c1g8N0Cz/6Pk8y3xJmvJghfFl029hGoZJQggqX04+z2kfwaAfvtufr8mkEuW +q6f5SaXWd2e1q7ut6oRaQxP5sxqAsVnM1B0z6A2wr5qARA6mAfOk4ocr20e+DygI +2at82UyG0Lq8G9yZmzPqpz7vUrhwqCfng1nNVzh/oTZTT6AbaX3k+p8rUlAJI2LG +wAGmhXZFgGq2VL1gXVo6BJKr470MlH9feZw/bhLDlrB4RJsDHnkR+42lHVXJs+Wg +JhgQaJK4VGjQLeGZDAiczEBQNGmfE+bXh4XnV2M+Fw/OAnt45RjvGlWxalX4RD6S +HQihfbv8AL7jG4OquHXwBUU= -----END CERTIFICATE----- Certificate: @@ -199,30 +199,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:eb:e2:5f:c7:d4:38:fe:e8:6d:64:82:8e:c6:d8: - d7:a5:a4:ca:65:5f:55:b6:c5:5c:9c:f6:cc:af:d6: - 4b:ec:a1:5c:c3:55:08:19:1c:0e:99:4a:4d:b2:14: - 22:36:a0:db:eb:c3:1c:6f:d6:05:69:a5:5b:61:59: - 7a:fb:88:da:28:1d:95:c6:fe:31:51:06:ac:f7:41: - a6:10:08:25:7f:41:f1:01:39:48:27:c1:34:73:2f: - c2:05:b1:97:42:80:de:d4:3a:44:db:a0:34:8c:b8: - 5c:de:ab:42:c8:1e:f1:08:7e:10:3a:ee:16:8e:61: - ee:ab:aa:f5:7a:2b:ab:af:a2:69:da:f4:b5:95:32: - 17:bc:cf:ba:ad:a7:7b:fc:ea:9b:43:bc:ae:07:c3: - 92:15:ce:4a:fb:ee:33:e6:89:7d:09:88:f9:a5:af: - 0b:4d:c1:7f:28:30:d8:93:75:92:b5:27:2c:01:bd: - 52:05:5d:42:a5:dc:f3:1f:1e:b2:3c:a1:17:19:9b: - 30:ec:18:85:41:e3:72:d2:93:ef:a0:4d:0b:d4:8a: - fa:89:0d:b6:46:fe:bc:f0:82:de:99:4c:1e:57:1c: - 8d:71:b3:9c:41:ea:03:8f:a1:d6:f2:a4:9d:1c:b8: - 50:c8:c0:19:6a:18:4d:c0:7f:7d:f8:b3:af:c6:62: - 09:9b + 00:d3:fa:b1:7f:2b:e4:ff:ad:10:e9:54:54:ef:6a: + 81:02:0b:b6:83:70:89:ae:d9:4d:54:ea:95:99:88: + 3d:59:7d:97:1e:fd:b9:9b:53:8b:14:1e:a4:68:07: + ed:68:65:68:7d:4f:ba:28:38:ff:87:33:98:2c:32: + d0:e5:00:78:0f:6a:20:32:7d:9e:7d:9b:af:e9:39: + fe:5c:bc:04:1c:06:1a:11:1a:46:24:34:f7:e3:af: + 56:6d:38:8f:46:39:a6:01:fa:56:f9:d7:9e:73:35: + 1a:23:94:12:0f:0d:d3:ec:fe:09:57:f6:a0:9c:18: + a7:ba:4b:c9:37:a3:0c:60:77:4b:77:5f:c8:9c:7e: + b1:5c:b3:43:72:da:c9:6c:c8:71:24:ab:2f:c4:83: + bd:b0:4f:60:af:46:0d:7b:34:8f:e9:70:a2:85:ed: + 6e:05:df:e3:c1:40:3d:17:b1:f0:a3:7d:e2:17:6f: + 3d:fe:11:81:90:1f:c2:f8:bc:2c:d5:9c:fc:04:47: + 24:c4:5e:cf:20:0f:31:e8:7d:ea:b5:69:b8:0f:35: + 19:5d:13:08:db:d6:a2:dc:7a:33:92:b3:9c:fc:35: + de:cf:55:96:f7:52:6e:a9:e2:93:b0:52:07:8d:0f: + 95:9c:0e:0d:1b:48:0e:b8:41:4f:eb:68:da:e5:6d: + a1:63 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - AA:16:BC:F9:7E:AD:F4:71:D6:D4:94:D9:61:4B:01:38:B2:95:8B:84 + 8A:85:CE:7E:DC:AF:15:B7:01:C2:5C:81:3F:3D:14:49:D2:38:08:AB X509v3 Authority Key Identifier: - keyid:AA:16:BC:F9:7E:AD:F4:71:D6:D4:94:D9:61:4B:01:38:B2:95:8B:84 + keyid:8A:85:CE:7E:DC:AF:15:B7:01:C2:5C:81:3F:3D:14:49:D2:38:08:AB Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -237,41 +237,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 07:d5:33:48:84:04:40:42:f1:f2:ff:d9:07:5e:5f:bf:d9:72: - 07:6f:a9:6a:f1:5f:f3:59:69:99:41:cd:9d:37:65:cb:2e:c8: - 06:f3:0a:0c:da:46:28:6d:d6:06:08:20:5b:ca:ed:c9:14:6e: - 11:5a:9f:df:33:06:67:44:e7:63:ba:b2:42:53:2e:31:0b:ce: - ef:c1:74:60:76:96:0b:3f:da:9b:f2:a1:d1:89:99:34:f0:f9: - ae:8c:39:fd:3d:a6:be:7f:f5:82:f0:25:62:b0:b7:b4:bc:1b: - 51:c3:60:05:af:bc:22:b9:62:49:c0:27:12:72:c2:ac:d9:1e: - 17:ff:e7:57:f6:b2:f8:37:dd:76:1a:dc:e0:89:4f:b3:8a:74: - 0b:76:5f:48:fc:6c:af:6d:42:85:25:b4:44:ca:27:ed:2e:fb: - d8:df:1a:a1:82:bd:6c:25:35:62:cb:50:db:27:9e:b2:65:cc: - 58:fa:fd:1e:6a:2a:77:cd:3f:b4:6b:e6:71:ec:85:f5:7b:73: - a9:73:05:78:1f:26:21:dc:8b:a4:f5:e1:06:a6:97:13:9f:5f: - 84:03:12:59:37:81:17:21:2d:39:db:b7:b0:f4:17:73:90:7c: - a1:2f:53:c0:4a:af:53:54:2c:5b:9c:8a:e3:66:80:40:30:96: - e3:d8:b2:23 + 3b:f2:cd:03:ef:d9:61:67:ea:7b:dd:e9:88:13:07:8d:94:51: + 62:bb:56:d6:c1:be:8a:d0:a0:81:fe:1d:90:6d:85:94:2c:ac: + 33:fb:5d:f6:c9:74:72:7b:f7:5a:b8:e4:b6:dd:30:bb:93:3b: + 74:22:e9:fe:e9:5c:b2:8b:d4:a1:21:0c:e6:3c:ee:86:ae:9e: + 8a:fd:88:bb:a7:fd:20:bb:9c:ff:d4:ca:6f:66:60:19:14:d1: + d1:f2:d6:f3:b2:58:c8:4d:15:30:e1:e0:fc:40:ad:55:25:ba: + 8d:25:68:26:c4:64:68:7e:94:e6:f4:96:5a:c4:e6:ba:85:5b: + b2:32:d1:82:32:8b:f4:3f:6f:4e:d5:de:2e:d7:09:3c:1f:7e: + 93:3a:22:d8:ef:40:41:47:28:80:03:77:0d:f9:51:28:28:b6: + 53:24:66:f7:3b:56:6c:53:58:55:b2:49:7c:c4:1a:3d:a1:37: + 29:19:8a:9a:99:84:7f:63:ac:21:85:f5:02:5a:5a:1c:7c:0a: + 8b:bc:83:ff:80:57:2e:ce:62:c5:79:58:24:12:e8:af:a4:6c: + ce:a8:92:2b:25:c4:e3:b6:27:f7:d5:dd:e6:fa:cc:91:6c:59: + 5e:f5:a4:e2:4f:0b:18:fa:4e:9c:88:66:20:25:af:87:14:01: + 27:08:89:6a -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOviX8fUOP7obWSCjsbY -16WkymVfVbbFXJz2zK/WS+yhXMNVCBkcDplKTbIUIjag2+vDHG/WBWmlW2FZevuI -2igdlcb+MVEGrPdBphAIJX9B8QE5SCfBNHMvwgWxl0KA3tQ6RNugNIy4XN6rQsge -8Qh+EDruFo5h7quq9Xorq6+iadr0tZUyF7zPuq2ne/zqm0O8rgfDkhXOSvvuM+aJ -fQmI+aWvC03Bfygw2JN1krUnLAG9UgVdQqXc8x8esjyhFxmbMOwYhUHjctKT76BN -C9SK+okNtkb+vPCC3plMHlccjXGznEHqA4+h1vKknRy4UMjAGWoYTcB/ffizr8Zi -CZsCAwEAAaOByzCByDAdBgNVHQ4EFgQUqha8+X6t9HHW1JTZYUsBOLKVi4QwHwYD -VR0jBBgwFoAUqha8+X6t9HHW1JTZYUsBOLKVi4QwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANP6sX8r5P+tEOlUVO9q +gQILtoNwia7ZTVTqlZmIPVl9lx79uZtTixQepGgH7WhlaH1Puig4/4czmCwy0OUA +eA9qIDJ9nn2br+k5/ly8BBwGGhEaRiQ09+OvVm04j0Y5pgH6VvnXnnM1GiOUEg8N +0+z+CVf2oJwYp7pLyTejDGB3S3dfyJx+sVyzQ3LayWzIcSSrL8SDvbBPYK9GDXs0 +j+lwooXtbgXf48FAPRex8KN94hdvPf4RgZAfwvi8LNWc/ARHJMRezyAPMeh96rVp +uA81GV0TCNvWotx6M5KznPw13s9VlvdSbqnik7BSB40PlZwODRtIDrhBT+to2uVt +oWMCAwEAAaOByzCByDAdBgNVHQ4EFgQUioXOftyvFbcBwlyBPz0USdI4CKswHwYD +VR0jBBgwFoAUioXOftyvFbcBwlyBPz0USdI4CKswNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAH1TNIhARA -QvHy/9kHXl+/2XIHb6lq8V/zWWmZQc2dN2XLLsgG8woM2kYobdYGCCBbyu3JFG4R -Wp/fMwZnROdjurJCUy4xC87vwXRgdpYLP9qb8qHRiZk08PmujDn9Paa+f/WC8CVi -sLe0vBtRw2AFr7wiuWJJwCcScsKs2R4X/+dX9rL4N912GtzgiU+zinQLdl9I/Gyv -bUKFJbREyiftLvvY3xqhgr1sJTViy1DbJ56yZcxY+v0eaip3zT+0a+Zx7IX1e3Op -cwV4HyYh3Iuk9eEGppcTn1+EAxJZN4EXIS0527ew9BdzkHyhL1PASq9TVCxbnIrj -ZoBAMJbj2LIj +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA78s0D79lh +Z+p73emIEweNlFFiu1bWwb6K0KCB/h2QbYWULKwz+132yXRye/dauOS23TC7kzt0 +Iun+6Vyyi9ShIQzmPO6Grp6K/Yi7p/0gu5z/1MpvZmAZFNHR8tbzsljITRUw4eD8 +QK1VJbqNJWgmxGRofpTm9JZaxOa6hVuyMtGCMov0P29O1d4u1wk8H36TOiLY70BB +RyiAA3cN+VEoKLZTJGb3O1ZsU1hVskl8xBo9oTcpGYqamYR/Y6whhfUCWlocfAqL +vIP/gFcuzmLFeVgkEuivpGzOqJIrJcTjtif31d3m+syRbFle9aTiTwsY+k6ciGYg +Ja+HFAEnCIlq -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-not-end-entity.pem b/net/data/verify_certificate_chain_unittest/target-not-end-entity.pem index 249d42a..ee5a515 100644 --- a/net/data/verify_certificate_chain_unittest/target-not-end-entity.pem +++ b/net/data/verify_certificate_chain_unittest/target-not-end-entity.pem
@@ -1,6 +1,6 @@ -[Created by: ./generate-target-not-end-entity.py] +[Created by: generate-target-not-end-entity.py] -Certificate chain with 1 intermediary, a trusted root, and a target +Certificate chain with 1 intermediate, a trusted root, and a target certificate that is also a CA. Verification is expected to succeed, as the test code accepts any target certificate. @@ -9,7 +9,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,79 +18,79 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ee:c2:63:d9:42:ea:55:e7:60:10:b7:7a:07:f3: - 2c:85:b7:38:91:0c:ec:29:d5:fd:ca:14:ad:58:8b: - 12:c2:fd:b6:2e:fb:50:dc:04:e9:c3:20:d1:db:23: - da:0e:5e:93:94:cf:82:54:fd:e7:5d:9a:ee:01:37: - 84:67:e9:f4:93:7b:ef:be:b1:e1:a3:5a:5a:eb:31: - b1:29:8e:05:1a:90:d5:15:aa:5e:de:29:1b:1f:80: - eb:17:fa:89:4b:d4:5b:77:0f:d1:e0:7b:f2:8d:a6: - b4:aa:22:44:42:3e:bb:af:b7:5e:06:ae:0b:c0:20: - 6e:ea:90:ef:4c:cb:34:5a:6b:37:29:a7:07:0c:66: - 65:16:36:29:f0:d7:c8:e7:cc:88:2f:cc:bd:63:33: - 2d:f5:91:8d:9b:69:f6:f3:05:d3:ca:87:96:ed:79: - e4:0f:85:a4:41:62:aa:f2:f9:89:fe:a7:92:e5:7c: - 0a:6e:74:70:b0:be:b2:67:12:2c:c4:44:77:54:f0: - d6:07:26:aa:ad:8f:9c:f2:12:c2:c1:23:2d:54:8c: - 09:df:94:59:7c:8b:e0:62:f1:2d:7b:cc:26:f3:11: - 7b:97:04:3b:2a:02:c5:8f:2f:28:c5:c4:52:dc:4c: - 5b:6f:0b:8c:e4:89:0a:85:d0:a3:d4:02:74:35:48: - c7:c5 + 00:f5:cd:3c:3f:41:74:34:24:e9:1d:74:42:a1:a8: + 16:8e:38:0b:ef:74:5b:38:0c:fb:18:b5:f6:08:f3: + 7e:d6:03:ac:02:7c:38:07:dc:c2:3e:78:bd:a7:2d: + 44:3d:6b:b4:74:42:71:c4:0c:93:c7:9a:ba:83:e9: + 6a:12:39:ab:fd:63:f5:e9:d7:97:33:93:7c:1b:77: + 78:c6:7a:7b:32:31:c3:68:aa:b0:b9:78:7b:c2:5a: + 85:0b:04:b4:c1:2b:fd:ce:71:02:6a:b1:0c:f6:1a: + 65:99:58:29:6e:95:21:69:7c:2a:c0:ff:18:90:28: + 92:ad:40:f5:83:67:63:04:14:21:aa:d2:29:35:22: + 03:f8:28:27:8a:69:82:de:aa:f4:1e:5e:93:19:27: + 74:4a:6b:d5:82:d3:2e:66:cb:23:e9:34:d1:70:0f: + 84:cb:1d:87:55:9e:1c:f2:b9:5a:e8:d0:43:dc:89: + a3:5c:28:61:fc:89:97:ab:ff:4a:2c:bc:c0:58:f2: + 68:f8:d7:9f:3e:e8:b1:8c:70:5a:d0:f7:1a:d3:dd: + d1:24:ba:fe:15:f8:bd:ea:16:8d:ee:9e:7e:99:30: + 22:6c:24:21:67:d1:fa:50:61:ce:65:48:5f:0e:79: + 02:0d:e9:b1:69:d3:4c:e7:2d:5d:57:8b:d5:e8:42: + d4:e7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 75:E4:93:1E:26:35:79:D3:34:F7:E2:FD:A3:1C:38:1C:68:8B:F6:CD + B4:44:21:DE:96:81:AA:7F:9A:5B:79:CB:57:AA:3D:13:A5:4B:6A:93 X509v3 Authority Key Identifier: - keyid:58:01:24:B6:3B:E6:E7:85:87:83:6F:54:23:6A:C2:D4:E0:9D:6C:37 + keyid:01:CB:1D:FC:13:00:C9:67:B2:D6:76:F2:0A:4F:9D:6A:D4:E2:9D:3D Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Certificate Sign, CRL Sign X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 86:0e:74:e2:4f:1c:93:23:8a:9c:37:4a:42:ff:ab:4b:7b:5c: - 38:c3:67:11:1d:60:03:b3:1e:57:15:8f:1f:b2:94:45:f0:44: - 31:f1:7e:30:0e:f9:cc:48:7b:a3:27:2b:bf:9a:bd:e9:a1:69: - e2:1f:e7:91:ef:98:e9:58:5e:f8:7c:a0:8d:e5:81:85:af:8c: - a6:04:c5:57:3e:cb:5f:33:dc:ca:b6:72:5b:e7:82:9b:68:91: - 73:aa:f2:47:b9:6b:e2:7d:12:b4:85:87:2a:a9:49:a0:cd:79: - 41:8d:60:33:43:e8:aa:55:4b:60:8a:41:26:ca:e1:75:35:bd: - 45:00:a7:1a:2e:16:15:14:1f:be:9d:aa:25:54:e2:0d:f2:da: - 96:27:72:2c:75:4b:d7:06:5f:9d:47:37:25:08:7f:1f:ad:df: - e7:6f:1d:f6:95:63:e8:08:02:c9:51:dc:ae:4a:31:eb:c5:61: - 24:79:4c:d1:88:79:1f:04:ae:35:79:24:bc:29:4d:0c:c0:05: - 99:91:db:f3:83:af:95:4f:f3:13:35:b4:a9:40:04:81:cb:f5: - 39:e1:55:96:cf:42:86:68:26:f8:cc:82:6a:b9:10:77:41:55: - 03:16:9d:0e:57:37:33:a0:53:ca:7e:0b:1c:85:9e:c2:81:8d: - c8:3e:b8:62 + 0e:8f:41:87:a8:42:bd:13:c8:62:be:1d:f6:ad:a4:cd:00:5d: + 21:61:73:5f:75:27:67:16:98:11:ca:0f:cd:9d:bf:96:2a:75: + 62:35:68:e0:af:f7:6f:c4:75:69:f2:a7:89:27:96:64:4f:0e: + 7e:f0:82:89:65:1e:a2:08:cd:8b:f1:e5:a0:32:c5:93:2a:62: + 4c:3c:d2:9f:95:55:5d:87:a8:fe:ef:fa:92:aa:08:76:38:67: + 0a:d3:f9:0a:b9:93:69:e6:d3:78:ab:9f:eb:ef:35:a7:24:ae: + 10:d7:3d:17:bd:86:07:c0:64:0f:d6:fc:55:c1:54:70:6c:22: + 4f:ae:c1:64:ca:fc:dc:97:eb:8b:d2:22:52:d8:52:2c:4d:d4: + 5c:df:10:52:ab:ab:b2:89:10:e8:ed:00:19:8a:65:e8:4e:8c: + e2:5d:5b:cd:35:4c:55:24:30:be:57:f7:f0:51:ef:52:9d:34: + 60:0d:1e:f5:ba:8a:33:83:ac:db:dc:d9:2b:0b:f3:46:1c:98: + 3a:5e:5c:c7:36:7e:62:62:a4:13:68:2e:35:32:a1:bd:9d:e9: + 67:bb:58:85:3b:ea:94:1f:c7:91:35:b0:2c:ce:25:2b:9c:9f: + 60:7a:09:fa:32:1c:9d:4e:ca:ef:20:9d:ca:e1:ad:20:cd:63: + 20:ce:48:fd -----BEGIN CERTIFICATE----- MIIDfzCCAmegAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDuwmPZ -QupV52AQt3oH8yyFtziRDOwp1f3KFK1YixLC/bYu+1DcBOnDINHbI9oOXpOUz4JU -/eddmu4BN4Rn6fSTe+++seGjWlrrMbEpjgUakNUVql7eKRsfgOsX+olL1Ft3D9Hg -e/KNprSqIkRCPruvt14GrgvAIG7qkO9MyzRaazcppwcMZmUWNinw18jnzIgvzL1j -My31kY2bafbzBdPKh5bteeQPhaRBYqry+Yn+p5LlfApudHCwvrJnEizERHdU8NYH -Jqqtj5zyEsLBIy1UjAnflFl8i+Bi8S17zCbzEXuXBDsqAsWPLyjFxFLcTFtvC4zk -iQqF0KPUAnQ1SMfFAgMBAAGjgdswgdgwHQYDVR0OBBYEFHXkkx4mNXnTNPfi/aMc -OBxoi/bNMB8GA1UdIwQYMBaAFFgBJLY75ueFh4NvVCNqwtTgnWw3MD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD1zTw/ +QXQ0JOkddEKhqBaOOAvvdFs4DPsYtfYI837WA6wCfDgH3MI+eL2nLUQ9a7R0QnHE +DJPHmrqD6WoSOav9Y/Xp15czk3wbd3jGensyMcNoqrC5eHvCWoULBLTBK/3OcQJq +sQz2GmWZWClulSFpfCrA/xiQKJKtQPWDZ2MEFCGq0ik1IgP4KCeKaYLeqvQeXpMZ +J3RKa9WC0y5myyPpNNFwD4TLHYdVnhzyuVro0EPciaNcKGH8iZer/0osvMBY8mj4 +158+6LGMcFrQ9xrT3dEkuv4V+L3qFo3unn6ZMCJsJCFn0fpQYc5lSF8OeQIN6bFp +00znLV1Xi9XoQtTnAgMBAAGjgdswgdgwHQYDVR0OBBYEFLREId6Wgap/mlt5y1eq +PROlS2qTMB8GA1UdIwQYMBaAFAHLHfwTAMlnstZ28gpPnWrU4p09MD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQELBQADggEBAIYOdOJPHJMjipw3SkL/q0t7XDjDZxEdYAOzHlcV -jx+ylEXwRDHxfjAO+cxIe6MnK7+avemhaeIf55HvmOlYXvh8oI3lgYWvjKYExVc+ -y18z3Mq2clvngptokXOq8ke5a+J9ErSFhyqpSaDNeUGNYDND6KpVS2CKQSbK4XU1 -vUUApxouFhUUH76dqiVU4g3y2pYncix1S9cGX51HNyUIfx+t3+dvHfaVY+gIAslR -3K5KMevFYSR5TNGIeR8ErjV5JLwpTQzABZmR2/ODr5VP8xM1tKlABIHL9TnhVZbP -QoZoJvjMgmq5EHdBVQMWnQ5XNzOgU8p+CxyFnsKBjcg+uGI= +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggEBAA6PQYeoQr0TyGK+HfatpM0AXSFhc191J2cWmBHK +D82dv5YqdWI1aOCv92/EdWnyp4knlmRPDn7wgollHqIIzYvx5aAyxZMqYkw80p+V +VV2HqP7v+pKqCHY4ZwrT+Qq5k2nm03irn+vvNackrhDXPRe9hgfAZA/W/FXBVHBs +Ik+uwWTK/NyX64vSIlLYUixN1FzfEFKrq7KJEOjtABmKZehOjOJdW801TFUkML5X +9/BR71KdNGANHvW6ijODrNvc2SsL80YcmDpeXMc2fmJipBNoLjUyob2d6We7WIU7 +6pQfx5E1sCzOJSucn2B6CfoyHJ1Oyu8gncrhrSDNYyDOSP0= -----END CERTIFICATE----- Certificate: @@ -102,35 +102,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c7:c3:50:5c:f2:60:57:55:0d:be:39:c4:be:74: - 76:26:ce:b2:4c:be:ac:dc:17:ac:a0:a4:c3:5f:ae: - 64:59:da:20:77:7c:88:28:0e:75:7e:ef:70:80:9c: - 0c:8e:94:1c:48:ea:4f:b3:34:1e:e4:cf:af:f8:29: - 13:06:6f:19:0f:e7:9a:df:59:8c:44:d3:0e:26:70: - 5f:c7:a5:3a:36:4d:4b:50:9c:bd:14:fb:21:4a:f8: - d6:2b:49:94:2b:df:4c:8c:89:32:d7:53:f8:59:14: - e9:23:76:f3:fb:b4:27:2d:c9:28:17:cc:fe:06:2c: - bd:b5:97:30:83:40:9e:c7:ff:9e:0a:99:a7:f0:e8: - 0c:c7:73:ca:3f:48:3a:75:97:bd:de:9a:84:6d:5b: - 13:dc:0c:64:1e:66:4f:72:10:28:cd:34:bb:15:f1: - ca:65:3f:03:db:aa:fa:4d:4c:26:64:8a:3f:6f:67: - 51:fa:15:2d:71:7c:fd:0b:12:9e:12:c2:77:9c:f2: - a8:86:78:f2:6f:9f:79:c9:50:51:28:41:13:79:79: - 7c:a1:93:dd:71:f7:08:92:99:f7:9c:37:ff:2b:82: - b6:4e:a9:93:47:83:dc:36:83:40:13:22:96:eb:5e: - 2f:ad:a1:d6:70:38:c5:2b:3a:0b:ce:4c:fc:81:c1: - 49:f5 + 00:d0:8e:2e:ba:a1:8d:d9:60:16:cd:17:31:c9:08: + 43:93:94:76:48:55:a2:78:19:17:70:8e:95:25:ac: + f9:b9:81:33:66:8c:2c:79:b7:d9:f5:89:92:1b:d2: + 4e:01:e9:69:e6:61:b4:d7:96:78:6d:a0:23:cf:67: + 11:cd:fb:fe:3d:d6:b8:ad:64:3f:f6:b9:f5:17:05: + 89:1c:fb:3d:94:c3:18:43:e4:1e:15:0f:8d:26:25: + de:db:f0:c0:d6:67:cc:90:f8:33:1c:d1:81:4b:63: + 3e:c9:76:61:65:80:b4:13:97:9d:2e:99:ca:a2:6b: + cc:10:a6:3b:2f:20:90:ee:a5:6c:cf:f6:a0:7a:7b: + ce:59:c6:19:42:3f:9f:69:ab:f3:c1:2f:26:8d:fe: + ac:b8:ec:33:d2:d6:bb:4e:3f:80:c0:d9:12:33:35: + 05:2d:30:ce:6b:1c:12:ea:89:6f:8a:93:15:0e:0c: + c0:10:7a:99:1e:3f:fb:85:88:09:82:16:f0:62:ed: + fb:26:63:93:71:72:9b:15:11:19:c3:36:5b:10:c1: + b1:12:51:2e:6a:af:c1:d1:9d:fd:8b:7f:13:19:5d: + ce:00:49:3d:33:32:d1:6b:c5:14:4e:10:92:4d:1f: + 28:07:01:29:8f:fe:5d:ff:98:b8:2f:99:fc:68:21: + 1d:1f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 58:01:24:B6:3B:E6:E7:85:87:83:6F:54:23:6A:C2:D4:E0:9D:6C:37 + 01:CB:1D:FC:13:00:C9:67:B2:D6:76:F2:0A:4F:9D:6A:D4:E2:9D:3D X509v3 Authority Key Identifier: - keyid:92:00:23:C7:C3:33:14:62:3D:59:C9:52:A4:CC:A0:5C:16:DD:35:2D + keyid:2D:38:72:D3:21:CA:2A:39:AD:2D:B4:9A:10:5C:CB:58:56:82:C4:AA Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -145,41 +145,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 3d:c9:5f:4a:71:a9:28:ca:c0:27:47:f1:23:b0:87:2c:5f:4c: - 20:de:1e:60:8b:6d:c3:42:2c:bf:ed:82:26:00:b6:f8:4f:7e: - ac:37:ec:43:ea:7a:a5:58:fc:34:cd:af:54:2d:3e:30:e8:44: - 8d:37:8d:5b:5c:b8:52:bd:f1:d5:ab:c7:61:d9:83:b5:f5:51: - 41:ed:f0:1c:02:c7:ae:4f:57:60:49:c8:6d:3e:44:53:13:ce: - 97:47:78:b5:04:23:fd:0a:49:e5:99:67:90:07:e7:a5:66:61: - 2b:93:5f:b5:dd:d0:fe:92:e8:36:3e:4f:cb:a7:f0:64:d2:88: - 11:e5:78:42:89:a7:3f:b6:fe:93:3a:d8:52:d0:8c:9d:ea:89: - 21:56:67:04:21:c5:c2:83:42:13:43:ee:5c:1c:2f:00:97:45: - 56:4a:18:21:ad:2d:b3:b6:38:ed:5e:df:fe:13:43:53:90:2a: - 05:ab:47:6a:dd:9e:9e:51:a2:f2:98:08:03:4c:3f:17:5f:55: - e7:b0:f3:ae:62:be:a3:0f:5f:d2:3c:b9:c3:48:55:a9:f6:0d: - 4b:fd:15:54:f5:0b:57:30:c7:f5:fb:61:ff:0a:82:35:58:21: - f0:05:90:a2:d6:52:d4:6b:53:a8:ea:98:68:53:59:0c:11:db: - b2:af:fd:3e + 11:b8:7a:ac:f4:c5:c5:cc:bc:46:f9:9e:03:6d:69:f7:3c:15: + 71:be:be:15:0d:a4:b9:23:cd:e0:15:a4:51:36:86:2a:65:7e: + 7e:29:bc:58:d1:9d:11:2d:0e:22:61:65:ca:a4:9e:61:3f:16: + 23:ca:ff:91:62:34:55:56:1c:b8:83:b7:62:cb:9a:07:46:53: + 35:53:8a:04:7e:fa:12:72:af:af:04:1d:18:a4:c1:ba:5b:c7: + db:01:97:58:01:d1:73:e9:85:fb:16:27:0f:d2:eb:ce:35:7e: + e1:a1:91:52:d7:91:03:59:ab:c0:ed:a6:bc:7b:70:bc:af:73: + 20:10:a6:a8:f4:45:28:0e:8b:a8:f7:e8:03:64:c6:f1:3d:12: + dc:f2:30:75:85:a9:68:44:ad:fb:ab:36:ed:8f:84:25:79:d3: + d6:f1:c8:10:1a:ac:c4:fc:65:6b:0c:77:ef:d3:61:de:91:74: + df:da:f3:f2:f1:07:93:5f:e0:c9:6a:6d:58:29:e1:ef:98:93: + 3a:13:82:09:ec:90:82:5a:d7:ef:1d:d4:50:b8:e6:ff:ef:8f: + 8f:9e:38:72:e5:f3:58:f9:04:90:b3:a9:a3:fd:dc:82:ab:44: + be:bc:47:f7:79:15:31:91:1c:c1:3c:5c:86:d1:78:bc:1e:0c: + 9e:af:18:60 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx8NQXPJg -V1UNvjnEvnR2Js6yTL6s3BesoKTDX65kWdogd3yIKA51fu9wgJwMjpQcSOpPszQe -5M+v+CkTBm8ZD+ea31mMRNMOJnBfx6U6Nk1LUJy9FPshSvjWK0mUK99MjIky11P4 -WRTpI3bz+7QnLckoF8z+Biy9tZcwg0Cex/+eCpmn8OgMx3PKP0g6dZe93pqEbVsT -3AxkHmZPchAozTS7FfHKZT8D26r6TUwmZIo/b2dR+hUtcXz9CxKeEsJ3nPKohnjy -b595yVBRKEETeXl8oZPdcfcIkpn3nDf/K4K2TqmTR4PcNoNAEyKW614vraHWcDjF -KzoLzkz8gcFJ9QIDAQABo4HLMIHIMB0GA1UdDgQWBBRYASS2O+bnhYeDb1QjasLU -4J1sNzAfBgNVHSMEGDAWgBSSACPHwzMUYj1ZyVKkzKBcFt01LTA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0I4uuqGN +2WAWzRcxyQhDk5R2SFWieBkXcI6VJaz5uYEzZowsebfZ9YmSG9JOAelp5mG015Z4 +baAjz2cRzfv+Pda4rWQ/9rn1FwWJHPs9lMMYQ+QeFQ+NJiXe2/DA1mfMkPgzHNGB +S2M+yXZhZYC0E5edLpnKomvMEKY7LyCQ7qVsz/agenvOWcYZQj+faavzwS8mjf6s +uOwz0ta7Tj+AwNkSMzUFLTDOaxwS6olvipMVDgzAEHqZHj/7hYgJghbwYu37JmOT +cXKbFREZwzZbEMGxElEuaq/B0Z39i38TGV3OAEk9MzLRa8UUThCSTR8oBwEpj/5d +/5i4L5n8aCEdHwIDAQABo4HLMIHIMB0GA1UdDgQWBBQByx38EwDJZ7LWdvIKT51q +1OKdPTAfBgNVHSMEGDAWgBQtOHLTIcoqOa0ttJoQXMtYVoLEqjA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AD3JX0pxqSjKwCdH8SOwhyxfTCDeHmCLbcNCLL/tgiYAtvhPfqw37EPqeqVY/DTN -r1QtPjDoRI03jVtcuFK98dWrx2HZg7X1UUHt8BwCx65PV2BJyG0+RFMTzpdHeLUE -I/0KSeWZZ5AH56VmYSuTX7Xd0P6S6DY+T8un8GTSiBHleEKJpz+2/pM62FLQjJ3q -iSFWZwQhxcKDQhND7lwcLwCXRVZKGCGtLbO2OO1e3/4TQ1OQKgWrR2rdnp5RovKY -CANMPxdfVeew865ivqMPX9I8ucNIVan2DUv9FVT1C1cwx/X7Yf8KgjVYIfAFkKLW -UtRrU6jqmGhTWQwR27Kv/T4= +ABG4eqz0xcXMvEb5ngNtafc8FXG+vhUNpLkjzeAVpFE2hiplfn4pvFjRnREtDiJh +ZcqknmE/FiPK/5FiNFVWHLiDt2LLmgdGUzVTigR++hJyr68EHRikwbpbx9sBl1gB +0XPphfsWJw/S6841fuGhkVLXkQNZq8Dtprx7cLyvcyAQpqj0RSgOi6j36ANkxvE9 +EtzyMHWFqWhErfurNu2PhCV509bxyBAarMT8ZWsMd+/TYd6RdN/a8/LxB5Nf4Mlq +bVgp4e+YkzoTggnskIJa1+8d1FC45v/vj4+eOHLl81j5BJCzqaP93IKrRL68R/d5 +FTGRHME8XIbReLweDJ6vGGA= -----END CERTIFICATE----- Certificate: @@ -196,30 +196,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:9d:bb:c1:61:ff:52:46:21:fd:d7:06:43:c7:e0: - 5d:5c:c8:02:0a:44:68:63:45:92:58:8d:2f:d6:b3: - 86:f1:01:ee:fd:34:97:4b:d6:64:fc:4f:8f:88:50: - 56:1a:e6:20:00:9f:8c:8d:e0:c0:30:41:28:99:10: - 14:b6:28:6c:b9:37:ef:5c:c4:ee:eb:37:ff:06:07: - f3:5c:17:8b:aa:d6:5c:8e:19:01:8d:66:3b:8f:c9: - e2:83:0a:0f:8c:7b:21:da:cb:4d:ea:81:11:17:92: - 83:f5:35:19:d5:b5:92:49:3d:08:a5:c3:95:37:76: - ad:38:9c:fd:11:ff:d4:7f:09:60:10:ea:07:93:5c: - 2f:4c:95:53:a1:cb:3b:b1:a8:9a:9d:b9:a4:87:af: - 78:78:6e:dc:76:bb:00:74:cd:54:75:6a:17:45:b8: - 55:d8:87:87:88:7a:d4:98:30:05:92:df:65:07:aa: - d7:08:b7:18:b8:35:79:bb:5e:13:e2:c3:07:65:42: - d4:52:e3:91:41:9d:38:cb:1e:9e:5d:3b:51:7d:95: - f4:3b:6f:31:77:57:4b:e8:74:59:82:47:60:f9:91: - 83:19:20:54:03:a0:cb:76:5e:50:32:ec:32:57:f6: - d0:1d:f7:46:7d:c1:ff:a7:b8:1d:80:66:f0:d9:c9: - 59:d9 + 00:c4:68:12:a9:88:50:04:f4:70:9b:0a:1e:d1:83: + 30:a0:36:08:fe:20:f5:bc:b4:a5:32:74:dd:4c:ab: + cc:73:a4:ce:25:ab:04:38:71:2d:5c:06:de:3b:c3: + 2f:b8:d9:91:f3:28:9a:70:f4:7f:be:d5:0e:4e:00: + db:ce:d7:c6:9f:b2:aa:0b:5e:3a:b5:e3:ad:80:78: + 53:f1:38:61:05:7f:00:19:e4:ec:77:b5:1d:b6:c9: + 35:10:ca:18:c2:71:ae:c8:34:77:dc:46:26:a1:60: + a4:f0:dc:49:5a:fe:af:91:98:41:1c:90:50:7d:be: + 94:61:0e:58:b6:21:48:83:2e:5f:c1:a6:0c:a6:72: + 95:4a:a5:c5:a1:d9:bd:14:dd:7c:f4:1a:db:b1:1c: + 09:0c:2b:60:e7:28:c0:fc:e1:36:0a:f4:68:dc:ee: + 89:d8:0f:47:9c:e4:7b:ca:fe:65:57:2c:3b:3b:e5: + b4:89:c5:04:52:55:02:dc:09:44:fd:6a:19:fc:e4: + 52:6f:78:96:41:79:3f:b8:85:5a:fe:7f:8f:5d:fc: + ee:ba:35:1d:eb:64:2d:e0:7b:f2:8c:17:d3:33:21: + 9c:2d:e6:85:d2:e3:2c:0f:5b:57:2c:c5:c6:de:93: + 24:a2:6e:1b:72:49:f5:c8:05:e2:0e:ae:68:7a:f6: + b5:09 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 92:00:23:C7:C3:33:14:62:3D:59:C9:52:A4:CC:A0:5C:16:DD:35:2D + 2D:38:72:D3:21:CA:2A:39:AD:2D:B4:9A:10:5C:CB:58:56:82:C4:AA X509v3 Authority Key Identifier: - keyid:92:00:23:C7:C3:33:14:62:3D:59:C9:52:A4:CC:A0:5C:16:DD:35:2D + keyid:2D:38:72:D3:21:CA:2A:39:AD:2D:B4:9A:10:5C:CB:58:56:82:C4:AA Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -234,41 +234,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 7a:76:9e:1b:08:ba:ae:df:d7:32:30:27:f7:6d:e0:00:f2:4f: - f0:cf:dd:b5:3e:65:71:d9:97:18:5c:fc:5f:a4:61:88:41:73: - e6:45:d2:09:3a:a5:6d:09:ab:29:13:dc:0a:43:fd:8a:1f:be: - 7f:a5:a2:07:cc:9c:63:d5:30:51:93:eb:fc:27:17:08:d4:15: - 80:84:1c:5e:1b:bd:00:a0:21:0d:08:8a:44:64:40:73:6c:b5: - 50:2b:82:5f:c8:d8:fd:26:f6:91:38:df:d2:58:20:a0:ae:f2: - 14:54:e5:d2:ff:ef:87:57:7d:bd:5e:68:b8:1b:62:e0:ae:f4: - 08:cd:53:35:1e:a4:cf:3c:21:22:55:1e:e4:51:87:f9:74:38: - 10:29:86:64:87:8b:55:9b:96:5a:81:e4:93:2d:c0:fb:06:7f: - dd:17:b1:d3:24:75:73:97:df:31:d6:01:a4:be:70:e2:af:ee: - c3:bc:fc:a1:cd:93:2d:4d:b6:b5:95:02:28:38:68:27:59:38: - 95:d9:64:20:1e:e5:46:f1:bb:f3:5a:2c:b3:f8:d8:cc:fd:34: - 09:fb:0b:02:b7:e5:de:0f:ea:2a:2b:0d:81:55:4d:84:d6:f6: - ba:a4:47:fe:f1:f9:7d:3f:f9:a1:46:bf:fd:dd:89:8b:b4:22: - 1d:86:9f:c5 + 09:ee:80:43:2f:77:6c:2b:2f:51:79:35:59:ad:f0:a5:51:45: + 22:6a:0a:20:c7:eb:d1:98:c2:43:06:5a:5c:92:cb:44:24:7b: + 97:8e:18:b8:23:3c:8b:31:6d:54:0e:73:11:90:9e:8b:2c:a4: + 78:53:e6:8e:55:93:64:cc:14:04:54:a1:b6:ec:28:59:67:3a: + 64:0f:9d:51:ec:ba:35:06:af:5f:96:b5:3c:fe:62:0e:13:5a: + ee:29:af:55:d9:22:71:b3:c8:61:1a:36:4c:c8:f9:39:80:c2: + 06:c2:54:93:fb:2f:1b:f7:01:66:42:2a:e2:08:7b:ee:3e:0d: + e0:c6:07:fd:f1:cf:5e:d1:77:b2:46:21:c6:c5:9f:db:15:75: + 7e:ea:ec:5d:da:02:2a:42:35:7a:b5:a2:2e:86:08:8b:29:ea: + e9:f3:b5:cd:9d:46:96:86:c7:82:ed:64:ab:74:29:53:1c:3e: + f5:69:51:5b:11:1c:0d:c4:f0:01:31:a6:32:d2:68:af:1d:52: + c1:c4:d9:a2:9e:da:a2:bd:19:71:fa:26:f5:28:43:6a:fd:5c: + 97:d2:bb:e0:cd:56:0e:b8:0e:f9:4d:d5:dd:a0:4e:ae:46:68: + 00:93:d6:fd:ec:85:78:f4:c9:93:96:34:65:cc:f0:72:e7:0e: + 00:3d:d0:6b -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ27wWH/UkYh/dcGQ8fg -XVzIAgpEaGNFkliNL9azhvEB7v00l0vWZPxPj4hQVhrmIACfjI3gwDBBKJkQFLYo -bLk371zE7us3/wYH81wXi6rWXI4ZAY1mO4/J4oMKD4x7IdrLTeqBEReSg/U1GdW1 -kkk9CKXDlTd2rTic/RH/1H8JYBDqB5NcL0yVU6HLO7Gomp25pIeveHhu3Ha7AHTN -VHVqF0W4VdiHh4h61JgwBZLfZQeq1wi3GLg1ebteE+LDB2VC1FLjkUGdOMsenl07 -UX2V9DtvMXdXS+h0WYJHYPmRgxkgVAOgy3ZeUDLsMlf20B33Rn3B/6e4HYBm8NnJ -WdkCAwEAAaOByzCByDAdBgNVHQ4EFgQUkgAjx8MzFGI9WclSpMygXBbdNS0wHwYD -VR0jBBgwFoAUkgAjx8MzFGI9WclSpMygXBbdNS0wNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRoEqmIUAT0cJsKHtGD +MKA2CP4g9by0pTJ03UyrzHOkziWrBDhxLVwG3jvDL7jZkfMomnD0f77VDk4A287X +xp+yqgteOrXjrYB4U/E4YQV/ABnk7He1HbbJNRDKGMJxrsg0d9xGJqFgpPDcSVr+ +r5GYQRyQUH2+lGEOWLYhSIMuX8GmDKZylUqlxaHZvRTdfPQa27EcCQwrYOcowPzh +Ngr0aNzuidgPR5zke8r+ZVcsOzvltInFBFJVAtwJRP1qGfzkUm94lkF5P7iFWv5/ +j1387ro1HetkLeB78owX0zMhnC3mhdLjLA9bVyzFxt6TJKJuG3JJ9cgF4g6uaHr2 +tQkCAwEAAaOByzCByDAdBgNVHQ4EFgQULThy0yHKKjmtLbSaEFzLWFaCxKowHwYD +VR0jBBgwFoAULThy0yHKKjmtLbSaEFzLWFaCxKowNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB6dp4bCLqu -39cyMCf3beAA8k/wz921PmVx2ZcYXPxfpGGIQXPmRdIJOqVtCaspE9wKQ/2KH75/ -paIHzJxj1TBRk+v8JxcI1BWAhBxeG70AoCENCIpEZEBzbLVQK4JfyNj9JvaRON/S -WCCgrvIUVOXS/++HV329Xmi4G2LgrvQIzVM1HqTPPCEiVR7kUYf5dDgQKYZkh4tV -m5ZageSTLcD7Bn/dF7HTJHVzl98x1gGkvnDir+7DvPyhzZMtTba1lQIoOGgnWTiV -2WQgHuVG8bvzWiyz+NjM/TQJ+wsCt+XeD+oqKw2BVU2E1va6pEf+8fl9P/mhRr/9 -3YmLtCIdhp/F +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAJ7oBDL3ds +Ky9ReTVZrfClUUUiagogx+vRmMJDBlpckstEJHuXjhi4IzyLMW1UDnMRkJ6LLKR4 +U+aOVZNkzBQEVKG27ChZZzpkD51R7Lo1Bq9flrU8/mIOE1ruKa9V2SJxs8hhGjZM +yPk5gMIGwlST+y8b9wFmQiriCHvuPg3gxgf98c9e0XeyRiHGxZ/bFXV+6uxd2gIq +QjV6taIuhgiLKerp87XNnUaWhseC7WSrdClTHD71aVFbERwNxPABMaYy0mivHVLB +xNmintqivRlx+ib1KENq/VyX0rvgzVYOuA75TdXdoE6uRmgAk9b97IV49MmTljRl +zPBy5w4APdBr -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-signed-by-512bit-rsa.pem b/net/data/verify_certificate_chain_unittest/target-signed-by-512bit-rsa.pem index 8c8bd24..d55d955a 100644 --- a/net/data/verify_certificate_chain_unittest/target-signed-by-512bit-rsa.pem +++ b/net/data/verify_certificate_chain_unittest/target-signed-by-512bit-rsa.pem
@@ -1,6 +1,6 @@ [Created by: generate-target-signed-by-512bit-rsa.py] -Certificate chain with 1 intermediary and a trusted root. The target +Certificate chain with 1 intermediate and a trusted root. The target certificate is signed using a weak RSA key (512-bit modulus), and so verification is expected to fail. @@ -9,7 +9,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,64 +18,64 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a0:09:f8:e1:95:28:53:9e:e3:c1:a5:c0:76:05: - 74:88:fb:fb:d0:c9:c2:3e:61:e3:a1:e3:b0:c8:81: - a3:d1:bf:0c:f4:d8:06:3d:8f:58:45:e1:f0:00:8e: - b1:8c:ab:bc:83:ae:d1:39:3d:6c:52:ef:76:f1:6f: - 93:b0:b2:26:b7:b4:ab:fd:25:44:94:85:4a:c1:ad: - 2a:6c:59:11:3c:33:63:39:e9:f1:c6:96:05:7a:a4: - 8b:3c:74:10:cb:ae:19:eb:cd:df:eb:b0:68:91:cd: - 5c:56:8d:41:d4:b4:4f:db:45:50:4d:01:01:10:09: - be:84:a3:3a:98:55:a2:a6:ea:6b:fc:c7:4f:ae:cd: - 31:60:80:2b:86:27:cf:64:f8:4f:35:32:83:02:57: - ab:85:9e:ae:e0:39:06:03:d8:8e:c5:6f:01:5f:f6: - 08:1f:ae:c9:a1:32:65:35:c5:9b:d7:2c:e1:6f:93: - 41:f7:40:ff:b1:36:08:5e:35:9e:42:2b:a4:d8:0a: - c2:ce:e4:94:cf:51:7c:76:18:d0:0a:4e:e8:37:b3: - 44:f4:0b:31:fa:49:96:94:c8:c0:ef:3a:10:ca:4d: - eb:ed:24:a7:d4:ec:bf:d5:5d:80:ed:d7:3a:b1:7c: - 3f:0f:b7:cb:48:59:73:fb:af:43:5e:3e:6b:e7:a5: - ed:01 + 00:b8:8a:4e:71:4c:e6:58:02:9d:bc:08:20:2d:8d: + 74:e3:04:2f:59:9e:43:73:e0:ca:83:1b:3a:e2:30: + 78:de:f8:07:a1:17:62:5d:4e:35:e8:03:40:2a:1e: + 2e:8e:91:a4:96:bf:a7:34:45:13:19:b2:d7:b0:72: + d0:10:e2:ad:ab:a8:f8:41:c5:ec:ee:1c:14:cb:cf: + 4f:cd:37:71:bd:2d:11:8d:95:e4:fa:2b:16:8c:bf: + 82:1c:22:85:25:4a:88:01:af:1e:fe:e7:53:d5:03: + d4:36:14:ae:81:d2:3d:73:6c:96:e0:e7:d2:a4:fb: + 17:1d:df:6a:93:68:b5:f8:a8:70:df:d0:b6:9d:fb: + e5:80:a3:a8:85:df:82:f3:05:23:9f:b6:62:89:b7: + 72:0c:99:49:5b:07:bd:c5:fb:4c:f4:32:83:a5:3c: + c6:8c:6b:c1:a1:c0:ab:73:68:fb:91:14:12:3a:c5: + 31:89:ac:a2:4b:b6:20:3b:03:1f:50:48:ff:7b:3b: + be:53:e5:46:e2:ad:18:7a:d3:3e:f9:bb:d0:0b:ac: + 0c:23:d8:9c:92:07:6c:ee:a6:64:0d:77:ef:aa:f4: + 64:5a:aa:ed:52:cb:20:9a:57:d5:ab:be:8c:07:71: + b3:a4:43:8b:d9:7e:6f:46:2c:70:9f:c0:e3:68:89: + e5:2b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 01:E0:D2:38:1C:28:DC:51:7E:F9:E6:25:7A:C5:47:ED:81:6C:FC:5F + 3D:5B:07:9A:2F:A5:14:87:32:C3:F8:54:71:62:3F:A1:E6:60:7F:D0 X509v3 Authority Key Identifier: - keyid:B8:D0:79:3D:EA:8A:56:E5:90:68:D6:6C:E9:91:14:0C:AE:5A:48:10 + keyid:7C:0E:01:A5:04:38:CE:0F:6A:AB:34:B2:CD:77:19:DB:84:C1:EC:44 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - be:ba:eb:82:1f:02:6b:d0:9e:c9:55:09:b1:e9:e1:82:8c:50: - 39:7e:f5:ff:0f:4f:ef:d8:7d:52:10:07:5e:c1:c4:0e:d5:94: - 67:d2:0e:2e:22:e6:5a:91:b5:f7:05:e3:a4:be:bc:6c:fb:38: - 2c:df:47:55:61:bc:4c:39:14:68 + 6a:f4:be:75:7e:66:b3:42:6e:fb:64:ed:d2:a1:d8:3d:08:04: + bf:93:17:0b:9b:79:df:ca:73:95:b4:5a:78:e3:96:d0:7f:5e: + 3c:2c:df:00:da:37:fc:61:22:9a:81:d1:bb:5d:13:6a:e4:21: + 18:bf:dc:49:36:4e:7a:aa:b8:6f -----BEGIN CERTIFICATE----- MIICyzCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgCfjh -lShTnuPBpcB2BXSI+/vQycI+YeOh47DIgaPRvwz02AY9j1hF4fAAjrGMq7yDrtE5 -PWxS73bxb5Owsia3tKv9JUSUhUrBrSpsWRE8M2M56fHGlgV6pIs8dBDLrhnrzd/r -sGiRzVxWjUHUtE/bRVBNAQEQCb6EozqYVaKm6mv8x0+uzTFggCuGJ89k+E81MoMC -V6uFnq7gOQYD2I7FbwFf9ggfrsmhMmU1xZvXLOFvk0H3QP+xNgheNZ5CK6TYCsLO -5JTPUXx2GNAKTug3s0T0CzH6SZaUyMDvOhDKTevtJKfU7L/VXYDt1zqxfD8Pt8tI -WXP7r0NePmvnpe0BAgMBAAGjgekwgeYwHQYDVR0OBBYEFAHg0jgcKNxRfvnmJXrF -R+2BbPxfMB8GA1UdIwQYMBaAFLjQeT3qilblkGjWbOmRFAyuWkgQMD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4ik5x +TOZYAp28CCAtjXTjBC9ZnkNz4MqDGzriMHje+AehF2JdTjXoA0AqHi6OkaSWv6c0 +RRMZstewctAQ4q2rqPhBxezuHBTLz0/NN3G9LRGNleT6KxaMv4IcIoUlSogBrx7+ +51PVA9Q2FK6B0j1zbJbg59Kk+xcd32qTaLX4qHDf0Lad++WAo6iF34LzBSOftmKJ +t3IMmUlbB73F+0z0MoOlPMaMa8GhwKtzaPuRFBI6xTGJrKJLtiA7Ax9QSP97O75T +5UbirRh60z75u9ALrAwj2JySB2zupmQNd++q9GRaqu1SyyCaV9WrvowHcbOkQ4vZ +fm9GLHCfwONoieUrAgMBAAGjgekwgeYwHQYDVR0OBBYEFD1bB5ovpRSHMsP4VHFi +P6HmYH/QMB8GA1UdIwQYMBaAFHwOAaUEOM4Paqs0ss13GduEwexEMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAANBAL6664IfAmvQnslVCbHp4YKM -UDl+9f8PT+/YfVIQB17BxA7VlGfSDi4i5lqRtfcF46S+vGz7OCzfR1VhvEw5FGg= +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAANBAGr0vnV+ZrNCbvtk7dKh2D0I +BL+TFwubed/Kc5W0WnjjltB/Xjws3wDaN/xhIpqB0btdE2rkIRi/3Ek2TnqquG8= -----END CERTIFICATE----- Certificate: @@ -87,22 +87,22 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (512 bit) Modulus: - 00:da:fa:51:64:db:d4:40:cf:aa:60:3f:0b:9a:0e: - 26:21:59:0e:f1:8b:e2:75:11:de:2d:1c:e5:dc:9b: - e2:16:ce:cf:50:a1:aa:c9:e0:19:9f:5c:e5:44:69: - 0d:f9:0c:d7:c5:1e:cf:11:65:77:cd:37:5f:d8:fe: - 6f:e0:99:b3:f7 + 00:ba:89:53:56:03:c7:9f:d6:cc:d0:48:7d:3b:52: + 02:ee:7e:58:eb:d8:9c:8e:3c:d6:65:b2:8d:94:0d: + 87:48:e1:65:65:56:91:5b:1a:52:3a:84:96:46:2a: + 8b:1b:7d:0c:43:57:04:0d:38:55:21:5b:0b:45:06: + a6:1e:67:ca:5b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - B8:D0:79:3D:EA:8A:56:E5:90:68:D6:6C:E9:91:14:0C:AE:5A:48:10 + 7C:0E:01:A5:04:38:CE:0F:6A:AB:34:B2:CD:77:19:DB:84:C1:EC:44 X509v3 Authority Key Identifier: - keyid:68:06:12:0B:9D:1F:3A:7C:E5:87:20:3C:ED:A3:49:5D:3E:74:28:69 + keyid:71:59:49:4D:A5:43:49:C5:0E:E4:78:E9:5C:B7:4E:80:A8:A3:BB:5E Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -117,37 +117,37 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 8c:35:af:f3:d9:62:41:91:93:ed:8b:f6:42:3e:94:80:cf:31: - ed:0f:a5:52:2e:51:3f:f3:3f:56:38:c5:f0:25:c5:f1:13:8c: - 6a:80:28:58:79:e1:eb:39:25:5a:af:31:07:24:da:8c:ae:17: - c7:56:fd:c1:d4:3a:2c:7e:7e:a4:ff:eb:66:74:96:66:e8:26: - 52:1d:c5:d6:0a:64:ea:cd:b7:df:b8:49:b1:c4:44:c6:d0:e3: - 94:0f:b2:b2:cb:75:5a:bf:48:c6:ad:82:46:74:a7:53:bd:55: - 00:67:6e:ba:2c:b8:15:43:30:64:d8:10:3a:67:b0:31:df:f6: - 9e:7e:7c:0b:63:d6:6d:b0:5d:9a:61:96:51:03:71:d3:fb:da: - 30:b8:d1:a6:8a:4a:a2:36:58:84:34:c0:30:5a:d8:51:30:d0: - 89:8c:1e:c3:45:32:85:17:ba:01:4d:60:04:91:23:ee:df:71: - 0d:82:90:67:2f:04:4e:e2:64:a9:48:55:03:e7:0b:a1:b4:e3: - e7:e9:54:3b:bc:83:f0:b3:bb:3f:1a:fd:03:95:28:0e:d2:3b: - 8b:62:fe:bb:b7:9a:1d:15:d3:96:47:be:c9:4e:21:77:63:60: - 3b:27:b3:3d:7e:8b:fd:3b:55:17:cf:8b:99:81:6d:92:66:5b: - 35:62:4a:96 + 8e:cc:d3:f3:5a:fb:ca:83:4e:55:e3:ae:2a:b7:b7:ac:9e:87: + f0:62:58:23:29:3d:63:7e:8d:42:60:ea:dc:3e:ec:66:19:4b: + e6:d6:a7:b7:e1:ea:33:88:3c:ea:8b:87:b9:e7:64:0d:35:b3: + 0e:ab:81:71:0c:1c:0a:f3:0a:49:23:4e:d6:21:de:7f:e5:fd: + 6d:8b:7a:33:2f:a6:ab:4e:b8:02:cc:01:1e:18:9a:90:f3:56: + f8:8a:b5:2f:68:12:c6:83:b2:91:59:00:51:86:75:68:45:3b: + 27:c4:e0:0d:ed:e7:51:2d:47:60:26:19:02:fd:43:27:81:ad: + 33:cb:eb:98:9a:a1:2e:81:d3:81:52:4a:1d:19:e9:30:f9:fc: + 6b:e7:26:c8:c1:6c:65:e4:66:d4:cc:82:16:0a:a6:b9:68:3a: + eb:ee:cd:86:aa:a7:80:ed:4f:77:47:d2:c6:1b:eb:53:de:f3: + eb:24:60:41:ac:77:08:43:1b:76:ce:a6:4b:f1:4e:1d:32:2b: + 31:bd:59:52:f1:60:e7:f5:db:6d:bf:be:af:55:9b:11:63:f7: + 6e:19:2c:17:4b:db:fe:40:27:ae:02:f5:c2:17:62:21:7b:ac: + 38:d6:17:3e:5c:80:61:6d:95:63:e4:64:d3:07:23:9f:14:bb: + df:b2:eb:c2 -----BEGIN CERTIFICATE----- MIICpTCCAY2gAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANr6UWTb1EDPqmA/C5oO -JiFZDvGL4nUR3i0c5dyb4hbOz1ChqsngGZ9c5URpDfkM18UezxFld803X9j+b+CZ -s/cCAwEAAaOByzCByDAdBgNVHQ4EFgQUuNB5PeqKVuWQaNZs6ZEUDK5aSBAwHwYD -VR0jBBgwFoAUaAYSC50fOnzlhyA87aNJXT50KGkwNwYIKwYBBQUHAQEEKzApMCcG +ZXJtZWRpYXRlMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALqJU1YDx5/WzNBIfTtS +Au5+WOvYnI481mWyjZQNh0jhZWVWkVsaUjqElkYqixt9DENXBA04VSFbC0UGph5n +ylsCAwEAAaOByzCByDAdBgNVHQ4EFgQUfA4BpQQ4zg9qqzSyzXcZ24TB7EQwHwYD +VR0jBBgwFoAUcVlJTaVDScUO5HjpXLdOgKiju14wNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCMNa/z2WJB -kZPti/ZCPpSAzzHtD6VSLlE/8z9WOMXwJcXxE4xqgChYeeHrOSVarzEHJNqMrhfH -Vv3B1Dosfn6k/+tmdJZm6CZSHcXWCmTqzbffuEmxxETG0OOUD7Kyy3Vav0jGrYJG -dKdTvVUAZ266LLgVQzBk2BA6Z7Ax3/aefnwLY9ZtsF2aYZZRA3HT+9owuNGmikqi -NliENMAwWthRMNCJjB7DRTKFF7oBTWAEkSPu33ENgpBnLwRO4mSpSFUD5wuhtOPn -6VQ7vIPws7s/Gv0DlSgO0juLYv67t5odFdOWR77JTiF3Y2A7J7M9fov9O1UXz4uZ -gW2SZls1YkqW +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCOzNPzWvvK +g05V464qt7esnofwYlgjKT1jfo1CYOrcPuxmGUvm1qe34eoziDzqi4e552QNNbMO +q4FxDBwK8wpJI07WId5/5f1ti3ozL6arTrgCzAEeGJqQ81b4irUvaBLGg7KRWQBR +hnVoRTsnxOAN7edRLUdgJhkC/UMnga0zy+uYmqEugdOBUkodGekw+fxr5ybIwWxl +5GbUzIIWCqa5aDrr7s2GqqeA7U93R9LGG+tT3vPrJGBBrHcIQxt2zqZL8U4dMisx +vVlS8WDn9dttv76vVZsRY/duGSwXS9v+QCeuAvXCF2Ihe6w41hc+XIBhbZVj5GTT +ByOfFLvfsuvC -----END CERTIFICATE----- Certificate: @@ -164,30 +164,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:cc:43:57:ce:f5:69:b5:17:2d:24:1e:10:48:61: - 1e:6e:27:06:10:ae:6d:cd:70:97:4c:39:7b:0d:68: - 76:49:5b:2a:56:cf:24:d3:35:e4:f9:44:b0:60:c2: - db:ee:58:f0:2c:3f:25:53:95:bf:fc:3b:cf:1a:5c: - de:94:67:30:7f:6b:7b:c1:9c:d9:55:91:8b:34:57: - a7:4f:d0:d7:38:8c:e6:57:ae:f6:61:66:bb:fb:4e: - d3:b0:d0:c0:74:83:e3:43:7a:15:ab:29:fa:3f:65: - b5:58:3b:0b:76:cf:b9:85:d9:2a:5b:bf:81:4d:d7: - bb:72:cf:30:91:1a:0a:4f:6c:64:48:13:fe:cc:14: - 21:f0:74:b8:90:73:f7:d5:fe:5b:dd:b2:7a:71:1a: - e3:c3:22:5a:37:38:db:d0:39:62:b3:87:0e:7d:a8: - 93:68:82:01:29:36:eb:30:20:66:d9:2a:f8:e9:7d: - 53:ac:93:c1:68:c1:21:66:26:9e:4d:34:8a:14:c2: - 38:c0:6e:57:9a:c8:93:c1:7d:7d:d8:22:6e:bb:5e: - ff:dd:e0:af:e4:af:32:6d:f2:e7:57:d4:53:8d:ea: - f9:ca:72:d3:3a:4e:19:e3:b8:b7:4f:fb:d8:5b:41: - da:0e:17:59:e2:88:cd:c2:b7:6b:d4:64:50:f0:1e: - 36:9d + 00:ca:5e:08:17:b7:7c:c4:55:39:a2:1c:7f:97:49: + b0:bb:88:3e:9e:ed:46:36:41:c2:a7:5e:2b:ce:bb: + 7b:d2:d2:a8:3b:a3:53:27:39:ac:3a:76:48:a2:85: + 97:3f:ba:98:9f:14:f9:b9:31:64:e5:27:a8:9a:23: + ae:7d:12:39:65:c0:10:f3:6d:2d:a3:45:3d:c3:69: + e6:cf:3e:4d:8a:5c:37:a5:6c:32:17:7c:ab:8f:62: + 0e:e4:57:6b:e1:64:22:8d:3b:ad:c6:93:60:4a:c4: + 32:6d:be:c4:6b:06:e1:4b:e0:89:3c:ef:ad:78:94: + bd:3d:d1:bb:19:1a:86:98:43:0e:84:bb:68:11:47: + 9a:06:49:33:e9:48:e6:f2:00:0e:ef:e7:4d:2a:1b: + b2:aa:5b:a8:8d:59:ac:b7:c8:77:5d:c9:9f:d3:e8: + c7:f2:88:0a:ce:6e:34:b5:8f:5a:63:24:68:42:2f: + 60:2c:a5:82:44:e9:12:1f:c3:7a:01:c3:e7:e3:24: + 97:0b:bc:5e:48:e1:33:4b:a0:cd:fa:ce:75:90:97: + 20:f4:0b:4c:8e:69:c5:8b:cd:1c:ac:8a:7f:d4:18: + 22:c7:10:09:52:dc:3a:17:3d:3a:5c:03:99:ee:f8: + 9d:a0:bf:ef:72:33:df:43:8d:9f:1b:1c:e3:22:24: + 73:99 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 68:06:12:0B:9D:1F:3A:7C:E5:87:20:3C:ED:A3:49:5D:3E:74:28:69 + 71:59:49:4D:A5:43:49:C5:0E:E4:78:E9:5C:B7:4E:80:A8:A3:BB:5E X509v3 Authority Key Identifier: - keyid:68:06:12:0B:9D:1F:3A:7C:E5:87:20:3C:ED:A3:49:5D:3E:74:28:69 + keyid:71:59:49:4D:A5:43:49:C5:0E:E4:78:E9:5C:B7:4E:80:A8:A3:BB:5E Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -202,41 +202,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 2a:56:07:28:0a:b2:16:a5:3e:e3:cc:7e:10:47:8d:88:04:be: - 92:d6:ef:fa:c2:e3:5f:5f:57:3a:75:5a:8e:8e:62:e0:94:26: - 32:d2:ab:d3:d7:88:7e:d0:14:b1:1b:1a:5d:15:87:15:45:ae: - 47:50:0b:50:dd:52:55:03:0b:cb:91:13:b0:96:20:24:c5:aa: - 13:f5:4f:60:20:b6:46:6a:a6:cf:9d:4e:88:09:77:ad:4d:6f: - ea:d6:18:81:ac:7c:ad:59:9c:bb:f5:c5:62:e5:e4:b3:61:b2: - fb:f4:22:4e:38:a4:42:3a:e1:00:54:78:dd:24:90:20:47:d2: - 74:2b:89:44:64:04:02:3b:f9:8b:fa:35:aa:90:c1:73:82:95: - 94:fa:5f:85:e9:af:e1:3e:33:2b:1b:91:31:1d:94:ee:1c:0c: - e5:22:de:48:d4:2d:f7:3a:16:7e:f2:40:dc:ce:ec:3e:41:0d: - 12:3e:9c:ff:15:2b:9b:b3:80:87:02:50:76:ae:e1:05:dd:89: - 72:fc:49:e5:81:1f:91:cc:c8:27:b7:2c:b2:ef:71:a0:97:76: - 49:da:71:75:24:5e:45:2d:5b:2b:79:d2:b0:a3:b8:85:13:d5: - 68:d7:53:f0:d1:b8:87:d1:84:7c:9e:e1:18:23:f4:cc:2a:8d: - f3:93:51:5e + 20:51:cc:39:0f:3c:0c:67:47:0c:73:f0:00:0d:57:fb:6f:fe: + 4c:e3:c1:d1:a6:f7:40:54:4c:91:0f:ca:e1:eb:b3:7a:44:0e: + 57:f5:81:1f:9a:4f:81:57:d8:91:01:7b:09:6a:61:19:04:8f: + 00:7a:d1:5b:3f:cb:1b:c0:53:a4:da:dc:40:a5:ef:9b:59:1a: + fc:99:b2:0d:66:22:ee:d7:da:69:72:4d:b1:44:e9:2d:57:84: + 52:d5:2b:c5:77:ac:a7:d0:f2:27:12:6b:5c:42:7a:3d:fc:e8: + 04:91:98:aa:1d:3f:40:9d:9b:e2:43:24:47:7b:b8:24:23:a3: + 47:24:cd:9a:44:87:f8:a7:c4:07:90:9a:73:60:e1:0e:7b:82: + a1:ef:73:4e:02:46:6d:06:e2:58:8f:79:47:79:a6:59:75:cf: + ac:5d:e2:37:6c:88:3f:bf:57:00:f5:fb:09:53:f4:5f:06:42: + 58:5e:75:48:96:7d:4f:dd:3b:45:d3:7c:61:8f:75:20:17:a0: + 2e:1c:08:4b:22:3f:37:be:d7:43:89:da:59:ac:79:87:1e:6a: + cc:53:4d:5b:e9:0a:d6:40:a5:a0:28:99:57:44:5d:d2:7b:bf: + 02:38:a3:c4:df:14:a9:c1:b2:ec:15:21:7b:84:a1:a1:56:f8: + b9:45:42:cd -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMxDV871abUXLSQeEEhh -Hm4nBhCubc1wl0w5ew1odklbKlbPJNM15PlEsGDC2+5Y8Cw/JVOVv/w7zxpc3pRn -MH9re8Gc2VWRizRXp0/Q1ziM5leu9mFmu/tO07DQwHSD40N6Fasp+j9ltVg7C3bP -uYXZKlu/gU3Xu3LPMJEaCk9sZEgT/swUIfB0uJBz99X+W92yenEa48MiWjc429A5 -YrOHDn2ok2iCASk26zAgZtkq+Ol9U6yTwWjBIWYmnk00ihTCOMBuV5rIk8F9fdgi -brte/93gr+SvMm3y51fUU43q+cpy0zpOGeO4t0/72FtB2g4XWeKIzcK3a9RkUPAe -Np0CAwEAAaOByzCByDAdBgNVHQ4EFgQUaAYSC50fOnzlhyA87aNJXT50KGkwHwYD -VR0jBBgwFoAUaAYSC50fOnzlhyA87aNJXT50KGkwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMpeCBe3fMRVOaIcf5dJ +sLuIPp7tRjZBwqdeK867e9LSqDujUyc5rDp2SKKFlz+6mJ8U+bkxZOUnqJojrn0S +OWXAEPNtLaNFPcNp5s8+TYpcN6VsMhd8q49iDuRXa+FkIo07rcaTYErEMm2+xGsG +4UvgiTzvrXiUvT3RuxkahphDDoS7aBFHmgZJM+lI5vIADu/nTSobsqpbqI1ZrLfI +d13Jn9Pox/KICs5uNLWPWmMkaEIvYCylgkTpEh/DegHD5+Mklwu8XkjhM0ugzfrO +dZCXIPQLTI5pxYvNHKyKf9QYIscQCVLcOhc9OlwDme74naC/73Iz30ONnxsc4yIk +c5kCAwEAAaOByzCByDAdBgNVHQ4EFgQUcVlJTaVDScUO5HjpXLdOgKiju14wHwYD +VR0jBBgwFoAUcVlJTaVDScUO5HjpXLdOgKiju14wNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAqVgcoCrIW -pT7jzH4QR42IBL6S1u/6wuNfX1c6dVqOjmLglCYy0qvT14h+0BSxGxpdFYcVRa5H -UAtQ3VJVAwvLkROwliAkxaoT9U9gILZGaqbPnU6ICXetTW/q1hiBrHytWZy79cVi -5eSzYbL79CJOOKRCOuEAVHjdJJAgR9J0K4lEZAQCO/mL+jWqkMFzgpWU+l+F6a/h -PjMrG5ExHZTuHAzlIt5I1C33OhZ+8kDczuw+QQ0SPpz/FSubs4CHAlB2ruEF3Yly -/EnlgR+RzMgntyyy73Ggl3ZJ2nF1JF5FLVsredKwo7iFE9Vo11Pw0biH0YR8nuEY -I/TMKo3zk1Fe +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAgUcw5DzwM +Z0cMc/AADVf7b/5M48HRpvdAVEyRD8rh67N6RA5X9YEfmk+BV9iRAXsJamEZBI8A +etFbP8sbwFOk2txApe+bWRr8mbINZiLu19ppck2xROktV4RS1SvFd6yn0PInEmtc +Qno9/OgEkZiqHT9AnZviQyRHe7gkI6NHJM2aRIf4p8QHkJpzYOEOe4Kh73NOAkZt +BuJYj3lHeaZZdc+sXeI3bIg/v1cA9fsJU/RfBkJYXnVIln1P3TtF03xhj3UgF6Au +HAhLIj83vtdDidpZrHmHHmrMU01b6QrWQKWgKJlXRF3Se78COKPE3xSpwbLsFSF7 +hKGhVvi5RULN -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-signed-using-ecdsa.pem b/net/data/verify_certificate_chain_unittest/target-signed-using-ecdsa.pem index 6109796..620b9cc5 100644 --- a/net/data/verify_certificate_chain_unittest/target-signed-using-ecdsa.pem +++ b/net/data/verify_certificate_chain_unittest/target-signed-using-ecdsa.pem
@@ -1,6 +1,6 @@ [Created by: generate-target-signed-using-ecdsa.py] -Certificate chain with a trusted root using RSA, and intermediary using EC, +Certificate chain with a trusted root using RSA, and intermediate using EC, and a target certificate using RSA. Verification is expected to succeed. Certificate: @@ -8,7 +8,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: ecdsa-with-SHA256 - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -17,67 +17,67 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:f5:15:82:5b:5b:ef:98:fd:63:b3:5b:08:9c:21: - 8b:be:10:f1:3a:ab:17:e8:f2:9c:37:24:80:41:6a: - 87:71:1d:9a:ea:c3:a6:f7:25:e3:09:03:3f:92:2e: - e1:bc:9e:fd:70:65:e9:29:21:4f:46:01:12:20:e2: - 08:d9:bd:86:40:5d:3d:b9:6a:c5:ad:3f:dc:82:00: - 75:7b:da:26:a1:c9:49:f2:b5:30:6c:40:07:94:c6: - f4:41:1f:88:3a:d7:89:ab:86:79:50:cc:85:8e:f6: - a4:fc:7b:03:70:74:1e:6e:09:98:ff:b4:8a:ea:c0: - c1:e3:07:ff:8d:f8:e8:bc:f5:fd:6e:aa:db:fc:26: - 2e:44:bd:52:e3:66:f5:58:6d:ea:0c:30:19:ed:8f: - db:cd:1f:40:20:2f:36:35:d7:63:b5:d7:2c:e8:4b: - d3:e2:90:82:2f:27:4d:22:8a:94:e3:fb:c7:40:77: - e2:e0:56:c7:70:b6:ae:9b:e9:7c:fa:b5:d0:40:34: - dd:0b:59:96:0d:ba:84:47:87:62:c1:3e:1f:21:5b: - 3b:15:56:3a:8b:e8:4e:6c:02:c8:da:dc:b3:2b:a3: - b9:7e:c6:dc:06:94:9b:0c:ea:fc:7e:02:d3:3f:d2: - 87:30:da:c4:41:1a:5f:1f:89:c9:6f:39:96:e5:fd: - 3a:c9 + 00:c1:2c:42:ca:d9:bd:0d:55:79:40:9a:cf:f4:1b: + de:4e:e7:8b:77:40:55:83:bf:2c:27:72:58:db:62: + 24:12:e2:e5:4e:36:09:95:e0:0d:5b:09:d9:f8:bf: + e5:f8:3a:d4:9a:c9:5a:ff:16:44:16:21:15:bc:cf: + f6:99:ad:5c:bf:74:9a:02:3e:91:99:28:2b:76:eb: + fe:14:8c:24:a2:f9:41:b3:7a:86:b2:15:34:a4:fc: + 93:49:42:b6:ee:20:70:61:f8:8e:ae:8b:55:aa:4f: + 3f:ec:1e:63:45:24:c4:01:c1:68:c2:cf:a7:c5:29: + 58:a7:c2:cc:89:00:25:b0:1a:b1:a0:dd:52:e4:3c: + 41:ff:2a:3b:97:07:63:70:13:01:3d:eb:1d:a1:12: + f2:27:0a:c0:47:8a:96:f4:c9:f0:2f:b1:2a:7a:fa: + 57:f8:60:98:c5:b8:03:ce:36:fc:32:73:39:13:46: + 5b:71:02:42:22:45:4c:11:1d:3d:e1:77:53:9c:8d: + 0b:a0:bf:68:67:b4:b2:2b:6a:9a:1f:da:dd:dd:c2: + 0d:0c:12:00:ff:d9:d2:36:77:52:72:32:30:ea:68: + bb:62:55:37:24:aa:13:92:a4:b5:8c:9d:71:19:6b: + 4a:1a:38:b0:21:79:14:70:d3:e9:7e:92:91:fc:8a: + c7:35 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 0A:36:4B:AA:5E:42:C2:6B:CE:3C:58:0C:33:53:9B:ED:09:42:89:B9 + E2:9C:21:ED:AF:F9:55:73:3F:68:B8:CD:03:B2:45:FB:C8:4F:35:8C X509v3 Authority Key Identifier: - keyid:A4:A1:01:1C:8F:94:62:C3:11:19:36:76:04:DC:A9:AF:6F:B6:11:9C + keyid:71:4E:D7:4E:A8:0A:43:13:41:FE:F4:50:09:92:D0:56:1D:44:8A:3F Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: ecdsa-with-SHA256 - 30:64:02:30:3b:0e:cc:c2:70:77:25:fe:01:46:fb:e7:fe:ee: - 68:07:50:f1:14:b8:9a:6f:53:bb:1f:4f:7f:ba:62:d2:76:06: - 4b:d4:93:8a:1b:f6:3c:96:91:8c:57:90:a2:99:5d:0b:02:30: - 3e:98:92:c5:01:13:f9:d4:21:bc:44:14:a6:9b:b9:8e:f0:86: - ec:67:c8:12:07:74:41:8c:f0:f3:e8:b7:cc:e3:23:a0:a1:05: - 2f:66:73:be:62:9b:1c:ce:70:fe:eb:09 + 30:65:02:30:16:0c:16:b2:2c:2e:68:f7:e6:c9:e6:fc:25:67: + ab:1b:cd:65:0b:30:ca:d4:92:0b:0a:26:40:cd:7b:47:b5:37: + 8b:84:12:b2:51:53:3e:a9:b8:d0:fa:0b:e5:ec:54:2e:02:31: + 00:e5:d7:43:9b:58:f1:7e:90:79:de:63:49:7f:5b:fe:7a:34: + 2e:5a:d1:92:13:66:3a:e0:1c:ea:77:e1:98:1c:a9:38:d5:ce: + 98:7b:1f:5b:8a:d4:01:cb:35:7a:d5:74:8a -----BEGIN CERTIFICATE----- -MIIC6zCCAnKgAwIBAgIBATAKBggqhkjOPQQDAjAXMRUwEwYDVQQDDAxJbnRlcm1l -ZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYDVQQD -DAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD1FYJbW++Y -/WOzWwicIYu+EPE6qxfo8pw3JIBBaodxHZrqw6b3JeMJAz+SLuG8nv1wZekpIU9G -ARIg4gjZvYZAXT25asWtP9yCAHV72iahyUnytTBsQAeUxvRBH4g614mrhnlQzIWO -9qT8ewNwdB5uCZj/tIrqwMHjB/+N+Oi89f1uqtv8Ji5EvVLjZvVYbeoMMBntj9vN -H0AgLzY112O11yzoS9PikIIvJ00iipTj+8dAd+LgVsdwtq6b6Xz6tdBANN0LWZYN -uoRHh2LBPh8hWzsVVjqL6E5sAsja3LMro7l+xtwGlJsM6vx+AtM/0ocw2sRBGl8f -iclvOZbl/TrJAgMBAAGjgekwgeYwHQYDVR0OBBYEFAo2S6peQsJrzjxYDDNTm+0J -Qom5MB8GA1UdIwQYMBaAFKShARyPlGLDERk2dgTcqa9vthGcMD8GCCsGAQUFBwEB -BDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVkaWFy -eS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0ludGVy -bWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMB -BggrBgEFBQcDAjAKBggqhkjOPQQDAgNnADBkAjA7DszCcHcl/gFG++f+7mgHUPEU -uJpvU7sfT3+6YtJ2BkvUk4ob9jyWkYxXkKKZXQsCMD6YksUBE/nUIbxEFKabuY7w -huxnyBIHdEGM8PPot8zjI6ChBS9mc75imxzOcP7rCQ== +MIIC7DCCAnKgAwIBAgIBATAKBggqhkjOPQQDAjAXMRUwEwYDVQQDDAxJbnRlcm1l +ZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYDVQQD +DAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBLELK2b0N +VXlAms/0G95O54t3QFWDvywncljbYiQS4uVONgmV4A1bCdn4v+X4OtSayVr/FkQW +IRW8z/aZrVy/dJoCPpGZKCt26/4UjCSi+UGzeoayFTSk/JNJQrbuIHBh+I6ui1Wq +Tz/sHmNFJMQBwWjCz6fFKVinwsyJACWwGrGg3VLkPEH/KjuXB2NwEwE96x2hEvIn +CsBHipb0yfAvsSp6+lf4YJjFuAPONvwyczkTRltxAkIiRUwRHT3hd1OcjQugv2hn +tLIrapof2t3dwg0MEgD/2dI2d1JyMjDqaLtiVTckqhOSpLWMnXEZa0oaOLAheRRw +0+l+kpH8isc1AgMBAAGjgekwgeYwHQYDVR0OBBYEFOKcIe2v+VVzP2i4zQOyRfvI +TzWMMB8GA1UdIwQYMBaAFHFO106oCkMTQf70UAmS0FYdRIo/MD8GCCsGAQUFBwEB +BDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVkaWF0 +ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0ludGVy +bWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMB +BggrBgEFBQcDAjAKBggqhkjOPQQDAgNoADBlAjAWDBayLC5o9+bJ5vwlZ6sbzWUL +MMrUkgsKJkDNe0e1N4uEErJRUz6puND6C+XsVC4CMQDl10ObWPF+kHneY0l/W/56 +NC5a0ZITZjrgHOp34ZgcqTjVzph7H1uK1AHLNXrVdIo= -----END CERTIFICATE----- Certificate: @@ -89,24 +89,24 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (384 bit) pub: - 04:ca:bc:6c:d5:4b:51:ef:d3:7d:8a:46:12:ab:5f: - d4:f3:3c:7d:eb:40:8b:de:0f:79:6d:6f:a4:40:0f: - 96:51:8a:00:20:48:7a:d3:d4:30:2e:5b:1d:9f:e1: - 00:3e:54:cb:93:62:21:7c:09:57:2e:43:38:08:77: - 5c:1c:8b:aa:17:c1:22:c0:db:01:bf:c0:80:0a:24: - 68:0d:2d:ce:51:e4:a3:2a:c9:42:0b:7c:57:82:31: - 94:2f:b7:a8:42:9c:4e + 04:ff:41:5f:16:8c:e0:75:59:3b:4a:9c:84:3e:79: + 93:48:a5:98:7e:93:58:58:d5:c9:ca:60:b8:6d:0c: + 84:81:40:de:22:95:f1:6e:56:49:8f:02:45:ce:fe: + e8:71:71:02:25:a7:47:5f:63:0e:4a:46:4d:e0:b3: + 73:9e:d8:91:2a:ad:51:47:80:b0:f5:4a:5e:0d:93: + a6:78:93:a7:f9:1d:ad:b6:23:78:2e:23:e0:62:f6: + 77:f8:1c:db:31:82:c1 ASN1 OID: secp384r1 X509v3 extensions: X509v3 Subject Key Identifier: - A4:A1:01:1C:8F:94:62:C3:11:19:36:76:04:DC:A9:AF:6F:B6:11:9C + 71:4E:D7:4E:A8:0A:43:13:41:FE:F4:50:09:92:D0:56:1D:44:8A:3F X509v3 Authority Key Identifier: - keyid:E9:AC:73:09:B6:86:CD:95:42:29:5D:E5:EC:C7:99:29:12:91:8C:53 + keyid:39:BF:53:7E:B4:7B:97:5D:7A:E5:12:6D:FA:8B:79:C5:67:3E:1E:E4 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -121,37 +121,37 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 22:50:e8:71:34:bf:8b:44:c5:4e:82:31:fd:50:48:f4:fa:3a: - 01:4a:f9:71:a6:a9:a2:d0:1e:bc:d3:1d:dc:ac:8f:4e:db:58: - 8a:6b:a2:64:29:6e:f5:1b:0b:87:2e:f5:bd:dd:92:7a:5f:4e: - a6:aa:1d:b4:7c:f2:eb:5a:2b:17:83:99:29:1f:2b:12:45:9b: - 1a:cd:d3:b1:71:a3:d9:7d:cf:78:f4:64:ce:03:a5:0b:c7:98: - e8:73:58:e2:26:47:5c:c0:ed:ac:c0:11:b8:39:11:19:39:fc: - 01:b6:4c:a2:f5:4a:ae:a3:9e:3c:82:73:3e:b5:2c:28:63:ec: - 14:a2:9f:a7:d7:4b:3e:f3:56:50:f6:9e:87:9b:d1:38:fa:78: - 2e:7f:29:fe:4a:a8:d6:43:c4:05:d6:d6:67:7f:52:90:36:53: - ff:a6:78:1f:7f:f7:ad:66:65:7d:4b:57:3c:d6:b3:19:9d:08: - af:d2:5b:1a:76:42:ff:b2:6b:2c:0d:d1:1d:05:c0:d8:28:02: - 9b:cb:f6:1d:7a:35:93:b9:c9:76:2d:d3:ef:f4:07:bf:d6:8b: - 33:2a:83:69:8a:68:63:0a:b9:45:f6:e4:12:38:37:87:d6:53: - 46:33:ae:f8:72:d3:e5:e9:93:bb:ba:db:8d:73:01:b1:79:0f: - d8:1c:a0:d0 + d2:53:ac:75:a8:06:52:55:48:4f:d0:a3:92:51:d4:23:06:f7: + 98:2b:b4:15:2e:65:26:44:c0:75:64:c5:df:73:cd:dc:a3:5a: + 7f:86:f6:e8:6b:bd:8f:3a:7e:20:6e:b9:df:4c:07:78:f5:1d: + b4:4c:d0:8b:0b:71:ad:74:6d:f7:48:fb:a8:45:e6:2f:87:d8: + 89:e3:de:b4:15:fa:71:47:19:c6:88:a2:9c:66:cd:44:05:22: + f8:d8:0b:1f:72:4d:ef:98:76:15:7d:41:20:53:2b:ef:e1:35: + 31:7c:b7:8e:70:c0:23:5a:ab:9a:58:5e:0b:02:d6:9c:7c:6e: + d0:29:ad:19:95:e2:1f:e8:18:c7:c3:25:cf:21:30:52:28:32: + fa:cf:07:4a:19:f2:39:bd:bb:05:96:4e:11:91:9f:b4:ae:5c: + 9e:bc:ac:f4:4a:b8:9a:73:40:4b:88:05:6d:3c:9e:c7:7d:0a: + 16:4f:d1:96:67:17:fa:e6:43:8c:0e:4c:26:2e:4c:51:8b:18: + ee:8d:e4:69:09:ca:7f:ea:8d:33:38:fa:45:e5:d7:06:74:1d: + bd:05:32:c7:1f:fd:84:9e:42:f7:7d:f2:24:ab:54:50:ba:69: + 3e:84:15:fe:f9:20:5a:77:8a:20:af:f3:97:35:1e:16:ee:92: + ef:9d:c7:5d -----BEGIN CERTIFICATE----- MIICvzCCAaegAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyrxs1UtR79N9ikYSq1/U -8zx960CL3g95bW+kQA+WUYoAIEh609QwLlsdn+EAPlTLk2IhfAlXLkM4CHdcHIuq -F8EiwNsBv8CACiRoDS3OUeSjKslCC3xXgjGUL7eoQpxOo4HLMIHIMB0GA1UdDgQW -BBSkoQEcj5RiwxEZNnYE3Kmvb7YRnDAfBgNVHSMEGDAWgBTprHMJtobNlUIpXeXs -x5kpEpGMUzA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwt +ZXJtZWRpYXRlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/0FfFozgdVk7SpyEPnmT +SKWYfpNYWNXJymC4bQyEgUDeIpXxblZJjwJFzv7ocXECJadHX2MOSkZN4LNzntiR +Kq1RR4Cw9UpeDZOmeJOn+R2ttiN4LiPgYvZ3+BzbMYLBo4HLMIHIMB0GA1UdDgQW +BBRxTtdOqApDE0H+9FAJktBWHUSKPzAfBgNVHSMEGDAWgBQ5v1N+tHuXXXrlEm36 +i3nFZz4e5DA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwt Zm9yLWFpYS9Sb290LmNlcjAsBgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZv ci1jcmwvUm9vdC5jcmwwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQELBQADggEBACJQ6HE0v4tExU6CMf1QSPT6OgFK+XGmqaLQHrzT -Hdysj07bWIpromQpbvUbC4cu9b3dknpfTqaqHbR88utaKxeDmSkfKxJFmxrN07Fx -o9l9z3j0ZM4DpQvHmOhzWOImR1zA7azAEbg5ERk5/AG2TKL1Sq6jnjyCcz61LChj -7BSin6fXSz7zVlD2noeb0Tj6eC5/Kf5KqNZDxAXW1md/UpA2U/+meB9/961mZX1L -VzzWsxmdCK/SWxp2Qv+yaywN0R0FwNgoApvL9h16NZO5yXYt0+/0B7/WizMqg2mK -aGMKuUX25BI4N4fWU0Yzrvhy0+Xpk7u6241zAbF5D9gcoNA= +DQYJKoZIhvcNAQELBQADggEBANJTrHWoBlJVSE/Qo5JR1CMG95grtBUuZSZEwHVk +xd9zzdyjWn+G9uhrvY86fiBuud9MB3j1HbRM0IsLca10bfdI+6hF5i+H2Inj3rQV ++nFHGcaIopxmzUQFIvjYCx9yTe+YdhV9QSBTK+/hNTF8t45wwCNaq5pYXgsC1px8 +btAprRmV4h/oGMfDJc8hMFIoMvrPB0oZ8jm9uwWWThGRn7SuXJ68rPRKuJpzQEuI +BW08nsd9ChZP0ZZnF/rmQ4wOTCYuTFGLGO6N5GkJyn/qjTM4+kXl1wZ0Hb0FMscf +/YSeQvd98iSrVFC6aT6EFf75IFp3iiCv85c1Hhbuku+dx10= -----END CERTIFICATE----- Certificate: @@ -168,30 +168,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b8:3c:af:88:6d:5e:96:7e:58:90:09:5d:40:54: - 11:4f:55:ff:bb:e7:94:1b:ba:d7:df:b9:47:c3:ff: - 84:71:22:da:a8:89:e6:98:71:4b:ae:d8:c1:19:df: - 4f:69:bf:c2:3d:da:0a:a8:65:08:a8:c3:2c:aa:34: - c7:a2:b9:00:45:6f:2e:69:6e:90:ee:9b:a2:f6:20: - 0d:75:17:c2:33:e0:59:2c:7d:d6:3d:23:34:0e:e6: - e0:49:74:3b:21:04:9f:6b:25:92:1a:2e:0f:e5:4a: - 0a:96:85:0d:69:dc:ab:31:23:19:b7:d0:54:e6:18: - c6:a1:ef:c6:e1:8b:da:a4:c2:78:7a:61:19:d7:83: - 5f:81:34:37:3e:1a:e2:b4:56:64:eb:db:af:7c:83: - c7:67:58:f1:69:c4:02:3a:05:1c:d9:56:5c:32:32: - bd:a7:e9:5f:82:b3:bb:1e:a6:e8:9c:86:86:ee:de: - 9b:19:d7:19:4f:89:cf:98:76:81:6d:dc:10:7d:d3: - 92:b8:7b:0d:c8:2f:2d:fc:ee:d7:68:fb:d5:87:7e: - 64:9a:32:73:57:58:5b:31:fc:da:d3:2c:2c:22:1d: - d6:db:71:a6:58:0b:84:0d:28:de:82:ad:d1:4e:2c: - 4b:b4:df:1d:78:34:59:52:a3:16:bd:0b:77:26:4d: - 4b:6f + 00:dd:a5:d8:2e:59:ed:a6:74:62:3b:71:d5:2f:0c: + b5:e6:a8:d6:d3:d2:f3:38:d5:6a:14:e4:ec:7e:d0: + 46:81:35:0e:27:96:4e:25:0c:9f:81:85:18:03:d2: + 22:1b:14:cc:54:4b:96:0e:35:0c:4c:0f:20:69:3d: + ff:48:26:b4:28:6c:6a:1f:95:87:df:09:9e:ab:60: + 43:97:3c:3a:7b:4a:d3:c6:66:ba:1a:79:71:58:29: + cb:78:38:19:de:12:c6:09:fa:f9:fd:13:a0:e1:0e: + d5:e6:c2:36:d9:dc:c5:f4:ef:08:42:e8:bf:43:d1: + b5:8a:c9:81:b1:9c:16:8f:8d:b2:aa:9e:61:30:ed: + fc:12:f0:a6:f5:9e:6a:1e:6e:d7:7c:3f:ff:76:fa: + 6f:53:8b:49:08:84:9a:69:37:bc:f5:ee:e7:ba:ee: + 39:5b:31:28:05:5a:39:d3:75:5a:1a:b2:5a:ef:48: + d4:f5:5c:ab:99:b0:41:cd:50:cd:f4:36:c3:4d:e9: + 42:2c:9d:2c:86:ea:a8:e4:d0:c9:1f:d0:c3:92:1b: + ef:c0:2c:a2:ed:2a:23:2f:ba:c0:27:a5:13:98:1d: + d3:ba:71:91:29:ae:2c:85:44:ff:bd:b5:c2:bc:e3: + fc:ff:c1:78:51:57:e9:5e:ee:1e:c2:29:d1:8c:91: + 60:9d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - E9:AC:73:09:B6:86:CD:95:42:29:5D:E5:EC:C7:99:29:12:91:8C:53 + 39:BF:53:7E:B4:7B:97:5D:7A:E5:12:6D:FA:8B:79:C5:67:3E:1E:E4 X509v3 Authority Key Identifier: - keyid:E9:AC:73:09:B6:86:CD:95:42:29:5D:E5:EC:C7:99:29:12:91:8C:53 + keyid:39:BF:53:7E:B4:7B:97:5D:7A:E5:12:6D:FA:8B:79:C5:67:3E:1E:E4 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -206,41 +206,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 76:62:2d:4c:94:4e:63:cb:7f:35:52:08:e2:8a:f3:d1:03:55: - 31:f4:e8:e0:79:68:23:f0:19:d5:7f:b2:dd:27:0a:a2:bb:6c: - f3:85:ae:48:83:3c:37:7e:62:69:e9:af:e0:4d:60:f0:8b:bf: - 1b:2c:da:90:10:fc:8c:83:b1:55:46:a6:fe:d1:d1:21:6f:91: - e1:cc:d6:c6:8c:1e:b1:03:e5:d7:5b:5f:3c:a7:2d:16:a1:71: - 54:e1:8a:4b:62:61:18:42:b1:f4:ec:6e:33:5a:3b:52:2a:8e: - 1a:60:75:73:89:78:72:86:9f:42:82:e5:d7:0e:5c:ce:36:a7: - 2d:8e:78:0a:e9:95:2d:72:d2:42:6f:b6:7c:7e:28:29:2d:85: - 3c:46:ab:6f:04:a8:f4:a2:ec:c4:24:7e:7a:a9:96:ec:b3:49: - 8b:ec:2a:00:88:c0:a6:50:01:a5:f0:df:ef:1c:6c:f8:bf:8e: - 64:ab:ff:43:bf:05:ce:82:b6:d4:cc:30:47:d8:74:7f:4e:4c: - dc:cc:a6:92:e3:96:37:97:b1:03:27:93:38:62:4d:b7:ae:fe: - a2:2b:61:05:32:27:28:27:c3:1f:e9:50:91:0a:4a:4b:ca:a3: - b0:8e:d4:56:30:ad:e8:76:49:e4:0e:36:83:15:22:8a:bc:59: - 27:1c:62:f3 + 0d:d6:63:36:cb:eb:0f:98:6d:d8:0a:17:d2:6e:77:43:17:e8: + e6:36:c6:2a:40:2c:1e:64:f3:84:13:31:b9:fd:b7:6f:1d:b0: + d3:49:55:4b:76:ac:9d:6b:9c:3e:2b:fd:c6:d2:0c:df:9b:ef: + 4a:cf:2b:9c:61:5e:6b:2a:7d:b4:08:8e:a7:2a:aa:a9:a5:0d: + 8e:e1:0a:99:fc:f7:fa:f2:34:50:6a:aa:3b:30:ac:7c:93:b1: + dc:56:9e:2c:98:12:05:26:51:ff:c5:bf:06:44:24:7e:98:21: + aa:32:5e:f6:25:74:6d:31:f4:6b:f6:b0:70:30:87:04:b6:89: + 3d:a0:0f:cc:a6:d4:bd:93:df:98:bc:a9:92:ca:3f:ff:ef:29: + 4b:f1:3a:6a:c8:69:89:a6:93:01:54:49:af:20:4f:4d:4d:df: + 8a:4e:4a:ba:4b:a8:5e:85:46:96:a2:64:6f:78:f9:d7:6b:e5: + db:fb:39:42:3a:18:c7:08:ce:93:41:e3:3c:78:01:64:36:8b: + de:78:9e:13:42:52:72:13:f6:81:df:5e:7a:45:08:4f:0d:99: + f8:af:1e:71:d6:55:85:3a:2c:79:17:e3:df:8e:46:8d:39:13: + a4:c9:e7:3d:f2:9d:ef:e7:b9:12:6e:e3:76:3f:e7:c6:5c:fe: + 1e:af:1b:50 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALg8r4htXpZ+WJAJXUBU -EU9V/7vnlBu619+5R8P/hHEi2qiJ5phxS67YwRnfT2m/wj3aCqhlCKjDLKo0x6K5 -AEVvLmlukO6bovYgDXUXwjPgWSx91j0jNA7m4El0OyEEn2slkhouD+VKCpaFDWnc -qzEjGbfQVOYYxqHvxuGL2qTCeHphGdeDX4E0Nz4a4rRWZOvbr3yDx2dY8WnEAjoF -HNlWXDIyvafpX4Kzux6m6JyGhu7emxnXGU+Jz5h2gW3cEH3Tkrh7DcgvLfzu12j7 -1Yd+ZJoyc1dYWzH82tMsLCId1ttxplgLhA0o3oKt0U4sS7TfHXg0WVKjFr0LdyZN -S28CAwEAAaOByzCByDAdBgNVHQ4EFgQU6axzCbaGzZVCKV3l7MeZKRKRjFMwHwYD -VR0jBBgwFoAU6axzCbaGzZVCKV3l7MeZKRKRjFMwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2l2C5Z7aZ0Yjtx1S8M +teao1tPS8zjVahTk7H7QRoE1DieWTiUMn4GFGAPSIhsUzFRLlg41DEwPIGk9/0gm +tChsah+Vh98JnqtgQ5c8OntK08Zmuhp5cVgpy3g4Gd4Sxgn6+f0ToOEO1ebCNtnc +xfTvCELov0PRtYrJgbGcFo+NsqqeYTDt/BLwpvWeah5u13w//3b6b1OLSQiEmmk3 +vPXu57ruOVsxKAVaOdN1WhqyWu9I1PVcq5mwQc1QzfQ2w03pQiydLIbqqOTQyR/Q +w5Ib78Asou0qIy+6wCelE5gd07pxkSmuLIVE/721wrzj/P/BeFFX6V7uHsIp0YyR +YJ0CAwEAAaOByzCByDAdBgNVHQ4EFgQUOb9TfrR7l1165RJt+ot5xWc+HuQwHwYD +VR0jBBgwFoAUOb9TfrR7l1165RJt+ot5xWc+HuQwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB2Yi1MlE5j -y381UgjiivPRA1Ux9OjgeWgj8BnVf7LdJwqiu2zzha5Igzw3fmJp6a/gTWDwi78b -LNqQEPyMg7FVRqb+0dEhb5HhzNbGjB6xA+XXW188py0WoXFU4YpLYmEYQrH07G4z -WjtSKo4aYHVziXhyhp9CguXXDlzONqctjngK6ZUtctJCb7Z8figpLYU8RqtvBKj0 -ouzEJH56qZbss0mL7CoAiMCmUAGl8N/vHGz4v45kq/9DvwXOgrbUzDBH2HR/Tkzc -zKaS45Y3l7EDJ5M4Yk23rv6iK2EFMicoJ8Mf6VCRCkpLyqOwjtRWMK3odknkDjaD -FSKKvFknHGLz +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAN1mM2y+sP +mG3YChfSbndDF+jmNsYqQCweZPOEEzG5/bdvHbDTSVVLdqyda5w+K/3G0gzfm+9K +zyucYV5rKn20CI6nKqqppQ2O4QqZ/Pf68jRQaqo7MKx8k7HcVp4smBIFJlH/xb8G +RCR+mCGqMl72JXRtMfRr9rBwMIcEtok9oA/MptS9k9+YvKmSyj//7ylL8TpqyGmJ +ppMBVEmvIE9NTd+KTkq6S6hehUaWomRvePnXa+Xb+zlCOhjHCM6TQeM8eAFkNove +eJ4TQlJyE/aB3156RQhPDZn4rx5x1lWFOix5F+PfjkaNOROkyec98p3v57kSbuN2 +P+fGXP4erxtQ -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-signed-with-md5.pem b/net/data/verify_certificate_chain_unittest/target-signed-with-md5.pem index dd82071..1e60c4a0 100644 --- a/net/data/verify_certificate_chain_unittest/target-signed-with-md5.pem +++ b/net/data/verify_certificate_chain_unittest/target-signed-with-md5.pem
@@ -1,6 +1,6 @@ [Created by: generate-target-signed-with-md5.py] -Certificate chain with an intermediary that uses MD5 to sign the target +Certificate chain with an intermediate that uses MD5 to sign the target certificate. This is expected to fail because MD5 is too weak. Certificate: @@ -8,7 +8,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: md5WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -17,80 +17,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c5:55:ac:42:f6:5f:21:93:e6:93:07:6a:dc:a0: - 4c:66:21:42:8c:2e:f4:d0:61:30:ac:bf:9a:3b:b3: - 59:21:e4:29:9f:33:5d:5e:6f:a1:de:4d:c2:b3:22: - f3:16:0a:81:f0:51:90:f8:45:e0:5e:9b:7d:3a:e4: - 60:d2:a8:a1:b1:2f:13:8c:41:dc:c3:58:1d:66:6c: - 67:13:5e:21:51:f7:49:21:5d:29:dd:91:fd:a7:36: - 10:bb:d1:30:71:16:ee:4b:7f:1b:ba:02:c3:79:0c: - 4d:e7:98:59:b1:0f:c8:61:a3:f9:5c:fa:03:08:29: - 41:af:60:50:b8:80:3b:f6:fe:75:0f:bb:d4:92:d9: - f5:3a:25:41:12:f1:cd:ad:2c:08:c9:f9:a3:17:78: - 86:2a:18:13:b1:20:15:83:de:04:ac:2a:c6:42:5c: - d1:f9:e6:12:1c:1b:51:7a:2c:cd:40:94:c8:76:17: - d7:20:4a:f8:e4:c8:3c:57:7c:c8:c6:6d:bd:2a:5e: - a9:03:7e:14:9d:a5:4e:1f:b1:aa:94:2f:64:34:6e: - d1:cb:5f:41:84:f7:86:95:04:90:ce:77:27:f6:7d: - 8e:5b:9c:52:7a:5e:dd:e2:f6:e6:fd:10:8d:e2:7d: - 34:f0:54:1b:c2:54:45:fe:01:97:90:f7:33:03:db: - 0c:bd + 00:bc:8a:b8:3e:5c:f9:f0:cc:33:10:6f:ab:ec:81: + 53:1c:4f:d3:c7:e2:c6:ac:57:9b:b0:a1:37:3d:2a: + b8:4f:eb:23:8b:64:6d:2f:5b:f5:02:dc:5b:d5:11: + ea:29:38:4c:76:40:f4:b0:b0:47:9f:6c:8d:89:91: + f4:0d:e5:cb:bb:c2:2a:cc:c1:9b:3a:56:f6:26:8e: + 4a:df:2c:b3:7c:35:3f:71:a9:37:49:3c:1a:40:fd: + 5e:6f:1b:5e:a0:61:64:d1:40:80:d7:dd:2b:d4:32: + 4c:80:f8:5a:8c:b2:ff:b6:ea:91:73:59:00:5e:02: + a8:49:1b:2b:fa:c2:9b:35:44:79:74:7b:02:8e:68: + 47:76:43:8d:23:d0:d0:f9:c4:8c:a1:aa:99:cb:55: + 24:a1:11:1c:88:0d:8a:5c:d9:46:a6:8f:ac:3f:83: + e3:4e:35:90:03:fe:0e:2d:d7:c6:9b:a3:36:d7:7f: + af:32:89:83:94:40:e7:87:1b:fe:f5:1b:1e:75:ba: + f2:b5:70:f3:75:f8:85:b3:58:9d:5f:56:6b:60:0f: + 53:12:82:dc:01:67:28:66:2c:3e:f6:df:08:fb:b9: + da:ce:00:60:b3:b4:65:fd:1d:1e:14:7c:90:9b:0b: + d4:ca:ff:96:12:c0:2c:cd:fb:c3:4f:62:d0:67:59: + bc:71 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - DF:16:6B:0E:36:1E:E4:F1:15:A2:3A:9E:07:4A:F9:6D:81:82:7A:D5 + 2F:67:2E:92:9E:39:55:C4:47:23:6A:10:A9:37:87:97:74:0F:55:57 X509v3 Authority Key Identifier: - keyid:E2:CD:39:61:AF:F5:B9:CE:D9:7C:36:97:5D:28:36:61:63:0B:CA:49 + keyid:A7:A7:7E:EF:32:C8:D1:7C:DF:CA:EE:F4:4F:7A:EA:67:43:53:57:CF Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: md5WithRSAEncryption - 35:9f:32:4a:5f:2e:b6:3f:d4:03:97:8f:0d:70:8b:5a:8d:62: - 30:77:44:37:e0:85:5f:e8:fc:8a:f6:e2:cb:df:05:f3:08:2d: - 05:dc:bb:16:1f:69:06:2e:4b:2b:1b:6f:a1:b3:77:02:1e:7d: - 49:da:a0:d9:6a:ac:bd:5e:4d:65:10:51:ee:e6:2a:33:e5:b9: - b5:5b:83:67:3d:c1:9d:c5:a6:c4:6e:7b:3b:ad:88:02:dc:ef: - 98:c4:cf:1d:cc:ab:45:23:53:27:ee:7f:87:f4:e6:13:5a:3a: - 3d:30:1e:66:b7:6e:67:e7:ae:1b:c6:4e:26:14:0f:cf:71:8a: - 0c:ee:60:14:25:45:a1:4b:2f:46:73:41:11:59:9f:e7:9f:12: - 01:7e:dc:e4:68:96:31:a5:c0:cc:03:fc:e3:b0:c5:c2:65:57: - ef:48:a4:85:eb:6e:d9:95:2f:d8:b1:48:46:b1:d5:30:84:d6: - c0:aa:32:41:a2:8a:be:35:b4:97:e5:1d:f7:36:f4:47:36:68: - f9:6b:10:39:1f:13:e8:b3:f5:7c:57:71:df:a8:e8:40:28:ed: - 65:3a:ba:7a:98:fa:4d:14:e9:5e:f5:a3:92:03:aa:d5:0b:72: - 29:7e:30:80:03:40:b9:eb:72:e2:ac:43:3a:2c:f6:c9:a3:13: - c7:c9:05:b9 + 30:9f:40:ac:31:10:78:0f:06:4b:ed:6d:de:05:20:c6:29:64: + 66:a8:2a:4d:ac:b3:3d:40:d5:70:80:24:08:13:00:73:0b:90: + 32:c3:fe:35:b3:8c:77:bb:d6:79:a9:84:e3:76:89:d9:0f:19: + 2e:68:6a:ec:09:ef:9c:57:32:ee:9f:e5:0e:5e:4c:6b:87:eb: + e0:7b:e9:ed:b0:db:ef:34:7a:41:aa:7b:0d:b7:37:89:17:99: + b8:43:db:93:19:30:91:7c:25:fe:1d:cd:69:02:b8:6d:c6:08: + fa:7f:d8:3c:e5:9a:9d:fd:af:13:53:5a:54:a7:5d:d1:e3:46: + 3a:c9:8b:ac:e3:cb:e8:67:a8:e0:cf:bb:ab:45:5c:d6:d5:51: + d2:2a:d2:b2:f8:3f:05:d2:20:e8:95:17:7d:43:fe:af:cd:1c: + fa:d2:8f:8f:3b:b1:2b:3d:22:06:d8:c7:0d:00:64:8a:35:40: + 32:6e:2c:07:be:5f:e7:9d:06:4f:b1:99:a9:fb:2e:03:80:79: + 5e:19:60:a9:7f:e5:12:bb:ba:a8:f2:34:d7:00:29:11:ab:8d: + 51:52:67:33:99:5c:08:de:85:a6:ea:42:9d:08:76:d1:f1:23: + fa:c0:4c:ff:38:5a:de:1b:7a:16:e7:79:cf:a0:d0:2f:b7:e5: + d4:8e:92:4f -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQQFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDFVaxC -9l8hk+aTB2rcoExmIUKMLvTQYTCsv5o7s1kh5CmfM11eb6HeTcKzIvMWCoHwUZD4 -ReBem3065GDSqKGxLxOMQdzDWB1mbGcTXiFR90khXSndkf2nNhC70TBxFu5Lfxu6 -AsN5DE3nmFmxD8hho/lc+gMIKUGvYFC4gDv2/nUPu9SS2fU6JUES8c2tLAjJ+aMX -eIYqGBOxIBWD3gSsKsZCXNH55hIcG1F6LM1AlMh2F9cgSvjkyDxXfMjGbb0qXqkD -fhSdpU4fsaqUL2Q0btHLX0GE94aVBJDOdyf2fY5bnFJ6Xt3i9ub9EI3ifTTwVBvC -VEX+AZeQ9zMD2wy9AgMBAAGjgekwgeYwHQYDVR0OBBYEFN8Waw42HuTxFaI6ngdK -+W2BgnrVMB8GA1UdIwQYMBaAFOLNOWGv9bnO2Xw2l10oNmFjC8pJMD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8irg+ +XPnwzDMQb6vsgVMcT9PH4sasV5uwoTc9KrhP6yOLZG0vW/UC3FvVEeopOEx2QPSw +sEefbI2JkfQN5cu7wirMwZs6VvYmjkrfLLN8NT9xqTdJPBpA/V5vG16gYWTRQIDX +3SvUMkyA+FqMsv+26pFzWQBeAqhJGyv6wps1RHl0ewKOaEd2Q40j0ND5xIyhqpnL +VSShERyIDYpc2Uamj6w/g+NONZAD/g4t18abozbXf68yiYOUQOeHG/71Gx51uvK1 +cPN1+IWzWJ1fVmtgD1MSgtwBZyhmLD723wj7udrOAGCztGX9HR4UfJCbC9TK/5YS +wCzN+8NPYtBnWbxxAgMBAAGjgekwgeYwHQYDVR0OBBYEFC9nLpKeOVXERyNqEKk3 +h5d0D1VXMB8GA1UdIwQYMBaAFKenfu8yyNF838ru9E966mdDU1fPMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQQFAAOCAQEANZ8ySl8utj/UA5ePDXCL -Wo1iMHdEN+CFX+j8ivbiy98F8wgtBdy7Fh9pBi5LKxtvobN3Ah59Sdqg2WqsvV5N -ZRBR7uYqM+W5tVuDZz3BncWmxG57O62IAtzvmMTPHcyrRSNTJ+5/h/TmE1o6PTAe -ZrduZ+euG8ZOJhQPz3GKDO5gFCVFoUsvRnNBEVmf558SAX7c5GiWMaXAzAP847DF -wmVX70ikhetu2ZUv2LFIRrHVMITWwKoyQaKKvjW0l+Ud9zb0RzZo+WsQOR8T6LP1 -fFdx36joQCjtZTq6epj6TRTpXvWjkgOq1QtyKX4wgANAuety4qxDOiz2yaMTx8kF -uQ== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQQFAAOCAQEAMJ9ArDEQeA8GS+1t3gUg +xilkZqgqTayzPUDVcIAkCBMAcwuQMsP+NbOMd7vWeamE43aJ2Q8ZLmhq7AnvnFcy +7p/lDl5Ma4fr4Hvp7bDb7zR6Qap7Dbc3iReZuEPbkxkwkXwl/h3NaQK4bcYI+n/Y +POWanf2vE1NaVKdd0eNGOsmLrOPL6Geo4M+7q0Vc1tVR0irSsvg/BdIg6JUXfUP+ +r80c+tKPjzuxKz0iBtjHDQBkijVAMm4sB75f550GT7GZqfsuA4B5XhlgqX/lEru6 +qPI01wApEauNUVJnM5lcCN6FpupCnQh20fEj+sBM/zha3ht6Fud5z6DQL7fl1I6S +Tw== -----END CERTIFICATE----- Certificate: @@ -102,35 +102,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b0:67:b9:ee:01:e6:50:d2:01:11:81:3a:70:41: - c3:36:af:95:28:11:ed:90:02:37:9a:f9:fe:23:38: - d6:72:c5:38:da:62:a4:84:dc:50:12:0e:03:e2:34: - 4d:d8:88:b7:aa:09:31:14:71:b5:e5:f9:80:06:c5: - 72:8a:1a:dd:72:a8:c9:76:79:3b:14:34:0a:bc:7a: - d4:a6:75:58:c0:f1:77:d7:23:bb:5b:a1:54:d2:cf: - ec:0f:b7:ab:53:01:7d:1d:54:40:68:12:fb:75:68: - 56:d5:0d:5c:00:de:81:5f:a5:14:fd:5d:77:b8:1f: - 3e:ee:84:99:a5:b5:0d:13:9a:fe:cf:b8:b0:e1:4c: - db:87:64:e1:36:a0:04:02:5d:fd:58:9e:e5:70:85: - 63:65:50:93:b8:3e:6c:85:10:67:bc:3d:e2:77:38: - b2:75:b5:e3:57:55:b2:44:68:3c:ab:65:2b:cb:8b: - 11:29:d5:7c:b8:24:88:25:d1:80:0b:04:3f:0e:e9: - 1d:79:db:39:7d:ab:81:67:fb:cf:ae:a3:da:ea:f1: - 12:ac:cd:87:96:5c:ed:fd:db:bc:e2:3a:4e:33:05: - af:1a:d3:03:85:ec:74:23:04:12:7e:62:a1:56:4c: - 45:9c:95:80:55:b6:2f:13:82:27:24:c4:a0:68:33: - e6:71 + 00:b1:0a:34:0b:b1:d9:65:b5:ea:7a:ac:f5:96:11: + 68:ba:f0:c9:6b:57:c7:97:7e:f4:bb:5d:31:4e:43: + 9b:04:7f:a7:2e:fd:4c:e0:03:c7:0d:ac:70:24:0e: + bc:26:a2:5d:48:71:04:9b:43:8c:97:e4:2c:df:7c: + 59:39:eb:a3:94:b3:5b:87:d5:11:b6:c1:4a:e9:7b: + e8:f8:c5:31:3b:2c:4d:f0:47:34:75:a8:88:6d:22: + a9:24:dc:00:1f:a0:36:1e:e3:a7:92:b1:00:9d:f8: + ef:27:46:63:60:23:67:48:e6:5d:66:b3:3d:b6:84: + 04:3f:b1:1b:2f:b7:8e:71:26:28:32:ff:de:fa:b0: + cb:e2:90:5a:72:9a:83:1d:de:c7:ad:b1:5d:68:11: + 9e:6a:ac:44:6b:06:cc:93:6c:a9:13:af:a4:72:e2: + 34:4d:c4:d7:8f:ee:99:f4:e4:db:d1:19:45:bf:97: + 76:59:7d:b9:32:63:07:a0:1c:e3:19:98:f6:aa:d8: + ba:44:f6:ec:5f:eb:46:d1:63:70:56:00:a1:f1:ce: + 18:c3:a5:77:27:81:e6:18:65:78:9a:c4:87:f9:36: + 2e:b6:fc:5c:75:a9:a9:59:6a:df:99:26:07:c9:1d: + 1a:a8:4f:6e:b6:10:92:4f:96:c1:74:30:4a:5c:8b: + bd:7b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - E2:CD:39:61:AF:F5:B9:CE:D9:7C:36:97:5D:28:36:61:63:0B:CA:49 + A7:A7:7E:EF:32:C8:D1:7C:DF:CA:EE:F4:4F:7A:EA:67:43:53:57:CF X509v3 Authority Key Identifier: - keyid:BD:2A:00:54:BB:89:72:89:4F:27:75:12:AA:89:38:AB:A0:06:F7:D1 + keyid:7F:7A:CD:B2:58:B8:B5:62:1A:C2:DE:B4:6B:B5:74:E9:B8:DC:77:87 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -145,41 +145,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 3d:9a:bd:e5:a7:4d:e4:0e:ea:6a:34:da:9e:48:c7:8a:e4:34: - 6c:19:fe:d0:2f:2f:7b:01:14:46:3a:45:d7:a7:46:6e:83:bb: - 54:cc:4e:af:cf:ef:fc:6d:90:e4:54:38:94:2d:cb:55:85:bd: - 1d:9f:9e:cd:ac:68:b3:7f:ed:bb:1f:30:30:14:15:ba:17:e4: - 62:db:6b:70:5a:1f:c2:e7:43:c6:30:d0:0f:be:78:06:4e:09: - 0b:00:96:63:d2:14:84:93:88:5d:e6:bf:93:1c:e9:18:9d:df: - 7d:db:34:39:e5:94:f8:c9:84:b6:ff:a0:e7:5c:51:5e:ba:40: - 82:5a:7e:64:ca:bf:e3:0e:c8:76:0b:5c:be:29:b1:62:79:18: - b2:d6:c3:ee:d0:05:61:96:be:a8:dc:c5:65:72:cc:f7:f8:6e: - 27:85:c3:9b:68:6d:3d:a5:e5:34:20:ff:19:12:62:7c:5d:b8: - 95:8f:a8:a8:a8:90:41:e0:83:f1:e3:3f:67:26:bc:b1:6c:76: - b1:5e:25:60:49:7d:78:bf:bb:11:22:43:ac:d3:5f:c0:c9:73: - 76:d5:9c:97:b0:ec:17:36:0d:4b:83:3e:77:d0:84:62:76:98: - af:6d:42:ac:cb:40:bb:04:1d:9e:0a:a3:97:11:f2:b0:3f:6b: - b6:fd:ff:da + 96:e8:cf:14:ab:83:41:2e:62:24:7e:03:ad:0e:ae:8e:6a:93: + ed:3d:86:68:84:b5:76:2b:88:c3:67:b6:15:b6:38:b2:27:f3: + 2a:1b:83:42:60:11:ee:94:ba:d8:d8:35:74:92:c1:5f:b4:b3: + f0:fc:5e:eb:51:93:be:00:11:79:db:94:86:0f:19:26:bb:f6: + b1:ec:93:66:34:df:3e:7e:6e:80:17:3e:4a:9b:53:04:05:22: + 88:de:65:e3:50:c1:81:fa:1d:fc:76:09:f6:25:89:9d:4f:d3: + ff:76:b0:3e:81:d3:79:8f:05:48:68:36:93:43:ac:b8:41:37: + 98:54:bc:71:90:ed:12:c0:1f:f7:b4:a7:7b:56:34:e3:97:01: + 41:56:9a:c6:37:3f:8e:34:9b:51:37:77:4f:67:d6:72:66:d1: + 89:64:10:80:5f:13:15:34:03:a9:c5:6e:07:6c:77:78:99:27: + f4:e0:44:0e:5f:a0:67:dd:f7:4d:4a:93:b3:71:d2:8e:1b:d6: + 29:5a:8f:f1:f7:c8:9c:33:ae:28:15:7b:10:ee:92:bd:d5:3c: + b3:81:5a:52:5d:96:43:ae:bd:03:83:36:e8:c5:f8:23:03:26: + eb:2f:70:4a:bb:d8:e1:6a:a0:7d:23:b1:4f:32:28:65:23:84: + 02:95:8e:2d -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsGe57gHm -UNIBEYE6cEHDNq+VKBHtkAI3mvn+IzjWcsU42mKkhNxQEg4D4jRN2Ii3qgkxFHG1 -5fmABsVyihrdcqjJdnk7FDQKvHrUpnVYwPF31yO7W6FU0s/sD7erUwF9HVRAaBL7 -dWhW1Q1cAN6BX6UU/V13uB8+7oSZpbUNE5r+z7iw4Uzbh2ThNqAEAl39WJ7lcIVj -ZVCTuD5shRBnvD3idziydbXjV1WyRGg8q2Ury4sRKdV8uCSIJdGACwQ/Dukdeds5 -fauBZ/vPrqPa6vESrM2Hllzt/du84jpOMwWvGtMDhex0IwQSfmKhVkxFnJWAVbYv -E4InJMSgaDPmcQIDAQABo4HLMIHIMB0GA1UdDgQWBBTizTlhr/W5ztl8NpddKDZh -YwvKSTAfBgNVHSMEGDAWgBS9KgBUu4lyiU8ndRKqiTiroAb30TA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsQo0C7HZ +ZbXqeqz1lhFouvDJa1fHl370u10xTkObBH+nLv1M4APHDaxwJA68JqJdSHEEm0OM +l+Qs33xZOeujlLNbh9URtsFK6Xvo+MUxOyxN8Ec0daiIbSKpJNwAH6A2HuOnkrEA +nfjvJ0ZjYCNnSOZdZrM9toQEP7EbL7eOcSYoMv/e+rDL4pBacpqDHd7HrbFdaBGe +aqxEawbMk2ypE6+kcuI0TcTXj+6Z9OTb0RlFv5d2WX25MmMHoBzjGZj2qti6RPbs +X+tG0WNwVgCh8c4Yw6V3J4HmGGV4msSH+TYutvxcdampWWrfmSYHyR0aqE9uthCS +T5bBdDBKXIu9ewIDAQABo4HLMIHIMB0GA1UdDgQWBBSnp37vMsjRfN/K7vRPeupn +Q1NXzzAfBgNVHSMEGDAWgBR/es2yWLi1YhrC3rRrtXTpuNx3hzA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AD2aveWnTeQO6mo02p5Ix4rkNGwZ/tAvL3sBFEY6RdenRm6Du1TMTq/P7/xtkORU -OJQty1WFvR2fns2saLN/7bsfMDAUFboX5GLba3BaH8LnQ8Yw0A++eAZOCQsAlmPS -FISTiF3mv5Mc6Rid333bNDnllPjJhLb/oOdcUV66QIJafmTKv+MOyHYLXL4psWJ5 -GLLWw+7QBWGWvqjcxWVyzPf4bieFw5tobT2l5TQg/xkSYnxduJWPqKiokEHgg/Hj -P2cmvLFsdrFeJWBJfXi/uxEiQ6zTX8DJc3bVnJew7Bc2DUuDPnfQhGJ2mK9tQqzL -QLsEHZ4Ko5cR8rA/a7b9/9o= +AJbozxSrg0EuYiR+A60Oro5qk+09hmiEtXYriMNnthW2OLIn8yobg0JgEe6UutjY +NXSSwV+0s/D8XutRk74AEXnblIYPGSa79rHsk2Y03z5+boAXPkqbUwQFIojeZeNQ +wYH6Hfx2CfYliZ1P0/92sD6B03mPBUhoNpNDrLhBN5hUvHGQ7RLAH/e0p3tWNOOX +AUFWmsY3P440m1E3d09n1nJm0YlkEIBfExU0A6nFbgdsd3iZJ/TgRA5foGfd901K +k7Nx0o4b1ilaj/H3yJwzrigVexDukr3VPLOBWlJdlkOuvQODNujF+CMDJusvcEq7 +2OFqoH0jsU8yKGUjhAKVji0= -----END CERTIFICATE----- Certificate: @@ -196,30 +196,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a0:9b:ff:8c:74:7b:c9:1e:3c:34:5b:7c:c0:35: - a4:88:6a:26:ed:0b:52:e9:58:e6:b5:bd:fd:f6:ae: - 0f:08:09:24:ef:62:fb:1c:61:7f:8a:ca:5f:d4:b5: - 2b:45:c2:21:1f:1a:a1:ef:f9:d8:0d:be:31:88:bd: - d7:35:8e:0d:de:e8:be:60:63:f6:3c:6a:cd:e7:1d: - 78:36:86:91:a1:e9:5c:2d:c6:9a:95:b9:e7:c3:66: - 6f:b5:0c:4b:aa:9a:51:ea:b3:a3:9e:57:d6:17:c9: - ae:4c:3f:32:ef:28:5a:99:6a:dc:50:54:f5:cc:80: - 51:76:6c:50:4d:52:01:45:92:af:a2:ca:a7:c1:9e: - 76:24:29:9c:d1:73:95:0a:a1:16:73:0f:56:9d:e8: - fe:c2:bb:e4:64:99:a3:d4:46:7d:7a:f7:25:d3:49: - c0:da:38:18:78:9c:2a:40:60:c2:b8:98:8a:84:ed: - d2:84:e0:39:a6:31:64:36:2a:59:ca:ba:dc:c2:6d: - a2:ac:1a:93:58:27:76:95:ea:5d:12:8d:7a:a5:b6: - 50:3b:1c:25:3f:75:ee:eb:db:12:78:67:47:0d:86: - 49:77:ce:f5:d0:37:03:55:eb:98:93:bf:f1:10:5b: - 87:aa:a1:ef:76:30:e1:e4:77:54:b1:52:e8:c9:81: - 4d:5b + 00:a7:f5:bd:ee:ad:ff:30:37:e6:5a:68:20:1a:22: + b1:f5:bb:5e:24:38:bd:b7:c1:34:d4:97:8b:16:97: + 34:17:bc:61:df:ff:ff:6b:9c:b6:34:79:7d:5a:e7: + 3b:cf:07:73:b8:2d:03:59:56:68:4a:85:25:58:f4: + 68:01:61:84:52:99:2f:6a:7e:cb:13:61:8b:6e:3b: + f5:8e:c2:48:cc:1e:50:28:4f:5f:4b:6b:32:d3:f3: + 76:c9:6f:a3:aa:40:1b:06:59:19:cd:42:70:f4:85: + fe:86:38:ca:84:42:5f:bb:d3:a7:41:42:46:59:14: + 3f:11:1d:62:d9:e1:16:3f:06:a7:59:f3:ff:ba:f1: + 88:7b:0c:68:10:49:ac:8d:75:87:08:94:f6:ec:ce: + 4c:6d:e6:77:85:25:c8:8f:42:0a:1d:d3:00:cc:89: + 31:dc:32:07:d7:2e:62:16:73:8b:5d:c4:c9:1b:87: + 7c:46:64:2d:cc:e0:fb:69:d2:e1:bd:23:2b:d9:15: + 62:22:a4:cd:75:64:f1:78:76:cc:07:11:59:08:60: + 03:dd:cb:67:3e:a7:b8:12:fa:96:54:6f:6d:9f:05: + 11:89:71:13:50:94:bb:bb:17:7e:80:ed:40:b1:ba: + f2:36:2d:45:bb:73:78:5e:b7:5e:2f:e7:f8:66:ec: + 1f:17 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - BD:2A:00:54:BB:89:72:89:4F:27:75:12:AA:89:38:AB:A0:06:F7:D1 + 7F:7A:CD:B2:58:B8:B5:62:1A:C2:DE:B4:6B:B5:74:E9:B8:DC:77:87 X509v3 Authority Key Identifier: - keyid:BD:2A:00:54:BB:89:72:89:4F:27:75:12:AA:89:38:AB:A0:06:F7:D1 + keyid:7F:7A:CD:B2:58:B8:B5:62:1A:C2:DE:B4:6B:B5:74:E9:B8:DC:77:87 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -234,41 +234,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 43:7c:24:ea:dc:11:3a:08:d7:6e:dd:8c:b9:21:1a:d7:88:d8: - f1:4c:90:a0:b7:67:a7:3c:d2:8d:a4:68:50:34:db:a4:f1:69: - d4:e0:8b:4c:b3:39:62:11:b5:4a:df:3a:60:87:eb:f6:79:2c: - ef:4d:67:91:93:5f:b3:d1:63:1b:2e:12:74:4e:e2:60:d8:c1: - 1f:e8:b2:5d:d4:56:2d:85:27:64:36:b0:e4:17:5e:d1:9c:ce: - 56:e2:f4:68:d3:80:6f:44:d6:e4:7b:5b:c6:5e:3e:ea:69:9d: - 97:4b:0d:83:3b:a7:52:f5:78:96:9f:af:15:e2:bf:59:a7:5f: - 5b:d4:21:d1:49:b2:f4:b5:26:b1:b1:cf:74:d0:ba:26:b1:2e: - 0e:ef:74:29:ed:f5:35:18:2f:cc:8b:80:39:41:8f:ea:ab:81: - 6a:89:71:b8:22:e6:bc:e5:33:34:f7:dd:6c:37:0a:e1:21:a7: - 7f:2d:29:f6:aa:02:d8:47:3f:a6:3d:0e:85:20:59:f8:5f:49: - 06:f7:3a:9a:b8:d9:3a:08:ce:9a:60:aa:dd:72:07:1e:bb:8f: - 86:fd:6a:3e:dc:4a:3f:5e:c2:b7:e6:0e:89:75:08:89:e3:bf: - 2b:6c:cc:02:63:e0:1c:04:21:79:64:c0:7c:89:73:2b:e9:85: - 49:80:5e:f4 + a6:5d:56:c1:c7:29:8f:3a:1d:86:2c:5f:1e:ff:83:7a:c0:44: + 81:81:f7:16:9d:84:70:66:f8:1a:f4:8e:50:a7:dd:d2:1a:2e: + f9:6e:cc:e6:39:7c:fb:7e:29:54:24:3d:4a:82:e1:a5:d6:7e: + 4c:c8:58:b8:d6:f7:d2:90:ca:d9:8f:e9:c8:59:bc:73:1c:37: + 19:7c:a4:2b:ec:68:de:e9:04:fa:14:f0:07:bd:2f:3f:16:a4: + 50:8f:e8:89:ea:c1:31:d1:ce:6e:b1:21:11:5b:69:dc:28:e7: + 8a:33:8d:40:52:f8:86:8e:b0:a1:7a:a5:46:f2:8d:d7:d1:2e: + c8:2f:0f:ac:20:38:25:d6:4e:b2:72:fc:88:f3:47:93:bc:ec: + 47:0c:1c:cf:22:65:40:04:70:15:fa:79:ec:09:a2:69:a9:09: + 78:f7:3e:84:f3:7f:fa:a2:11:ad:45:72:5d:9d:55:58:fa:b1: + c6:67:4e:41:b4:bd:88:a0:e2:55:ae:26:3a:72:78:3d:e4:ab: + ad:f7:83:69:24:cd:22:4f:2e:23:a1:05:19:bd:57:d3:e8:b3: + 3d:9f:bd:ed:0b:95:bf:e5:47:8f:da:dd:9d:6b:27:61:bd:49: + 15:9c:9d:6b:40:2b:54:5f:3f:56:d5:08:29:6c:46:49:2d:3f: + d1:91:ff:f8 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKCb/4x0e8kePDRbfMA1 -pIhqJu0LUulY5rW9/fauDwgJJO9i+xxhf4rKX9S1K0XCIR8aoe/52A2+MYi91zWO -Dd7ovmBj9jxqzecdeDaGkaHpXC3GmpW558Nmb7UMS6qaUeqzo55X1hfJrkw/Mu8o -Wplq3FBU9cyAUXZsUE1SAUWSr6LKp8GediQpnNFzlQqhFnMPVp3o/sK75GSZo9RG -fXr3JdNJwNo4GHicKkBgwriYioTt0oTgOaYxZDYqWcq63MJtoqwak1gndpXqXRKN -eqW2UDscJT917uvbEnhnRw2GSXfO9dA3A1XrmJO/8RBbh6qh73Yw4eR3VLFS6MmB -TVsCAwEAAaOByzCByDAdBgNVHQ4EFgQUvSoAVLuJcolPJ3USqok4q6AG99EwHwYD -VR0jBBgwFoAUvSoAVLuJcolPJ3USqok4q6AG99EwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKf1ve6t/zA35lpoIBoi +sfW7XiQ4vbfBNNSXixaXNBe8Yd///2uctjR5fVrnO88Hc7gtA1lWaEqFJVj0aAFh +hFKZL2p+yxNhi2479Y7CSMweUChPX0trMtPzdslvo6pAGwZZGc1CcPSF/oY4yoRC +X7vTp0FCRlkUPxEdYtnhFj8Gp1nz/7rxiHsMaBBJrI11hwiU9uzOTG3md4UlyI9C +Ch3TAMyJMdwyB9cuYhZzi13EyRuHfEZkLczg+2nS4b0jK9kVYiKkzXVk8Xh2zAcR +WQhgA93LZz6nuBL6llRvbZ8FEYlxE1CUu7sXfoDtQLG68jYtRbtzeF63Xi/n+Gbs +HxcCAwEAAaOByzCByDAdBgNVHQ4EFgQUf3rNsli4tWIawt60a7V06bjcd4cwHwYD +VR0jBBgwFoAUf3rNsli4tWIawt60a7V06bjcd4cwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBDfCTq3BE6 -CNdu3Yy5IRrXiNjxTJCgt2enPNKNpGhQNNuk8WnU4ItMszliEbVK3zpgh+v2eSzv -TWeRk1+z0WMbLhJ0TuJg2MEf6LJd1FYthSdkNrDkF17RnM5W4vRo04BvRNbke1vG -Xj7qaZ2XSw2DO6dS9XiWn68V4r9Zp19b1CHRSbL0tSaxsc900LomsS4O73Qp7fU1 -GC/Mi4A5QY/qq4FqiXG4Iua85TM0991sNwrhIad/LSn2qgLYRz+mPQ6FIFn4X0kG -9zqauNk6CM6aYKrdcgceu4+G/Wo+3Eo/XsK35g6JdQiJ478rbMwCY+AcBCF5ZMB8 -iXMr6YVJgF70 +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCmXVbBxymP +Oh2GLF8e/4N6wESBgfcWnYRwZvga9I5Qp93SGi75bszmOXz7filUJD1KguGl1n5M +yFi41vfSkMrZj+nIWbxzHDcZfKQr7Gje6QT6FPAHvS8/FqRQj+iJ6sEx0c5usSER +W2ncKOeKM41AUviGjrCheqVG8o3X0S7ILw+sIDgl1k6ycvyI80eTvOxHDBzPImVA +BHAV+nnsCaJpqQl49z6E83/6ohGtRXJdnVVY+rHGZ05BtL2IoOJVriY6cng95Kut +94NpJM0iTy4joQUZvVfT6LM9n73tC5W/5UeP2t2daydhvUkVnJ1rQCtUXz9W1Qgp +bEZJLT/Rkf/4 -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-unknown-critical-extension.pem b/net/data/verify_certificate_chain_unittest/target-unknown-critical-extension.pem index f02ac62..20ae9b5 100644 --- a/net/data/verify_certificate_chain_unittest/target-unknown-critical-extension.pem +++ b/net/data/verify_certificate_chain_unittest/target-unknown-critical-extension.pem
@@ -1,16 +1,16 @@ -[Created by: ./generate-target-unknown-critical-extension.py] +[Created by: generate-target-unknown-critical-extension.py] -Certificate chain with 1 intermediary and a trusted root. The intermediary -has an unknown X.509v3 extension (OID=1.2.3.4) that is marked as critical. -Verifying this certificate chain is expected to fail because there is an -unrecognized critical extension. +Certificate chain with 1 intermediate and a trusted root. The target +certificate has an unknown X.509v3 extension (OID=1.2.3.4) that is marked as +critical. Verifying this certificate chain is expected to fail because there is +an unrecognized critical extension. Certificate: Data: Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -19,38 +19,38 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c9:42:1d:0f:19:4b:d8:78:b9:3f:4d:43:a8:a9: - 92:67:ed:f3:55:a4:f5:9e:f4:d0:21:3c:25:cc:28: - 1d:db:22:5c:c0:eb:e8:78:fe:6c:71:72:ed:0c:cd: - 76:80:44:dc:72:d1:92:29:7d:e8:7f:e0:42:60:d6: - cb:b1:53:06:0d:6c:8b:f4:d3:ce:42:af:34:bc:57: - 63:34:dd:b2:00:26:3f:a9:7f:c8:ce:f6:1a:66:75: - db:7c:b6:57:ef:ee:3d:e7:d7:b8:38:3a:83:5d:7a: - 63:1f:91:c4:f1:15:da:9b:e9:f7:ef:d5:d6:26:16: - 96:c1:94:55:3f:3e:67:13:26:bf:3d:0c:93:ab:1b: - a2:58:10:38:60:11:18:15:c5:3c:db:71:62:ef:27: - 1f:a9:62:61:1f:f6:55:51:d9:7c:2d:b6:e3:2d:c3: - 86:2b:cd:5c:30:d3:a0:0d:a4:e4:34:fb:bb:59:09: - d5:7b:8f:b2:49:10:0d:d7:2d:0e:34:72:25:7b:b4: - 0e:e9:fd:cb:ce:50:ee:d2:71:40:14:3d:06:ad:71: - 52:43:cc:e9:77:4e:c4:8c:af:8c:a2:41:40:4a:82: - 82:83:a2:58:e3:5e:40:fa:74:f0:fb:bd:46:aa:55: - 9d:6d:5b:db:af:6a:1f:7c:46:cf:1a:1f:d3:17:c3: - 02:2f + 00:d5:9d:3b:85:e5:81:69:52:70:67:33:4a:2b:76: + 6a:e5:61:db:af:e5:32:74:85:dd:54:d2:c7:76:5a: + 5c:38:d8:46:fc:b4:33:f5:9d:8e:80:83:ab:31:96: + 41:c4:c2:52:af:8c:4d:0e:5c:69:c5:5d:cc:b4:1b: + ef:de:61:58:88:e2:c4:bf:6a:cb:74:bd:f5:bd:61: + 57:1c:22:9f:6d:e8:38:c6:70:b8:1e:a5:2b:4f:35: + 9f:65:fc:c1:36:17:3e:d7:fa:33:21:70:fb:e0:ce: + ab:23:41:3f:fc:7b:74:1d:6b:ba:21:b7:5b:fd:a1: + 77:11:1a:8d:5b:2a:be:38:2e:79:a0:b7:2d:45:5c: + d7:32:fd:4c:70:f1:95:1c:38:a3:15:4f:57:f3:75: + 59:fe:75:14:39:ea:44:16:b9:2e:06:df:67:30:dd: + 5a:b1:7e:95:09:fd:12:cc:87:b1:66:fa:7e:b9:e5: + b5:38:0a:46:73:53:1a:b2:aa:12:e3:6d:99:56:e8: + c7:cc:eb:6b:00:9b:c1:ba:02:23:2b:32:be:9b:f8: + ab:b2:b5:be:50:f6:7f:95:b6:6b:1c:e6:ad:f1:69: + 5a:e0:41:1e:85:64:91:37:7b:9a:28:43:a5:ee:33: + 25:ab:82:97:03:07:94:b8:d3:34:95:bf:33:d2:14: + b1:61 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 07:DB:E2:A1:15:3D:67:0C:54:ED:D5:22:AD:DE:59:73:9E:0F:F5:24 + B3:FD:B6:08:AB:82:83:50:E7:F0:85:51:1C:CC:78:E5:22:50:91:60 X509v3 Authority Key Identifier: - keyid:07:D2:5E:3F:28:F7:AD:46:16:25:D0:4D:DD:6D:77:7B:26:81:89:85 + keyid:5B:B2:D8:DC:1B:60:39:B5:6B:10:A5:70:37:93:E7:3C:F5:52:46:C8 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment @@ -59,42 +59,42 @@ 1.2.3.4: critical .... Signature Algorithm: sha256WithRSAEncryption - 66:78:33:4b:09:c3:20:05:e2:d2:a3:7f:90:2f:96:15:b8:d0: - ca:7e:97:c6:12:53:4b:18:92:03:77:b6:2c:8b:57:8e:84:7d: - 14:ee:df:cc:99:0d:f9:2e:21:dd:ca:4d:00:77:87:88:4d:13: - 28:36:4a:88:82:52:d2:b8:1d:75:67:1f:b5:0a:ea:bd:6a:b8: - 98:79:ea:cf:6e:2c:5f:21:94:e4:a9:29:d5:37:87:58:6a:d7: - 5b:0b:f5:35:59:c9:68:dd:f9:e7:c6:67:1a:ef:26:17:cf:89: - e7:18:8c:be:41:c4:07:d3:b7:1a:20:44:4f:20:12:8c:2e:5a: - 39:7c:8b:f3:12:f7:bd:b6:f1:7b:8c:48:7f:c5:29:7f:7a:9e: - 1e:28:13:08:36:56:ca:8d:17:f2:37:ce:59:0a:e7:ca:19:90: - c7:c8:b4:45:ab:3b:f7:0e:10:db:81:4b:2d:74:05:46:ab:5c: - 7e:c2:88:83:87:09:4d:5a:a3:40:56:f5:d5:da:fd:a2:2d:99: - 8c:d1:bf:0b:d0:8c:ce:79:12:0c:37:fc:b2:08:68:b2:fe:5e: - cc:3e:99:85:40:74:27:88:7f:f6:43:0f:60:dd:b7:6e:31:e3: - d4:39:87:8e:b1:cf:2d:b7:2f:bb:f9:ec:f8:86:96:1e:fc:68: - 0d:45:21:2c + 39:19:04:31:e9:20:03:1b:e9:d3:91:25:94:68:4f:8d:07:16: + 08:e8:7f:99:01:37:56:8d:f4:15:6b:a8:7c:e4:3d:32:ad:3d: + 62:0f:5e:93:6f:b9:21:ba:e8:c3:48:13:e5:eb:ad:26:f0:9b: + 4c:fe:76:8e:73:a2:be:01:b5:48:7c:11:7e:cc:47:4b:0c:0c: + 17:65:54:ab:0e:79:6c:e5:75:67:52:ab:f7:26:97:36:3d:71: + 6d:88:54:b9:ef:b1:00:42:56:64:88:db:0f:9c:be:25:e0:6e: + 2b:df:c6:55:3a:89:af:92:1c:21:71:6e:22:ab:5a:b8:de:53: + a1:8d:84:0f:0e:55:43:08:45:0b:fd:4a:6f:fa:e4:89:55:a0: + 8d:10:c0:3a:06:42:7c:f1:b8:7a:19:a7:61:cc:c0:b1:e2:f1: + 14:d5:bd:ff:41:a5:50:f6:ac:a4:3f:ec:6a:6a:3e:7b:60:29: + f4:9d:c8:57:81:12:59:7b:0f:b2:2a:43:29:03:a5:eb:e7:e8: + cd:15:fe:53:07:e0:12:0a:35:29:e8:fe:7f:51:ae:19:98:d5: + 89:9c:05:0a:ba:51:89:0f:1f:3c:8e:2a:eb:e7:93:0a:fd:c1: + f3:0e:ce:67:5b:f2:73:dc:e6:2e:db:2b:88:11:3b:07:d8:ff: + 79:0c:6a:e1 -----BEGIN CERTIFICATE----- MIIDnTCCAoWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJQh0P -GUvYeLk/TUOoqZJn7fNVpPWe9NAhPCXMKB3bIlzA6+h4/mxxcu0MzXaARNxy0ZIp -feh/4EJg1suxUwYNbIv0085CrzS8V2M03bIAJj+pf8jO9hpmddt8tlfv7j3n17g4 -OoNdemMfkcTxFdqb6ffv1dYmFpbBlFU/PmcTJr89DJOrG6JYEDhgERgVxTzbcWLv -Jx+pYmEf9lVR2XwttuMtw4YrzVww06ANpOQ0+7tZCdV7j7JJEA3XLQ40ciV7tA7p -/cvOUO7ScUAUPQatcVJDzOl3TsSMr4yiQUBKgoKDoljjXkD6dPD7vUaqVZ1tW9uv -ah98Rs8aH9MXwwIvAgMBAAGjgfkwgfYwHQYDVR0OBBYEFAfb4qEVPWcMVO3VIq3e -WXOeD/UkMB8GA1UdIwQYMBaAFAfSXj8o961GFiXQTd1td3smgYmFMD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVnTuF +5YFpUnBnM0ordmrlYduv5TJ0hd1U0sd2Wlw42Eb8tDP1nY6Ag6sxlkHEwlKvjE0O +XGnFXcy0G+/eYViI4sS/ast0vfW9YVccIp9t6DjGcLgepStPNZ9l/ME2Fz7X+jMh +cPvgzqsjQT/8e3Qda7oht1v9oXcRGo1bKr44Lnmgty1FXNcy/Uxw8ZUcOKMVT1fz +dVn+dRQ56kQWuS4G32cw3VqxfpUJ/RLMh7Fm+n655bU4CkZzUxqyqhLjbZlW6MfM +62sAm8G6AiMrMr6b+Kuytb5Q9n+Vtmsc5q3xaVrgQR6FZJE3e5ooQ6XuMyWrgpcD +B5S40zSVvzPSFLFhAgMBAAGjgfkwgfYwHQYDVR0OBBYEFLP9tgirgoNQ5/CFURzM +eOUiUJFgMB8GA1UdIwQYMBaAFFuy2NwbYDm1axClcDeT5zz1UkbIMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF BwMBBggrBgEFBQcDAjAOBgMqAwQBAf8EBAECAwQwDQYJKoZIhvcNAQELBQADggEB -AGZ4M0sJwyAF4tKjf5AvlhW40Mp+l8YSU0sYkgN3tiyLV46EfRTu38yZDfkuId3K -TQB3h4hNEyg2SoiCUtK4HXVnH7UK6r1quJh56s9uLF8hlOSpKdU3h1hq11sL9TVZ -yWjd+efGZxrvJhfPiecYjL5BxAfTtxogRE8gEowuWjl8i/MS97228XuMSH/FKX96 -nh4oEwg2VsqNF/I3zlkK58oZkMfItEWrO/cOENuBSy10BUarXH7CiIOHCU1ao0BW -9dXa/aItmYzRvwvQjM55Egw3/LIIaLL+Xsw+mYVAdCeIf/ZDD2Ddt24x49Q5h46x -zy23L7v57PiGlh78aA1FISw= +ADkZBDHpIAMb6dORJZRoT40HFgjof5kBN1aN9BVrqHzkPTKtPWIPXpNvuSG66MNI +E+XrrSbwm0z+do5zor4BtUh8EX7MR0sMDBdlVKsOeWzldWdSq/cmlzY9cW2IVLnv +sQBCVmSI2w+cviXgbivfxlU6ia+SHCFxbiKrWrjeU6GNhA8OVUMIRQv9Sm/65IlV +oI0QwDoGQnzxuHoZp2HMwLHi8RTVvf9BpVD2rKQ/7GpqPntgKfSdyFeBEll7D7Iq +QykDpevn6M0V/lMH4BIKNSno/n9RrhmY1YmcBQq6UYkPHzyOKuvnkwr9wfMOzmdb +8nPc5i7bK4gROwfY/3kMauE= -----END CERTIFICATE----- Certificate: @@ -106,35 +106,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:e1:3b:e0:9e:b3:37:a6:d2:5d:5a:cf:1d:6c:d4: - e7:9d:92:0e:29:b6:da:7e:48:32:ea:dd:a8:6e:a5: - 4f:d4:07:23:be:f5:b2:e2:e9:57:1b:a1:bc:67:5a: - 27:15:9d:f7:51:07:23:d9:0a:0f:21:36:4b:b1:c3: - 48:71:f5:f8:67:6f:a4:9c:54:8b:e8:d2:79:da:6e: - 70:06:b8:ae:b5:6f:82:ab:89:5a:68:19:56:c7:8a: - 93:25:f9:4b:7e:8b:de:2f:1a:92:c4:be:c4:9f:ea: - 34:fe:95:f5:74:ab:fc:47:8b:34:7d:28:d3:7a:7b: - 29:70:3e:aa:b9:d9:be:53:fe:79:3a:ea:79:c7:d7: - 1d:b1:c3:47:e6:7d:8e:ed:40:2a:47:d9:71:5f:c2: - 6c:cb:52:be:1b:83:01:de:06:97:d4:98:ea:37:67: - f6:fb:67:69:c7:b1:fe:07:ad:be:0a:f8:c8:a8:5d: - 98:0b:f6:02:7b:cb:19:f6:23:58:79:f9:d3:8c:a5: - 09:73:c9:2b:ae:76:33:3f:2d:a9:49:93:39:89:92: - bc:5e:27:1c:ae:a6:29:43:97:a1:04:d0:6c:b6:b6: - b8:c3:62:5e:43:7c:ca:27:50:e2:91:da:bb:cc:c6: - e5:7b:5a:31:62:77:a6:4d:6a:ee:84:ea:7a:87:de: - a9:bd + 00:b9:ec:7c:da:f2:c7:b4:02:ee:82:a9:58:98:60: + 67:07:a2:c2:9d:2c:a1:76:50:f7:4a:0a:04:80:45: + 7b:3d:f6:31:fe:1d:e9:45:40:76:1d:38:df:c9:e1: + 42:df:13:7e:16:26:2b:41:14:6b:6e:5e:f3:39:4e: + 61:9d:fd:5f:bf:2a:f9:b7:cf:3f:af:34:b1:17:ef: + 97:1f:bf:3d:4c:0a:93:91:bd:ee:11:7a:64:ee:69: + 22:75:60:8b:c3:10:cd:9e:91:8a:d8:54:c7:43:f4: + fb:88:db:09:7a:22:5d:26:58:ab:7d:d0:41:11:47: + 10:62:ed:cc:e6:bb:d2:da:a4:7c:e9:0a:39:5b:9f: + 93:b0:06:27:50:38:ea:63:e2:6b:a0:eb:c5:d3:7f: + 87:71:d8:08:64:d5:87:0a:6e:59:99:d7:74:7c:da: + eb:30:68:9d:f8:09:31:c7:66:5f:9a:fb:2d:9b:f1: + c1:ff:cb:57:67:46:03:99:a3:4b:e0:bc:2b:17:f4: + 0b:7b:61:3f:5e:cf:c9:41:9b:15:ee:f9:90:46:ad: + b4:a2:86:3f:87:3c:dd:7e:97:6f:97:30:88:f8:e6: + 88:83:15:ad:77:6a:fd:1e:f1:ae:88:a2:f5:52:6d: + 6e:d9:5d:5d:c1:1b:0a:49:10:f4:5a:e8:42:53:67: + d1:cd Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 07:D2:5E:3F:28:F7:AD:46:16:25:D0:4D:DD:6D:77:7B:26:81:89:85 + 5B:B2:D8:DC:1B:60:39:B5:6B:10:A5:70:37:93:E7:3C:F5:52:46:C8 X509v3 Authority Key Identifier: - keyid:C8:0F:45:73:03:B2:2C:B8:35:14:0F:C4:D7:4B:E4:E2:9D:B2:AB:CE + keyid:50:25:07:BE:12:C8:A2:18:2F:32:21:59:CC:2B:5A:A7:4E:19:5D:55 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -149,41 +149,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 2a:af:ec:1b:fc:c9:ad:bf:ad:97:8d:ed:f4:44:87:7f:72:86: - c0:4d:85:dd:eb:6c:d3:c7:17:df:11:0a:f5:e5:2b:c2:53:41: - 58:73:66:da:29:8a:43:af:5e:24:b2:16:26:b6:89:7e:4a:6f: - 46:13:05:c4:3f:13:6c:ed:b8:37:a7:a9:f6:c9:c8:b9:b3:a1: - 7c:eb:99:57:fb:8d:12:c5:47:ff:1e:02:b2:47:dc:e9:6f:41: - 17:0a:3b:ff:ba:14:76:cc:14:35:ec:71:b0:1a:d4:eb:b0:6c: - a3:96:eb:7d:50:59:d7:01:a0:ee:67:b8:c8:b6:ed:78:02:b1: - 0b:72:9c:ea:c3:3b:14:3d:89:fc:89:c2:af:6c:18:ae:b0:13: - 31:04:a2:89:4f:a6:99:58:00:c6:00:e1:39:79:d4:31:0b:0f: - d5:92:86:a2:e7:ec:c6:b8:f2:62:21:bb:0d:d5:91:b8:f2:5f: - db:dc:b1:b2:b2:28:fd:d5:14:54:a6:cf:8d:bd:33:ca:22:27: - 72:d8:27:85:03:21:7f:8e:4f:2d:e6:bf:22:08:86:03:a8:f3: - 9f:42:2f:81:8f:1e:44:39:e3:23:b2:9d:3d:64:7e:e2:b3:93: - 8d:46:a0:b7:08:4e:d5:e6:14:af:1d:5d:b6:74:7c:91:36:37: - 0c:c0:ab:14 + 12:72:ee:b6:62:1b:0d:70:52:a6:02:3c:13:2a:88:cf:cb:9a: + e2:07:5f:cf:3e:be:75:d3:f9:a6:23:47:ca:fb:88:87:bd:e1: + 52:8e:8b:fe:e9:c1:7a:8c:30:91:c5:0c:fe:9d:31:fa:fc:c0: + d7:fe:7a:7a:18:6f:3c:67:50:b0:22:b2:09:48:ca:dc:d7:d3: + 29:86:eb:f4:cf:e0:3e:6e:d1:88:fa:20:93:b3:05:4c:c6:29: + 06:df:4a:8b:72:3e:c8:3c:2b:33:56:26:de:91:1a:11:bc:21: + 7b:b8:b5:b6:7c:ca:0d:f7:d6:e8:b0:a8:99:e8:7a:2b:f0:c4: + 78:e5:54:9e:3f:73:dc:85:41:97:11:36:45:73:b9:f2:49:8d: + d7:83:cf:b4:1a:ed:33:dc:0b:cd:7e:83:77:ce:aa:2f:0e:1f: + 4d:e0:19:96:cd:74:79:de:18:8b:ad:9f:0c:96:20:14:63:5e: + e2:58:8e:4a:d8:fd:59:0d:a6:a4:02:85:ac:23:d4:43:b2:da: + 2d:6b:87:79:9e:2e:1e:f4:d3:95:ef:3d:91:7a:f7:17:16:c7: + 9f:1f:b7:42:7e:f4:fa:d9:81:18:26:23:03:1e:86:99:7d:28: + ef:a3:ac:be:bb:55:fa:38:62:3c:e6:6e:47:4b:f1:45:ef:de: + 38:ea:c3:a3 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4TvgnrM3 -ptJdWs8dbNTnnZIOKbbafkgy6t2obqVP1AcjvvWy4ulXG6G8Z1onFZ33UQcj2QoP -ITZLscNIcfX4Z2+knFSL6NJ52m5wBriutW+Cq4laaBlWx4qTJflLfoveLxqSxL7E -n+o0/pX1dKv8R4s0fSjTenspcD6qudm+U/55Oup5x9cdscNH5n2O7UAqR9lxX8Js -y1K+G4MB3gaX1JjqN2f2+2dpx7H+B62+CvjIqF2YC/YCe8sZ9iNYefnTjKUJc8kr -rnYzPy2pSZM5iZK8XiccrqYpQ5ehBNBstra4w2JeQ3zKJ1Dikdq7zMble1oxYnem -TWruhOp6h96pvQIDAQABo4HLMIHIMB0GA1UdDgQWBBQH0l4/KPetRhYl0E3dbXd7 -JoGJhTAfBgNVHSMEGDAWgBTID0VzA7IsuDUUD8TXS+TinbKrzjA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuex82vLH +tALugqlYmGBnB6LCnSyhdlD3SgoEgEV7PfYx/h3pRUB2HTjfyeFC3xN+FiYrQRRr +bl7zOU5hnf1fvyr5t88/rzSxF++XH789TAqTkb3uEXpk7mkidWCLwxDNnpGK2FTH +Q/T7iNsJeiJdJlirfdBBEUcQYu3M5rvS2qR86Qo5W5+TsAYnUDjqY+JroOvF03+H +cdgIZNWHCm5Zmdd0fNrrMGid+Akxx2Zfmvstm/HB/8tXZ0YDmaNL4LwrF/QLe2E/ +Xs/JQZsV7vmQRq20ooY/hzzdfpdvlzCI+OaIgxWtd2r9HvGuiKL1Um1u2V1dwRsK +SRD0WuhCU2fRzQIDAQABo4HLMIHIMB0GA1UdDgQWBBRbstjcG2A5tWsQpXA3k+c8 +9VJGyDAfBgNVHSMEGDAWgBRQJQe+EsiiGC8yIVnMK1qnThldVTA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -ACqv7Bv8ya2/rZeN7fREh39yhsBNhd3rbNPHF98RCvXlK8JTQVhzZtopikOvXiSy -Fia2iX5Kb0YTBcQ/E2ztuDenqfbJyLmzoXzrmVf7jRLFR/8eArJH3OlvQRcKO/+6 -FHbMFDXscbAa1OuwbKOW631QWdcBoO5nuMi27XgCsQtynOrDOxQ9ifyJwq9sGK6w -EzEEoolPpplYAMYA4Tl51DELD9WShqLn7Ma48mIhuw3VkbjyX9vcsbKyKP3VFFSm -z429M8oiJ3LYJ4UDIX+OTy3mvyIIhgOo859CL4GPHkQ54yOynT1kfuKzk41GoLcI -TtXmFK8dXbZ0fJE2NwzAqxQ= +ABJy7rZiGw1wUqYCPBMqiM/LmuIHX88+vnXT+aYjR8r7iIe94VKOi/7pwXqMMJHF +DP6dMfr8wNf+enoYbzxnULAisglIytzX0ymG6/TP4D5u0Yj6IJOzBUzGKQbfSoty +Psg8KzNWJt6RGhG8IXu4tbZ8yg331uiwqJnoeivwxHjlVJ4/c9yFQZcRNkVzufJJ +jdeDz7Qa7TPcC81+g3fOqi8OH03gGZbNdHneGIutnwyWIBRjXuJYjkrY/VkNpqQC +hawj1EOy2i1rh3meLh7005XvPZF69xcWx58ft0J+9PrZgRgmIwMehpl9KO+jrL67 +Vfo4YjzmbkdL8UXv3jjqw6M= -----END CERTIFICATE----- Certificate: @@ -200,30 +200,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:dc:6a:1a:05:36:f1:a3:7c:28:e9:97:2f:7b:85: - d5:c1:91:33:0a:72:2d:bb:45:ae:c6:29:54:22:05: - c2:e9:f4:be:f2:39:ec:e0:64:66:1d:e3:c9:42:3e: - 6c:c8:3b:65:0a:e4:2c:74:e4:c9:17:c8:8b:27:6e: - c0:4c:9a:b4:85:ae:ff:3f:e3:1e:d0:21:1c:8b:84: - e0:3b:f6:59:00:a7:ab:59:f3:58:67:d7:af:97:74: - a9:b1:1f:78:80:ad:e3:09:31:81:c2:11:55:10:d0: - 93:ca:eb:de:a7:72:76:09:33:6a:89:f9:51:b1:de: - ca:4a:48:e8:9f:1c:5f:df:bc:7d:a7:f5:27:6b:77: - a3:53:e5:c3:e4:3d:9e:82:72:9e:d2:1b:76:52:8c: - f0:53:b6:98:5f:6c:54:1b:da:9a:72:14:ee:c3:51: - b4:c7:6b:f0:75:b2:2c:6e:b4:b7:29:54:92:ab:69: - 57:af:3c:6d:96:e8:05:c8:a4:d0:7a:c2:42:7d:8b: - 7f:3c:8f:9d:1d:c1:35:af:41:7b:f5:0e:60:88:72: - 90:22:ac:37:2f:7b:b4:47:01:62:b8:fe:73:4b:d2: - 7b:56:8d:b2:37:d3:18:2f:dc:fb:d1:fb:e9:14:19: - b1:d8:76:eb:34:d2:c0:40:a8:22:68:33:44:a7:84: - 90:e1 + 00:a9:09:72:27:8b:f5:e4:bb:33:ee:14:1d:da:11: + 7c:b1:f1:53:3a:a3:77:3f:b2:f5:1f:b6:23:a3:69: + f8:9d:52:97:4c:92:af:07:46:c5:82:3f:97:a5:b2: + fc:e0:b3:3e:29:53:e5:75:07:04:30:7b:bb:55:a3: + af:ec:c3:bd:a0:c5:f1:58:4b:a8:5a:77:49:c7:fc: + a2:13:97:5c:3a:95:58:9b:95:4c:a0:18:b3:3a:18: + 1d:fe:5f:c1:c7:9b:d3:9a:0d:f3:4c:a6:3d:28:21: + 50:9d:ae:90:ae:aa:96:23:d6:4f:9b:ec:ff:59:67: + 0a:ff:8a:89:df:bc:99:ff:f6:75:b5:da:c7:79:d8: + 54:c8:f3:96:3a:c6:e9:60:0c:ee:9e:52:e1:e9:5f: + 58:1e:29:a3:1a:c3:4f:91:8c:2e:85:33:87:f0:c7: + c6:74:91:cc:fb:dd:ca:1e:71:6f:e2:c1:41:bc:ef: + e8:7f:48:07:a9:5c:aa:21:60:43:fd:3e:98:8b:4c: + 8d:95:55:48:3b:35:1a:2a:f4:e3:ef:85:01:11:c4: + f4:a3:15:e3:68:df:bb:94:f9:26:10:35:83:96:83: + 00:ce:cf:71:d4:e9:01:18:80:c2:dd:f0:9d:52:f6: + fa:11:de:a1:7f:79:d9:13:a6:eb:33:3e:04:57:b6: + 75:b9 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - C8:0F:45:73:03:B2:2C:B8:35:14:0F:C4:D7:4B:E4:E2:9D:B2:AB:CE + 50:25:07:BE:12:C8:A2:18:2F:32:21:59:CC:2B:5A:A7:4E:19:5D:55 X509v3 Authority Key Identifier: - keyid:C8:0F:45:73:03:B2:2C:B8:35:14:0F:C4:D7:4B:E4:E2:9D:B2:AB:CE + keyid:50:25:07:BE:12:C8:A2:18:2F:32:21:59:CC:2B:5A:A7:4E:19:5D:55 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -238,41 +238,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 54:39:78:5b:30:97:aa:99:fb:e5:0a:39:27:2a:ea:ad:9f:37: - 3e:aa:5a:b8:c4:51:66:83:6e:36:5c:c3:1b:da:de:cd:a7:6e: - bd:55:47:7c:3e:53:12:6a:51:02:13:c2:98:03:32:b6:5b:d9: - 5e:26:b2:9a:d1:21:ca:39:cd:20:be:ad:d8:3a:23:a2:de:d7: - 18:b2:99:bb:d4:1a:82:43:7c:6e:20:3c:01:f1:22:5f:72:ac: - 43:9a:87:07:37:5d:a8:34:26:19:89:aa:f3:18:e3:ee:c6:67: - 43:49:64:e4:b3:d8:2c:11:8c:f7:8b:48:7f:fd:e1:6b:e9:a5: - 87:55:bf:f1:9d:54:fe:b5:7f:c4:5c:8b:08:cf:4f:47:21:58: - 06:5e:ab:40:be:b7:28:0c:27:55:82:6b:e8:17:5e:dd:f8:79: - 61:f2:7e:18:59:7a:24:7e:e3:08:3c:d9:d1:81:73:36:51:99: - a1:ea:bf:18:ff:94:40:d7:ff:5f:1a:8a:b1:ae:78:c1:91:7b: - 55:1a:d8:b1:91:02:b6:5e:94:32:84:5f:77:f8:89:89:00:5c: - 74:be:77:1b:95:3e:60:2d:6a:67:a3:e9:42:03:51:af:1f:10: - d8:21:6f:36:29:33:72:90:f4:7e:05:17:bb:a5:aa:fb:d6:56: - fc:40:2e:0e + 3d:e1:85:32:4c:43:1e:f2:0d:ff:d3:ec:90:97:7d:8f:9c:16: + b1:6e:cb:55:f1:4f:d9:46:1c:c8:d7:3c:3e:8c:2c:8a:21:b8: + 38:a4:a9:a8:ac:69:51:32:3c:99:57:f8:73:2a:56:4a:ba:6e: + 6a:a8:89:f0:03:14:d2:7f:d2:22:55:84:47:e7:05:9c:3b:72: + 5d:39:02:b0:fc:68:90:14:02:12:d8:9b:85:1c:cf:77:92:c7: + 73:80:38:e4:f4:f9:72:b7:dd:ca:0f:3d:f2:1c:6a:82:1f:21: + 90:d3:e3:77:e5:ee:e9:0e:23:9e:69:f6:29:38:51:4f:e9:73: + 7d:3d:32:54:b2:96:04:9b:62:36:99:8b:ea:9c:3f:87:7f:5e: + e8:ed:28:c8:15:ac:59:f8:f5:d9:3b:b3:fd:d4:a9:e4:55:1b: + 07:ee:d9:18:77:d4:68:8d:b0:ce:a3:60:fe:60:2c:ca:b4:2f: + 08:8a:19:1a:fc:a3:6b:1b:b4:72:28:7a:63:cc:cc:cd:18:ae: + 99:86:4d:67:12:48:a6:33:f3:19:ce:fa:5a:a5:d7:0d:4d:50: + c6:1f:f2:d9:e6:41:d6:29:4a:a6:3c:ff:80:4f:e6:e8:90:f5: + ab:cb:bf:93:3b:90:da:e6:fb:d5:59:c3:9f:ec:91:bf:3e:0a: + a3:23:ef:ee -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANxqGgU28aN8KOmXL3uF -1cGRMwpyLbtFrsYpVCIFwun0vvI57OBkZh3jyUI+bMg7ZQrkLHTkyRfIiyduwEya -tIWu/z/jHtAhHIuE4Dv2WQCnq1nzWGfXr5d0qbEfeICt4wkxgcIRVRDQk8rr3qdy -dgkzaon5UbHeykpI6J8cX9+8faf1J2t3o1Plw+Q9noJyntIbdlKM8FO2mF9sVBva -mnIU7sNRtMdr8HWyLG60tylUkqtpV688bZboBcik0HrCQn2LfzyPnR3BNa9Be/UO -YIhykCKsNy97tEcBYrj+c0vSe1aNsjfTGC/c+9H76RQZsdh26zTSwECoImgzRKeE -kOECAwEAAaOByzCByDAdBgNVHQ4EFgQUyA9FcwOyLLg1FA/E10vk4p2yq84wHwYD -VR0jBBgwFoAUyA9FcwOyLLg1FA/E10vk4p2yq84wNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKkJcieL9eS7M+4UHdoR +fLHxUzqjdz+y9R+2I6Np+J1Sl0ySrwdGxYI/l6Wy/OCzPilT5XUHBDB7u1Wjr+zD +vaDF8VhLqFp3Scf8ohOXXDqVWJuVTKAYszoYHf5fwceb05oN80ymPSghUJ2ukK6q +liPWT5vs/1lnCv+Kid+8mf/2dbXax3nYVMjzljrG6WAM7p5S4elfWB4poxrDT5GM +LoUzh/DHxnSRzPvdyh5xb+LBQbzv6H9IB6lcqiFgQ/0+mItMjZVVSDs1Gir04++F +ARHE9KMV42jfu5T5JhA1g5aDAM7PcdTpARiAwt3wnVL2+hHeoX952ROm6zM+BFe2 +dbkCAwEAAaOByzCByDAdBgNVHQ4EFgQUUCUHvhLIohgvMiFZzCtap04ZXVUwHwYD +VR0jBBgwFoAUUCUHvhLIohgvMiFZzCtap04ZXVUwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBUOXhbMJeq -mfvlCjknKuqtnzc+qlq4xFFmg242XMMb2t7Np269VUd8PlMSalECE8KYAzK2W9le -JrKa0SHKOc0gvq3YOiOi3tcYspm71BqCQ3xuIDwB8SJfcqxDmocHN12oNCYZiarz -GOPuxmdDSWTks9gsEYz3i0h//eFr6aWHVb/xnVT+tX/EXIsIz09HIVgGXqtAvrco -DCdVgmvoF17d+Hlh8n4YWXokfuMIPNnRgXM2UZmh6r8Y/5RA1/9fGoqxrnjBkXtV -GtixkQK2XpQyhF93+ImJAFx0vncblT5gLWpno+lCA1GvHxDYIW82KTNykPR+BRe7 -par71lb8QC4O +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA94YUyTEMe +8g3/0+yQl32PnBaxbstV8U/ZRhzI1zw+jCyKIbg4pKmorGlRMjyZV/hzKlZKum5q +qInwAxTSf9IiVYRH5wWcO3JdOQKw/GiQFAIS2JuFHM93ksdzgDjk9Plyt93KDz3y +HGqCHyGQ0+N35e7pDiOeafYpOFFP6XN9PTJUspYEm2I2mYvqnD+Hf17o7SjIFaxZ ++PXZO7P91KnkVRsH7tkYd9RojbDOo2D+YCzKtC8Iihka/KNrG7RyKHpjzMzNGK6Z +hk1nEkimM/MZzvpapdcNTVDGH/LZ5kHWKUqmPP+AT+bokPWry7+TO5Da5vvVWcOf +7JG/PgqjI+/u -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/target-wrong-signature.pem b/net/data/verify_certificate_chain_unittest/target-wrong-signature.pem index 9d162b0..e027308e 100644 --- a/net/data/verify_certificate_chain_unittest/target-wrong-signature.pem +++ b/net/data/verify_certificate_chain_unittest/target-wrong-signature.pem
@@ -9,7 +9,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,80 +18,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:cd:40:90:3b:6e:2e:d4:5d:a8:08:3e:d4:69:a0: - ec:3b:62:99:ec:81:30:1b:6e:d0:92:8b:bd:df:17: - 3a:fb:ce:bd:2a:32:5b:bb:5e:da:53:6c:b9:3d:4b: - a8:0b:12:41:61:d3:f9:3f:23:b9:71:3f:33:8a:bf: - 57:48:bd:99:e1:5d:c7:99:72:fd:ac:f4:4f:e1:cd: - ca:b8:0c:81:57:64:c5:56:1f:d9:ed:f8:df:c6:60: - 70:82:ee:b5:23:4a:a4:b5:d6:b4:e3:84:74:c9:ca: - da:d7:a7:11:51:c4:56:36:6c:b4:53:0e:35:e5:63: - fa:fd:75:df:72:01:31:17:e9:4d:35:8c:ae:a9:c1: - 3b:ae:ac:06:75:e0:77:2b:36:97:e5:bb:99:34:b6: - dc:f4:11:f6:2f:33:4e:db:4b:73:18:78:51:e6:12: - d1:be:94:2a:02:33:d9:bc:8a:36:dc:12:f0:2f:ae: - 57:4b:66:f0:ba:e6:1b:65:01:de:95:06:63:22:9b: - d0:58:42:55:99:34:06:ec:5a:00:f2:77:ed:71:23: - 24:7d:66:9a:e0:8c:d3:64:91:0a:a6:5b:36:43:36: - e3:07:33:a0:c3:fa:46:9c:3e:81:b2:2c:a6:51:92: - a7:7a:01:cb:95:1a:ea:cf:3c:fa:93:2d:81:5b:29: - 98:d5 + 00:95:c5:73:7e:a9:8f:9f:25:a3:b1:9f:29:c6:2e: + d6:b2:3d:5b:a4:10:08:53:40:f7:91:79:45:96:d0: + 66:85:85:ea:56:e6:db:07:fd:82:1d:e3:e6:11:f2: + da:13:64:45:bf:c6:e1:a7:4c:da:29:e7:ba:2f:27: + d8:cd:59:3d:69:a3:af:d6:64:4b:3e:a4:12:07:5d: + d4:7d:07:85:6d:9c:9d:fe:fd:8f:ff:74:b3:c9:c9: + 86:64:7c:ee:ca:74:1b:2f:3f:7c:37:8b:d9:fa:05: + 0a:3a:9b:93:45:d0:8d:16:3e:7a:ce:0b:bb:8f:1b: + cc:15:4b:a2:76:08:f5:fb:e0:98:cc:1d:a4:1a:c1: + f5:23:b0:28:1c:fe:5f:a4:24:68:59:fc:1d:63:bc: + 60:9a:a6:16:2c:db:0d:66:9d:d7:6e:13:6a:53:8c: + 5b:61:a7:3f:9f:be:c8:2a:f9:ce:ea:47:d2:d2:1b: + 95:de:af:5d:b0:39:3d:71:f5:be:5f:80:bd:3b:3e: + 2e:79:e8:a2:de:9c:2b:da:e5:88:cd:4e:9c:cf:cd: + bc:88:2e:cc:9e:3b:e4:52:2b:49:0f:31:90:3f:15: + 0d:b5:68:ea:5e:7e:6e:f9:6c:ba:57:bd:41:33:51: + 27:66:f9:2b:3f:ae:7c:87:07:a1:19:a5:0f:ba:bd: + f8:b7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 7F:F7:32:82:5E:B7:BD:FB:F8:64:38:93:2A:B1:6E:10:D6:4A:B4:28 + 5E:72:8E:7C:0B:A6:A7:E8:2C:3E:36:CA:37:EF:8E:4E:46:CB:97:34 X509v3 Authority Key Identifier: - keyid:E1:EB:47:46:C2:78:53:C4:B6:58:28:94:20:81:58:06:93:17:36:7F + keyid:DF:46:5C:25:13:E9:22:B2:C9:E4:1A:32:22:C4:97:1F:E6:0C:55:AA Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 80:dc:43:74:98:bf:da:2c:ea:5f:60:45:7f:d9:90:46:b1:f1: - ba:ea:9f:e3:39:40:4e:43:51:30:f1:a6:1a:c7:52:48:ed:de: - 2a:d8:6d:0d:b6:b2:69:a7:d7:e6:e9:4d:c3:73:c6:e5:3f:56: - 06:04:79:d2:a5:56:b7:a6:a5:a8:a2:2c:4f:0e:fa:fe:4f:39: - 11:5a:83:76:af:5e:0f:5d:df:0e:c6:c2:ea:79:19:04:92:a1: - c7:57:b2:16:83:c3:44:d1:47:89:e1:14:eb:1c:2c:f0:a9:63: - ed:31:fc:43:d0:93:c5:4c:7f:d3:68:6e:9b:81:2c:4f:70:71: - 90:af:98:ce:f6:73:97:5b:dc:13:d3:d9:01:8e:5f:34:a8:00: - 1d:71:89:a7:6e:12:f3:df:9d:4b:18:1f:0f:84:59:2b:7f:d0: - 05:5d:5f:e7:97:b7:26:ab:c1:12:87:19:28:6a:43:dc:c0:76: - 38:8a:fc:16:93:92:d3:2e:69:1f:9b:f3:1d:75:0d:32:89:f6: - ca:a4:8c:f2:c6:0a:17:e4:29:c3:bc:a6:33:df:c2:cd:42:97: - 28:65:1f:99:c9:6b:41:0e:4b:59:de:32:f2:1e:f7:62:88:66: - c6:d1:e7:9a:25:78:86:7d:e3:f3:4e:f7:18:11:ce:bc:37:56: - 78:f4:04:b1 + 15:7a:35:37:ba:ff:11:3b:c0:ad:82:51:d0:e9:23:50:77:06: + 56:e0:84:94:2d:e4:76:94:d5:af:65:26:26:06:77:f2:6c:03: + f4:77:6c:a3:ba:92:26:c7:a0:ea:24:06:98:78:18:24:70:44: + 08:03:d0:ef:0b:db:d9:f2:3d:35:38:17:41:69:46:62:1a:af: + a7:44:be:1d:27:02:b3:79:1a:30:ab:06:79:6a:bd:3f:72:21: + f2:34:47:07:ef:08:69:ae:40:1f:61:68:a7:a8:a8:5c:85:6e: + 39:61:39:ad:8a:3a:a5:d8:64:94:bd:e2:dc:1f:68:45:f0:2c: + bf:08:d0:74:75:1c:80:30:86:87:b0:f4:eb:69:e8:16:52:45: + bc:c3:3b:08:c9:90:9f:f8:c9:01:9b:2f:29:2b:dc:2c:af:59: + cb:3e:07:8a:e7:e0:ca:64:2a:43:39:bf:a5:0e:d6:14:08:e9: + 9a:c1:76:7d:fb:a1:39:05:a6:43:0a:ba:ed:70:5b:f5:b8:ac: + 15:91:a4:37:24:c7:1e:d2:69:41:08:e2:2f:76:bb:e1:f8:b9: + 0d:7a:a9:57:af:25:8c:5c:73:f2:d8:2b:a6:23:c8:42:b4:28: + ed:fe:79:2b:11:4a:2e:3c:ef:3f:13:e6:51:68:d8:1a:c3:3b: + b3:22:62:c9 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNQJA7 -bi7UXagIPtRpoOw7YpnsgTAbbtCSi73fFzr7zr0qMlu7XtpTbLk9S6gLEkFh0/k/ -I7lxPzOKv1dIvZnhXceZcv2s9E/hzcq4DIFXZMVWH9nt+N/GYHCC7rUjSqS11rTj -hHTJytrXpxFRxFY2bLRTDjXlY/r9dd9yATEX6U01jK6pwTuurAZ14HcrNpflu5k0 -ttz0EfYvM07bS3MYeFHmEtG+lCoCM9m8ijbcEvAvrldLZvC65htlAd6VBmMim9BY -QlWZNAbsWgDyd+1xIyR9ZprgjNNkkQqmWzZDNuMHM6DD+kacPoGyLKZRkqd6AcuV -GurPPPqTLYFbKZjVAgMBAAGjgekwgeYwHQYDVR0OBBYEFH/3MoJet737+GQ4kyqx -bhDWSrQoMB8GA1UdIwQYMBaAFOHrR0bCeFPEtlgolCCBWAaTFzZ/MD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCVxXN+ +qY+fJaOxnynGLtayPVukEAhTQPeReUWW0GaFhepW5tsH/YId4+YR8toTZEW/xuGn +TNop57ovJ9jNWT1po6/WZEs+pBIHXdR9B4VtnJ3+/Y//dLPJyYZkfO7KdBsvP3w3 +i9n6BQo6m5NF0I0WPnrOC7uPG8wVS6J2CPX74JjMHaQawfUjsCgc/l+kJGhZ/B1j +vGCaphYs2w1mndduE2pTjFthpz+fvsgq+c7qR9LSG5Xer12wOT1x9b5fgL07Pi55 +6KLenCva5YjNTpzPzbyILsyeO+RSK0kPMZA/FQ21aOpefm75bLpXvUEzUSdm+Ss/ +rnyHB6EZpQ+6vfi3AgMBAAGjgekwgeYwHQYDVR0OBBYEFF5yjnwLpqfoLD42yjfv +jk5Gy5c0MB8GA1UdIwQYMBaAFN9GXCUT6SKyyeQaMiLElx/mDFWqMD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAgNxDdJi/2izqX2BFf9mQ -RrHxuuqf4zlATkNRMPGmGsdSSO3eKthtDbayaafX5ulNw3PG5T9WBgR50qVWt6al -qKIsTw76/k85EVqDdq9eD13fDsbC6nkZBJKhx1eyFoPDRNFHieEU6xws8Klj7TH8 -Q9CTxUx/02hum4EsT3BxkK+YzvZzl1vcE9PZAY5fNKgAHXGJp24S89+dSxgfD4RZ -K3/QBV1f55e3JqvBEocZKGpD3MB2OIr8FpOS0y5pH5vzHXUNMon2yqSM8sYKF+Qp -w7ymM9/CzUKXKGUfmclrQQ5LWd4y8h73YohmxtHnmiV4hn3j8073GBHOvDdWePQE -sQ== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAFXo1N7r/ETvArYJR0Okj +UHcGVuCElC3kdpTVr2UmJgZ38mwD9Hdso7qSJseg6iQGmHgYJHBECAPQ7wvb2fI9 +NTgXQWlGYhqvp0S+HScCs3kaMKsGeWq9P3Ih8jRHB+8Iaa5AH2Fop6ioXIVuOWE5 +rYo6pdhklL3i3B9oRfAsvwjQdHUcgDCGh7D062noFlJFvMM7CMmQn/jJAZsvKSvc +LK9Zyz4HiufgymQqQzm/pQ7WFAjpmsF2ffuhOQWmQwq67XBb9bisFZGkNyTHHtJp +QQjiL3a74fi5DXqpV68ljFxz8tgrpiPIQrQo7f55KxFKLjzvPxPmUWjYGsM7syJi +yQ== -----END CERTIFICATE----- Certificate: @@ -103,35 +103,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:c8:7f:42:62:ee:29:ef:bb:58:84:48:c3:aa:61: - ca:32:b1:ec:f0:e6:34:0b:f4:7e:d2:21:46:bb:bb: - b5:fb:43:ef:e8:66:88:2e:a3:86:4f:2e:95:51:f8: - 82:dd:c4:7a:9f:3b:6e:81:4d:32:eb:a6:c7:05:4a: - 1d:f1:bd:31:9a:2d:45:0b:2e:a9:9b:d4:13:a4:55: - 40:1c:12:db:4b:76:2b:31:cc:8b:fb:f7:a4:52:e1: - de:f7:0f:b8:17:47:a4:0a:1e:53:b9:7c:a6:cc:ac: - ed:40:72:d1:9c:93:85:05:2e:77:1e:60:ab:7d:fc: - 46:0f:f1:47:65:09:53:62:c6:90:db:5d:4e:ee:cd: - e9:ea:f0:18:f0:ba:a3:91:e2:bf:7b:24:e9:eb:13: - 48:4e:05:63:f4:40:b8:f1:84:7b:d6:91:e9:90:50: - c2:7a:f7:44:2e:70:ad:73:c1:5a:3c:32:5e:3c:9b: - 15:5f:9a:b2:48:03:50:a6:72:2f:10:94:81:e5:27: - bf:28:01:6a:a2:ef:3f:6c:10:b0:a2:02:72:27:d8: - 1c:0c:d4:4d:06:55:48:19:ab:6d:67:56:cd:2d:55: - 63:e5:50:63:02:7d:cc:c6:28:ef:29:ed:db:50:f2: - 31:23:dd:52:f3:27:7e:fd:e1:5f:6f:f5:0f:69:58: - 2b:01 + 00:ba:c2:3e:70:32:82:15:bd:6f:24:c3:e0:9f:a9: + af:46:01:cb:23:03:07:17:d8:73:73:d0:8d:46:88: + 3f:9b:40:30:ea:cb:76:d1:dc:e5:79:c6:ed:5e:94: + 68:49:fe:8e:be:ff:74:b4:b1:a0:fd:ec:3f:4c:f5: + 26:40:97:d8:b2:fd:a8:e1:9a:1e:47:48:58:8a:39: + 0f:a8:53:76:1d:d8:55:b7:ff:15:7a:1a:28:70:a7: + 50:6f:f7:2f:d8:dd:22:bf:08:32:82:66:33:fd:7d: + df:55:7f:71:5b:bd:c0:c6:f4:cd:a4:52:30:a9:bd: + a1:a3:61:e3:7a:93:40:a7:41:b3:10:43:0f:79:12: + 50:34:0a:a4:ad:07:53:e6:7a:b6:8c:a5:00:82:0c: + 9f:eb:c9:f8:51:68:2c:4e:3a:da:7e:7d:6d:15:b1: + ff:37:dd:e6:25:cf:5e:8f:fe:b1:09:7e:f8:60:3b: + 20:3e:99:64:e1:9a:58:ee:01:28:71:cf:ac:dd:66: + 40:0d:d9:7b:85:8f:f2:35:90:2a:75:26:96:b4:3a: + f2:ef:5c:06:f1:2c:ec:07:83:d6:23:a4:ab:f4:28: + ad:1f:8d:cf:e2:d8:b9:1f:48:76:6f:7c:e7:8a:17: + 5b:b5:9b:ff:17:13:6e:f4:05:47:78:91:c7:7a:03: + 33:15 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - C4:E1:12:23:5E:5D:61:E9:F8:C1:9E:0E:57:94:54:97:B2:4E:0B:65 + D0:3F:2D:C4:6A:01:B8:7A:61:4F:B0:35:18:E6:D0:F9:55:5D:7B:B7 X509v3 Authority Key Identifier: - keyid:81:56:F3:D5:96:CB:97:DE:87:18:26:E0:E7:E9:59:9E:58:FC:8B:76 + keyid:D4:FF:80:DD:86:D2:53:18:54:65:B3:62:9A:07:67:BB:21:7D:19:77 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -146,41 +146,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 4a:7b:2a:d9:aa:69:78:28:dc:2d:46:22:f2:ec:d3:09:b7:b7: - 91:2b:6d:a0:07:b9:8a:9e:5c:11:73:ba:1d:61:ed:07:b2:a3: - 7e:3c:48:f3:95:59:ed:98:e9:40:9c:88:47:47:23:9e:37:ce: - f3:49:b5:53:51:be:4a:8b:77:ac:ef:76:2a:3b:11:d1:92:61: - cc:f4:04:85:09:c2:83:db:21:cc:20:a6:49:3d:54:da:e8:ba: - e2:0f:f6:15:fd:cb:83:8a:82:17:b2:c3:43:dd:a4:0a:42:61: - 59:75:5c:c6:5b:7e:5f:97:e6:ea:7e:bc:19:17:5b:df:9e:72: - a4:31:fd:64:6d:34:5b:05:39:5d:f3:2d:35:44:0a:cc:da:cb: - af:86:06:14:0f:ae:47:9e:ff:f1:55:dc:32:4b:9b:43:df:60: - d9:ee:0a:09:95:08:43:c3:c3:18:30:c6:56:f1:d0:b9:17:c9: - 19:5f:a5:c3:a2:76:c0:ad:b2:73:24:0e:34:03:f0:83:17:a5: - ac:b1:4f:9e:38:3d:7d:82:f6:90:ca:43:f5:37:c4:1a:19:2e: - a5:a9:40:64:0a:fb:d1:eb:42:c2:42:f1:08:26:6b:d6:c3:59: - bc:14:99:95:b3:62:80:92:93:49:4f:95:fe:71:e8:7c:3d:ee: - 21:99:7a:aa + 44:69:05:6c:d0:10:da:90:f7:62:5f:8a:80:93:39:f0:ee:6f: + c5:18:df:47:40:d0:b4:73:8a:d6:68:7f:99:92:e4:34:bd:ef: + d7:c8:8c:d9:09:b1:24:06:86:ab:9f:58:1a:d3:38:73:9b:80: + f3:9b:a9:8c:db:ef:0d:94:54:91:45:04:42:9b:98:3c:fc:39: + 53:85:36:1d:06:59:c5:1e:50:7c:1e:e0:ec:ad:d8:44:98:13: + a2:6b:bc:10:39:3e:3e:5b:3a:30:de:2a:a0:08:05:21:cd:d1: + 57:50:05:c2:84:c3:e8:0d:69:59:76:3d:32:aa:9a:82:0d:59: + c6:1a:8e:fa:08:3c:18:08:b2:8b:f2:39:05:02:0e:af:7c:28: + 7e:16:44:d8:b2:e0:32:19:d7:c5:54:4c:e9:87:e0:1f:30:73: + 6a:2b:ef:9f:9d:5e:31:a6:02:39:9d:5b:e1:c5:b6:d1:cd:95: + ba:ee:5c:3a:97:58:49:ef:26:cf:e6:eb:72:47:5b:6e:f4:cc: + 3b:1c:08:c7:2e:89:f6:91:ef:94:e3:33:83:7c:9b:d8:10:01: + d7:ac:0f:4c:c6:01:c7:0d:84:48:bd:a7:e8:4d:09:40:a8:b2: + f3:0a:21:71:74:0f:ab:ca:23:aa:99:80:6d:0c:42:73:14:00: + 31:1e:67:51 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyH9CYu4p -77tYhEjDqmHKMrHs8OY0C/R+0iFGu7u1+0Pv6GaILqOGTy6VUfiC3cR6nztugU0y -66bHBUod8b0xmi1FCy6pm9QTpFVAHBLbS3YrMcyL+/ekUuHe9w+4F0ekCh5TuXym -zKztQHLRnJOFBS53HmCrffxGD/FHZQlTYsaQ211O7s3p6vAY8LqjkeK/eyTp6xNI -TgVj9EC48YR71pHpkFDCevdELnCtc8FaPDJePJsVX5qySANQpnIvEJSB5Se/KAFq -ou8/bBCwogJyJ9gcDNRNBlVIGattZ1bNLVVj5VBjAn3MxijvKe3bUPIxI91S8yd+ -/eFfb/UPaVgrAQIDAQABo4HLMIHIMB0GA1UdDgQWBBTE4RIjXl1h6fjBng5XlFSX -sk4LZTAfBgNVHSMEGDAWgBSBVvPVlsuX3ocYJuDn6VmeWPyLdjA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAusI+cDKC +Fb1vJMPgn6mvRgHLIwMHF9hzc9CNRog/m0Aw6st20dzlecbtXpRoSf6Ovv90tLGg +/ew/TPUmQJfYsv2o4ZoeR0hYijkPqFN2HdhVt/8VehoocKdQb/cv2N0ivwgygmYz +/X3fVX9xW73AxvTNpFIwqb2ho2HjepNAp0GzEEMPeRJQNAqkrQdT5nq2jKUAggyf +68n4UWgsTjrafn1tFbH/N93mJc9ej/6xCX74YDsgPplk4ZpY7gEocc+s3WZADdl7 +hY/yNZAqdSaWtDry71wG8SzsB4PWI6Sr9CitH43P4ti5H0h2b3znihdbtZv/FxNu +9AVHeJHHegMzFQIDAQABo4HLMIHIMB0GA1UdDgQWBBTQPy3EagG4emFPsDUY5tD5 +VV17tzAfBgNVHSMEGDAWgBTU/4DdhtJTGFRls2KaB2e7IX0ZdzA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AEp7KtmqaXgo3C1GIvLs0wm3t5ErbaAHuYqeXBFzuh1h7Qeyo348SPOVWe2Y6UCc -iEdHI543zvNJtVNRvkqLd6zvdio7EdGSYcz0BIUJwoPbIcwgpkk9VNrouuIP9hX9 -y4OKgheyw0PdpApCYVl1XMZbfl+X5up+vBkXW9+ecqQx/WRtNFsFOV3zLTVECsza -y6+GBhQPrkee//FV3DJLm0PfYNnuCgmVCEPDwxgwxlbx0LkXyRlfpcOidsCtsnMk -DjQD8IMXpayxT544PX2C9pDKQ/U3xBoZLqWpQGQK+9HrQsJC8Qgma9bDWbwUmZWz -YoCSk0lPlf5x6Hw97iGZeqo= +AERpBWzQENqQ92JfioCTOfDub8UY30dA0LRzitZof5mS5DS979fIjNkJsSQGhquf +WBrTOHObgPObqYzb7w2UVJFFBEKbmDz8OVOFNh0GWcUeUHwe4Oyt2ESYE6JrvBA5 +Pj5bOjDeKqAIBSHN0VdQBcKEw+gNaVl2PTKqmoINWcYajvoIPBgIsovyOQUCDq98 +KH4WRNiy4DIZ18VUTOmH4B8wc2or75+dXjGmAjmdW+HFttHNlbruXDqXWEnvJs/m +63JHW270zDscCMcuifaR75TjM4N8m9gQAdesD0zGAccNhEi9p+hNCUCosvMKIXF0 +D6vKI6qZgG0MQnMUADEeZ1E= -----END CERTIFICATE----- Certificate: @@ -197,30 +197,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ce:b8:01:ca:69:e8:5c:e1:16:2a:54:88:85:15: - 66:e9:09:2e:04:cf:e8:7f:98:b0:63:1a:39:b9:25: - 0d:dd:d8:81:f6:e3:d3:3b:98:39:70:09:eb:ed:63: - 35:91:6a:bf:c4:4e:38:fa:04:a7:1c:bd:32:92:3b: - 5b:2b:29:f3:94:bc:b2:e6:69:7c:32:57:40:36:1b: - 6a:1f:9d:12:10:96:db:75:2b:77:bb:50:95:0e:03: - 65:d7:28:85:12:c8:54:89:38:be:2c:83:81:59:31: - c7:36:d8:d8:89:28:f3:87:7d:ab:b8:24:c0:d9:43: - a8:c8:0d:18:fa:98:4c:32:90:73:4c:86:ec:b1:c1: - 52:1f:af:03:73:84:7c:80:ee:72:56:4e:49:91:0e: - 1d:16:bc:ad:39:5a:dd:52:96:cb:87:09:e0:15:6a: - a4:ac:24:5c:c0:93:13:4b:09:1e:b7:bd:a6:0b:0a: - 94:96:5d:b5:7f:3a:ea:25:cd:c3:c5:7a:49:6a:89: - 42:db:e6:b5:71:fc:46:45:19:d2:33:d8:e4:95:a4: - 53:12:fd:09:f1:94:d8:24:28:d3:cc:ec:21:bd:cb: - 46:1b:24:d9:5a:70:86:1d:cb:7f:6c:be:24:7c:e4: - 37:72:3e:4f:c5:3e:01:68:d8:3b:ae:4a:ab:b2:90: - 3c:cd + 00:c8:51:b0:c3:f3:b1:5d:6e:4a:c2:41:9e:b7:88: + 48:d3:62:d1:49:3a:0b:ab:c9:26:f3:8a:bb:ee:1e: + b8:4a:cb:9a:47:3f:8c:87:a2:81:f5:91:05:7c:47: + 45:d6:5f:a1:7d:e7:dd:cd:33:eb:4e:90:65:be:31: + d7:2d:98:03:45:48:03:03:72:8f:0f:43:3d:3a:ad: + cf:bc:f5:f5:bb:7d:1d:94:1d:d4:2c:b6:3b:4a:68: + 9e:30:54:c2:c1:69:10:f8:7c:d5:73:ae:2f:22:65: + 94:5c:17:1e:41:eb:5a:10:80:6c:eb:04:1d:09:0e: + 79:51:71:ce:e7:4f:90:23:4f:84:b5:4e:97:70:79: + eb:28:47:0a:8c:b8:43:a6:f5:df:4d:fd:44:46:18: + 06:97:6c:52:65:4a:89:25:af:73:6e:43:6a:93:b0: + ec:29:97:63:a4:36:95:db:71:b6:61:c3:25:0d:3f: + 53:2f:de:d0:b4:16:c2:b6:70:3a:34:53:02:3d:50: + eb:32:4a:22:62:3c:9a:74:da:b2:60:af:37:41:4c: + c1:df:90:74:5a:ae:5d:a4:48:dd:1b:86:06:0f:cb: + 3e:e5:4d:ec:62:86:04:1a:cb:0f:2a:04:a0:45:d5: + c1:79:9e:07:df:5d:2d:c3:0c:c4:57:0a:be:7e:41: + 43:3d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 81:56:F3:D5:96:CB:97:DE:87:18:26:E0:E7:E9:59:9E:58:FC:8B:76 + D4:FF:80:DD:86:D2:53:18:54:65:B3:62:9A:07:67:BB:21:7D:19:77 X509v3 Authority Key Identifier: - keyid:81:56:F3:D5:96:CB:97:DE:87:18:26:E0:E7:E9:59:9E:58:FC:8B:76 + keyid:D4:FF:80:DD:86:D2:53:18:54:65:B3:62:9A:07:67:BB:21:7D:19:77 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -235,41 +235,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 49:ab:00:40:12:3b:b6:18:a4:f7:c0:e3:94:db:49:b3:45:02: - 45:ac:38:50:2c:4f:b9:a3:31:4f:99:e5:1a:3d:a7:76:23:1f: - 47:83:c4:ea:11:1e:98:f4:a5:d2:d3:76:d1:e7:47:23:09:5f: - e6:de:ef:d3:9e:aa:fa:42:4f:2e:14:2e:78:ee:0f:3f:ac:53: - 1c:d5:7f:b2:ec:4e:34:bd:c6:10:f4:be:fa:31:e4:a3:67:7e: - 3e:31:e7:55:ad:17:8c:b3:72:e0:19:5e:77:59:06:bb:56:8e: - 81:ec:c8:b5:c1:95:d6:6c:53:9c:86:a0:19:72:1d:47:ea:be: - ad:bc:4d:cd:26:f8:87:75:ff:08:1d:9a:d5:f8:7c:ae:3f:57: - 97:3a:54:aa:90:5a:b5:93:97:3f:47:be:34:2d:14:bf:7d:fd: - be:67:88:22:7e:b7:b5:3a:a0:3a:b0:d2:0f:9d:28:1e:fb:1a: - c0:11:ed:ba:a6:4e:c5:6f:2a:4b:90:84:26:1d:2b:f0:14:40: - 7a:55:22:c7:7d:39:ee:42:30:7f:b5:4a:0b:d5:1b:12:42:36: - 62:86:b2:02:68:24:8a:c3:a6:7e:18:b1:15:5d:d4:f0:62:2c: - cf:09:0d:7d:8f:80:a5:13:8d:9a:53:87:70:f0:94:b1:62:71: - e3:b9:b0:d1 + 46:ee:68:7d:1f:94:16:70:57:11:6b:6b:18:96:45:c3:d7:17: + 50:9b:f1:e6:b1:bf:ad:97:3f:ca:3e:75:37:4e:c6:b6:d3:68: + 57:f5:59:a6:44:b4:3f:e5:fe:a3:05:65:02:f5:7c:dc:da:8e: + 1f:2d:fb:9c:23:f0:c0:a6:fc:f5:f3:a9:80:f9:eb:64:f0:8b: + 2a:f1:f5:68:8d:8c:c2:37:c4:8e:d5:bb:5b:e6:fb:ec:06:f9: + 80:28:56:c2:de:9c:16:78:3f:a8:16:15:e9:26:72:8f:45:c3: + e7:d4:78:84:3c:b4:a0:72:5e:5d:09:d8:d1:7f:66:ca:74:d6: + 26:c0:72:c0:2a:89:fa:b4:5f:fe:92:4f:01:97:0e:81:88:01: + 6b:2e:ed:af:36:30:c7:62:fd:42:63:10:3f:c4:ad:eb:ee:c5: + fd:bc:57:08:0f:a3:0c:e5:8c:de:ab:05:b5:b4:e9:c9:d1:c8: + 66:e2:ea:4a:b0:33:e5:a4:47:22:67:7c:70:e9:02:e0:22:75: + 35:4a:39:0e:2c:27:e5:29:d6:d2:f5:39:c9:03:39:7a:35:f5: + ff:1d:88:8d:e1:be:6b:6b:c7:4c:0c:6d:02:d4:33:7a:f5:ea: + 29:55:a9:79:94:bc:a3:01:64:4a:99:99:fc:c6:e5:38:a2:8f: + 18:cc:e7:1f -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM64Acpp6FzhFipUiIUV -ZukJLgTP6H+YsGMaObklDd3Ygfbj0zuYOXAJ6+1jNZFqv8ROOPoEpxy9MpI7Wysp -85S8suZpfDJXQDYbah+dEhCW23Urd7tQlQ4DZdcohRLIVIk4viyDgVkxxzbY2Iko -84d9q7gkwNlDqMgNGPqYTDKQc0yG7LHBUh+vA3OEfIDuclZOSZEOHRa8rTla3VKW -y4cJ4BVqpKwkXMCTE0sJHre9pgsKlJZdtX866iXNw8V6SWqJQtvmtXH8RkUZ0jPY -5JWkUxL9CfGU2CQo08zsIb3LRhsk2Vpwhh3Lf2y+JHzkN3I+T8U+AWjYO65Kq7KQ -PM0CAwEAAaOByzCByDAdBgNVHQ4EFgQUgVbz1ZbLl96HGCbg5+lZnlj8i3YwHwYD -VR0jBBgwFoAUgVbz1ZbLl96HGCbg5+lZnlj8i3YwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhRsMPzsV1uSsJBnreI +SNNi0Uk6C6vJJvOKu+4euErLmkc/jIeigfWRBXxHRdZfoX3n3c0z606QZb4x1y2Y +A0VIAwNyjw9DPTqtz7z19bt9HZQd1Cy2O0ponjBUwsFpEPh81XOuLyJllFwXHkHr +WhCAbOsEHQkOeVFxzudPkCNPhLVOl3B56yhHCoy4Q6b13039REYYBpdsUmVKiSWv +c25DapOw7CmXY6Q2ldtxtmHDJQ0/Uy/e0LQWwrZwOjRTAj1Q6zJKImI8mnTasmCv +N0FMwd+QdFquXaRI3RuGBg/LPuVN7GKGBBrLDyoEoEXVwXmeB99dLcMMxFcKvn5B +Qz0CAwEAAaOByzCByDAdBgNVHQ4EFgQU1P+A3YbSUxhUZbNimgdnuyF9GXcwHwYD +VR0jBBgwFoAU1P+A3YbSUxhUZbNimgdnuyF9GXcwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBJqwBAEju2 -GKT3wOOU20mzRQJFrDhQLE+5ozFPmeUaPad2Ix9Hg8TqER6Y9KXS03bR50cjCV/m -3u/Tnqr6Qk8uFC547g8/rFMc1X+y7E40vcYQ9L76MeSjZ34+MedVrReMs3LgGV53 -WQa7Vo6B7Mi1wZXWbFOchqAZch1H6r6tvE3NJviHdf8IHZrV+HyuP1eXOlSqkFq1 -k5c/R740LRS/ff2+Z4gifre1OqA6sNIPnSge+xrAEe26pk7FbypLkIQmHSvwFEB6 -VSLHfTnuQjB/tUoL1RsSQjZihrICaCSKw6Z+GLEVXdTwYizPCQ19j4ClE42aU4dw -8JSxYnHjubDR +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBG7mh9H5QW +cFcRa2sYlkXD1xdQm/Hmsb+tlz/KPnU3Tsa202hX9VmmRLQ/5f6jBWUC9Xzc2o4f +LfucI/DApvz186mA+etk8Isq8fVojYzCN8SO1btb5vvsBvmAKFbC3pwWeD+oFhXp +JnKPRcPn1HiEPLSgcl5dCdjRf2bKdNYmwHLAKon6tF/+kk8Blw6BiAFrLu2vNjDH +Yv1CYxA/xK3r7sX9vFcID6MM5YzeqwW1tOnJ0chm4upKsDPlpEciZ3xw6QLgInU1 +SjkOLCflKdbS9TnJAzl6NfX/HYiN4b5ra8dMDG0C1DN69eopVal5lLyjAWRKmZn8 +xuU4oo8YzOcf -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/unknown-root.pem b/net/data/verify_certificate_chain_unittest/unknown-root.pem index a3ee2f7d..1900cb05 100644 --- a/net/data/verify_certificate_chain_unittest/unknown-root.pem +++ b/net/data/verify_certificate_chain_unittest/unknown-root.pem
@@ -1,7 +1,7 @@ [Created by: generate-unknown-root.py] -Certificate chain with 1 intermediary, but the root is not in trust store. -Verification is expected to fail because the final intermediary (Intermediary) +Certificate chain with 1 intermediate, but the root is not in trust store. +Verification is expected to fail because the final intermediate (Intermediate) does not chain to a known root. Certificate: @@ -9,7 +9,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary + Issuer: CN=Intermediate Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,80 +18,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:f3:f6:f4:c5:f5:4f:a3:17:ee:19:45:0e:97:90: - 31:60:2a:a5:31:0d:e4:c7:f4:fa:4d:e4:99:f5:3c: - db:ad:6b:2d:f2:8d:07:4f:dc:c1:e3:3f:53:b6:48: - 31:8e:8e:a6:b3:d6:a4:3c:fb:21:00:01:a6:35:79: - 50:a6:d0:43:10:8d:13:1b:6f:a9:4b:a3:9b:77:11: - af:0f:7c:f9:f0:e6:03:c5:b5:b4:49:7a:9d:8f:a1: - 42:89:a5:41:5d:c7:e1:7d:4a:e5:af:8f:66:ad:93: - b0:f6:60:52:f4:0c:2d:d1:60:ca:a4:4c:fa:0d:55: - 0d:46:60:69:10:a7:8e:06:bd:ad:28:65:63:a5:63: - 36:d8:eb:8e:e1:cc:fd:53:76:80:d3:1d:e2:b8:46: - f9:24:e7:3a:86:30:f9:14:34:a2:42:81:b7:2b:a4: - 41:14:7a:9c:77:83:51:cb:b9:08:31:29:a2:b0:25: - 92:1e:7f:43:90:1c:6a:43:ca:64:04:37:c8:26:b7: - 7b:ae:cb:8b:2e:e7:6f:09:c4:3e:87:0d:b1:ef:70: - 58:cd:b5:d7:c7:6b:dd:7b:3c:46:0c:4d:5f:21:1d: - 78:b9:cf:46:5e:f8:35:48:7d:14:0b:3e:a4:2a:1c: - 4e:78:6d:27:76:61:e5:c5:74:16:fb:f1:77:9c:f3: - 51:7f + 00:a3:7b:69:ed:ad:13:3f:59:75:63:cf:2a:9e:b0: + 78:06:62:e2:5e:40:3f:12:2e:61:1c:7f:2e:f8:4f: + 0e:92:28:80:18:d8:e2:e2:f4:b4:63:84:c8:0b:4d: + ae:1b:f0:4d:d5:49:91:89:b9:a4:11:b3:77:72:ba: + 12:16:3e:29:7c:51:28:99:37:69:57:6d:3b:68:e1: + 58:83:c0:ad:13:af:63:2e:85:63:ab:92:11:7a:92: + 8b:fa:66:33:f9:3b:c9:ab:22:75:9f:6c:91:1b:22: + 6b:c9:2d:c8:6d:58:2b:bc:a9:f3:cf:24:8f:7a:37: + 9b:83:67:e5:b2:eb:ea:35:c6:9d:e4:a8:24:74:18: + 5b:8b:62:6b:cd:92:d7:c3:6c:b1:40:e1:2f:a3:16: + 52:92:df:59:70:bc:cc:37:27:8f:8e:3d:b9:fc:d6: + ca:fb:63:89:b3:d0:64:24:2b:97:e3:a7:bc:6f:76: + 7e:e6:82:36:9f:c4:ea:b2:96:60:ac:86:57:09:55: + d7:3b:45:a8:23:b8:b1:4a:92:f8:a9:66:1f:1a:0f: + c5:f6:da:4e:6d:02:56:1b:8a:9f:52:9f:bd:b5:16: + a6:fb:85:3d:fa:04:1d:8e:25:b4:03:9e:74:e4:98: + 4a:da:39:7b:d0:f2:7d:f9:f4:97:ce:d1:d8:4d:31: + 88:47 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - F8:48:56:E7:65:49:C4:48:98:8E:F0:F5:EA:01:C4:01:C8:4D:56:D9 + 94:D6:3E:50:DE:FF:47:B8:65:1A:C6:33:78:79:87:8D:F2:32:32:BA X509v3 Authority Key Identifier: - keyid:41:D3:BE:10:2F:EE:43:B6:25:B0:04:4E:39:CF:78:F9:0E:ED:E1:9D + keyid:CC:11:88:FF:DF:7E:14:06:07:B5:10:B6:C1:BC:CB:2B:65:FC:83:77 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary.cer + CA Issuers - URI:http://url-for-aia/Intermediate.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary.crl + URI:http://url-for-crl/Intermediate.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 48:65:f4:55:86:82:85:93:a0:4d:b0:ce:b8:b2:21:f5:bf:56: - 66:ef:e3:f5:24:52:da:a5:15:21:f7:b4:a1:7c:2f:69:de:1e: - 6a:90:8d:98:e9:38:29:b8:51:44:7b:43:68:92:95:e4:50:7c: - 32:94:72:6c:96:4a:77:07:ce:0c:55:df:19:50:29:e5:ee:ff: - c4:54:c9:75:2d:c2:fd:f1:41:5c:c4:28:3c:15:df:1a:12:73: - aa:a6:af:2a:3e:f5:a6:17:68:5b:80:d8:6d:fa:6d:37:26:a1: - 01:0e:0a:c1:a8:ed:ef:2b:65:1c:43:4d:dd:aa:7b:e1:6d:a6: - a6:23:66:11:58:73:f0:e2:98:d2:ba:db:94:ed:c9:fc:41:6f: - 4b:99:7c:be:2e:e9:57:e2:c6:26:24:db:2a:02:4e:3c:7e:8b: - d8:96:27:43:7b:b4:1e:25:2f:19:c0:e4:05:b9:5e:0e:57:29: - 9e:81:9c:1e:d8:48:4b:d0:c8:ff:1a:a7:7f:71:4a:9f:51:0d: - 8a:11:6e:74:86:8e:89:d8:fd:a4:69:bb:67:78:2d:2d:44:75: - 9b:63:31:ef:b1:3e:38:11:ce:01:ae:b0:fa:a4:3f:b0:df:be: - 13:9a:5e:11:f6:bb:eb:8e:3a:7d:09:be:76:9b:e5:d4:91:f3: - dc:e5:23:df + b4:9a:15:da:2b:7d:d4:26:f2:41:a2:04:1e:13:f3:b3:28:bf: + a3:85:34:fc:42:b1:57:05:0f:97:e5:f5:d9:d4:0e:eb:43:e8: + 63:ce:5b:23:8b:48:ab:2f:25:03:81:43:ba:7e:9a:14:e4:4e: + 9c:5b:d3:08:56:b7:00:7c:7f:fd:9e:ab:50:ce:09:95:2c:21: + 00:74:22:26:83:fb:08:47:34:1b:67:0e:eb:e0:c4:ab:3d:00: + 76:b2:9a:b1:00:c8:d0:17:0d:2e:81:43:71:51:f8:d7:f5:ad: + e9:f0:81:12:2a:e0:6f:c7:10:11:d7:f4:55:73:a4:7c:cb:97: + 6c:fd:2b:34:bf:7e:a9:57:d8:e1:a9:05:01:5a:09:2b:49:bf: + bc:99:a3:a5:7c:b0:df:7a:32:0f:c2:94:0f:e0:15:f2:86:8f: + c3:19:44:49:02:10:56:f6:a9:58:38:7f:4d:f1:66:58:00:f9: + 17:18:ab:b4:0c:c1:9e:f3:8d:5d:61:4d:02:8c:3a:97:89:8d: + 5f:d0:98:f3:57:5c:85:35:b0:94:f8:02:7c:6f:bf:69:bf:7b: + 91:5a:c3:38:88:0d:ec:42:3b:b5:29:6b:0a:2d:10:19:ae:bc: + 6c:18:95:2e:cd:74:04:af:95:79:ab:8e:4a:cc:53:6e:4d:ad: + 83:58:6d:c5 -----BEGIN CERTIFICATE----- MIIDjTCCAnWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl -cm1lZGlhcnkwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD -VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDz9vTF -9U+jF+4ZRQ6XkDFgKqUxDeTH9PpN5Jn1PNutay3yjQdP3MHjP1O2SDGOjqaz1qQ8 -+yEAAaY1eVCm0EMQjRMbb6lLo5t3Ea8PfPnw5gPFtbRJep2PoUKJpUFdx+F9SuWv -j2atk7D2YFL0DC3RYMqkTPoNVQ1GYGkQp44Gva0oZWOlYzbY647hzP1TdoDTHeK4 -Rvkk5zqGMPkUNKJCgbcrpEEUepx3g1HLuQgxKaKwJZIef0OQHGpDymQEN8gmt3uu -y4su528JxD6HDbHvcFjNtdfHa917PEYMTV8hHXi5z0Ze+DVIfRQLPqQqHE54bSd2 -YeXFdBb78Xec81F/AgMBAAGjgekwgeYwHQYDVR0OBBYEFPhIVudlScRImI7w9eoB -xAHITVbZMB8GA1UdIwQYMBaAFEHTvhAv7kO2JbAETjnPePkO7eGdMD8GCCsGAQUF +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTYwMTAxMTIwMDAwWjARMQ8wDQYD +VQQDDAZUYXJnZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCje2nt +rRM/WXVjzyqesHgGYuJeQD8SLmEcfy74Tw6SKIAY2OLi9LRjhMgLTa4b8E3VSZGJ +uaQRs3dyuhIWPil8USiZN2lXbTto4ViDwK0Tr2MuhWOrkhF6kov6ZjP5O8mrInWf +bJEbImvJLchtWCu8qfPPJI96N5uDZ+Wy6+o1xp3kqCR0GFuLYmvNktfDbLFA4S+j +FlKS31lwvMw3J4+OPbn81sr7Y4mz0GQkK5fjp7xvdn7mgjafxOqylmCshlcJVdc7 +RagjuLFKkvipZh8aD8X22k5tAlYbip9Sn721Fqb7hT36BB2OJbQDnnTkmEraOXvQ +8n359JfO0dhNMYhHAgMBAAGjgekwgeYwHQYDVR0OBBYEFJTWPlDe/0e4ZRrGM3h5 +h43yMjK6MB8GA1UdIwQYMBaAFMwRiP/ffhQGB7UQtsG8yytl/IN3MD8GCCsGAQUF BwEBBDMwMTAvBggrBgEFBQcwAoYjaHR0cDovL3VybC1mb3ItYWlhL0ludGVybWVk -aWFyeS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu -dGVybWVkaWFyeS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF -BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEASGX0VYaChZOgTbDOuLIh -9b9WZu/j9SRS2qUVIfe0oXwvad4eapCNmOk4KbhRRHtDaJKV5FB8MpRybJZKdwfO -DFXfGVAp5e7/xFTJdS3C/fFBXMQoPBXfGhJzqqavKj71phdoW4DYbfptNyahAQ4K -wajt7ytlHENN3ap74W2mpiNmEVhz8OKY0rrblO3J/EFvS5l8vi7pV+LGJiTbKgJO -PH6L2JYnQ3u0HiUvGcDkBbleDlcpnoGcHthIS9DI/xqnf3FKn1ENihFudIaOidj9 -pGm7Z3gtLUR1m2Mx77E+OBHOAa6w+qQ/sN++E5peEfa76446fQm+dpvl1JHz3OUj -3w== +aWF0ZS5jZXIwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL3VybC1mb3ItY3JsL0lu +dGVybWVkaWF0ZS5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUF +BwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAtJoV2it91CbyQaIEHhPz +syi/o4U0/EKxVwUPl+X12dQO60PoY85bI4tIqy8lA4FDun6aFOROnFvTCFa3AHx/ +/Z6rUM4JlSwhAHQiJoP7CEc0G2cO6+DEqz0AdrKasQDI0BcNLoFDcVH41/Wt6fCB +Eirgb8cQEdf0VXOkfMuXbP0rNL9+qVfY4akFAVoJK0m/vJmjpXyw33oyD8KUD+AV +8oaPwxlESQIQVvapWDh/TfFmWAD5FxirtAzBnvONXWFNAow6l4mNX9CY81dchTWw +lPgCfG+/ab97kVrDOIgN7EI7tSlrCi0QGa68bBiVLs10BK+VeauOSsxTbk2tg1ht +xQ== -----END CERTIFICATE----- Certificate: @@ -103,35 +103,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary + Subject: CN=Intermediate Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:cd:6f:e8:b3:ea:d4:9e:d9:23:03:8a:4a:f3:6c: - 84:cd:0c:28:7c:c2:07:60:89:c5:9a:9f:74:b8:d0: - ac:e4:30:f1:4b:1c:c5:7f:9d:d2:0f:4e:e0:e5:45: - 4a:cc:93:70:a0:df:3c:4c:fc:0c:a5:d5:c9:86:fd: - ba:4e:67:c0:af:c3:04:98:cb:bb:f6:25:a6:af:7f: - 7b:a3:29:b9:86:60:87:80:67:90:ab:e7:64:86:ec: - e6:30:f6:dd:5b:3a:69:4f:b1:58:f8:4b:15:ae:13: - c8:84:24:bf:9a:a0:6c:8a:b3:36:31:84:2f:a4:3e: - 4a:f2:9f:07:91:a4:8b:dc:fa:5b:65:3c:4e:93:19: - 02:a5:3a:78:5d:f2:51:bd:d7:96:16:6e:c5:8b:17: - d0:21:77:2f:96:4a:44:c8:17:2d:73:d5:da:24:40: - d1:a4:b7:f2:c4:b2:e2:16:6a:19:9b:72:cb:58:62: - eb:30:2f:2f:c5:35:1c:74:2f:ba:e6:93:7e:dc:78: - bc:ad:e3:89:c9:72:9a:f5:01:95:61:02:9f:82:40: - f9:c1:c8:6e:36:b7:14:4a:13:36:bb:d0:1b:25:bd: - d6:5e:11:e7:d9:ea:a7:db:6d:d3:92:98:b1:2a:c1: - cf:00:52:c1:78:c9:0a:30:41:30:09:c8:90:0a:04: - 8f:0d + 00:b6:cf:57:a5:6e:7c:9a:78:f2:c1:bd:99:eb:7c: + af:6a:c8:38:2e:8e:cf:e5:20:c0:f9:57:5c:e2:83: + 29:33:2c:b1:9d:2b:91:ce:4c:da:27:62:5f:18:08: + a8:f1:03:eb:0e:be:f2:1e:00:8c:63:f2:8f:d3:c1: + e4:df:0a:d3:d4:82:0d:6c:c4:98:87:eb:5b:81:66: + 43:f3:38:5e:d4:8b:91:47:70:8b:89:90:a0:0b:9d: + 63:56:4f:58:4b:e2:36:e1:97:df:37:71:7a:90:f5: + 62:2c:3e:57:71:6a:75:db:10:66:22:4c:fd:e9:a0: + 78:5e:4c:e3:8c:d5:c2:c9:a0:10:3d:ec:bd:7b:76: + 9f:5f:54:e3:c3:88:9b:d7:7f:8c:80:79:87:0f:3c: + aa:28:d9:f5:63:e8:f3:a5:6b:2b:e0:45:1c:af:94: + 00:84:b4:e4:fc:3a:5d:9c:bc:05:c2:04:b7:3a:23: + 84:56:66:a2:50:fc:8d:00:06:52:7f:a2:d3:9e:0b: + fa:d5:ba:1b:1e:10:e9:13:60:56:a6:cd:ab:67:90: + 66:0c:3d:71:c0:46:42:13:48:74:a8:a8:6d:0c:a8: + 6d:7b:6b:57:f1:ba:c0:c5:c8:cd:d9:75:20:d3:59: + ed:32:ed:5c:b6:63:b4:9b:0b:3a:05:7b:ad:38:70: + e4:3d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 41:D3:BE:10:2F:EE:43:B6:25:B0:04:4E:39:CF:78:F9:0E:ED:E1:9D + CC:11:88:FF:DF:7E:14:06:07:B5:10:B6:C1:BC:CB:2B:65:FC:83:77 X509v3 Authority Key Identifier: - keyid:A7:80:43:01:58:B0:DD:7A:AD:7C:38:10:73:02:DE:2C:E6:E4:9E:A9 + keyid:A7:26:DB:0B:03:E6:0B:32:0B:8C:34:AD:CE:60:CD:4C:89:9B:59:6E Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -146,41 +146,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 90:b6:a5:85:fe:d4:51:b9:f7:92:ae:60:80:ab:54:09:3d:63: - 43:fd:ce:e0:ea:e3:f2:c0:db:f5:1b:a7:db:f1:b3:21:d0:e4: - 7f:63:c1:75:13:ca:3d:6b:70:76:55:23:cc:c8:74:80:b8:82: - c0:cd:63:41:77:4c:27:8a:32:34:f7:9d:8d:0e:9f:15:ee:22: - 4f:ed:d7:32:f2:c9:95:bd:35:87:d8:c5:58:19:ba:06:58:a4: - 96:bc:2d:4e:1b:ed:2f:23:ac:b1:2f:b7:e0:88:a9:fc:68:c0: - 8d:8a:41:e6:d3:ba:b9:88:77:54:37:5a:e5:a9:b3:f2:85:7b: - b4:7d:69:83:37:81:12:54:21:4c:d1:69:98:a2:fd:ef:a3:65: - e9:32:f6:63:1e:54:ce:a9:75:74:53:61:b4:f0:78:72:c4:f0: - 04:f0:f3:a8:70:93:f6:35:89:0f:6f:49:7a:0e:57:e0:af:33: - 35:89:b6:cd:ef:81:aa:8c:10:11:e9:57:a1:66:4c:30:9c:11: - 6a:c6:85:4b:d1:94:88:6e:aa:5f:8e:fb:d2:31:3d:ee:19:19: - 01:3c:4a:05:72:9c:aa:ae:ef:af:b0:f1:9f:e0:ae:d6:8e:09: - d1:05:ee:6b:77:08:11:52:8c:91:a0:2f:9b:ac:88:98:14:14: - a4:08:b5:7d + 69:10:d5:c3:ff:f0:65:c6:79:55:be:ba:6b:7c:7f:49:a2:47: + b0:d7:e9:28:9f:14:f6:11:6a:d7:1f:e3:11:30:c1:d0:0c:21: + 8c:b3:21:95:c1:f3:2e:7c:8a:34:f6:d6:c7:49:9a:75:4c:93: + 35:c4:88:f7:be:d6:ed:e0:75:22:29:4d:0f:59:80:1a:1b:9b: + a4:fd:86:af:1e:76:44:03:f9:42:f2:74:1e:6b:74:fc:fa:64: + 67:33:4a:14:93:fc:84:1f:92:0c:62:ac:aa:e1:f0:6f:3e:09: + 90:d5:67:68:2a:28:9c:5f:86:29:8d:48:ef:3e:a5:48:60:08: + b5:cf:ac:ba:ff:ba:d7:7d:9a:8e:b4:63:10:e3:14:12:12:89: + 37:00:42:fb:4c:e5:b7:0d:e5:b8:28:5b:9f:79:48:aa:e4:ef: + 17:ec:eb:f1:c3:82:d9:48:ec:cd:f4:f7:1f:8f:e2:9e:ec:71: + a6:7a:ce:c0:fc:14:8f:48:17:56:10:02:27:aa:d9:10:bb:fc: + 6d:e2:d8:b6:66:27:08:e5:31:4d:fb:24:45:0f:da:7a:9c:8d: + e5:91:0c:80:91:1e:44:78:01:28:ca:db:40:87:db:38:0f:18: + 1a:a9:ff:68:8c:03:b2:89:82:e2:80:ee:3c:77:e2:4e:85:a5: + cf:72:3f:24 -----BEGIN CERTIFICATE----- MIIDbTCCAlWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 -ZXJtZWRpYXJ5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzW/os+rU -ntkjA4pK82yEzQwofMIHYInFmp90uNCs5DDxSxzFf53SD07g5UVKzJNwoN88TPwM -pdXJhv26TmfAr8MEmMu79iWmr397oym5hmCHgGeQq+dkhuzmMPbdWzppT7FY+EsV -rhPIhCS/mqBsirM2MYQvpD5K8p8HkaSL3PpbZTxOkxkCpTp4XfJRvdeWFm7FixfQ -IXcvlkpEyBctc9XaJEDRpLfyxLLiFmoZm3LLWGLrMC8vxTUcdC+65pN+3Hi8reOJ -yXKa9QGVYQKfgkD5wchuNrcUShM2u9AbJb3WXhHn2eqn223TkpixKsHPAFLBeMkK -MEEwCciQCgSPDQIDAQABo4HLMIHIMB0GA1UdDgQWBBRB074QL+5DtiWwBE45z3j5 -Du3hnTAfBgNVHSMEGDAWgBSngEMBWLDdeq18OBBzAt4s5uSeqTA3BggrBgEFBQcB +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAts9XpW58 +mnjywb2Z63yvasg4Lo7P5SDA+Vdc4oMpMyyxnSuRzkzaJ2JfGAio8QPrDr7yHgCM +Y/KP08Hk3wrT1IINbMSYh+tbgWZD8zhe1IuRR3CLiZCgC51jVk9YS+I24ZffN3F6 +kPViLD5XcWp12xBmIkz96aB4XkzjjNXCyaAQPey9e3afX1Tjw4ib13+MgHmHDzyq +KNn1Y+jzpWsr4EUcr5QAhLTk/DpdnLwFwgS3OiOEVmaiUPyNAAZSf6LTngv61bob +HhDpE2BWps2rZ5BmDD1xwEZCE0h0qKhtDKhte2tX8brAxcjN2XUg01ntMu1ctmO0 +mws6BXutOHDkPQIDAQABo4HLMIHIMB0GA1UdDgQWBBTMEYj/334UBge1ELbBvMsr +ZfyDdzAfBgNVHSMEGDAWgBSnJtsLA+YLMguMNK3OYM1MiZtZbjA3BggrBgEFBQcB AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB -AJC2pYX+1FG595KuYICrVAk9Y0P9zuDq4/LA2/Ubp9vxsyHQ5H9jwXUTyj1rcHZV -I8zIdIC4gsDNY0F3TCeKMjT3nY0OnxXuIk/t1zLyyZW9NYfYxVgZugZYpJa8LU4b -7S8jrLEvt+CIqfxowI2KQebTurmId1Q3WuWps/KFe7R9aYM3gRJUIUzRaZii/e+j -Zeky9mMeVM6pdXRTYbTweHLE8ATw86hwk/Y1iQ9vSXoOV+CvMzWJts3vgaqMEBHp -V6FmTDCcEWrGhUvRlIhuql+O+9IxPe4ZGQE8SgVynKqu76+w8Z/grtaOCdEF7mt3 -CBFSjJGgL5usiJgUFKQItX0= +AGkQ1cP/8GXGeVW+umt8f0miR7DX6SifFPYRatcf4xEwwdAMIYyzIZXB8y58ijT2 +1sdJmnVMkzXEiPe+1u3gdSIpTQ9ZgBobm6T9hq8edkQD+ULydB5rdPz6ZGczShST +/IQfkgxirKrh8G8+CZDVZ2gqKJxfhimNSO8+pUhgCLXPrLr/utd9mo60YxDjFBIS +iTcAQvtM5bcN5bgoW595SKrk7xfs6/HDgtlI7M309x+P4p7scaZ6zsD8FI9IF1YQ +Aieq2RC7/G3i2LZmJwjlMU37JEUP2nqcjeWRDICRHkR4ASjK20CH2zgPGBqp/2iM +A7KJguKA7jx34k6Fpc9yPyQ= -----END CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/violates-basic-constraints-pathlen-0.pem b/net/data/verify_certificate_chain_unittest/violates-basic-constraints-pathlen-0.pem index a0cd187e..04d29bf 100644 --- a/net/data/verify_certificate_chain_unittest/violates-basic-constraints-pathlen-0.pem +++ b/net/data/verify_certificate_chain_unittest/violates-basic-constraints-pathlen-0.pem
@@ -1,15 +1,15 @@ [Created by: generate-violates-basic-constraints-pathlen-0.py] -Certificate chain with 2 intermediaries. The first intermediary has a basic +Certificate chain with 2 intermediates. The first intermediate has a basic constraints path length of 0, so it is a violation for it to have a subordinate -intermediary. +intermediate. Certificate: Data: Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary2 + Issuer: CN=Intermediate2 Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -18,80 +18,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b2:f1:24:bb:4b:3d:6d:80:7f:67:ad:2e:0e:e8: - 07:e4:4b:6c:28:0d:2e:d9:9d:9d:e5:31:0a:7f:37: - 3f:9c:c1:c3:03:8e:b8:72:5a:1c:52:d4:4e:84:7a: - 9c:4d:f6:2a:a8:4b:f2:5c:5b:6c:f4:23:73:b3:4e: - 0a:b9:66:16:ae:e4:c4:8b:d7:1b:b5:d0:5e:5f:03: - 21:ce:63:b8:3a:da:e0:3c:f8:0a:7e:4b:99:f9:c6: - 0d:01:a2:ab:18:d8:a7:a0:84:8c:3f:09:fd:10:41: - 7c:6f:b0:51:34:4f:5d:39:b5:3f:6d:a0:68:87:6d: - 09:47:db:0d:2a:62:99:83:02:0c:b9:d7:93:0b:bf: - 17:5f:06:58:22:27:62:fc:1c:d9:02:b9:1e:e9:f0: - fb:e1:a4:cc:fd:e3:9e:a8:a5:2d:f9:af:8b:b8:1e: - 68:dc:f1:52:a2:55:94:20:da:82:14:b7:c0:a0:c5: - 53:ff:00:0f:76:f9:fd:bf:53:71:99:60:2f:00:c9: - 9e:d0:07:eb:3c:d0:47:5c:7b:65:cb:62:db:9b:74: - ed:b8:51:a0:ed:ed:af:e9:6f:44:0e:8c:a4:42:ee: - fc:92:bb:19:1a:b3:42:74:27:39:47:b8:d4:06:ed: - bd:99:72:0c:83:15:10:ff:4a:66:66:0f:d6:14:ef: - dd:17 + 00:c3:d8:cf:ca:eb:7a:63:bc:cd:53:50:a0:a5:e7: + 24:1c:5e:ab:ee:eb:48:d3:60:73:ab:a5:c3:b5:e0: + ea:b2:71:0b:99:48:4c:0c:78:6f:67:a8:98:13:f7: + 99:59:a0:fc:78:d8:7e:05:cc:1c:4c:4d:ff:c0:a7: + 85:8f:c0:f8:c2:10:51:a2:a6:9b:38:a1:a8:7f:e3: + 7c:df:be:f7:8c:62:9a:83:c6:a5:ab:63:26:9e:71: + 25:26:7d:dc:05:09:b3:76:e8:de:90:07:6d:6d:d1: + 33:a5:3a:64:90:c0:50:2e:d6:a9:84:2e:f2:7c:11: + 49:4c:c5:e2:50:c3:b9:9c:0f:ac:8f:07:19:74:63: + 00:12:8a:ec:6f:4f:86:8a:9b:af:2a:c2:21:f1:98: + 88:eb:4a:23:2c:7d:25:9f:fd:2a:3e:b0:3d:f5:66: + bf:a7:07:42:7d:04:70:62:d3:4b:88:92:af:74:6e: + 20:4c:55:5e:9e:de:29:a6:58:66:1a:8d:c4:af:b5: + 22:44:29:ee:b6:03:66:8e:4b:a6:ca:77:3d:91:08: + c0:b2:e0:70:c8:e6:d1:fb:db:09:86:7c:ad:f5:20: + 76:10:1d:fc:bf:98:05:0b:b1:6e:47:d8:ce:4b:aa: + 02:7c:ec:3e:8a:b0:22:f9:3d:fc:8e:60:45:1b:cc: + c9:a5 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 33:73:C0:44:EE:71:53:CD:C0:EA:D9:FC:FF:BE:B7:DD:16:66:19:84 + 4C:E1:88:56:8D:23:98:7B:19:E1:6E:D8:1C:E5:06:73:6B:D5:1E:03 X509v3 Authority Key Identifier: - keyid:FD:31:C0:C5:57:AB:1E:A5:78:24:73:72:58:9F:75:7D:78:17:42:AC + keyid:CB:CE:B8:91:FA:EC:E9:A4:15:CA:75:30:F1:C6:9A:B8:19:35:FA:29 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary2.cer + CA Issuers - URI:http://url-for-aia/Intermediate2.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary2.crl + URI:http://url-for-crl/Intermediate2.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 61:39:30:49:95:f7:63:44:f3:a5:97:35:48:84:ea:94:cd:94: - 37:ce:09:7a:b1:58:21:3e:f8:9c:a4:a9:65:bf:1d:a1:cb:eb: - 09:95:f7:f6:ad:a4:65:95:a1:51:c4:18:06:43:d2:93:eb:16: - 41:65:33:8a:42:cc:90:9d:e9:66:1f:d6:98:31:f1:48:f4:a8: - a3:89:50:29:bc:f2:2d:af:8b:f7:af:9e:62:02:21:06:75:3d: - 4a:8d:98:a0:df:4d:5d:db:9a:af:2a:0f:32:50:aa:61:c3:19: - 87:99:54:60:3a:16:c5:46:ea:ed:54:ab:91:34:5f:8e:60:33: - 10:e4:e1:4d:05:8d:36:5b:47:1c:c3:f2:58:7f:22:07:c7:95: - 02:24:8e:03:f4:1f:06:25:d7:49:76:f8:f1:02:25:7c:9a:cf: - 0f:4d:8f:08:e7:bf:fd:13:31:43:e5:56:20:eb:0a:43:ca:41: - 0d:7c:4f:68:f6:d1:d1:67:ca:24:4f:e3:8e:8e:12:39:2f:7b: - e8:9a:5c:c9:b5:19:01:1a:46:7e:54:21:ad:7e:c5:cd:e2:40: - c3:13:aa:b5:e5:16:b3:18:dc:c8:61:d7:73:b7:3b:23:00:04: - ce:dc:5a:22:1a:0b:da:8a:99:10:96:33:32:ae:4e:83:f4:d0: - 93:e7:75:56 + a6:96:6f:71:a0:4e:f8:17:93:ad:30:1f:2e:e5:6e:bc:4e:83: + 32:07:95:9f:f6:02:e8:06:5e:a6:51:0a:23:f6:46:06:3c:3d: + e6:4d:cc:ac:8c:29:e8:ce:0e:a4:db:11:7d:4f:6e:b7:78:e2: + 40:1e:0e:74:83:d5:16:7c:c5:6e:3e:41:59:be:d5:0c:ab:05: + 9f:2f:22:8c:3b:58:ed:72:49:11:b0:0b:21:b9:5d:e0:b8:3f: + cd:a0:a0:95:64:c6:8e:45:7d:aa:1b:67:69:13:54:40:0d:99: + 74:da:b1:9f:5b:9f:ba:e3:b6:aa:5b:e4:b6:d9:6c:46:d3:50: + 1a:d9:5a:54:b9:2d:a1:da:97:00:7a:6a:71:2a:8e:45:9c:6d: + e8:3d:a2:cb:29:44:45:11:5c:a9:64:60:81:88:e4:93:a2:61: + ec:87:74:69:bc:9c:61:92:94:eb:42:33:12:29:82:5d:fe:30: + 9b:9c:bf:47:50:a9:f6:ae:ea:d4:97:39:87:d5:02:c4:45:09: + a8:f3:f3:bf:e0:35:45:89:a9:bc:57:34:bf:d4:81:a0:09:4e: + 2d:15:61:39:0c:43:53:2e:50:fb:31:ab:91:0d:ce:9c:cb:c1: + e2:39:e2:76:60:ab:6b:5d:33:b6:0f:a7:c8:f0:61:ed:37:81: + 83:3a:2b:b4 -----BEGIN CERTIFICATE----- MIIDkDCCAnigAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1JbnRl -cm1lZGlhcnkyMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0G -A1UEAwwGVGFyZ2V0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsvEk -u0s9bYB/Z60uDugH5EtsKA0u2Z2d5TEKfzc/nMHDA464clocUtROhHqcTfYqqEvy -XFts9CNzs04KuWYWruTEi9cbtdBeXwMhzmO4OtrgPPgKfkuZ+cYNAaKrGNinoISM -Pwn9EEF8b7BRNE9dObU/baBoh20JR9sNKmKZgwIMudeTC78XXwZYIidi/BzZArke -6fD74aTM/eOeqKUt+a+LuB5o3PFSolWUINqCFLfAoMVT/wAPdvn9v1NxmWAvAMme -0AfrPNBHXHtly2Lbm3TtuFGg7e2v6W9EDoykQu78krsZGrNCdCc5R7jUBu29mXIM -gxUQ/0pmZg/WFO/dFwIDAQABo4HrMIHoMB0GA1UdDgQWBBQzc8BE7nFTzcDq2fz/ -vrfdFmYZhDAfBgNVHSMEGDAWgBT9McDFV6sepXgkc3JYn3V9eBdCrDBABggrBgEF +cm1lZGlhdGUyMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0G +A1UEAwwGVGFyZ2V0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw9jP +yut6Y7zNU1CgpeckHF6r7utI02Bzq6XDteDqsnELmUhMDHhvZ6iYE/eZWaD8eNh+ +BcwcTE3/wKeFj8D4whBRoqabOKGof+N83773jGKag8alq2MmnnElJn3cBQmzduje +kAdtbdEzpTpkkMBQLtaphC7yfBFJTMXiUMO5nA+sjwcZdGMAEorsb0+GipuvKsIh +8ZiI60ojLH0ln/0qPrA99Wa/pwdCfQRwYtNLiJKvdG4gTFVent4pplhmGo3Er7Ui +RCnutgNmjkumync9kQjAsuBwyObR+9sJhnyt9SB2EB38v5gFC7FuR9jOS6oCfOw+ +irAi+T38jmBFG8zJpQIDAQABo4HrMIHoMB0GA1UdDgQWBBRM4YhWjSOYexnhbtgc +5QZza9UeAzAfBgNVHSMEGDAWgBTLzriR+uzppBXKdTDxxpq4GTX6KTBABggrBgEF BQcBAQQ0MDIwMAYIKwYBBQUHMAKGJGh0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1l -ZGlhcnkyLmNlcjA1BgNVHR8ELjAsMCqgKKAmhiRodHRwOi8vdXJsLWZvci1jcmwv -SW50ZXJtZWRpYXJ5Mi5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG -AQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAYTkwSZX3Y0TzpZc1 -SITqlM2UN84JerFYIT74nKSpZb8docvrCZX39q2kZZWhUcQYBkPSk+sWQWUzikLM -kJ3pZh/WmDHxSPSoo4lQKbzyLa+L96+eYgIhBnU9So2YoN9NXduaryoPMlCqYcMZ -h5lUYDoWxUbq7VSrkTRfjmAzEOThTQWNNltHHMPyWH8iB8eVAiSOA/QfBiXXSXb4 -8QIlfJrPD02PCOe//RMxQ+VWIOsKQ8pBDXxPaPbR0WfKJE/jjo4SOS976JpcybUZ -ARpGflQhrX7FzeJAwxOqteUWsxjcyGHXc7c7IwAEztxaIhoL2oqZEJYzMq5Og/TQ -k+d1Vg== +ZGlhdGUyLmNlcjA1BgNVHR8ELjAsMCqgKKAmhiRodHRwOi8vdXJsLWZvci1jcmwv +SW50ZXJtZWRpYXRlMi5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG +AQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAppZvcaBO+BeTrTAf +LuVuvE6DMgeVn/YC6AZeplEKI/ZGBjw95k3MrIwp6M4OpNsRfU9ut3jiQB4OdIPV +FnzFbj5BWb7VDKsFny8ijDtY7XJJEbALIbld4Lg/zaCglWTGjkV9qhtnaRNUQA2Z +dNqxn1ufuuO2qlvkttlsRtNQGtlaVLktodqXAHpqcSqORZxt6D2iyylERRFcqWRg +gYjkk6Jh7Id0abycYZKU60IzEimCXf4wm5y/R1Cp9q7q1Jc5h9UCxEUJqPPzv+A1 +RYmpvFc0v9SBoAlOLRVhOQxDUy5Q+zGrkQ3OnMvB4jnidmCra10ztg+nyPBh7TeB +gzortA== -----END CERTIFICATE----- Certificate: @@ -99,88 +99,88 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary1 + Issuer: CN=Intermediate1 Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary2 + Subject: CN=Intermediate2 Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b9:4e:dc:bd:a8:9e:1d:81:d7:bb:c3:4d:8a:5d: - 34:3f:b2:71:12:c0:0d:76:05:d6:b3:6a:b6:3d:b5: - 97:a8:8d:a0:ba:d9:2f:3c:da:b0:8f:5f:18:f0:83: - fb:59:ef:91:8d:5a:57:57:63:36:a1:ff:54:9a:f5: - 10:ab:4a:6b:16:fc:c6:f2:4e:9f:97:ec:22:6f:97: - dd:0e:63:ef:ce:71:4f:f6:8e:04:68:22:c9:6d:b4: - d2:fe:7b:46:aa:e9:05:a0:c0:b0:25:42:cd:ba:e8: - 8d:bb:cb:3e:5f:e4:54:b7:dd:48:c6:08:52:30:54: - e2:f4:c1:ae:ee:71:71:a7:33:ce:c1:b1:55:e4:77: - 15:72:c5:ea:5f:ed:b3:a6:ef:a7:cc:f6:eb:6c:42: - 1d:45:c3:75:15:d5:bd:09:44:52:b9:f5:5d:1f:10: - e1:fc:31:9e:37:90:ca:7c:8d:16:c4:f7:76:39:b7: - 57:ea:5b:75:3d:6c:50:60:26:ed:8b:2a:e4:a2:b8: - a2:34:ba:51:89:ce:3c:e3:68:c3:3c:4a:58:cb:be: - 79:34:54:2d:61:38:7b:7a:89:3f:4c:5f:3f:c9:c6: - fc:d0:81:de:0c:21:2e:5a:2a:74:cd:fe:d7:c9:de: - b3:3a:60:d6:16:e7:91:13:87:a4:f4:f8:67:4b:17: - e6:13 + 00:ad:d8:fa:e5:f4:8b:41:38:13:dc:61:ad:db:db: + 3d:f6:be:e2:fd:9d:63:a2:eb:4a:8d:c8:03:6b:d2: + c3:18:29:e6:93:92:5f:d0:c5:b2:3c:05:cd:79:c9: + 25:dd:e8:fc:68:83:f1:d9:95:15:22:8f:27:eb:bf: + 1f:ed:78:ce:34:b7:60:66:ee:4a:40:9f:e3:95:d0: + 32:47:67:80:6c:37:1c:3d:3a:e8:3e:14:2d:5b:97: + b3:40:85:28:a9:10:f0:fb:c9:eb:51:be:b6:c6:8a: + ca:60:cd:31:b7:b0:d3:bd:eb:5c:8a:14:89:38:47: + cb:18:2b:11:f7:a7:9e:9d:f3:76:82:97:c4:78:61: + 8c:ec:90:ac:f2:a8:2e:bf:d8:30:48:52:94:7f:48: + f6:fb:4b:e6:0a:63:89:ad:8a:4d:8d:3e:dc:45:06: + 89:e9:94:24:5b:d4:94:50:de:05:cf:87:59:66:fb: + 70:62:84:3c:fe:d9:1b:02:92:30:80:cb:45:43:e4: + 55:47:97:2e:99:59:22:86:6f:51:3a:24:13:26:e8: + 10:c9:92:35:13:6f:4a:39:c5:71:d2:c3:63:a5:11: + f8:6e:dc:fa:75:5c:4b:29:24:04:9f:e3:f4:f0:49: + 55:7e:0a:8c:6c:44:b4:a4:35:c7:b0:54:10:a4:b1: + 6f:95 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - FD:31:C0:C5:57:AB:1E:A5:78:24:73:72:58:9F:75:7D:78:17:42:AC + CB:CE:B8:91:FA:EC:E9:A4:15:CA:75:30:F1:C6:9A:B8:19:35:FA:29 X509v3 Authority Key Identifier: - keyid:09:87:C1:14:11:81:04:D8:AF:CF:66:4A:4F:8D:1C:A5:BB:04:CF:DA + keyid:58:20:BB:27:E1:6D:B0:95:1A:D3:40:A1:81:79:89:63:34:21:9F:13 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary1.cer + CA Issuers - URI:http://url-for-aia/Intermediate1.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary1.crl + URI:http://url-for-crl/Intermediate1.crl X509v3 Key Usage: critical Certificate Sign, CRL Sign X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 Signature Algorithm: sha256WithRSAEncryption - 51:f3:32:1a:03:bd:bd:a1:40:7d:4a:55:ef:6e:5e:58:57:8c: - 50:75:7c:e6:d0:44:ff:7e:0c:f7:9d:c2:67:99:83:e2:da:19: - e6:0b:54:8a:61:7d:16:86:99:2d:b7:32:2d:c6:a0:7a:1a:e2: - c2:46:8c:a1:b7:f8:bb:d4:22:b1:ae:d0:2f:a9:98:32:4e:14: - 20:6c:22:cf:df:c8:08:ce:f4:4c:8b:5c:03:33:0a:d1:32:2b: - 5a:0d:d2:99:18:79:a1:e8:ed:8d:31:85:9e:dd:30:52:30:1f: - ff:af:1f:09:08:98:a0:75:11:02:e6:6c:2b:7e:67:df:89:91: - 1e:57:b4:a2:ba:1e:7b:86:68:f3:62:7a:69:c1:4e:b3:76:58: - 74:e5:84:3d:0f:6d:1b:22:97:e9:7f:0b:c7:2f:00:c5:4d:1a: - fd:47:ff:9f:c0:84:0b:ee:dc:cd:c2:43:7f:0f:7a:a6:28:6e: - c3:2c:7a:a1:cf:4f:16:3f:f5:fc:40:c7:65:91:a5:bc:5c:82: - 9c:a0:fb:0a:1d:69:89:85:e5:9e:10:41:7e:4d:83:02:4f:64: - 54:04:86:97:d7:5e:6c:e1:ef:65:b0:a4:69:b8:e3:d4:0e:cd: - 20:04:1a:05:56:e9:e1:c3:e9:2f:9a:7b:43:59:73:ff:0b:82: - 38:e8:b3:b5 + 5c:fb:a9:0c:98:92:b4:e2:3c:b1:57:ae:7d:4c:17:b3:44:0e: + df:f8:c5:96:e3:1c:10:c2:1b:cf:26:b8:b8:45:3b:e2:3a:54: + d9:2a:ce:2d:70:ef:7d:e7:0a:f8:c4:3e:c2:11:65:58:c2:9c: + 57:0f:82:6f:ad:d5:c3:75:fe:7a:eb:3e:51:13:a9:04:18:37: + 6a:e1:86:11:7f:3b:9d:5a:eb:29:ec:ef:d1:3b:df:13:f4:66: + 87:31:2e:b7:75:b0:31:02:b6:47:98:d6:f5:3d:35:7e:18:ac: + 53:86:4e:d2:d4:93:ac:7a:20:04:8f:58:9b:15:58:ad:7a:b3: + 3e:a0:11:57:92:96:2a:d4:b9:16:e9:f0:8b:70:67:4b:21:58: + 80:8e:43:21:ba:62:22:46:96:d2:f0:48:82:69:c5:51:ba:22: + 32:a0:50:cf:48:1f:1a:35:05:41:23:4e:93:a2:43:e6:83:d9: + ae:32:1e:95:72:24:61:79:09:4c:62:d0:1c:42:60:c5:8c:0c: + 6f:a1:8c:29:8c:68:e3:b8:da:44:83:f6:04:ab:e2:85:e4:6a: + f6:ca:ed:95:e3:a0:81:4e:79:1e:cb:46:a1:83:4b:19:23:52: + ae:b3:80:d7:7c:4f:05:8c:78:55:e2:fc:ec:80:74:5b:3e:7d: + 16:e3:71:5a -----BEGIN CERTIFICATE----- MIIDjDCCAnSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1JbnRl -cm1lZGlhcnkxMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowGDEWMBQG -A1UEAwwNSW50ZXJtZWRpYXJ5MjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBALlO3L2onh2B17vDTYpdND+ycRLADXYF1rNqtj21l6iNoLrZLzzasI9fGPCD -+1nvkY1aV1djNqH/VJr1EKtKaxb8xvJOn5fsIm+X3Q5j785xT/aOBGgiyW200v57 -RqrpBaDAsCVCzbrojbvLPl/kVLfdSMYIUjBU4vTBru5xcaczzsGxVeR3FXLF6l/t -s6bvp8z262xCHUXDdRXVvQlEUrn1XR8Q4fwxnjeQynyNFsT3djm3V+pbdT1sUGAm -7Ysq5KK4ojS6UYnOPONowzxKWMu+eTRULWE4e3qJP0xfP8nG/NCB3gwhLloqdM3+ -18neszpg1hbnkROHpPT4Z0sX5hMCAwEAAaOB4DCB3TAdBgNVHQ4EFgQU/THAxVer -HqV4JHNyWJ91fXgXQqwwHwYDVR0jBBgwFoAUCYfBFBGBBNivz2ZKT40cpbsEz9ow +cm1lZGlhdGUxMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowGDEWMBQG +A1UEAwwNSW50ZXJtZWRpYXRlMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAK3Y+uX0i0E4E9xhrdvbPfa+4v2dY6LrSo3IA2vSwxgp5pOSX9DFsjwFzXnJ +Jd3o/GiD8dmVFSKPJ+u/H+14zjS3YGbuSkCf45XQMkdngGw3HD066D4ULVuXs0CF +KKkQ8PvJ61G+tsaKymDNMbew073rXIoUiThHyxgrEfennp3zdoKXxHhhjOyQrPKo +Lr/YMEhSlH9I9vtL5gpjia2KTY0+3EUGiemUJFvUlFDeBc+HWWb7cGKEPP7ZGwKS +MIDLRUPkVUeXLplZIoZvUTokEyboEMmSNRNvSjnFcdLDY6UR+G7c+nVcSykkBJ/j +9PBJVX4KjGxEtKQ1x7BUEKSxb5UCAwEAAaOB4DCB3TAdBgNVHQ4EFgQUy864kfrs +6aQVynUw8caauBk1+ikwHwYDVR0jBBgwFoAUWCC7J+FtsJUa00ChgXmJYzQhnxMw QAYIKwYBBQUHAQEENDAyMDAGCCsGAQUFBzAChiRodHRwOi8vdXJsLWZvci1haWEv -SW50ZXJtZWRpYXJ5MS5jZXIwNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL3VybC1m -b3ItY3JsL0ludGVybWVkaWFyeTEuY3JsMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMB -Af8ECDAGAQH/AgEAMA0GCSqGSIb3DQEBCwUAA4IBAQBR8zIaA729oUB9SlXvbl5Y -V4xQdXzm0ET/fgz3ncJnmYPi2hnmC1SKYX0WhpkttzItxqB6GuLCRoyht/i71CKx -rtAvqZgyThQgbCLP38gIzvRMi1wDMwrRMitaDdKZGHmh6O2NMYWe3TBSMB//rx8J -CJigdREC5mwrfmffiZEeV7Siuh57hmjzYnppwU6zdlh05YQ9D20bIpfpfwvHLwDF -TRr9R/+fwIQL7tzNwkN/D3qmKG7DLHqhz08WP/X8QMdlkaW8XIKcoPsKHWmJheWe -EEF+TYMCT2RUBIaX115s4e9lsKRpuOPUDs0gBBoFVunhw+kvmntDWXP/C4I46LO1 +SW50ZXJtZWRpYXRlMS5jZXIwNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL3VybC1m +b3ItY3JsL0ludGVybWVkaWF0ZTEuY3JsMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMB +Af8ECDAGAQH/AgEAMA0GCSqGSIb3DQEBCwUAA4IBAQBc+6kMmJK04jyxV659TBez +RA7f+MWW4xwQwhvPJri4RTviOlTZKs4tcO995wr4xD7CEWVYwpxXD4JvrdXDdf56 +6z5RE6kEGDdq4YYRfzudWusp7O/RO98T9GaHMS63dbAxArZHmNb1PTV+GKxThk7S +1JOseiAEj1ibFViterM+oBFXkpYq1LkW6fCLcGdLIViAjkMhumIiRpbS8EiCacVR +uiIyoFDPSB8aNQVBI06TokPmg9muMh6VciRheQlMYtAcQmDFjAxvoYwpjGjjuNpE +g/YEq+KF5Gr2yu2V46CBTnkey0ahg0sZI1Kus4DXfE8FjHhV4vzsgHRbPn0W43Fa -----END CERTIFICATE----- Certificate: @@ -192,35 +192,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary1 + Subject: CN=Intermediate1 Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:ab:e9:a0:28:67:38:13:72:12:a0:3b:f2:f9:13: - c2:2b:c1:a2:07:e6:45:35:cf:ff:1a:46:b0:d2:58: - 12:63:fc:3d:b3:85:50:68:9c:57:21:ff:31:ff:24: - 48:db:13:de:b1:f4:f8:39:7a:f3:34:dd:51:58:1a: - 12:73:9d:85:e0:d0:f8:be:fd:9d:e2:34:ce:36:e0: - a0:48:53:36:23:bf:52:d2:ac:da:d1:ef:6c:da:9f: - 11:3b:6c:e1:67:6a:f1:df:97:2c:1a:12:c7:c3:72: - 0f:98:21:6a:40:2b:f0:28:b8:c2:ef:7f:cb:ee:7a: - e9:8f:17:fe:0a:a1:ff:d5:15:4c:63:5b:53:55:15: - 01:b9:5d:91:77:b0:23:03:0e:45:00:84:52:33:2b: - 11:51:99:e8:0d:5b:45:ef:d2:e2:c9:0e:a2:ae:43: - c2:92:5c:b0:36:76:06:21:91:d0:42:e8:0f:6f:80: - 61:98:12:a6:c0:c3:b7:64:7e:77:0c:76:12:1f:50: - 73:f8:bb:28:1a:5d:7b:68:36:01:fa:09:e7:9a:90: - b6:c5:3d:e9:16:a0:7b:c2:76:19:f0:e9:bc:15:0d: - 55:df:ea:67:2a:b2:e0:69:f8:c1:49:c4:a6:51:e9: - 43:d2:df:2a:de:e3:a0:66:3f:0c:18:b8:f8:8d:bb: - 43:15 + 00:e6:65:53:d1:2e:4e:ad:28:ff:05:13:1b:64:08: + aa:e6:b7:44:64:94:4c:0e:a4:68:80:12:7d:07:ce: + 6a:ec:c8:4b:cc:a1:3f:af:f4:c8:45:0e:b2:66:46: + b3:fd:ef:68:5d:04:c0:95:e9:71:45:b2:26:12:16: + 78:b1:75:15:39:a1:da:2a:b0:d7:7c:52:11:8b:1a: + b0:46:19:fb:71:d0:8f:13:3d:2e:ee:bc:75:97:4d: + b1:b6:7b:d5:b6:36:44:5b:75:d1:00:b3:a3:60:9f: + 92:34:c1:50:52:30:89:54:35:24:fa:7d:ea:5a:32: + ca:11:aa:12:1c:55:74:fd:5b:98:ad:0d:04:d3:b3: + 12:cd:a4:f9:7c:54:e1:1f:01:cd:ad:c6:0e:cc:ae: + 8c:89:d3:ff:a6:f7:2b:9f:67:d8:55:c2:a9:4a:5f: + e8:d6:96:0d:14:68:79:23:84:d0:5f:59:99:f6:8e: + 9c:34:da:b6:d2:37:cc:de:8d:44:ba:e4:bb:f0:6f: + f1:60:d2:0d:22:28:41:98:e8:9a:dd:18:b5:30:45: + fd:3b:7a:27:0f:16:08:07:02:83:aa:e0:68:ba:47: + 44:48:84:ea:da:51:c1:ec:7b:cb:1e:25:11:3d:fd: + ce:53:1a:39:0a:fc:42:82:3d:cc:a5:93:00:c6:27: + 62:75 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 09:87:C1:14:11:81:04:D8:AF:CF:66:4A:4F:8D:1C:A5:BB:04:CF:DA + 58:20:BB:27:E1:6D:B0:95:1A:D3:40:A1:81:79:89:63:34:21:9F:13 X509v3 Authority Key Identifier: - keyid:A4:9D:E4:F8:B0:AF:D5:A4:2F:B9:3F:42:B8:C3:D5:60:9D:64:C2:8C + keyid:7A:3D:6D:AF:22:3F:64:CA:5C:C8:B3:3D:D5:E5:3B:32:A0:02:CF:29 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -235,41 +235,41 @@ X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 Signature Algorithm: sha256WithRSAEncryption - 7d:97:b6:93:81:ef:63:d9:d6:31:8d:ba:e0:61:36:7c:06:cd: - b5:2f:3f:4a:04:84:c2:c4:51:07:49:55:53:4f:22:b6:2f:15: - d9:62:8a:65:97:15:84:a1:e2:2e:4e:66:59:02:b2:8f:b6:d6: - 84:d6:ed:d4:df:45:a3:75:93:58:88:76:8d:6c:01:81:cc:c5: - 91:99:cc:9c:65:f9:c9:f0:86:ed:3a:fe:d0:a0:2e:6c:04:d2: - 49:f8:d4:31:9f:ce:db:93:bb:5a:73:4d:5d:24:83:4b:55:fe: - 49:79:67:64:83:18:56:d9:ad:90:96:0b:ab:49:de:08:80:7a: - 93:54:b1:38:19:c2:0b:6f:e1:b1:50:52:19:67:15:a9:aa:5a: - c5:ed:73:30:63:1a:64:24:d4:8b:95:c9:c4:54:78:62:ce:42: - f7:98:f1:94:2e:4d:93:7e:df:6f:cd:6f:41:c4:ef:c8:ed:f7: - 73:92:af:ee:19:b5:e5:47:82:f7:47:41:35:29:8c:88:3b:62: - 18:c0:f6:80:56:3f:f8:9e:b4:6e:33:2c:ce:41:da:56:83:c7: - c7:30:c6:0f:f5:49:f5:79:d6:7b:c5:33:4c:0f:2a:e9:13:27: - 0b:e3:b8:63:74:14:c0:2e:19:24:00:a4:f8:17:d7:cd:b5:1b: - c1:38:25:9a + 37:db:eb:ca:f7:4c:e8:8d:30:46:40:83:77:7b:84:85:66:06: + 20:10:22:e9:f3:f0:5e:41:27:7d:dd:01:2a:c0:20:74:a6:f5: + d3:30:01:40:4a:4c:60:b0:9d:da:2f:71:90:c5:19:97:cc:af: + a2:e3:cc:fe:6e:e6:fa:5d:11:50:e6:ef:a9:b0:15:f8:da:26: + 51:b9:2e:1e:82:44:ec:13:e5:8d:27:2d:b1:31:97:cd:43:04: + 8a:70:ca:51:e3:2c:9e:93:9a:48:36:a1:46:56:08:e1:43:1c: + d7:96:aa:44:c2:3a:a2:e7:91:ac:91:28:fb:03:9c:e7:13:d1: + eb:c0:33:7b:3b:ff:c2:fc:af:68:36:54:57:f4:b8:2a:9d:de: + 78:3c:8e:ad:0d:d8:dd:4b:e7:50:41:0a:ae:7a:08:d7:5e:3b: + 2a:71:d5:88:ec:99:02:b3:cd:5a:31:26:41:79:e2:3a:49:55: + 40:7f:26:7f:34:f6:7a:76:28:5e:3d:e9:20:1e:a2:f4:6b:d5: + e0:6d:bd:2e:30:1a:69:70:ae:03:d3:ce:b3:76:04:2f:ef:86: + 4f:77:44:19:6f:94:6a:09:86:60:28:75:63:22:3a:13:5a:d5: + 13:af:23:08:9c:1f:0d:dc:0f:62:b4:97:85:05:5a:ea:c5:60: + 8a:02:4d:51 -----BEGIN CERTIFICATE----- MIIDcTCCAlmgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowGDEWMBQGA1UEAwwNSW50 -ZXJtZWRpYXJ5MTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKvpoChn -OBNyEqA78vkTwivBogfmRTXP/xpGsNJYEmP8PbOFUGicVyH/Mf8kSNsT3rH0+Dl6 -8zTdUVgaEnOdheDQ+L79neI0zjbgoEhTNiO/UtKs2tHvbNqfETts4Wdq8d+XLBoS -x8NyD5ghakAr8Ci4wu9/y+566Y8X/gqh/9UVTGNbU1UVAbldkXewIwMORQCEUjMr -EVGZ6A1bRe/S4skOoq5DwpJcsDZ2BiGR0ELoD2+AYZgSpsDDt2R+dwx2Eh9Qc/i7 -KBpde2g2AfoJ55qQtsU96Rage8J2GfDpvBUNVd/qZyqy4Gn4wUnEplHpQ9LfKt7j -oGY/DBi4+I27QxUCAwEAAaOBzjCByzAdBgNVHQ4EFgQUCYfBFBGBBNivz2ZKT40c -pbsEz9owHwYDVR0jBBgwFoAUpJ3k+LCv1aQvuT9CuMPVYJ1kwowwNwYIKwYBBQUH +ZXJtZWRpYXRlMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOZlU9Eu +Tq0o/wUTG2QIqua3RGSUTA6kaIASfQfOauzIS8yhP6/0yEUOsmZGs/3vaF0EwJXp +cUWyJhIWeLF1FTmh2iqw13xSEYsasEYZ+3HQjxM9Lu68dZdNsbZ71bY2RFt10QCz +o2CfkjTBUFIwiVQ1JPp96loyyhGqEhxVdP1bmK0NBNOzEs2k+XxU4R8Bza3GDsyu +jInT/6b3K59n2FXCqUpf6NaWDRRoeSOE0F9ZmfaOnDTattI3zN6NRLrku/Bv8WDS +DSIoQZjomt0YtTBF/Tt6Jw8WCAcCg6rgaLpHREiE6tpRwex7yx4lET39zlMaOQr8 +QoI9zKWTAMYnYnUCAwEAAaOBzjCByzAdBgNVHQ4EFgQUWCC7J+FtsJUa00ChgXmJ +YzQhnxMwHwYDVR0jBBgwFoAUej1tryI/ZMpcyLM91eU7MqACzykwNwYIKwYBBQUH AQEEKzApMCcGCCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIw LAYDVR0fBCUwIzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4G A1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMA0GCSqGSIb3DQEBCwUA -A4IBAQB9l7aTge9j2dYxjbrgYTZ8Bs21Lz9KBITCxFEHSVVTTyK2LxXZYopllxWE -oeIuTmZZArKPttaE1u3U30WjdZNYiHaNbAGBzMWRmcycZfnJ8IbtOv7QoC5sBNJJ -+NQxn87bk7tac01dJINLVf5JeWdkgxhW2a2QlgurSd4IgHqTVLE4GcILb+GxUFIZ -ZxWpqlrF7XMwYxpkJNSLlcnEVHhizkL3mPGULk2Tft9vzW9BxO/I7fdzkq/uGbXl -R4L3R0E1KYyIO2IYwPaAVj/4nrRuMyzOQdpWg8fHMMYP9Un1edZ7xTNMDyrpEycL -47hjdBTALhkkAKT4F9fNtRvBOCWa +A4IBAQA32+vK90zojTBGQIN3e4SFZgYgECLp8/BeQSd93QEqwCB0pvXTMAFASkxg +sJ3aL3GQxRmXzK+i48z+bub6XRFQ5u+psBX42iZRuS4egkTsE+WNJy2xMZfNQwSK +cMpR4yyek5pINqFGVgjhQxzXlqpEwjqi55GskSj7A5znE9HrwDN7O//C/K9oNlRX +9Lgqnd54PI6tDdjdS+dQQQquegjXXjsqcdWI7JkCs81aMSZBeeI6SVVAfyZ/NPZ6 +dihePekgHqL0a9Xgbb0uMBppcK4D086zdgQv74ZPd0QZb5RqCYZgKHVjIjoTWtUT +ryMInB8N3A9itJeFBVrqxWCKAk1R -----END CERTIFICATE----- Certificate: @@ -286,30 +286,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:9e:1f:9a:ec:aa:50:56:02:47:76:c8:ff:b9:91: - c0:58:8d:08:b9:87:d9:ac:9e:7c:6e:2e:b7:60:68: - d6:ab:1c:3d:f3:e2:a8:e6:05:58:ff:52:27:7c:f9: - 7e:96:2d:19:71:35:84:eb:8d:3c:db:27:f7:5f:2f: - d1:56:af:73:a8:26:84:f5:bb:7f:7a:7c:40:81:66: - e9:e5:c1:53:eb:ac:d5:65:47:3d:a1:0a:67:c6:c8: - 3b:cb:2f:a9:1e:9c:d5:30:6b:7b:50:cb:ad:46:6b: - 33:44:91:14:94:20:ad:e2:79:1b:62:bb:1d:7e:a7: - 2a:45:03:4b:d4:64:1b:15:82:c6:dc:cb:48:84:c5: - 77:22:2a:20:6d:d8:bd:25:8d:55:11:95:46:73:97: - fa:53:66:2e:ec:1a:73:66:09:f7:ef:e4:f8:df:ea: - ce:90:c8:f8:38:67:bb:3c:c2:48:e7:69:01:98:6b: - c1:3e:8f:17:05:0f:c0:d0:eb:49:f1:c7:ab:c6:07: - 49:85:a7:57:ac:11:42:e5:de:bf:a1:65:4b:e6:ba: - e8:44:64:2d:84:d8:a4:4a:ba:62:56:76:49:bf:67: - 19:91:e1:29:e9:fb:aa:de:ef:df:58:01:08:65:14: - 8e:71:b5:3b:43:fb:6c:65:9a:d6:6e:42:65:24:2d: - f4:99 + 00:cd:87:9d:f4:66:f8:77:5c:e3:56:6d:cb:12:dc: + a9:36:79:d5:1b:11:9f:92:20:8d:e6:d7:7d:41:8e: + 90:90:2a:a8:63:3d:59:25:a6:7a:86:73:7f:10:da: + 9f:c1:a5:69:4d:a3:67:61:b8:f8:9b:9b:ec:4a:3a: + f1:73:f1:83:c4:ab:34:1f:0b:ed:05:f3:6d:c5:ee: + 64:18:34:69:5f:09:1f:48:e5:d2:2d:12:4c:17:a3: + 7e:74:9f:93:04:ea:00:15:e3:b9:0d:ef:c5:ed:19: + 97:2b:12:05:7f:5c:32:2d:c5:30:46:7c:a7:02:27: + 29:b2:99:e1:43:95:f6:67:1c:ee:ad:9b:8e:fb:f8: + 57:1a:47:13:5a:1a:2f:27:e8:d5:03:2a:e5:f9:92: + 53:1d:03:5f:d6:2f:18:65:ce:3a:6e:ab:bf:b6:c5: + 72:e1:c9:a0:d6:3c:a2:8e:4f:3e:8f:06:52:19:a8: + 1a:f0:06:55:d2:f9:be:23:27:0a:de:33:26:ec:a0: + 41:d3:6b:56:25:70:09:ac:28:45:82:33:cb:db:85: + 59:50:61:9c:12:e0:04:cc:c5:81:3c:77:d7:9d:8e: + 59:d3:70:4d:4e:47:0a:f7:ef:6c:33:54:db:61:ee: + 31:cb:8d:43:59:ec:a1:3d:a4:c6:06:6e:05:b2:14: + d6:ad Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - A4:9D:E4:F8:B0:AF:D5:A4:2F:B9:3F:42:B8:C3:D5:60:9D:64:C2:8C + 7A:3D:6D:AF:22:3F:64:CA:5C:C8:B3:3D:D5:E5:3B:32:A0:02:CF:29 X509v3 Authority Key Identifier: - keyid:A4:9D:E4:F8:B0:AF:D5:A4:2F:B9:3F:42:B8:C3:D5:60:9D:64:C2:8C + keyid:7A:3D:6D:AF:22:3F:64:CA:5C:C8:B3:3D:D5:E5:3B:32:A0:02:CF:29 Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -324,41 +324,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 39:75:b8:af:a2:4e:d6:2f:15:08:4e:6d:06:1f:e7:65:29:96: - c2:77:96:ed:1b:b2:48:e3:f9:cf:fd:8c:40:d1:67:37:1a:7c: - e8:40:f0:ca:ee:72:9e:ef:6d:eb:e7:e9:5c:c4:61:e5:65:0e: - 25:62:8e:ca:b1:5d:08:d2:21:6d:cb:0f:d6:f3:41:4a:66:56: - 5b:06:3a:a7:6e:df:ad:6c:4d:18:01:95:b4:c9:7e:f4:80:e7: - 75:17:e0:41:25:7e:03:1b:5b:bd:a0:2d:1c:f8:f5:18:e6:0b: - 4c:69:7e:aa:54:78:f3:b4:84:b8:eb:8c:37:e9:60:dd:df:b8: - f8:43:57:37:99:db:b1:ed:99:2e:1f:f2:af:94:33:97:86:83: - 58:6d:e6:37:56:36:f8:68:e6:32:70:3f:5b:9b:13:75:a5:fc: - c0:5a:e5:61:61:37:d2:b6:d8:d5:5c:55:21:d5:8e:3a:ed:bf: - 83:81:76:e7:71:2b:3f:5b:0f:77:43:20:3a:d2:f6:ef:53:c8: - 29:19:2c:0a:4d:a6:2e:fb:9b:3b:10:73:e1:dc:ac:0e:8d:e4: - bd:36:da:e9:1e:0a:e6:57:b4:1d:ea:d8:cd:a0:dd:e3:88:8d: - a5:b4:43:7f:fd:b1:3c:29:e5:6a:b4:c9:4e:e6:77:83:ae:c6: - f7:04:47:a2 + 20:3e:c4:b6:78:84:bd:36:33:6b:38:8e:f2:1f:1a:46:a7:d9: + 02:86:39:d2:3f:14:bd:a9:82:21:b0:9d:da:a9:4f:0a:e8:65: + 0b:7f:b7:cd:d9:3c:de:7f:08:d6:d9:60:ba:b2:be:4d:8a:77: + e4:4d:fe:8c:5d:27:e6:8a:0c:6c:e1:3c:7b:e2:d2:4c:ac:34: + fe:1e:b1:28:e6:b7:49:a8:09:bf:67:80:0f:8f:02:49:d4:52: + 6e:bf:d1:a7:b8:b4:22:90:f8:83:d5:85:7f:46:99:2d:df:cb: + 56:31:0c:0e:92:9b:eb:28:6e:c2:7c:ba:37:5d:3f:f0:f8:b5: + e2:0a:02:ea:78:c3:5c:8d:24:92:95:52:bf:68:3e:2b:fc:17: + bc:bb:3c:7c:38:f8:6e:5f:d3:1d:9e:4c:c5:3a:47:93:4d:a6: + c2:00:f2:2a:7a:a1:f0:76:48:5a:ef:77:1c:47:10:40:d8:d5: + 84:45:13:f6:5e:7c:d2:0e:bd:e3:e3:b1:3d:d5:93:e1:c4:95: + a1:ba:84:0d:a0:1c:b0:cd:b6:b4:a2:52:2e:37:c2:f3:30:3e: + 91:0b:24:9d:3d:77:02:ce:83:b0:73:21:ba:3f:f6:b9:c7:5d: + 08:5c:f0:33:8d:de:1e:56:e8:82:2f:5d:e6:8c:0c:ac:77:c7: + bf:91:2a:25 -----BEGIN TRUSTED_CERTIFICATE----- MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ4fmuyqUFYCR3bI/7mR -wFiNCLmH2ayefG4ut2Bo1qscPfPiqOYFWP9SJ3z5fpYtGXE1hOuNPNsn918v0Vav -c6gmhPW7f3p8QIFm6eXBU+us1WVHPaEKZ8bIO8svqR6c1TBre1DLrUZrM0SRFJQg -reJ5G2K7HX6nKkUDS9RkGxWCxtzLSITFdyIqIG3YvSWNVRGVRnOX+lNmLuwac2YJ -9+/k+N/qzpDI+DhnuzzCSOdpAZhrwT6PFwUPwNDrSfHHq8YHSYWnV6wRQuXev6Fl -S+a66ERkLYTYpEq6YlZ2Sb9nGZHhKen7qt7v31gBCGUUjnG1O0P7bGWa1m5CZSQt -9JkCAwEAAaOByzCByDAdBgNVHQ4EFgQUpJ3k+LCv1aQvuT9CuMPVYJ1kwowwHwYD -VR0jBBgwFoAUpJ3k+LCv1aQvuT9CuMPVYJ1kwowwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM2HnfRm+Hdc41ZtyxLc +qTZ51RsRn5IgjebXfUGOkJAqqGM9WSWmeoZzfxDan8GlaU2jZ2G4+Jub7Eo68XPx +g8SrNB8L7QXzbcXuZBg0aV8JH0jl0i0STBejfnSfkwTqABXjuQ3vxe0ZlysSBX9c +Mi3FMEZ8pwInKbKZ4UOV9mcc7q2bjvv4VxpHE1oaLyfo1QMq5fmSUx0DX9YvGGXO +Om6rv7bFcuHJoNY8oo5PPo8GUhmoGvAGVdL5viMnCt4zJuygQdNrViVwCawoRYIz +y9uFWVBhnBLgBMzFgTx3152OWdNwTU5HCvfvbDNU22HuMcuNQ1nsoT2kxgZuBbIU +1q0CAwEAAaOByzCByDAdBgNVHQ4EFgQUej1tryI/ZMpcyLM91eU7MqACzykwHwYD +VR0jBBgwFoAUej1tryI/ZMpcyLM91eU7MqACzykwNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA5dbivok7W -LxUITm0GH+dlKZbCd5btG7JI4/nP/YxA0Wc3GnzoQPDK7nKe723r5+lcxGHlZQ4l -Yo7KsV0I0iFtyw/W80FKZlZbBjqnbt+tbE0YAZW0yX70gOd1F+BBJX4DG1u9oC0c -+PUY5gtMaX6qVHjztIS464w36WDd37j4Q1c3mdux7ZkuH/KvlDOXhoNYbeY3Vjb4 -aOYycD9bmxN1pfzAWuVhYTfSttjVXFUh1Y467b+DgXbncSs/Ww93QyA60vbvU8gp -GSwKTaYu+5s7EHPh3KwOjeS9NtrpHgrmV7Qd6tjNoN3jiI2ltEN//bE8KeVqtMlO -5neDrsb3BEei +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAgPsS2eIS9 +NjNrOI7yHxpGp9kChjnSPxS9qYIhsJ3aqU8K6GULf7fN2TzefwjW2WC6sr5Ninfk +Tf6MXSfmigxs4Tx74tJMrDT+HrEo5rdJqAm/Z4APjwJJ1FJuv9GnuLQikPiD1YV/ +Rpkt38tWMQwOkpvrKG7CfLo3XT/w+LXiCgLqeMNcjSSSlVK/aD4r/Be8uzx8OPhu +X9MdnkzFOkeTTabCAPIqeqHwdkha73ccRxBA2NWERRP2XnzSDr3j47E91ZPhxJWh +uoQNoBywzba0olIuN8LzMD6RCySdPXcCzoOwcyG6P/a5x10IXPAzjd4eVuiCL13m +jAysd8e/kSol -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/data/verify_certificate_chain_unittest/violates-pathlen-1-root.pem b/net/data/verify_certificate_chain_unittest/violates-pathlen-1-root.pem index c639e56..62ef9582 100644 --- a/net/data/verify_certificate_chain_unittest/violates-pathlen-1-root.pem +++ b/net/data/verify_certificate_chain_unittest/violates-pathlen-1-root.pem
@@ -1,6 +1,6 @@ [Created by: generate-violates-pathlen-1-root.py] -Certificate chain with 2 intermediaries and one end entity certificate. The +Certificate chain with 2 intermediates and one end entity certificate. The root certificate has a pathlen:1 restriction so this is an invalid chain. Certificate: @@ -8,7 +8,7 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary2 + Issuer: CN=Intermediate2 Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT @@ -17,80 +17,80 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:bf:b8:e9:8b:9f:2a:8d:58:f0:93:6a:7a:d2:d4: - 29:ec:ce:35:c9:5e:c0:f7:27:2a:78:a3:76:53:25: - 54:09:43:e0:30:df:a1:f3:e2:a2:45:21:d7:b0:e6: - ff:d0:cc:81:eb:2b:78:9a:b6:85:97:87:d5:b2:9f: - 3b:f2:d7:55:3d:fe:0f:ba:20:39:a6:0d:c8:7c:ea: - 23:8a:63:38:8e:70:44:ff:d2:18:66:3e:ad:10:68: - ee:ec:21:f7:18:e4:7f:37:09:c6:e6:a8:d1:a2:4c: - 1f:e5:7a:69:04:13:df:09:5e:13:61:7c:15:09:9c: - 55:af:27:66:87:0e:bd:fc:2a:9d:7f:1c:73:b5:84: - c2:d6:2b:d9:5d:f6:19:52:58:bb:8c:8c:5f:a7:9c: - de:d7:8d:5f:ef:8f:f3:24:e1:0d:10:59:58:c6:72: - 8c:d7:fc:fe:bc:22:a7:58:4d:83:f2:48:4b:cd:55: - 36:45:28:e4:cf:93:75:78:0f:5e:35:c0:b7:52:e5: - e2:91:42:04:bb:9c:0c:cf:eb:89:66:5f:90:46:b2: - 76:b0:82:c4:af:34:fd:a6:fd:93:7f:54:ce:4f:be: - a4:32:8e:9c:3f:40:c9:6c:db:be:85:0c:e6:df:2b: - 7c:9b:ef:8b:7a:4b:15:dc:09:10:3b:b1:b7:e7:c7: - c1:21 + 00:cb:62:aa:87:80:66:83:c5:88:0f:18:6f:ba:e4: + 3d:6e:3a:0e:02:40:9a:90:1c:2c:ef:63:5c:28:3a: + 27:79:e7:53:c0:d8:0e:e9:95:ec:ee:19:45:6a:39: + 1f:09:80:db:eb:0c:fc:ec:ff:e1:3d:42:8a:ab:ba: + 6e:43:bf:bc:50:6b:15:da:0d:af:84:f1:7e:8d:b1: + c6:b6:ee:50:2a:73:3f:38:de:46:49:c1:eb:52:4a: + 03:54:0b:67:d7:3b:1d:3d:ae:b5:0d:e1:2b:b5:a1: + 9d:ea:56:aa:13:8b:80:2d:fb:ea:7f:83:15:d5:df: + 09:a7:d5:ab:a8:5f:50:02:e1:82:7d:73:c3:6a:c6: + d9:bc:47:21:cd:d7:00:a2:06:7c:a7:2f:3e:e6:dd: + 35:b0:fe:35:8d:7f:1e:68:ff:15:ee:d0:3f:69:05: + b5:2f:bb:27:bc:3a:9d:29:31:3d:af:29:a6:d6:a7: + 45:0b:b9:f0:4f:a6:b3:13:f7:97:f5:6a:0f:1e:d1: + d8:9c:05:78:2e:b5:b9:de:ab:f4:26:90:93:49:f3: + b1:18:fe:3e:03:74:39:92:dd:7e:17:6d:31:c8:e7: + 3f:a0:d7:13:dc:fe:76:ec:1a:c1:7f:4e:ad:0f:cc: + b3:d4:27:9b:2f:a5:e9:d9:81:ad:f6:ab:da:7f:d4: + 71:69 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 11:74:6B:48:F5:42:3C:04:F3:A2:04:42:E5:F2:BC:1C:AD:AB:CB:E2 + CA:5D:98:89:E9:73:51:6B:E4:E7:3E:9B:EF:A8:A0:0A:BC:48:07:92 X509v3 Authority Key Identifier: - keyid:9A:80:A6:AF:E0:4A:48:D1:70:0A:10:7A:0D:74:57:B8:CE:48:5B:7D + keyid:FD:E5:DE:B3:E1:33:73:97:CA:6B:94:1B:A6:4C:98:A0:8A:75:8F:F7 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary2.cer + CA Issuers - URI:http://url-for-aia/Intermediate2.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary2.crl + URI:http://url-for-crl/Intermediate2.crl X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication Signature Algorithm: sha256WithRSAEncryption - 6e:0e:da:63:ae:72:b5:ee:9b:ee:f6:34:18:30:e5:4c:9b:b7: - a8:21:ef:fe:fe:55:c9:27:4d:13:ab:32:be:89:76:93:b8:2a: - be:c2:3f:6d:f6:23:6d:ed:b2:4f:77:7e:b7:7c:f4:5a:a3:de: - 80:09:f6:c0:3b:87:34:2d:97:5c:1a:a0:0d:e4:9f:28:93:d4: - d6:38:ca:ea:c8:4e:ec:71:07:b8:c7:cb:c0:59:77:e5:99:80: - 34:7b:9f:77:8f:63:b0:d0:3d:ce:a9:c4:aa:ba:49:02:5e:31: - 84:a3:7f:8e:51:5c:06:a4:44:49:04:c4:27:7e:04:f7:13:18: - 61:67:d1:4d:23:b0:16:f2:47:79:bd:e5:40:52:77:06:73:8b: - 4b:c6:c4:5c:09:46:29:a3:36:b5:3c:75:6d:94:71:13:db:ff: - e8:62:e4:76:59:06:88:9d:c5:5b:d7:af:ae:16:72:80:60:6a: - 23:01:4d:fa:90:33:ad:01:38:47:d6:5d:91:28:9f:78:6f:ba: - da:62:5b:17:fa:9f:5a:6e:28:5f:59:96:de:64:a8:3b:b7:de: - fe:f7:b5:3c:79:e9:fe:15:b2:73:0f:65:5f:83:2e:6b:85:55: - 04:42:da:87:48:6b:7d:1c:a2:b0:e2:60:7f:c9:22:70:d1:a4: - 51:94:40:3c + 6c:a3:b3:78:4e:dc:a2:d9:f4:d4:37:13:e2:1d:63:41:8c:db: + 37:8a:b5:9c:6f:03:20:b8:56:3f:45:c9:53:e2:d7:07:12:e3: + 4f:70:21:11:af:68:91:67:2c:12:b0:c3:8a:c6:52:24:55:ab: + 4c:37:f3:cc:9c:4f:51:d6:0e:a4:be:c0:a6:4e:7a:8b:a3:db: + ae:3e:d8:36:71:19:f4:34:1e:d8:52:4f:75:fb:47:0e:df:fe: + 67:93:04:5b:88:84:7c:a4:21:aa:2c:3e:84:94:fa:96:5a:93: + 90:32:4f:5a:64:aa:e5:be:b1:38:24:20:a3:8e:f0:5c:96:d0: + da:b3:12:82:00:fb:88:24:51:c5:65:6c:90:64:7f:80:38:32: + 74:bf:6f:a5:5e:88:96:ff:6f:5d:22:44:bc:85:27:b5:06:8e: + db:7b:ab:b1:e0:96:f2:1c:f7:21:36:97:c7:0f:7d:99:b9:ca: + 22:74:5b:b2:70:c7:8a:4e:ae:b8:03:14:f0:ea:ad:4a:4b:97: + d4:b1:33:91:c6:1b:4d:2a:85:03:c9:f2:60:22:47:d8:74:bd: + 97:83:ec:d4:cd:20:48:f6:b2:5e:5a:a8:ed:99:cf:58:d4:02: + 2a:23:3e:9b:b3:21:c1:82:b6:4e:31:01:73:e0:a5:06:e0:b5: + 4d:18:35:9e -----BEGIN CERTIFICATE----- MIIDkDCCAnigAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1JbnRl -cm1lZGlhcnkyMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0G -A1UEAwwGVGFyZ2V0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv7jp -i58qjVjwk2p60tQp7M41yV7A9ycqeKN2UyVUCUPgMN+h8+KiRSHXsOb/0MyB6yt4 -mraFl4fVsp878tdVPf4PuiA5pg3IfOojimM4jnBE/9IYZj6tEGju7CH3GOR/NwnG -5qjRokwf5XppBBPfCV4TYXwVCZxVrydmhw69/CqdfxxztYTC1ivZXfYZUli7jIxf -p5ze141f74/zJOENEFlYxnKM1/z+vCKnWE2D8khLzVU2RSjkz5N1eA9eNcC3UuXi -kUIEu5wMz+uJZl+QRrJ2sILErzT9pv2Tf1TOT76kMo6cP0DJbNu+hQzm3yt8m++L -eksV3AkQO7G358fBIQIDAQABo4HrMIHoMB0GA1UdDgQWBBQRdGtI9UI8BPOiBELl -8rwcravL4jAfBgNVHSMEGDAWgBSagKav4EpI0XAKEHoNdFe4zkhbfTBABggrBgEF +cm1lZGlhdGUyMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowETEPMA0G +A1UEAwwGVGFyZ2V0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy2Kq +h4Bmg8WIDxhvuuQ9bjoOAkCakBws72NcKDoneedTwNgO6ZXs7hlFajkfCYDb6wz8 +7P/hPUKKq7puQ7+8UGsV2g2vhPF+jbHGtu5QKnM/ON5GScHrUkoDVAtn1zsdPa61 +DeErtaGd6laqE4uALfvqf4MV1d8Jp9WrqF9QAuGCfXPDasbZvEchzdcAogZ8py8+ +5t01sP41jX8eaP8V7tA/aQW1L7snvDqdKTE9rymm1qdFC7nwT6azE/eX9WoPHtHY +nAV4LrW53qv0JpCTSfOxGP4+A3Q5kt1+F20xyOc/oNcT3P527BrBf06tD8yz1Ceb +L6Xp2YGt9qvaf9RxaQIDAQABo4HrMIHoMB0GA1UdDgQWBBTKXZiJ6XNRa+TnPpvv +qKAKvEgHkjAfBgNVHSMEGDAWgBT95d6z4TNzl8prlBumTJiginWP9zBABggrBgEF BQcBAQQ0MDIwMAYIKwYBBQUHMAKGJGh0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1l -ZGlhcnkyLmNlcjA1BgNVHR8ELjAsMCqgKKAmhiRodHRwOi8vdXJsLWZvci1jcmwv -SW50ZXJtZWRpYXJ5Mi5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG -AQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAbg7aY65yte6b7vY0 -GDDlTJu3qCHv/v5VySdNE6syvol2k7gqvsI/bfYjbe2yT3d+t3z0WqPegAn2wDuH -NC2XXBqgDeSfKJPU1jjK6shO7HEHuMfLwFl35ZmANHufd49jsNA9zqnEqrpJAl4x -hKN/jlFcBqRESQTEJ34E9xMYYWfRTSOwFvJHeb3lQFJ3BnOLS8bEXAlGKaM2tTx1 -bZRxE9v/6GLkdlkGiJ3FW9evrhZygGBqIwFN+pAzrQE4R9ZdkSifeG+62mJbF/qf -Wm4oX1mW3mSoO7fe/ve1PHnp/hWycw9lX4Mua4VVBELah0hrfRyisOJgf8kicNGk -UZRAPA== +ZGlhdGUyLmNlcjA1BgNVHR8ELjAsMCqgKKAmhiRodHRwOi8vdXJsLWZvci1jcmwv +SW50ZXJtZWRpYXRlMi5jcmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG +AQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAbKOzeE7cotn01DcT +4h1jQYzbN4q1nG8DILhWP0XJU+LXBxLjT3AhEa9okWcsErDDisZSJFWrTDfzzJxP +UdYOpL7Apk56i6Pbrj7YNnEZ9DQe2FJPdftHDt/+Z5MEW4iEfKQhqiw+hJT6llqT +kDJPWmSq5b6xOCQgo47wXJbQ2rMSggD7iCRRxWVskGR/gDgydL9vpV6Ilv9vXSJE +vIUntQaO23urseCW8hz3ITaXxw99mbnKInRbsnDHik6uuAMU8OqtSkuX1LEzkcYb +TSqFA8nyYCJH2HS9l4Ps1M0gSPayXlqo7ZnPWNQCKiM+m7MhwYK2TjEBc+ClBuC1 +TRg1ng== -----END CERTIFICATE----- Certificate: @@ -98,88 +98,88 @@ Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption - Issuer: CN=Intermediary1 + Issuer: CN=Intermediate1 Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary2 + Subject: CN=Intermediate2 Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:9b:e8:f6:41:79:62:c9:06:fd:13:2c:f5:cc:07: - a9:dd:5c:1e:90:76:a5:71:fa:f3:5c:34:1f:c9:3a: - 33:77:05:a0:27:7b:6a:eb:8b:d8:de:25:65:6f:b6: - d6:e1:82:34:0a:7b:13:d3:85:37:7d:d9:70:04:43: - b3:e3:46:8b:60:e1:99:ba:28:5b:ef:c2:7e:b3:c4: - 20:6f:94:f2:47:79:66:ce:0f:5d:79:58:aa:f7:62: - 80:38:14:4a:17:34:59:86:39:1d:ed:38:b8:14:f4: - 10:0c:1f:2c:8e:49:e5:5d:fd:d2:0f:37:5c:b8:e5: - a9:86:07:0e:5e:27:ee:05:a0:ad:b5:b6:86:43:30: - 8b:0d:35:b5:86:cd:98:98:e8:d6:04:53:4e:2b:81: - be:d2:96:6f:cf:2f:72:2d:f5:6c:c8:ba:f5:42:7a: - f1:67:33:03:bb:cf:6d:67:03:f3:1a:3c:39:d9:cf: - 8f:ad:03:ca:2c:dc:e3:33:92:24:18:46:86:8e:dc: - 27:b8:76:57:3a:7d:a2:89:96:18:07:96:04:d9:75: - 8c:e6:1b:cf:1f:e9:6c:5d:8d:77:2f:4d:9d:00:bb: - 16:e9:c5:da:7d:5f:45:e8:3d:17:d8:72:a6:bf:68: - 1f:0a:a5:88:c1:74:45:53:b9:0c:d5:05:a5:ba:ed: - 55:73 + 00:cf:d2:9b:08:f9:4a:42:eb:7d:64:c4:af:15:8e: + 1a:df:56:db:70:cd:5f:55:81:80:8b:cc:6e:2e:8a: + ed:cc:3e:cf:73:08:a8:6a:f6:d5:ab:71:ac:8e:dc: + 3f:ab:85:9a:c6:2e:d5:83:98:24:71:1d:81:c5:28: + 05:4a:ed:25:b7:d1:a0:1a:1c:d4:36:65:aa:33:5c: + a1:71:de:de:4e:ff:78:ef:54:1e:2e:6f:55:d2:58: + fc:c4:ef:b7:1d:88:5a:b7:01:25:43:84:9a:f8:20: + af:70:11:76:ec:c9:57:8b:1c:19:eb:fa:25:a4:f6: + 96:cf:b9:4e:6d:ec:a5:f6:92:01:09:ee:ec:b9:84: + 51:58:1c:a8:67:6d:46:9b:87:09:5d:3e:35:d3:d7: + cd:2f:67:96:07:c7:4c:93:df:f9:7b:48:84:3b:4f: + 6b:0d:57:15:69:8b:eb:9c:00:df:6d:59:26:7b:34: + 4c:da:6b:62:5b:16:5b:b5:df:2e:b0:97:90:54:98: + 84:83:07:f0:78:c0:6c:21:8f:5e:96:d1:8c:e7:0b: + ad:c9:be:38:c4:a9:d5:dd:96:6e:fa:3d:e9:de:04: + e0:eb:7a:8f:e7:54:9c:e8:bd:cd:df:42:91:19:2c: + 73:b0:ef:f4:f6:49:fc:ae:9a:88:50:ac:72:a1:84: + 03:75 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 9A:80:A6:AF:E0:4A:48:D1:70:0A:10:7A:0D:74:57:B8:CE:48:5B:7D + FD:E5:DE:B3:E1:33:73:97:CA:6B:94:1B:A6:4C:98:A0:8A:75:8F:F7 X509v3 Authority Key Identifier: - keyid:1D:4A:1C:48:70:30:B6:65:73:56:A7:6E:A0:48:35:81:6E:3B:95:8A + keyid:6A:CF:A7:31:B7:5A:1E:F0:D3:D0:55:74:2A:18:ED:26:B6:46:99:A2 Authority Information Access: - CA Issuers - URI:http://url-for-aia/Intermediary1.cer + CA Issuers - URI:http://url-for-aia/Intermediate1.cer X509v3 CRL Distribution Points: Full Name: - URI:http://url-for-crl/Intermediary1.crl + URI:http://url-for-crl/Intermediate1.crl X509v3 Key Usage: critical Certificate Sign, CRL Sign X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 47:1c:62:1b:7e:69:aa:b6:d8:6c:50:44:09:e8:15:b5:fe:ee: - 86:5c:69:6d:4c:7a:90:1f:2e:4f:e8:21:a3:44:38:d6:07:0b: - 43:cf:dd:13:64:64:42:a9:ae:62:f6:1b:ea:03:2e:3b:4f:ed: - 8a:45:8e:ec:09:d8:1a:67:eb:ef:c6:77:fc:cf:03:9f:b4:4a: - 59:76:4e:2b:b0:d3:41:5a:a0:8c:bb:1c:61:67:52:7d:48:2e: - 3f:c2:7d:a6:60:95:25:75:47:9c:1a:c3:1e:25:cd:e9:7d:2b: - 71:26:fc:97:f1:2e:c6:2f:d4:2a:bb:27:d4:76:7e:c9:bc:05: - 92:24:86:56:46:27:e0:14:af:d7:c6:72:d2:dc:be:93:2f:b3: - 44:d3:e1:4a:08:75:47:50:16:e6:50:36:61:e3:6f:b7:a6:40: - 1c:61:14:ae:66:20:93:0b:fb:6d:b1:a9:4d:d5:ec:8d:2b:d6: - 84:36:c4:61:70:e5:99:4f:7e:af:97:d2:42:91:11:a7:1f:0e: - 32:fc:09:37:44:a2:c9:bb:35:82:73:85:e5:90:b4:80:a7:4b: - 40:ce:cb:62:ca:e1:2b:36:f6:e7:bc:3a:67:71:6d:ab:4b:87: - cf:72:70:ad:ef:7a:85:ab:72:5d:c7:c1:ac:5e:b5:81:dc:ff: - 96:6f:08:02 + cb:42:61:28:aa:f4:9b:98:aa:7e:16:fc:c4:8e:58:6c:c4:3d: + 2e:47:9e:bf:ea:f6:61:db:95:30:77:23:c2:ea:21:67:d0:9c: + a5:4d:48:7b:ba:19:f9:9d:e2:f8:28:b0:f9:90:aa:f5:1e:53: + 02:e1:0c:b2:83:89:fe:63:ef:4e:3b:21:51:3d:cd:19:82:43: + c9:a1:fe:2b:ff:e7:ff:a5:19:ad:17:42:22:b8:15:01:80:17: + 1b:83:68:58:33:22:71:e5:03:20:f3:f2:11:b8:9b:93:be:11: + d0:6c:96:53:97:9e:d8:0e:f8:20:91:7d:61:a0:82:98:a2:67: + 06:3a:61:ee:d7:46:f1:02:77:75:28:50:cf:62:15:17:c9:9d: + 5b:ea:e4:1f:00:59:52:ad:66:07:46:34:df:13:3b:32:63:6a: + b5:a4:36:71:bd:e5:fa:85:40:98:3e:0b:1d:65:e6:b6:a0:c5: + b4:1b:3f:06:d4:8e:cf:4b:97:5b:7c:f2:f4:57:ba:89:a9:a9: + d4:b2:b3:7f:70:71:85:ca:8e:dd:3f:3b:5e:64:a7:a2:84:91: + 45:9e:14:4a:7e:02:1c:b0:45:4f:ee:90:8e:1a:d6:27:09:19: + 5d:f1:6c:8a:4b:2d:85:05:0a:83:af:1c:1a:0c:0e:b7:33:d2: + b7:c6:0a:f3 -----BEGIN CERTIFICATE----- MIIDiTCCAnGgAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1JbnRl -cm1lZGlhcnkxMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowGDEWMBQG -A1UEAwwNSW50ZXJtZWRpYXJ5MjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAJvo9kF5YskG/RMs9cwHqd1cHpB2pXH681w0H8k6M3cFoCd7auuL2N4lZW+2 -1uGCNAp7E9OFN33ZcARDs+NGi2DhmbooW+/CfrPEIG+U8kd5Zs4PXXlYqvdigDgU -Shc0WYY5He04uBT0EAwfLI5J5V390g83XLjlqYYHDl4n7gWgrbW2hkMwiw01tYbN -mJjo1gRTTiuBvtKWb88vci31bMi69UJ68WczA7vPbWcD8xo8OdnPj60Dyizc4zOS -JBhGho7cJ7h2Vzp9oomWGAeWBNl1jOYbzx/pbF2Ndy9NnQC7FunF2n1fReg9F9hy -pr9oHwqliMF0RVO5DNUFpbrtVXMCAwEAAaOB3TCB2jAdBgNVHQ4EFgQUmoCmr+BK -SNFwChB6DXRXuM5IW30wHwYDVR0jBBgwFoAUHUocSHAwtmVzVqduoEg1gW47lYow +cm1lZGlhdGUxMB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowGDEWMBQG +A1UEAwwNSW50ZXJtZWRpYXRlMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAM/Smwj5SkLrfWTErxWOGt9W23DNX1WBgIvMbi6K7cw+z3MIqGr21atxrI7c +P6uFmsYu1YOYJHEdgcUoBUrtJbfRoBoc1DZlqjNcoXHe3k7/eO9UHi5vVdJY/MTv +tx2IWrcBJUOEmvggr3ARduzJV4scGev6JaT2ls+5Tm3spfaSAQnu7LmEUVgcqGdt +RpuHCV0+NdPXzS9nlgfHTJPf+XtIhDtPaw1XFWmL65wA321ZJns0TNprYlsWW7Xf +LrCXkFSYhIMH8HjAbCGPXpbRjOcLrcm+OMSp1d2Wbvo96d4E4Ot6j+dUnOi9zd9C +kRksc7Dv9PZJ/K6aiFCscqGEA3UCAwEAAaOB3TCB2jAdBgNVHQ4EFgQU/eXes+Ez +c5fKa5QbpkyYoIp1j/cwHwYDVR0jBBgwFoAUas+nMbdaHvDT0FV0KhjtJrZGmaIw QAYIKwYBBQUHAQEENDAyMDAGCCsGAQUFBzAChiRodHRwOi8vdXJsLWZvci1haWEv -SW50ZXJtZWRpYXJ5MS5jZXIwNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL3VybC1m -b3ItY3JsL0ludGVybWVkaWFyeTEuY3JsMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB -Af8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBHHGIbfmmqtthsUEQJ6BW1/u6G -XGltTHqQHy5P6CGjRDjWBwtDz90TZGRCqa5i9hvqAy47T+2KRY7sCdgaZ+vvxnf8 -zwOftEpZdk4rsNNBWqCMuxxhZ1J9SC4/wn2mYJUldUecGsMeJc3pfStxJvyX8S7G -L9QquyfUdn7JvAWSJIZWRifgFK/XxnLS3L6TL7NE0+FKCHVHUBbmUDZh42+3pkAc -YRSuZiCTC/ttsalN1eyNK9aENsRhcOWZT36vl9JCkRGnHw4y/Ak3RKLJuzWCc4Xl -kLSAp0tAzstiyuErNvbnvDpncW2rS4fPcnCt73qFq3Jdx8GsXrWB3P+WbwgC +SW50ZXJtZWRpYXRlMS5jZXIwNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL3VybC1m +b3ItY3JsL0ludGVybWVkaWF0ZTEuY3JsMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB +Af8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQDLQmEoqvSbmKp+FvzEjlhsxD0u +R56/6vZh25UwdyPC6iFn0JylTUh7uhn5neL4KLD5kKr1HlMC4Qyyg4n+Y+9OOyFR +Pc0ZgkPJof4r/+f/pRmtF0IiuBUBgBcbg2hYMyJx5QMg8/IRuJuTvhHQbJZTl57Y +DvggkX1hoIKYomcGOmHu10bxAnd1KFDPYhUXyZ1b6uQfAFlSrWYHRjTfEzsyY2q1 +pDZxveX6hUCYPgsdZea2oMW0Gz8G1I7PS5dbfPL0V7qJqanUsrN/cHGFyo7dPzte +ZKeihJFFnhRKfgIcsEVP7pCOGtYnCRld8WyKSy2FBQqDrxwaDA63M9K3xgrz -----END CERTIFICATE----- Certificate: @@ -191,35 +191,35 @@ Validity Not Before: Jan 1 12:00:00 2015 GMT Not After : Jan 1 12:00:00 2016 GMT - Subject: CN=Intermediary1 + Subject: CN=Intermediate1 Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:b9:d1:e1:e9:55:23:09:13:95:52:d6:31:f6:16: - 49:28:4d:e9:02:bd:42:73:3b:f6:9a:d4:05:86:6e: - fd:c4:26:b1:59:d5:e1:be:64:f0:84:39:f0:d9:cf: - 0a:62:98:68:c6:7b:a1:6c:73:4c:79:5e:92:88:ba: - db:e2:16:f9:0a:5b:46:f7:ef:6b:77:4b:98:d9:40: - ca:1b:2d:7b:fa:9a:92:11:fe:85:6c:ef:2e:39:6f: - 2f:16:32:cc:45:c7:a7:bd:62:2a:d7:49:9d:c1:cc: - 0d:a8:b1:91:e0:f7:b8:e5:77:f4:0a:ef:01:de:e1: - 65:4c:e0:e6:29:3f:2d:3f:aa:0d:a4:38:69:90:5d: - 83:b4:e9:b0:04:c4:f4:a4:b9:5f:c0:a8:88:68:13: - 86:a1:9b:fe:24:d3:ef:cc:34:be:3d:bb:70:58:64: - 74:54:7d:c8:6a:a3:d3:37:9e:91:5c:fe:16:15:5f: - 00:45:2f:f9:81:3a:7f:ef:bb:03:60:b8:08:ce:9f: - 88:20:62:ba:4d:8a:18:8a:57:1d:ea:12:1e:62:d7: - eb:01:80:e6:a9:72:d2:2f:84:aa:16:20:e8:f8:47: - e1:4e:43:46:16:20:51:cd:20:39:a3:47:70:0f:9f: - 4e:e6:7b:fa:5d:c2:9e:67:ce:22:e1:e8:1c:89:bd: - a0:49 + 00:db:38:a4:dd:a1:12:62:44:8f:17:f5:d0:26:2d: + 52:d6:74:74:29:d1:7c:9d:97:a2:a2:18:10:ff:08: + 38:d8:b1:9b:ff:ff:91:f1:e0:36:31:37:e1:e7:32: + ca:40:12:7a:6a:4f:fa:44:91:40:1f:51:14:85:32: + 9f:16:e1:2d:35:65:5f:3b:a8:6d:a4:e9:eb:51:d0: + 1f:f7:9c:1e:22:82:48:2d:72:82:a3:59:82:f1:02: + 0f:73:ce:1e:92:0d:1c:23:31:a7:4a:80:f1:65:13: + a5:57:2b:ab:16:f4:87:ca:45:79:8e:46:68:4b:97: + 00:b2:98:61:c7:0d:21:47:58:dc:ff:85:4e:46:9e: + 7c:2a:90:a0:8c:22:a2:91:06:51:61:e1:75:7d:66: + a4:4f:7e:12:4b:8b:f1:aa:a5:aa:fb:73:d8:ca:a2: + 2b:c3:ba:3c:b4:03:4c:c8:9a:b6:8e:6d:9d:3f:45: + 2b:35:3c:f7:86:f6:83:1a:b8:0e:41:a8:7f:62:2d: + d7:95:f8:39:f8:7c:bf:e9:2d:3a:1d:7b:16:b4:55: + 46:d4:5c:bb:d1:19:24:97:c3:14:97:94:d4:43:b4: + 94:07:be:12:72:ba:de:60:7a:75:3b:da:df:81:cc: + 55:18:07:85:44:9c:95:da:30:e7:a1:01:e9:2a:85: + 64:07 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 1D:4A:1C:48:70:30:B6:65:73:56:A7:6E:A0:48:35:81:6E:3B:95:8A + 6A:CF:A7:31:B7:5A:1E:F0:D3:D0:55:74:2A:18:ED:26:B6:46:99:A2 X509v3 Authority Key Identifier: - keyid:88:1C:D6:E6:0D:8F:83:DE:9D:9C:2E:3E:1E:E5:61:82:EA:2D:11:F6 + keyid:46:4A:98:70:E1:6E:F7:E1:51:0F:EE:4D:43:FA:ED:D8:F3:23:58:BF Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -234,41 +234,41 @@ X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 7c:45:39:85:85:2e:2a:47:1a:05:7c:45:0b:9d:1c:94:58:c9: - a6:ab:95:85:fb:64:da:a3:cf:96:98:80:8c:c4:fe:5d:10:db: - 94:df:6c:eb:15:45:d3:e8:d1:80:39:0e:b9:28:4a:b8:0c:aa: - 87:cc:4b:b2:14:4d:fe:2c:a6:36:5e:40:5c:10:49:e2:90:1d: - 46:ad:d1:b5:25:85:35:3d:99:da:0b:da:ad:f0:9d:94:50:6e: - b8:4c:1c:86:d6:68:cc:d9:7f:7e:b8:8d:0c:43:0c:e9:6a:05: - 00:0e:7d:00:88:62:70:4f:f9:a1:68:48:9f:c4:c7:cd:78:63: - c6:6c:ec:84:c3:09:65:64:14:27:f4:f9:df:a1:f4:bc:c1:43: - 88:88:ba:98:ba:14:66:8a:47:42:49:dc:9a:35:84:e0:8b:17: - 9e:5b:bd:8f:4f:b3:01:2e:61:3e:12:45:ab:63:38:77:b1:f2: - 21:57:04:49:53:e4:23:4b:58:81:23:42:9a:a5:fe:1c:08:7b: - d6:bf:7e:ec:9d:b1:15:b7:27:2a:f2:96:81:05:52:ad:97:92: - 71:20:34:33:99:77:a3:e9:92:e1:68:73:ea:31:eb:54:cb:f9: - 97:61:03:56:de:4c:35:c5:cd:d4:75:a7:e4:f2:5c:66:f5:5d: - 34:ab:8f:f8 + 97:fe:af:92:37:5a:ea:1f:72:3a:0a:87:37:b2:e1:67:bf:37: + 66:1c:34:85:aa:86:38:36:c2:5e:cf:bb:de:4c:05:06:d8:61: + 96:4e:e7:3a:28:65:fb:1d:ee:c2:ff:e4:93:17:3d:6c:fa:1b: + 04:d0:06:6d:fb:41:3c:81:ff:e5:39:14:d1:37:b1:ad:fa:2f: + c8:fa:ce:7f:7a:85:b1:11:22:7d:24:d4:b8:93:cb:41:75:b2: + 7c:09:cc:af:79:af:e5:a6:49:f6:42:d3:f0:38:47:b7:28:10: + 56:5e:ea:65:09:11:e7:4b:42:66:3f:e5:83:08:19:cf:da:69: + 6a:45:51:c9:d0:93:43:71:2d:94:d4:33:b3:77:2c:a9:9e:76: + b8:49:70:17:ae:80:2e:3b:d0:91:63:28:9e:86:11:88:8e:0b: + c3:10:04:13:87:b0:5e:29:67:e8:03:ba:3d:40:04:3d:df:a5: + 68:34:1d:3f:7e:c8:ff:38:00:4d:da:a1:2f:e6:76:54:26:d7: + 42:11:fa:b0:be:8d:a1:67:95:ec:04:ff:21:db:99:ad:90:50: + cf:38:54:8a:4f:68:ca:e5:aa:00:9d:79:4a:57:ed:58:b0:b1: + bc:0b:31:c2:c6:6b:c5:5b:e0:5f:3e:b3:8c:56:8a:04:9a:45: + 23:3a:e2:dd -----BEGIN CERTIFICATE----- MIIDbjCCAlagAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowGDEWMBQGA1UEAwwNSW50 -ZXJtZWRpYXJ5MTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALnR4elV -IwkTlVLWMfYWSShN6QK9QnM79prUBYZu/cQmsVnV4b5k8IQ58NnPCmKYaMZ7oWxz -THlekoi62+IW+QpbRvfva3dLmNlAyhste/qakhH+hWzvLjlvLxYyzEXHp71iKtdJ -ncHMDaixkeD3uOV39ArvAd7hZUzg5ik/LT+qDaQ4aZBdg7TpsATE9KS5X8CoiGgT -hqGb/iTT78w0vj27cFhkdFR9yGqj0zeekVz+FhVfAEUv+YE6f++7A2C4CM6fiCBi -uk2KGIpXHeoSHmLX6wGA5qly0i+EqhYg6PhH4U5DRhYgUc0gOaNHcA+fTuZ7+l3C -nmfOIuHoHIm9oEkCAwEAAaOByzCByDAdBgNVHQ4EFgQUHUocSHAwtmVzVqduoEg1 -gW47lYowHwYDVR0jBBgwFoAUiBzW5g2Pg96dnC4+HuVhguotEfYwNwYIKwYBBQUH +ZXJtZWRpYXRlMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANs4pN2h +EmJEjxf10CYtUtZ0dCnRfJ2XoqIYEP8IONixm///kfHgNjE34ecyykASempP+kSR +QB9RFIUynxbhLTVlXzuobaTp61HQH/ecHiKCSC1ygqNZgvECD3POHpINHCMxp0qA +8WUTpVcrqxb0h8pFeY5GaEuXALKYYccNIUdY3P+FTkaefCqQoIwiopEGUWHhdX1m +pE9+EkuL8aqlqvtz2MqiK8O6PLQDTMiato5tnT9FKzU894b2gxq4DkGof2It15X4 +Ofh8v+ktOh17FrRVRtRcu9EZJJfDFJeU1EO0lAe+EnK63mB6dTva34HMVRgHhUSc +ldow56EB6SqFZAcCAwEAAaOByzCByDAdBgNVHQ4EFgQUas+nMbdaHvDT0FV0Khjt +JrZGmaIwHwYDVR0jBBgwFoAURkqYcOFu9+FRD+5NQ/rt2PMjWL8wNwYIKwYBBQUH AQEEKzApMCcGCCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIw LAYDVR0fBCUwIzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4G A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IB -AQB8RTmFhS4qRxoFfEULnRyUWMmmq5WF+2Tao8+WmICMxP5dENuU32zrFUXT6NGA -OQ65KEq4DKqHzEuyFE3+LKY2XkBcEEnikB1GrdG1JYU1PZnaC9qt8J2UUG64TByG -1mjM2X9+uI0MQwzpagUADn0AiGJwT/mhaEifxMfNeGPGbOyEwwllZBQn9PnfofS8 -wUOIiLqYuhRmikdCSdyaNYTgixeeW72PT7MBLmE+EkWrYzh3sfIhVwRJU+QjS1iB -I0Kapf4cCHvWv37snbEVtycq8paBBVKtl5JxIDQzmXej6ZLhaHPqMetUy/mXYQNW -3kw1xc3Udafk8lxm9V00q4/4 +AQCX/q+SN1rqH3I6Coc3suFnvzdmHDSFqoY4NsJez7veTAUG2GGWTuc6KGX7He7C +/+STFz1s+hsE0AZt+0E8gf/lORTRN7Gt+i/I+s5/eoWxESJ9JNS4k8tBdbJ8Ccyv +ea/lpkn2QtPwOEe3KBBWXuplCRHnS0JmP+WDCBnP2mlqRVHJ0JNDcS2U1DOzdyyp +nna4SXAXroAuO9CRYyiehhGIjgvDEAQTh7BeKWfoA7o9QAQ936VoNB0/fsj/OABN +2qEv5nZUJtdCEfqwvo2hZ5XsBP8h25mtkFDPOFSKT2jK5aoAnXlKV+1YsLG8CzHC +xmvFW+BfPrOMVooEmkUjOuLd -----END CERTIFICATE----- Certificate: @@ -285,30 +285,30 @@ Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: - 00:a3:90:0c:56:93:34:da:26:53:6e:a9:d5:07:b9: - 83:30:70:85:69:ed:18:67:72:bb:1d:c4:06:ff:a8: - b8:00:75:fd:38:ac:f1:e2:4a:86:21:4d:01:77:fc: - f3:2d:90:94:7e:14:2c:8a:89:c2:cd:42:a5:ae:fe: - 7a:ca:9d:44:78:21:f6:ab:6d:d3:c8:8a:07:57:eb: - 22:10:cf:1e:44:f2:a4:23:e7:10:46:1e:d4:21:60: - 9c:01:72:ff:ca:20:c8:48:c4:ad:b0:17:28:f3:14: - af:49:65:52:52:58:9a:1b:68:1a:9d:77:e9:61:52: - 54:0b:81:e4:0b:c7:2d:b3:2d:aa:9e:16:1f:51:ec: - 7d:e7:2d:2c:e6:c4:88:81:3e:1b:e1:e7:1f:21:12: - 21:47:ec:14:a5:d9:ab:a2:2b:ac:1f:3c:b2:a5:c1: - 69:4e:55:88:66:e8:5a:4d:9d:08:27:1c:fe:cd:62: - b0:95:62:c4:4b:ff:12:11:4c:d8:10:66:a4:d0:29: - da:d5:79:b7:ee:19:d5:b9:33:92:c5:61:89:56:a8: - 4f:48:cf:9a:a0:3e:95:f0:1f:b7:c9:de:82:89:09: - b0:87:a5:c5:71:2c:71:3b:72:4a:0a:51:c4:c4:7d: - ac:84:c3:9b:60:3d:ff:0c:52:05:23:4d:57:57:06: - 60:17 + 00:ae:d8:f0:4c:e2:aa:62:09:4f:6c:9e:00:49:b4: + b3:65:74:d7:78:f8:8d:42:96:f8:95:0e:58:91:bc: + b5:0c:9e:0c:df:0d:ab:e4:0b:8c:4d:77:24:45:0f: + 02:97:7c:d7:c4:10:41:7f:1f:10:80:46:85:6b:c1: + bb:88:81:fc:af:9e:35:f1:88:62:ff:58:e8:67:13: + a1:0d:10:9c:ea:0e:5d:fa:2c:b3:a2:e4:aa:53:55: + f4:01:1d:f9:bf:05:7e:36:f6:93:df:ce:44:e6:a9: + 8e:2d:93:75:1c:a1:55:18:41:f3:7f:1e:62:76:18: + 3f:0f:ca:5b:d5:0b:49:d1:ff:6a:1c:d5:2f:9d:c9: + 63:b7:1c:b7:03:39:5a:41:c5:b2:19:86:dd:f8:a1: + df:e8:75:4b:91:69:0b:96:83:c7:df:c5:c8:f0:a9: + ea:7c:d3:fe:11:29:39:ca:ce:1e:5e:9a:00:0c:16: + 1d:aa:c4:f0:4f:4f:d8:12:57:06:04:3c:04:e3:89: + d8:fb:71:9f:d5:14:c0:e9:ad:c9:c9:61:7f:00:6a: + e7:3f:c3:fc:99:b7:94:2a:dd:16:d7:f5:7d:77:1d: + de:87:e7:0b:18:fa:35:e6:23:7b:c9:d1:6a:88:20: + bf:ed:ec:2a:2a:e1:65:96:1e:68:15:bd:1b:ae:31: + cf:73 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - 88:1C:D6:E6:0D:8F:83:DE:9D:9C:2E:3E:1E:E5:61:82:EA:2D:11:F6 + 46:4A:98:70:E1:6E:F7:E1:51:0F:EE:4D:43:FA:ED:D8:F3:23:58:BF X509v3 Authority Key Identifier: - keyid:88:1C:D6:E6:0D:8F:83:DE:9D:9C:2E:3E:1E:E5:61:82:EA:2D:11:F6 + keyid:46:4A:98:70:E1:6E:F7:E1:51:0F:EE:4D:43:FA:ED:D8:F3:23:58:BF Authority Information Access: CA Issuers - URI:http://url-for-aia/Root.cer @@ -323,41 +323,41 @@ X509v3 Basic Constraints: critical CA:TRUE, pathlen:1 Signature Algorithm: sha256WithRSAEncryption - 2e:81:16:b6:af:49:9b:93:4d:84:34:9c:f0:43:ee:76:91:f5: - 88:9e:6b:cd:a8:95:f2:5e:10:19:f0:41:98:b2:ac:38:2a:ac: - 3e:4c:0f:49:0b:b9:fd:97:d3:c9:61:6c:8b:7d:26:06:1d:65: - 7e:e8:92:23:07:82:cc:3c:c9:c7:32:7b:2e:e2:3e:e8:42:52: - 29:9f:6d:8f:7d:34:57:37:7a:71:8f:f1:28:33:70:aa:59:88: - 12:95:74:82:60:d0:14:50:b5:d4:5a:ad:7c:03:85:ab:84:c9: - e5:bf:7a:4a:3e:1a:d0:44:0b:bc:e1:ae:3b:48:e9:00:1c:92: - 1b:b5:40:a4:e6:65:88:ec:3b:6e:ab:da:37:10:b7:6d:45:e5: - 70:89:eb:e4:21:68:2e:77:e6:de:25:e3:5d:7a:a0:f1:33:4c: - cc:e2:8b:a9:c8:fd:dc:0b:4b:9e:4c:5c:7c:86:0f:d4:ab:f9: - e0:c8:c0:82:76:38:55:d3:dc:4d:57:d0:ca:76:63:9f:92:5c: - ff:5f:1b:bd:b6:39:5e:0f:5f:93:0b:86:23:9e:08:d3:e4:11: - 02:5f:5f:bd:00:af:d3:22:c0:14:3a:f4:4b:8b:fb:be:5e:b7: - 1c:34:e1:20:69:5d:7c:d9:f5:86:28:ab:92:a6:31:6b:fe:1d: - 03:00:f0:89 + 75:7f:28:f3:9e:92:a5:65:6a:9a:ed:7f:29:3e:17:88:10:6a: + cc:a7:0d:b7:80:f0:d4:38:d0:f2:ed:a6:51:3e:7f:20:98:f3: + bc:18:ad:c3:3d:83:bb:b4:37:f0:27:68:eb:71:e4:a0:33:f0: + 6b:57:be:f2:9d:f6:45:ac:7b:83:bd:f9:bc:90:6e:38:20:4a: + 69:00:f3:2c:b0:b2:68:a4:14:b8:2d:09:f5:87:63:57:97:0a: + c5:64:41:c4:ab:b3:09:91:4e:ab:c6:b6:0f:1b:d4:86:16:12: + 02:86:3f:c7:4b:46:05:55:28:8b:f8:a5:f1:a3:1a:8c:d0:1c: + b6:83:56:01:9f:fd:68:f6:e1:6d:ff:ce:3a:59:7d:0e:5e:be: + 72:e7:b3:7c:c3:b6:a4:a1:a9:bc:a4:af:60:55:5b:07:51:19: + db:5b:1a:89:b9:ab:bb:cb:7a:ed:33:b1:c7:10:f6:6b:c7:a8: + 93:fb:fb:b7:f0:40:db:22:73:86:7d:da:db:33:a8:f4:e3:fc: + 45:6e:69:49:ba:18:7c:c0:59:75:b9:82:64:ae:8d:db:ae:27: + 03:14:2d:e2:e0:38:d3:af:0c:65:3b:4b:d7:c2:94:d4:9a:4d: + e6:58:31:d8:b6:c0:b1:c7:71:21:3f:a1:bf:84:d1:a1:c0:d9: + 06:47:08:0b -----BEGIN TRUSTED_CERTIFICATE----- MIIDaDCCAlCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 MB4XDTE1MDEwMTEyMDAwMFoXDTE2MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKOQDFaTNNomU26p1Qe5 -gzBwhWntGGdyux3EBv+ouAB1/Tis8eJKhiFNAXf88y2QlH4ULIqJws1Cpa7+esqd -RHgh9qtt08iKB1frIhDPHkTypCPnEEYe1CFgnAFy/8ogyEjErbAXKPMUr0llUlJY -mhtoGp136WFSVAuB5AvHLbMtqp4WH1HsfectLObEiIE+G+HnHyESIUfsFKXZq6Ir -rB88sqXBaU5ViGboWk2dCCcc/s1isJVixEv/EhFM2BBmpNAp2tV5t+4Z1bkzksVh -iVaoT0jPmqA+lfAft8negokJsIelxXEscTtySgpRxMR9rITDm2A9/wxSBSNNV1cG -YBcCAwEAAaOBzjCByzAdBgNVHQ4EFgQUiBzW5g2Pg96dnC4+HuVhguotEfYwHwYD -VR0jBBgwFoAUiBzW5g2Pg96dnC4+HuVhguotEfYwNwYIKwYBBQUHAQEEKzApMCcG +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK7Y8EziqmIJT2yeAEm0 +s2V013j4jUKW+JUOWJG8tQyeDN8Nq+QLjE13JEUPApd818QQQX8fEIBGhWvBu4iB +/K+eNfGIYv9Y6GcToQ0QnOoOXfoss6LkqlNV9AEd+b8Ffjb2k9/OROapji2TdRyh +VRhB838eYnYYPw/KW9ULSdH/ahzVL53JY7cctwM5WkHFshmG3fih3+h1S5FpC5aD +x9/FyPCp6nzT/hEpOcrOHl6aAAwWHarE8E9P2BJXBgQ8BOOJ2Ptxn9UUwOmtyclh +fwBq5z/D/Jm3lCrdFtf1fXcd3ofnCxj6NeYje8nRaoggv+3sKirhZZYeaBW9G64x +z3MCAwEAAaOBzjCByzAdBgNVHQ4EFgQURkqYcOFu9+FRD+5NQ/rt2PMjWL8wHwYD +VR0jBBgwFoAURkqYcOFu9+FRD+5NQ/rt2PMjWL8wNwYIKwYBBQUHAQEEKzApMCcG CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE -AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQAugRa2 -r0mbk02ENJzwQ+52kfWInmvNqJXyXhAZ8EGYsqw4Kqw+TA9JC7n9l9PJYWyLfSYG -HWV+6JIjB4LMPMnHMnsu4j7oQlIpn22PfTRXN3pxj/EoM3CqWYgSlXSCYNAUULXU -Wq18A4WrhMnlv3pKPhrQRAu84a47SOkAHJIbtUCk5mWI7Dtuq9o3ELdtReVwievk -IWgud+beJeNdeqDxM0zM4oupyP3cC0ueTFx8hg/Uq/ngyMCCdjhV09xNV9DKdmOf -klz/Xxu9tjleD1+TC4YjngjT5BECX1+9AK/TIsAUOvRLi/u+XrccNOEgaV182fWG -KKuSpjFr/h0DAPCJ +AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQB1fyjz +npKlZWqa7X8pPheIEGrMpw23gPDUONDy7aZRPn8gmPO8GK3DPYO7tDfwJ2jrceSg +M/BrV77ynfZFrHuDvfm8kG44IEppAPMssLJopBS4LQn1h2NXlwrFZEHEq7MJkU6r +xrYPG9SGFhIChj/HS0YFVSiL+KXxoxqM0By2g1YBn/1o9uFt/846WX0OXr5y57N8 +w7akoam8pK9gVVsHURnbWxqJuau7y3rtM7HHEPZrx6iT+/u38EDbInOGfdrbM6j0 +4/xFbmlJuhh8wFl1uYJkro3bricDFC3i4DjTrwxlO0vXwpTUmk3mWDHYtsCxx3Eh +P6G/hNGhwNkGRwgL -----END TRUSTED_CERTIFICATE----- -----BEGIN TIME-----
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc index 081d829..06651e96 100644 --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc
@@ -91,7 +91,6 @@ enable_tcp_fast_open_for_ssl(false), enable_spdy_ping_based_connection_checking(true), spdy_default_protocol(kProtoUnknown), - enable_spdy31(false), enable_http2(true), spdy_session_max_recv_window_size(kSpdySessionMaxRecvWindowSize), spdy_stream_max_recv_window_size(kSpdyStreamMaxRecvWindowSize), @@ -129,6 +128,7 @@ quic_migrate_sessions_on_network_change(false), quic_migrate_sessions_early(false), quic_disable_bidirectional_streams(false), + quic_force_hol_blocking(false), proxy_delegate(NULL), enable_token_binding(false) { quic_supported_versions.push_back(QUIC_VERSION_34); @@ -187,6 +187,7 @@ params.quic_idle_connection_timeout_seconds, params.quic_migrate_sessions_on_network_change, params.quic_migrate_sessions_early, + params.quic_force_hol_blocking, params.quic_connection_options, params.enable_token_binding), spdy_session_pool_(params.host_resolver, @@ -228,13 +229,6 @@ true; } - if (params_.enable_spdy31) { - next_protos_.push_back(kProtoSPDY31); - AlternateProtocol alternate = AlternateProtocolFromNextProto(kProtoSPDY31); - enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = - true; - } - if (params_.enable_quic) { AlternateProtocol alternate = AlternateProtocolFromNextProto(kProtoQUIC1SPDY3); @@ -345,6 +339,7 @@ params_.disable_quic_on_timeout_with_open_streams); dict->SetString("disabled_reason", quic_stream_factory_.QuicDisabledReasonString()); + dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); return std::move(dict); }
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index a6844a4..b4a72ea 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h
@@ -88,7 +88,6 @@ // Use SPDY ping frames to test for connection health after idle. bool enable_spdy_ping_based_connection_checking; NextProto spdy_default_protocol; - bool enable_spdy31; bool enable_http2; size_t spdy_session_max_recv_window_size; size_t spdy_stream_max_recv_window_size; @@ -179,6 +178,8 @@ bool quic_migrate_sessions_early; // If true, bidirectional streams over QUIC will be disabled. bool quic_disable_bidirectional_streams; + // If true, enable force HOL blocking. For measurement purposes. + bool quic_force_hol_blocking; ProxyDelegate* proxy_delegate; // Enable support for Token Binding.
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index 60173ab..1ec6f3f 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc
@@ -133,6 +133,9 @@ const base::string16 kTestingNTLM(ASCIIToUTF16("testing-ntlm")); const base::string16 kWrongPassword(ASCIIToUTF16("wrongpassword")); +const char kAlternativeServiceHttpHeader[] = + "Alt-Svc: h2=\"mail.example.org:443\"\r\n"; + int GetIdleSocketCountInTransportSocketPool(HttpNetworkSession* session) { return session->GetTransportSocketPool(HttpNetworkSession::NORMAL_SOCKET_POOL) ->IdleSocketCount(); @@ -326,16 +329,6 @@ return GetParam() == kTestCaseHTTP2PriorityDependencies; } - const char* GetAlternateProtocolFromParam() { - return AlternateProtocolToString( - AlternateProtocolFromNextProto(GetProtocol())); - } - - std::string GetAlternativeServiceHttpHeader() { - return std::string("Alt-Svc: ") + GetAlternateProtocolFromParam() + - "=\"mail.example.org:443\"\r\n"; - } - // Either |write_failure| specifies a write failure or |read_failure| // specifies a read failure when using a reused socket. In either case, the // failure should cause the network transaction to resend the request, and the @@ -9947,12 +9940,14 @@ } TEST_P(HttpNetworkTransactionTest, HonorAlternativeServiceHeader) { - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); + // SPDY/3.1 is not supported. + if (GetProtocol() != kProtoHTTP2) { + return; + } MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, OK), @@ -10010,12 +10005,9 @@ // Regression test for https://crbug.com/615497. TEST_P(HttpNetworkTransactionTest, DoNotParseAlternativeServiceHeaderOnInsecureRequest) { - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); - MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, OK), @@ -10209,13 +10201,15 @@ } TEST_P(HttpNetworkTransactionTest, HonorMultipleAlternativeServiceHeaders) { + // SPDY/3.1 is not supported. + if (GetProtocol() != kProtoHTTP2) { + return; + } + MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead("Alt-Svc: "), - MockRead(GetAlternateProtocolFromParam()), - MockRead("=\"www.example.com:443\","), - MockRead(GetAlternateProtocolFromParam()), - MockRead("=\":1234\"\r\n\r\n"), + MockRead("Alt-Svc: h2=\"www.example.com:443\","), + MockRead("h2=\":1234\"\r\n\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, OK), }; @@ -10789,12 +10783,9 @@ request.url = GURL("https://www.example.org/"); request.load_flags = 0; - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); - MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ), @@ -10875,18 +10866,20 @@ } TEST_P(HttpNetworkTransactionTest, AlternateProtocolWithSpdyLateBinding) { + // SPDY/3.1 is not supported. + if (GetProtocol() != kProtoHTTP2) { + return; + } + HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); request.load_flags = 0; // First transaction receives Alt-Svc header over HTTP/1.1. - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); - MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ), @@ -11002,17 +10995,19 @@ } TEST_P(HttpNetworkTransactionTest, StallAlternativeServiceForNpnSpdy) { + // SPDY/3.1 is not supported. + if (GetProtocol() != kProtoHTTP2) { + return; + } + HttpRequestInfo request; request.method = "GET"; request.url = GURL("https://www.example.org/"); request.load_flags = 0; - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); - MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ), @@ -11145,12 +11140,9 @@ request.url = GURL("https://www.example.org/"); request.load_flags = 0; - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); - MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ), @@ -11259,12 +11251,9 @@ request.url = GURL("https://www.example.org/"); request.load_flags = 0; - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); - MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(ASYNC, OK), @@ -11970,12 +11959,9 @@ "Connection: keep-alive\r\n\r\n"), }; - std::string alternative_service_http_header = - GetAlternativeServiceHttpHeader(); - MockRead data_reads[] = { MockRead("HTTP/1.1 200 OK\r\n"), - MockRead(alternative_service_http_header.c_str()), + MockRead(kAlternativeServiceHttpHeader), MockRead("\r\n"), MockRead("hello world"), MockRead(SYNCHRONOUS, OK),
diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc index 478fafc..e167e1a 100644 --- a/net/log/net_log_util.cc +++ b/net/log/net_log_util.cc
@@ -431,12 +431,8 @@ if (info_sources & NET_INFO_SPDY_STATUS) { base::DictionaryValue* status_dict = new base::DictionaryValue(); - status_dict->SetBoolean("enable_spdy31", - http_network_session->params().enable_spdy31 && - HttpStreamFactory::spdy_enabled()); status_dict->SetBoolean("enable_http2", - http_network_session->params().enable_http2 && - HttpStreamFactory::spdy_enabled()); + http_network_session->params().enable_http2); NextProtoVector alpn_protos; http_network_session->GetAlpnProtos(&alpn_protos);
diff --git a/net/net.gypi b/net/net.gypi index 8a4a799c..744f6e8 100644 --- a/net/net.gypi +++ b/net/net.gypi
@@ -2458,17 +2458,17 @@ 'data/url_request_unittest/with-headers.html', 'data/url_request_unittest/with-headers.html.mock-http-headers', 'data/verify_certificate_chain_unittest/basic-constraints-pathlen-0-self-issued.pem', - 'data/verify_certificate_chain_unittest/expired-intermediary.pem', + 'data/verify_certificate_chain_unittest/expired-intermediate.pem', 'data/verify_certificate_chain_unittest/expired-root.pem', 'data/verify_certificate_chain_unittest/expired-target-notBefore.pem', 'data/verify_certificate_chain_unittest/expired-target.pem', - 'data/verify_certificate_chain_unittest/intermediary-basic-constraints-ca-false.pem', - 'data/verify_certificate_chain_unittest/intermediary-basic-constraints-not-critical.pem', - 'data/verify_certificate_chain_unittest/intermediary-lacks-basic-constraints.pem', - 'data/verify_certificate_chain_unittest/intermediary-lacks-signing-key-usage.pem', - 'data/verify_certificate_chain_unittest/intermediary-signed-with-md5.pem', - 'data/verify_certificate_chain_unittest/intermediary-unknown-critical-extension.pem', - 'data/verify_certificate_chain_unittest/intermediary-unknown-non-critical-extension.pem', + 'data/verify_certificate_chain_unittest/intermediate-basic-constraints-ca-false.pem', + 'data/verify_certificate_chain_unittest/intermediate-basic-constraints-not-critical.pem', + 'data/verify_certificate_chain_unittest/intermediate-lacks-basic-constraints.pem', + 'data/verify_certificate_chain_unittest/intermediate-lacks-signing-key-usage.pem', + 'data/verify_certificate_chain_unittest/intermediate-signed-with-md5.pem', + 'data/verify_certificate_chain_unittest/intermediate-unknown-critical-extension.pem', + 'data/verify_certificate_chain_unittest/intermediate-unknown-non-critical-extension.pem', 'data/verify_certificate_chain_unittest/issuer-and-subject-not-byte-for-byte-equal-anchor.pem', 'data/verify_certificate_chain_unittest/issuer-and-subject-not-byte-for-byte-equal.pem', 'data/verify_certificate_chain_unittest/key-rollover-longrolloverchain.pem', @@ -2476,7 +2476,7 @@ 'data/verify_certificate_chain_unittest/key-rollover-oldchain.pem', 'data/verify_certificate_chain_unittest/key-rollover-rolloverchain.pem', 'data/verify_certificate_chain_unittest/non-self-signed-root.pem', - 'data/verify_certificate_chain_unittest/target-and-intermediary.pem', + 'data/verify_certificate_chain_unittest/target-and-intermediate.pem', 'data/verify_certificate_chain_unittest/target-has-keycertsign-but-not-ca.pem', 'data/verify_certificate_chain_unittest/target-has-pathlen-but-not-ca.pem', 'data/verify_certificate_chain_unittest/target-not-end-entity.pem',
diff --git a/net/nqe/network_quality.h b/net/nqe/network_quality.h index 2c7372fd..bc1ec77 100644 --- a/net/nqe/network_quality.h +++ b/net/nqe/network_quality.h
@@ -46,15 +46,25 @@ // Returns the estimate of the round trip time at the HTTP layer. const base::TimeDelta& http_rtt() const { return http_rtt_; } + void set_http_rtt(const base::TimeDelta& http_rtt) { http_rtt_ = http_rtt; } + // Returns the estimate of the round trip time at the transport layer. const base::TimeDelta& transport_rtt() const { return transport_rtt_; } + void set_transport_rtt(const base::TimeDelta& transport_rtt) { + transport_rtt_ = transport_rtt; + } + // Returns the estimate of the downstream throughput in Kbps (Kilobits per // second). int32_t downstream_throughput_kbps() const { return downstream_throughput_kbps_; } + void set_downstream_throughput_kbps(int32_t downstream_throughput_kbps) { + downstream_throughput_kbps_ = downstream_throughput_kbps; + } + private: // Estimated round trip time at the HTTP layer. base::TimeDelta http_rtt_;
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc index 6580a841..7750e2f 100644 --- a/net/nqe/network_quality_estimator.cc +++ b/net/nqe/network_quality_estimator.cc
@@ -94,6 +94,13 @@ const char kThresholdURLRTTMsecSuffix[] = ".ThresholdMedianHttpRTTMsec"; // Suffix of the name of the variation parameter that contains the threshold +// transport RTTs (in milliseconds) for different effective connection types. +// Complete name of the variation parameter would be +// |EffectiveConnectionType|.|kThresholdTransportRTTMsecSuffix|. +const char kThresholdTransportRTTMsecSuffix[] = + ".ThresholdMedianTransportRTTMsec"; + +// Suffix of the name of the variation parameter that contains the threshold // downlink throughput (in kbps) for different effective connection types. // Complete name of the variation parameter would be // |EffectiveConnectionType|.|kThresholdKbpsSuffix|. @@ -228,7 +235,10 @@ bool use_smaller_responses_for_tests) : algorithm_name_to_enum_({{"HttpRTTAndDownstreamThroughput", EffectiveConnectionTypeAlgorithm:: - HTTP_RTT_AND_DOWNSTREAM_THROUGHOUT}}), + HTTP_RTT_AND_DOWNSTREAM_THROUGHOUT}, + {"TransportRTTOrDownstreamThroughput", + EffectiveConnectionTypeAlgorithm:: + TRANSPORT_RTT_OR_DOWNSTREAM_THROUGHOUT}}), use_localhost_requests_(use_local_host_requests_for_tests), use_small_responses_(use_smaller_responses_for_tests), weight_multiplier_per_second_( @@ -376,17 +386,34 @@ variation_params, connection_type_name + kThresholdURLRTTMsecSuffix, &variations_value) && variations_value >= kMinimumRTTVariationParameterMsec) { - base::TimeDelta rtt(base::TimeDelta::FromMilliseconds(variations_value)); - connection_thresholds_[i] = nqe::internal::NetworkQuality( - rtt, connection_thresholds_[i].transport_rtt(), - connection_thresholds_[i].downstream_throughput_kbps()); + connection_thresholds_[i].set_http_rtt( + base::TimeDelta(base::TimeDelta::FromMilliseconds(variations_value))); // Verify that the RTT values are in decreasing order as the network // quality improves. DCHECK(i == 0 || connection_thresholds_[i - 1].http_rtt() == nqe::internal::InvalidRTT() || - rtt <= connection_thresholds_[i - 1].http_rtt()); + connection_thresholds_[i].http_rtt() <= + connection_thresholds_[i - 1].http_rtt()); + } + + variations_value = kMinimumRTTVariationParameterMsec - 1; + if (GetValueForVariationParam( + variation_params, + connection_type_name + kThresholdTransportRTTMsecSuffix, + &variations_value) && + variations_value >= kMinimumRTTVariationParameterMsec) { + connection_thresholds_[i].set_transport_rtt( + base::TimeDelta(base::TimeDelta::FromMilliseconds(variations_value))); + + // Verify that the transport RTT values are in decreasing order as the + // network quality improves. + DCHECK(i == 0 || + connection_thresholds_[i - 1].transport_rtt() == + nqe::internal::InvalidRTT() || + connection_thresholds_[i].transport_rtt() <= + connection_thresholds_[i - 1].transport_rtt()); } variations_value = kMinimumThroughputVariationParameterKbps - 1; @@ -394,17 +421,15 @@ connection_type_name + kThresholdKbpsSuffix, &variations_value) && variations_value >= kMinimumThroughputVariationParameterKbps) { - int32_t throughput_kbps = variations_value; - connection_thresholds_[i] = nqe::internal::NetworkQuality( - connection_thresholds_[i].http_rtt(), - connection_thresholds_[i].transport_rtt(), throughput_kbps); + connection_thresholds_[i].set_downstream_throughput_kbps( + variations_value); // Verify that the throughput values are in increasing order as the // network quality improves. DCHECK(i == 0 || connection_thresholds_[i - 1].downstream_throughput_kbps() == kMinimumThroughputVariationParameterKbps || - throughput_kbps >= + connection_thresholds_[i].downstream_throughput_kbps() >= connection_thresholds_[i - 1].downstream_throughput_kbps()); } } @@ -920,17 +945,37 @@ if (effective_connection_type_algorithm_ == EffectiveConnectionTypeAlgorithm::HTTP_RTT_AND_DOWNSTREAM_THROUGHOUT) { - return GetRecentEffectiveConnectionTypeHttpRTTAndDownstreamThroughput( - start_time); + return GetRecentEffectiveConnectionTypeUsingMetrics( + start_time, NetworkQualityEstimator::MetricUsage:: + MUST_BE_USED /* http_rtt_metric */, + NetworkQualityEstimator::MetricUsage:: + DO_NOT_USE /* transport_rtt_metric */, + NetworkQualityEstimator::MetricUsage:: + MUST_BE_USED /* downstream_throughput_kbps_metric */); + } + if (effective_connection_type_algorithm_ == + EffectiveConnectionTypeAlgorithm:: + TRANSPORT_RTT_OR_DOWNSTREAM_THROUGHOUT) { + return GetRecentEffectiveConnectionTypeUsingMetrics( + start_time, + NetworkQualityEstimator::MetricUsage::DO_NOT_USE /* http_rtt_metric */, + NetworkQualityEstimator::MetricUsage:: + USE_IF_AVAILABLE /* transport_rtt_metric */, + NetworkQualityEstimator::MetricUsage:: + USE_IF_AVAILABLE /* downstream_throughput_kbps_metric */); } // Add additional algorithms here. NOTREACHED(); return EFFECTIVE_CONNECTION_TYPE_UNKNOWN; } -NetworkQualityEstimator::EffectiveConnectionType NetworkQualityEstimator:: - GetRecentEffectiveConnectionTypeHttpRTTAndDownstreamThroughput( - const base::TimeTicks& start_time) const { +NetworkQualityEstimator::EffectiveConnectionType +NetworkQualityEstimator::GetRecentEffectiveConnectionTypeUsingMetrics( + const base::TimeTicks& start_time, + NetworkQualityEstimator::MetricUsage http_rtt_metric, + NetworkQualityEstimator::MetricUsage transport_rtt_metric, + NetworkQualityEstimator::MetricUsage downstream_throughput_kbps_metric) + const { DCHECK(thread_checker_.CalledOnValidThread()); // If the device is currently offline, then return @@ -939,16 +984,46 @@ return EFFECTIVE_CONNECTION_TYPE_OFFLINE; base::TimeDelta http_rtt = nqe::internal::InvalidRTT(); - if (!GetRecentHttpRTTMedian(start_time, &http_rtt)) + if (http_rtt_metric != NetworkQualityEstimator::MetricUsage::DO_NOT_USE && + !GetRecentHttpRTTMedian(start_time, &http_rtt)) { http_rtt = nqe::internal::InvalidRTT(); + } + + base::TimeDelta transport_rtt = nqe::internal::InvalidRTT(); + if (transport_rtt_metric != + NetworkQualityEstimator::MetricUsage::DO_NOT_USE && + !GetRecentTransportRTTMedian(start_time, &transport_rtt)) { + transport_rtt = nqe::internal::InvalidRTT(); + } int32_t kbps = nqe::internal::kInvalidThroughput; - if (!GetRecentMedianDownlinkThroughputKbps(start_time, &kbps)) + if (downstream_throughput_kbps_metric != + NetworkQualityEstimator::MetricUsage::DO_NOT_USE && + !GetRecentMedianDownlinkThroughputKbps(start_time, &kbps)) { kbps = nqe::internal::kInvalidThroughput; + } - if (http_rtt == nqe::internal::InvalidRTT() || + if (http_rtt == nqe::internal::InvalidRTT() && + http_rtt_metric == NetworkQualityEstimator::MetricUsage::MUST_BE_USED) { + return EFFECTIVE_CONNECTION_TYPE_UNKNOWN; + } + + if (transport_rtt == nqe::internal::InvalidRTT() && + transport_rtt_metric == + NetworkQualityEstimator::MetricUsage::MUST_BE_USED) { + return EFFECTIVE_CONNECTION_TYPE_UNKNOWN; + } + + if (kbps == nqe::internal::kInvalidThroughput && + downstream_throughput_kbps_metric == + NetworkQualityEstimator::MetricUsage::MUST_BE_USED) { + return EFFECTIVE_CONNECTION_TYPE_UNKNOWN; + } + + if (http_rtt == nqe::internal::InvalidRTT() && + transport_rtt == nqe::internal::InvalidRTT() && kbps == nqe::internal::kInvalidThroughput) { - // Quality of the current network is unknown. + // None of the metrics are available. return EFFECTIVE_CONNECTION_TYPE_UNKNOWN; } @@ -959,20 +1034,26 @@ EffectiveConnectionType type = static_cast<EffectiveConnectionType>(i); if (i == EFFECTIVE_CONNECTION_TYPE_UNKNOWN) continue; - bool estimated_http_rtt_is_higher_than_threshold = + + const bool estimated_http_rtt_is_higher_than_threshold = http_rtt != nqe::internal::InvalidRTT() && connection_thresholds_[i].http_rtt() != nqe::internal::InvalidRTT() && http_rtt >= connection_thresholds_[i].http_rtt(); - bool estimated_throughput_is_lower_than_threshold = + + const bool estimated_transport_rtt_is_higher_than_threshold = + transport_rtt != nqe::internal::InvalidRTT() && + connection_thresholds_[i].transport_rtt() != + nqe::internal::InvalidRTT() && + transport_rtt >= connection_thresholds_[i].transport_rtt(); + + const bool estimated_throughput_is_lower_than_threshold = kbps != nqe::internal::kInvalidThroughput && connection_thresholds_[i].downstream_throughput_kbps() != nqe::internal::kInvalidThroughput && kbps <= connection_thresholds_[i].downstream_throughput_kbps(); - // Return |type| as the effective connection type if the current network's - // RTT is worse than the threshold RTT for |type|, or if the current - // network's throughput is lower than the threshold throughput for |type|. if (estimated_http_rtt_is_higher_than_threshold || + estimated_transport_rtt_is_higher_than_threshold || estimated_throughput_is_lower_than_threshold) { return type; }
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h index 102dfa7..afeca4e 100644 --- a/net/nqe/network_quality_estimator.h +++ b/net/nqe/network_quality_estimator.h
@@ -292,17 +292,20 @@ // at the HTTP layer measures the time from when the request was sent (this // happens after the connection is established) to the time when the response // headers were received. + // TODO(tbansal): Change it to return HTTP RTT as base::TimeDelta. virtual bool GetHttpRTTEstimate(base::TimeDelta* rtt) const WARN_UNUSED_RESULT; // Returns true if the RTT is available and sets |rtt| to the RTT estimated at // the transport layer. |rtt| should not be null. Virtualized for testing. + // TODO(tbansal): Change it to return transport RTT as base::TimeDelta. virtual bool GetTransportRTTEstimate(base::TimeDelta* rtt) const WARN_UNUSED_RESULT; // Returns true if downlink throughput is available and sets |kbps| to // estimated downlink throughput (in kilobits per second). // Virtualized for testing. |kbps| should not be null. + // TODO(tbansal): Change it to return throughput as int32. virtual bool GetDownlinkThroughputKbpsEstimate(int32_t* kbps) const; // Returns true if median RTT at the HTTP layer is available and sets |rtt| @@ -311,6 +314,7 @@ // layer measures the time from when the request was sent (this happens after // the connection is established) to the time when the response headers were // received. + // TODO(tbansal): Change it to return HTTP RTT as base::TimeDelta. virtual bool GetRecentHttpRTTMedian(const base::TimeTicks& start_time, base::TimeDelta* rtt) const WARN_UNUSED_RESULT; @@ -318,6 +322,7 @@ // Returns true if the median RTT at the transport layer is available and sets // |rtt| to the median of transport layer RTT observations since // |start_time|. |rtt| should not be null. Virtualized for testing. + // TODO(tbansal): Change it to return transport RTT as base::TimeDelta. virtual bool GetRecentTransportRTTMedian(const base::TimeTicks& start_time, base::TimeDelta* rtt) const WARN_UNUSED_RESULT; @@ -326,6 +331,7 @@ // to the median of downstream throughput (in kilobits per second) // observations since |start_time|. Virtualized for testing. |kbps| // should not be null. Virtualized for testing. + // TODO(tbansal): Change it to return throughput as int32. virtual bool GetRecentMedianDownlinkThroughputKbps( const base::TimeTicks& start_time, int32_t* kbps) const WARN_UNUSED_RESULT; @@ -372,10 +378,27 @@ // connection type. enum class EffectiveConnectionTypeAlgorithm { HTTP_RTT_AND_DOWNSTREAM_THROUGHOUT = 0, + TRANSPORT_RTT_OR_DOWNSTREAM_THROUGHOUT, EFFECTIVE_CONNECTION_TYPE_ALGORITHM_LAST }; + // Defines how a metric (e.g, transport RTT) should be used when computing + // the effective connection type. + enum class MetricUsage { + // The metric should not be used when computing the effective connection + // type. + DO_NOT_USE = 0, + // If the metric is available, then it should be used when computing the + // effective connection type. + USE_IF_AVAILABLE, + // The metric is required when computing the effective connection type. + // If the value of the metric is unavailable, effective connection type + // should be set to |EFFECTIVE_CONNECTION_TYPE_UNKNOWN|. + MUST_BE_USED, + }; + // Map from algorithm names to EffectiveConnectionTypeAlgorithm. + // TODO(tbansal): Consider using an autogenerated enum using macros. const std::map<std::string, EffectiveConnectionTypeAlgorithm> algorithm_name_to_enum_; @@ -483,12 +506,15 @@ void UpdateSignalStrength(); // Returns the effective type of the current connection based on only the - // samples observed after |start_time|. Uses HTTP RTT and downstream - // throughput to compute the effective connection type, and requires both of - // them to have a valid value. - EffectiveConnectionType - GetRecentEffectiveConnectionTypeHttpRTTAndDownstreamThroughput( - const base::TimeTicks& start_time) const; + // samples observed after |start_time|. May use HTTP RTT, transport RTT and + // downstream throughput to compute the effective connection type based on + // |http_rtt_metric|, |transport_rtt_metric| and + // |downstream_throughput_kbps_metric|, respectively. + EffectiveConnectionType GetRecentEffectiveConnectionTypeUsingMetrics( + const base::TimeTicks& start_time, + MetricUsage http_rtt_metric, + MetricUsage transport_rtt_metric, + MetricUsage downstream_throughput_kbps_metric) const; // Values of external estimate provider status. This enum must remain // synchronized with the enum of the same name in
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc index 40a28c5..ce66082 100644 --- a/net/nqe/network_quality_estimator_unittest.cc +++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -636,6 +636,9 @@ {true, "HttpRTTAndDownstreamThroughput", NetworkQualityEstimator::EffectiveConnectionTypeAlgorithm:: HTTP_RTT_AND_DOWNSTREAM_THROUGHOUT}, + {true, "TransportRTTOrDownstreamThroughput", + NetworkQualityEstimator::EffectiveConnectionTypeAlgorithm:: + TRANSPORT_RTT_OR_DOWNSTREAM_THROUGHOUT}, }; for (const auto& test : tests) { @@ -647,6 +650,23 @@ EXPECT_EQ(test.expected_algorithm, estimator.effective_connection_type_algorithm_) << test.algorithm; + + // Make sure no two values are same in the map. + typedef std::map<std::string, + NetworkQualityEstimator::EffectiveConnectionTypeAlgorithm> + Algorithms; + + for (Algorithms::const_iterator it_first = + estimator.algorithm_name_to_enum_.begin(); + it_first != estimator.algorithm_name_to_enum_.end(); ++it_first) { + for (Algorithms::const_iterator it_second = + estimator.algorithm_name_to_enum_.begin(); + it_second != estimator.algorithm_name_to_enum_.end(); ++it_second) { + if (it_first != it_second) { + DCHECK_NE(it_first->second, it_second->second); + } + } + } } } @@ -754,8 +774,60 @@ } // Tests that |GetEffectiveConnectionType| returns correct connection type when -// both RTT and throughput thresholds are specified in the variation params. -TEST(NetworkQualityEstimatorTest, ObtainThresholdsRTTandThroughput) { +// only transport RTT thresholds are specified in the variation params. +TEST(NetworkQualityEstimatorTest, ObtainThresholdsOnlyTransportRTT) { + std::map<std::string, std::string> variation_params; + variation_params["effective_connection_type_algorithm"] = + "TransportRTTOrDownstreamThroughput"; + + variation_params["Offline.ThresholdMedianTransportRTTMsec"] = "4000"; + variation_params["Slow2G.ThresholdMedianTransportRTTMsec"] = "2000"; + variation_params["2G.ThresholdMedianTransportRTTMsec"] = "1000"; + variation_params["3G.ThresholdMedianTransportRTTMsec"] = "500"; + variation_params["4G.ThresholdMedianTransportRTTMsec"] = "300"; + variation_params["Broadband.ThresholdMedianTransportRTTMsec"] = "100"; + + TestNetworkQualityEstimator estimator(variation_params); + + // Simulate the connection type as Wi-Fi so that GetEffectiveConnectionType + // does not return Offline if the device is offline. + estimator.SimulateNetworkChangeTo(NetworkChangeNotifier::CONNECTION_WIFI, + "test"); + + const struct { + int32_t transport_rtt_msec; + NetworkQualityEstimator::EffectiveConnectionType expected_conn_type; + } tests[] = { + {5000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_OFFLINE}, + {4000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_OFFLINE}, + {3000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_SLOW_2G}, + {2000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_SLOW_2G}, + {1500, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_2G}, + {1000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_2G}, + {700, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G}, + {500, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G}, + {400, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_4G}, + {300, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_4G}, + {200, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_BROADBAND}, + {100, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_BROADBAND}, + {20, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_BROADBAND}, + }; + + for (const auto& test : tests) { + estimator.set_transport_rtt( + base::TimeDelta::FromMilliseconds(test.transport_rtt_msec)); + estimator.set_recent_transport_rtt( + base::TimeDelta::FromMilliseconds(test.transport_rtt_msec)); + estimator.set_downlink_throughput_kbps(INT32_MAX); + estimator.set_recent_downlink_throughput_kbps(INT32_MAX); + EXPECT_EQ(test.expected_conn_type, estimator.GetEffectiveConnectionType()); + } +} + +// Tests that |GetEffectiveConnectionType| returns correct connection type when +// both HTTP RTT and throughput thresholds are specified in the variation +// params. +TEST(NetworkQualityEstimatorTest, ObtainThresholdsHttpRTTandThroughput) { std::map<std::string, std::string> variation_params; variation_params["Offline.ThresholdMedianHttpRTTMsec"] = "4000"; @@ -814,6 +886,71 @@ } } +// Tests that |GetEffectiveConnectionType| returns correct connection type when +// both transport RTT and throughput thresholds are specified in the variation +// params. +TEST(NetworkQualityEstimatorTest, ObtainThresholdsTransportRTTandThroughput) { + std::map<std::string, std::string> variation_params; + variation_params["effective_connection_type_algorithm"] = + "TransportRTTOrDownstreamThroughput"; + + variation_params["Offline.ThresholdMedianTransportRTTMsec"] = "4000"; + variation_params["Slow2G.ThresholdMedianTransportRTTMsec"] = "2000"; + variation_params["2G.ThresholdMedianTransportRTTMsec"] = "1000"; + variation_params["3G.ThresholdMedianTransportRTTMsec"] = "500"; + variation_params["4G.ThresholdMedianTransportRTTMsec"] = "300"; + variation_params["Broadband.ThresholdMedianTransportRTTMsec"] = "100"; + + variation_params["Offline.ThresholdMedianKbps"] = "10"; + variation_params["Slow2G.ThresholdMedianKbps"] = "100"; + variation_params["2G.ThresholdMedianKbps"] = "300"; + variation_params["3G.ThresholdMedianKbps"] = "500"; + variation_params["4G.ThresholdMedianKbps"] = "1000"; + variation_params["Broadband.ThresholdMedianKbps"] = "2000"; + + TestNetworkQualityEstimator estimator(variation_params); + + // Simulate the connection type as Wi-Fi so that GetEffectiveConnectionType + // does not return Offline if the device is offline. + estimator.SimulateNetworkChangeTo(NetworkChangeNotifier::CONNECTION_WIFI, + "test"); + + const struct { + int32_t transport_rtt_msec; + int32_t downlink_throughput_kbps; + NetworkQualityEstimator::EffectiveConnectionType expected_conn_type; + } tests[] = { + // Set RTT to a very low value to observe the effect of throughput. + // Throughput is the bottleneck. + {1, 5, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_OFFLINE}, + {1, 10, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_OFFLINE}, + {1, 50, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_SLOW_2G}, + {1, 100, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_SLOW_2G}, + {1, 150, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_2G}, + {1, 300, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_2G}, + {1, 400, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G}, + {1, 500, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G}, + {1, 700, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_4G}, + {1, 1000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_4G}, + {1, 1500, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_BROADBAND}, + {1, 2500, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_BROADBAND}, + // Set both RTT and throughput. RTT is the bottleneck. + {3000, 25000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_SLOW_2G}, + {700, 25000, NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G}, + }; + + for (const auto& test : tests) { + estimator.set_transport_rtt( + base::TimeDelta::FromMilliseconds(test.transport_rtt_msec)); + estimator.set_recent_transport_rtt( + base::TimeDelta::FromMilliseconds(test.transport_rtt_msec)); + estimator.set_downlink_throughput_kbps(test.downlink_throughput_kbps); + estimator.set_recent_downlink_throughput_kbps( + test.downlink_throughput_kbps); + EXPECT_EQ(test.expected_conn_type, estimator.GetEffectiveConnectionType()); + } +} + // Tests if |weight_multiplier_per_second_| is set to correct value for various // values of half life parameter. TEST(NetworkQualityEstimatorTest, HalfLifeParam) {
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc index c6a1ced..01c5d88 100644 --- a/net/quic/quic_network_transaction_unittest.cc +++ b/net/quic/quic_network_transaction_unittest.cc
@@ -417,6 +417,28 @@ packet_number, stream_id, should_include_version, fin, offset, data); } + std::unique_ptr<QuicEncryptedPacket> ConstructClientDataPacket( + QuicPacketNumber packet_number, + QuicStreamId stream_id, + bool should_include_version, + bool fin, + QuicStreamOffset offset, + base::StringPiece data) { + return client_maker_.MakeDataPacket( + packet_number, stream_id, should_include_version, fin, offset, data); + } + + std::unique_ptr<QuicEncryptedPacket> ConstructClientForceHolDataPacket( + QuicPacketNumber packet_number, + QuicStreamId stream_id, + bool should_include_version, + bool fin, + QuicStreamOffset* offset, + base::StringPiece data) { + return client_maker_.MakeForceHolDataPacket( + packet_number, stream_id, should_include_version, fin, offset, data); + } + std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket( QuicPacketNumber packet_number, QuicStreamId stream_id, @@ -2353,6 +2375,56 @@ EXPECT_LT(0, pos); } +TEST_P(QuicNetworkTransactionTest, QuicForceHolBlocking) { + FLAGS_quic_enable_version_35 = true; + FLAGS_quic_enable_version_36 = true; + params_.quic_force_hol_blocking = true; + params_.origins_to_force_quic_on.insert( + HostPortPair::FromString("mail.example.org:443")); + + MockQuicData mock_quic_data; + + QuicStreamOffset offset = 0; + mock_quic_data.AddWrite(ConstructClientRequestHeadersPacket( + 1, kClientDataStreamId1, true, false, + GetRequestHeaders("POST", "https", "/"), &offset)); + + std::unique_ptr<QuicEncryptedPacket> packet; + if (GetParam() > QUIC_VERSION_35) { + packet = ConstructClientForceHolDataPacket(2, kClientDataStreamId1, true, + true, &offset, "1"); + } else { + packet = + ConstructClientDataPacket(2, kClientDataStreamId1, true, true, 0, "1"); + } + mock_quic_data.AddWrite(std::move(packet)); + + mock_quic_data.AddRead(ConstructServerResponseHeadersPacket( + 1, kClientDataStreamId1, false, false, GetResponseHeaders("200 OK"))); + + mock_quic_data.AddRead(ConstructServerDataPacket(2, kClientDataStreamId1, + false, true, 0, "hello!")); + + mock_quic_data.AddWrite(ConstructClientAckPacket(3, 2, 1, 1)); + + mock_quic_data.AddRead(ASYNC, ERR_IO_PENDING); // No more data to read + mock_quic_data.AddRead(ASYNC, 0); // EOF + mock_quic_data.AddSocketDataToFactory(&socket_factory_); + + // The non-alternate protocol job needs to hang in order to guarantee that + // the alternate-protocol job will "win". + AddHangingNonAlternateProtocolSocketData(); + + CreateSession(); + request_.method = "POST"; + ChunkedUploadDataStream upload_data(0); + upload_data.AppendData("1", 1, true); + + request_.upload_data_stream = &upload_data; + + SendRequestAndExpectQuicResponse("hello!"); +} + class QuicNetworkTransactionWithDestinationTest : public PlatformTest, public ::testing::WithParamInterface<PoolingTestParams> {
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc index 2890f63..91e442d 100644 --- a/net/quic/quic_stream_factory.cc +++ b/net/quic/quic_stream_factory.cc
@@ -632,6 +632,7 @@ int idle_connection_timeout_seconds, bool migrate_sessions_on_network_change, bool migrate_sessions_early, + bool force_hol_blocking, const QuicTagVector& connection_options, bool enable_token_binding) : require_confirmation_(true), @@ -685,6 +686,7 @@ NetworkChangeNotifier::AreNetworkHandlesSupported()), migrate_sessions_early_(migrate_sessions_early && migrate_sessions_on_network_change_), + force_hol_blocking_(force_hol_blocking), port_seed_(random_generator_->RandUint64()), check_persisted_supports_quic_(true), has_initialized_data_(false), @@ -1682,6 +1684,9 @@ config.SetInitialRoundTripTimeUsToSend(static_cast<uint32_t>(srtt)); config.SetBytesForConnectionIdToSend(0); + if (force_hol_blocking_) + config.SetForceHolBlocking(); + if (quic_server_info_factory_.get() && !server_info) { // Start the disk cache loading so that we can persist the newer QUIC server // information and/or inform the disk cache that we have reused
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h index 2f014d1..fbb91ab 100644 --- a/net/quic/quic_stream_factory.h +++ b/net/quic/quic_stream_factory.h
@@ -192,6 +192,7 @@ int idle_connection_timeout_seconds, bool migrate_sessions_on_network_change, bool migrate_sessions_early, + bool force_hol_blocking, const QuicTagVector& connection_options, bool enable_token_binding); ~QuicStreamFactory() override; @@ -572,6 +573,9 @@ // experiences poor connectivity. const bool migrate_sessions_early_; + // If set, force HOL blocking. For measurement purposes. + const bool force_hol_blocking_; + // Each profile will (probably) have a unique port_seed_ value. This value // is used to help seed a pseudo-random number generator (PortSuggester) so // that we consistently (within this profile) suggest the same ephemeral
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc index ef056be..cb159de8 100644 --- a/net/quic/quic_stream_factory_test.cc +++ b/net/quic/quic_stream_factory_test.cc
@@ -320,7 +320,8 @@ disable_quic_on_timeout_with_open_streams_(false), idle_connection_timeout_seconds_(kIdleConnectionTimeoutSeconds), migrate_sessions_on_network_change_(false), - migrate_sessions_early_(false) { + migrate_sessions_early_(false), + force_hol_blocking_(false) { clock_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); } @@ -352,7 +353,7 @@ close_sessions_on_ip_change_, disable_quic_on_timeout_with_open_streams_, idle_connection_timeout_seconds_, migrate_sessions_on_network_change_, - migrate_sessions_early_, QuicTagVector(), + migrate_sessions_early_, force_hol_blocking_, QuicTagVector(), /*enable_token_binding*/ false)); factory_->set_require_confirmation(false); EXPECT_FALSE(factory_->has_quic_server_info_factory()); @@ -545,6 +546,7 @@ int idle_connection_timeout_seconds_; bool migrate_sessions_on_network_change_; bool migrate_sessions_early_; + bool force_hol_blocking_; }; class QuicStreamFactoryTest : public QuicStreamFactoryTestBase, @@ -4394,6 +4396,33 @@ EXPECT_TRUE(socket_data.AllWriteDataConsumed()); } +TEST_P(QuicStreamFactoryTest, ForceHolBlockingEnabled) { + force_hol_blocking_ = true; + Initialize(); + + ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails(); + crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details); + + MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)}; + SequencedSocketData socket_data(reads, arraysize(reads), nullptr, 0); + socket_factory_.AddSocketDataProvider(&socket_data); + + QuicStreamRequest request(factory_.get()); + EXPECT_EQ(ERR_IO_PENDING, + request.Request(host_port_pair_, privacy_mode_, + /*cert_verify_flags=*/0, url_, "GET", net_log_, + callback_.callback())); + + EXPECT_EQ(OK, callback_.WaitForResult()); + + QuicChromiumClientSession* session = GetActiveSession(host_port_pair_); + if (session->connection()->version() > QUIC_VERSION_35) { + EXPECT_TRUE(session->force_hol_blocking()); + } else { + EXPECT_FALSE(session->force_hol_blocking()); + } +} + class QuicStreamFactoryWithDestinationTest : public QuicStreamFactoryTestBase, public ::testing::TestWithParam<PoolingTestParams> {
diff --git a/net/quic/test_tools/quic_test_packet_maker.cc b/net/quic/test_tools/quic_test_packet_maker.cc index 73d6fec01..4750ec3 100644 --- a/net/quic/test_tools/quic_test_packet_maker.cc +++ b/net/quic/test_tools/quic_test_packet_maker.cc
@@ -296,6 +296,7 @@ base::StringPiece data) { InitializeHeader(packet_number, should_include_version); QuicStreamFrame frame(stream_id, fin, offset, data); + DVLOG(1) << "Adding frame: " << frame; return MakePacket(header_, QuicFrame(&frame)); } @@ -518,6 +519,24 @@ } } +std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeForceHolDataPacket( + QuicPacketNumber packet_number, + QuicStreamId stream_id, + bool should_include_version, + bool fin, + QuicStreamOffset* offset, + base::StringPiece data) { + SpdyDataIR spdy_data(stream_id, data); + spdy_data.set_fin(fin); + SpdySerializedFrame spdy_frame( + spdy_request_framer_.SerializeFrame(spdy_data)); + InitializeHeader(packet_number, should_include_version); + QuicStreamFrame quic_frame(kHeadersStreamId, false, *offset, + StringPiece(spdy_frame.data(), spdy_frame.size())); + *offset += spdy_frame.size(); + return MakePacket(header_, QuicFrame(&quic_frame)); +} + // If |offset| is provided, will use the value when creating the packet. // Will also update the value after packet creation. std::unique_ptr<QuicReceivedPacket>
diff --git a/net/quic/test_tools/quic_test_packet_maker.h b/net/quic/test_tools/quic_test_packet_maker.h index 1668072c..43368a3 100644 --- a/net/quic/test_tools/quic_test_packet_maker.h +++ b/net/quic/test_tools/quic_test_packet_maker.h
@@ -90,6 +90,13 @@ bool fin, QuicStreamOffset offset, base::StringPiece data); + std::unique_ptr<QuicReceivedPacket> MakeForceHolDataPacket( + QuicPacketNumber packet_number, + QuicStreamId stream_id, + bool should_include_version, + bool fin, + QuicStreamOffset* offset, + base::StringPiece data); std::unique_ptr<QuicReceivedPacket> MakeMultipleDataFramesPacket( QuicPacketNumber packet_number, QuicStreamId stream_id,
diff --git a/net/spdy/spdy_header_block.cc b/net/spdy/spdy_header_block.cc index 09640c83e..bb3f044 100644 --- a/net/spdy/spdy_header_block.cc +++ b/net/spdy/spdy_header_block.cc
@@ -118,21 +118,18 @@ : lookup_result_->second; } -SpdyHeaderBlock::SpdyHeaderBlock() : storage_(new Storage) {} +SpdyHeaderBlock::SpdyHeaderBlock() {} -SpdyHeaderBlock::SpdyHeaderBlock(SpdyHeaderBlock&& other) - : storage_(std::move(other.storage_)) { - // |block_| is linked_hash_map, which does not have move constructor. +SpdyHeaderBlock::SpdyHeaderBlock(SpdyHeaderBlock&& other) { block_.swap(other.block_); + storage_.swap(other.storage_); } SpdyHeaderBlock::~SpdyHeaderBlock() {} SpdyHeaderBlock& SpdyHeaderBlock::operator=(SpdyHeaderBlock&& other) { - storage_ = std::move(other.storage_); - // |block_| is linked_hash_map, which does not have move assignment - // operator. block_.swap(other.block_); + storage_.swap(other.storage_); return *this; } @@ -167,7 +164,7 @@ void SpdyHeaderBlock::clear() { block_.clear(); - storage_->Clear(); + storage_.reset(); } void SpdyHeaderBlock::insert( @@ -183,14 +180,14 @@ if (iter == block_.end()) { // We write the key first, to assure that the StringPieceProxy has a // reference to a valid StringPiece in its operator=. - out_key = storage_->Write(key); - DVLOG(2) << "Key written as: " << hex - << static_cast<const void*>(key.data()) << ", " << dec + out_key = GetStorage()->Write(key); + DVLOG(2) << "Key written as: " << std::hex + << static_cast<const void*>(key.data()) << ", " << std::dec << key.size(); } else { out_key = iter->first; } - return StringPieceProxy(&block_, storage_.get(), iter, out_key); + return StringPieceProxy(&block_, GetStorage(), iter, out_key); } StringPiece SpdyHeaderBlock::GetHeader(const StringPiece key) const { @@ -207,13 +204,20 @@ AppendHeader(key, value); } else { DVLOG(1) << "Updating key: " << iter->first << " with value: " << value; - iter->second = storage_->Write(value); + iter->second = GetStorage()->Write(value); } } void SpdyHeaderBlock::AppendHeader(const StringPiece key, const StringPiece value) { - block_.insert(make_pair(storage_->Write(key), storage_->Write(value))); + block_.emplace(GetStorage()->Write(key), GetStorage()->Write(value)); +} + +SpdyHeaderBlock::Storage* SpdyHeaderBlock::GetStorage() { + if (!storage_) { + storage_.reset(new Storage); + } + return storage_.get(); } std::unique_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
diff --git a/net/spdy/spdy_header_block.h b/net/spdy/spdy_header_block.h index 0afde31..baf6e8ba 100644 --- a/net/spdy/spdy_header_block.h +++ b/net/spdy/spdy_header_block.h
@@ -141,7 +141,10 @@ private: void Write(const base::StringPiece s); void AppendHeader(const base::StringPiece key, const base::StringPiece value); + Storage* GetStorage(); + // StringPieces held by |block_| point to memory owned by |*storage_|. + // |storage_| might be nullptr as long as |block_| is empty. MapType block_; std::unique_ptr<Storage> storage_; };
diff --git a/net/spdy/spdy_header_block_test.cc b/net/spdy/spdy_header_block_test.cc index b4273af..bfbd0c2 100644 --- a/net/spdy/spdy_header_block_test.cc +++ b/net/spdy/spdy_header_block_test.cc
@@ -76,24 +76,24 @@ // This test verifies that headers can be set in a variety of ways. TEST(SpdyHeaderBlockTest, AddHeaders) { - SpdyHeaderBlock block1; - block1["foo"] = string(300, 'x'); - block1["bar"] = "baz"; - block1.ReplaceOrAppendHeader("qux", "qux1"); - block1["qux"] = "qux2"; - block1.insert(make_pair("key", "value")); + SpdyHeaderBlock block; + block["foo"] = string(300, 'x'); + block["bar"] = "baz"; + block.ReplaceOrAppendHeader("qux", "qux1"); + block["qux"] = "qux2"; + block.insert(std::make_pair("key", "value")); - EXPECT_EQ(Pair("foo", string(300, 'x')), *block1.find("foo")); - EXPECT_EQ("baz", block1["bar"]); - EXPECT_EQ("baz", block1.GetHeader("bar")); + EXPECT_EQ(Pair("foo", string(300, 'x')), *block.find("foo")); + EXPECT_EQ("baz", block["bar"]); + EXPECT_EQ("baz", block.GetHeader("bar")); string qux("qux"); - EXPECT_EQ("qux2", block1[qux]); - EXPECT_EQ("qux2", block1.GetHeader(qux)); - EXPECT_EQ(Pair("key", "value"), *block1.find("key")); + EXPECT_EQ("qux2", block[qux]); + EXPECT_EQ("qux2", block.GetHeader(qux)); + EXPECT_EQ(Pair("key", "value"), *block.find("key")); - block1.erase("key"); - EXPECT_EQ(block1.end(), block1.find("key")); - EXPECT_EQ("", block1.GetHeader("key")); + block.erase("key"); + EXPECT_EQ(block.end(), block.find("key")); + EXPECT_EQ("", block.GetHeader("key")); } // This test verifies that SpdyHeaderBlock can be copied using Clone(). @@ -141,5 +141,28 @@ EXPECT_NE(block1, block2); } +// Test that certain methods do not crash on moved-from instances. +TEST(SpdyHeaderBlockTest, MovedFromIsValid) { + SpdyHeaderBlock block1; + block1["foo"] = "bar"; + + SpdyHeaderBlock block2(std::move(block1)); + EXPECT_THAT(block2, ElementsAre(Pair("foo", "bar"))); + + block1.ReplaceOrAppendHeader("baz", "qux"); + + SpdyHeaderBlock block3(std::move(block1)); + + block1["foo"] = "bar"; + + SpdyHeaderBlock block4(std::move(block1)); + + block1.clear(); + EXPECT_TRUE(block1.empty()); + + block1["foo"] = "bar"; + EXPECT_THAT(block1, ElementsAre(Pair("foo", "bar"))); +} + } // namespace test } // namespace net
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 6091a4b7..a7cc1bd 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -4482,7 +4482,6 @@ new SSLSocketDataProvider(ASYNC, OK)); // Expect HTTP/2 protocols too in SSLConfig. ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP2); - ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoSPDY31); ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11); // Force SPDY. ssl_provider0->SetNextProto(GetParam().protocol); @@ -4566,7 +4565,6 @@ new SSLSocketDataProvider(ASYNC, OK)); // Expect HTTP/2 protocols too in SSLConfig. ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP2); - ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoSPDY31); ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11); // Force SPDY. ssl_provider0->SetNextProto(GetParam().protocol);
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc index 0a9066d..24aa58cc 100644 --- a/net/spdy/spdy_test_util_common.cc +++ b/net/spdy/spdy_test_util_common.cc
@@ -357,7 +357,6 @@ enable_ping(false), enable_user_alternate_protocol_ports(false), enable_priority_dependencies(true), - enable_spdy31(true), enable_quic(false), protocol(protocol), session_max_recv_window_size( @@ -417,7 +416,6 @@ session_deps->enable_user_alternate_protocol_ports; params.enable_priority_dependencies = session_deps->enable_priority_dependencies; - params.enable_spdy31 = session_deps->enable_spdy31; params.enable_quic = session_deps->enable_quic; params.spdy_default_protocol = session_deps->protocol; params.spdy_session_max_recv_window_size =
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h index 252ecd8..56b10c81 100644 --- a/net/spdy/spdy_test_util_common.h +++ b/net/spdy/spdy_test_util_common.h
@@ -204,7 +204,6 @@ bool enable_ping; bool enable_user_alternate_protocol_ports; bool enable_priority_dependencies; - bool enable_spdy31; bool enable_quic; NextProto protocol; size_t session_max_recv_window_size;
diff --git a/net/test/ct_test_util.cc b/net/test/ct_test_util.cc index c22dd3a..3d79967f 100644 --- a/net/test/ct_test_util.cc +++ b/net/test/ct_test_util.cc
@@ -179,7 +179,6 @@ } void GetX509CertTreeLeaf(MerkleTreeLeaf* tree_leaf) { - tree_leaf->log_id = HexToBytes(kTestKeyId); tree_leaf->timestamp = base::Time::FromJsTime(kTestTimestamp); GetX509CertLogEntry(&tree_leaf->log_entry); tree_leaf->extensions = HexToBytes(kDefaultExtensions); @@ -195,7 +194,6 @@ } void GetPrecertTreeLeaf(MerkleTreeLeaf* tree_leaf) { - tree_leaf->log_id = HexToBytes(kTestKeyId); tree_leaf->timestamp = base::Time::FromJsTime(kTestTimestamp); GetPrecertLogEntry(&tree_leaf->log_entry); tree_leaf->extensions = HexToBytes(kDefaultExtensions);
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc index 02328d6..3f93b3e 100644 --- a/net/url_request/url_request_context_builder.cc +++ b/net/url_request/url_request_context_builder.cc
@@ -182,7 +182,6 @@ host_mapping_rules(NULL), testing_fixed_http_port(0), testing_fixed_https_port(0), - enable_spdy31(false), enable_http2(true), enable_quic(false), quic_max_server_configs_stored_in_properties(0), @@ -246,7 +245,6 @@ void URLRequestContextBuilder::SetSpdyAndQuicEnabled(bool spdy_enabled, bool quic_enabled) { - http_network_session_params_.enable_spdy31 = spdy_enabled; http_network_session_params_.enable_http2 = spdy_enabled; http_network_session_params_.enable_quic = quic_enabled; } @@ -414,8 +412,6 @@ http_network_session_params_.testing_fixed_http_port; network_session_params.testing_fixed_https_port = http_network_session_params_.testing_fixed_https_port; - network_session_params.enable_spdy31 = - http_network_session_params_.enable_spdy31; network_session_params.enable_http2 = http_network_session_params_.enable_http2; network_session_params.enable_quic = http_network_session_params_.enable_quic;
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h index 438638e2..ed76c00 100644 --- a/net/url_request/url_request_context_builder.h +++ b/net/url_request/url_request_context_builder.h
@@ -90,7 +90,6 @@ HostMappingRules* host_mapping_rules; uint16_t testing_fixed_http_port; uint16_t testing_fixed_https_port; - bool enable_spdy31; bool enable_http2; bool enable_quic; std::string quic_user_agent_id;
diff --git a/net/url_request/url_request_context_getter.cc b/net/url_request/url_request_context_getter.cc index 1808617..022aa0f 100644 --- a/net/url_request/url_request_context_getter.cc +++ b/net/url_request/url_request_context_getter.cc
@@ -47,7 +47,7 @@ } } } - // If no IO message loop proxy was available, we will just leak memory. + // If no IO task runner was available, we will just leak memory. // This is also true if the IO thread is gone. }
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc index 05f7309..08e869de 100644 --- a/pdf/pdfium/pdfium_engine.cc +++ b/pdf/pdfium/pdfium_engine.cc
@@ -1706,7 +1706,6 @@ } client_->UpdateCursor(cursor); - pp::Point point = event.GetPosition(); std::string url = GetLinkAtPosition(event.GetPosition()); if (url != link_under_cursor_) { link_under_cursor_ = url;
diff --git a/ppapi/host/resource_message_filter.h b/ppapi/host/resource_message_filter.h index 8dcf6c2..31b469c 100644 --- a/ppapi/host/resource_message_filter.h +++ b/ppapi/host/resource_message_filter.h
@@ -52,7 +52,7 @@ // scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( // const IPC::Message& message) override { // if (message.type() == MyMessage::ID) -// return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); +// return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); // return NULL; // } // @@ -127,9 +127,9 @@ scoped_refptr<base::SingleThreadTaskRunner> deletion_task_runner_; - // Message loop to send resource message replies on. This will be the message - // loop proxy of the IO thread for the browser process or the main thread for - // the renderer process. + // Task runner to send resource message replies on. This will be the task + // runner of the IO thread for the browser process or the main thread for a + // renderer process. scoped_refptr<base::SingleThreadTaskRunner> reply_thread_task_runner_; // Non-owning pointer to the resource host owning this filter. Should only be
diff --git a/ppapi/native_client/native_client.gyp b/ppapi/native_client/native_client.gyp index c4e5fae3..899bd5e 100644 --- a/ppapi/native_client/native_client.gyp +++ b/ppapi/native_client/native_client.gyp
@@ -138,6 +138,8 @@ '-lgles2_implementation_nacl', '-lgles2_cmd_helper_nacl', '-lgles2_utils_nacl', + '-lgfx_geometry_nacl', + '-lgfx_ipc_geometry_nacl', '-lcommand_buffer_client_nacl', '-lcommand_buffer_common_nacl', '-ltracing_nacl', @@ -185,6 +187,8 @@ '>(tc_lib_dir_irt64)/libtracing_nacl.a', '>(tc_lib_dir_irt64)/libgles2_cmd_helper_nacl.a', '>(tc_lib_dir_irt64)/libgles2_utils_nacl.a', + '>(tc_lib_dir_irt64)/libgfx_geometry_nacl.a', + '>(tc_lib_dir_irt64)/libgfx_ipc_geometry_nacl.a', '>(tc_lib_dir_irt64)/libipc_nacl.a', '>(tc_lib_dir_irt64)/libbase_nacl.a', '>(tc_lib_dir_irt64)/libirt_browser.a', @@ -209,6 +213,8 @@ '>(tc_lib_dir_irt32)/libtracing_nacl.a', '>(tc_lib_dir_irt32)/libgles2_cmd_helper_nacl.a', '>(tc_lib_dir_irt32)/libgles2_utils_nacl.a', + '>(tc_lib_dir_irt32)/libgfx_geometry_nacl.a', + '>(tc_lib_dir_irt32)/libgfx_ipc_geometry_nacl.a', '>(tc_lib_dir_irt32)/libipc_nacl.a', '>(tc_lib_dir_irt32)/libbase_nacl.a', '>(tc_lib_dir_irt32)/libirt_browser.a', @@ -235,6 +241,8 @@ '>(tc_lib_dir_irt_arm)/libtracing_nacl.a', '>(tc_lib_dir_irt_arm)/libgles2_cmd_helper_nacl.a', '>(tc_lib_dir_irt_arm)/libgles2_utils_nacl.a', + '>(tc_lib_dir_irt_arm)/libgfx_geometry_nacl.a', + '>(tc_lib_dir_irt_arm)/libgfx_ipc_geometry_nacl.a', '>(tc_lib_dir_irt_arm)/libipc_nacl.a', '>(tc_lib_dir_irt_arm)/libbase_nacl.a', '>(tc_lib_dir_irt_arm)/libirt_browser.a', @@ -261,6 +269,8 @@ '>(tc_lib_dir_irt_mips)/libtracing_nacl.a', '>(tc_lib_dir_irt_mips)/libgles2_cmd_helper_nacl.a', '>(tc_lib_dir_irt_mips)/libgles2_utils_nacl.a', + '>(tc_lib_dir_irt_mips)/libgfx_geometry_nacl.a', + '>(tc_lib_dir_irt_mips)/libgfx_ipc_geometry_nacl.a', '>(tc_lib_dir_irt_mips)/libipc_nacl.a', '>(tc_lib_dir_irt_mips)/libbase_nacl.a', '>(tc_lib_dir_irt_mips)/libirt_browser.a',
diff --git a/ppapi/ppapi_internal.gyp b/ppapi/ppapi_internal.gyp index c58423a8..99b4652d 100644 --- a/ppapi/ppapi_internal.gyp +++ b/ppapi/ppapi_internal.gyp
@@ -107,6 +107,7 @@ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../gin/gin.gyp:gin', + '../gpu/command_buffer/command_buffer.gyp:gles2_utils', '../gpu/gpu.gyp:gles2_implementation', '../gpu/gpu.gyp:command_buffer_traits', '../media/media.gyp:shared_memory_support', @@ -116,6 +117,7 @@ '../third_party/icu/icu.gyp:icuuc', '../third_party/icu/icu.gyp:icui18n', '../ui/surface/surface.gyp:surface', + '../ui/gfx/gfx.gyp:gfx_geometry', 'ppapi.gyp:ppapi_c', 'ppapi_shared', 'ppapi_ipc', @@ -156,6 +158,7 @@ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../gin/gin.gyp:gin', + '../gpu/command_buffer/command_buffer.gyp:gles2_utils', '../gpu/gpu.gyp:gles2_implementation', '../gpu/gpu.gyp:command_buffer_traits', '../media/media.gyp:shared_memory_support', @@ -164,6 +167,7 @@ '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icuuc', '../third_party/icu/icu.gyp:icui18n', + '../ui/gfx/gfx.gyp:gfx_geometry', '../ui/surface/surface.gyp:surface', 'ppapi.gyp:ppapi_c', 'ppapi_shared',
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.cc b/ppapi/proxy/ppapi_command_buffer_proxy.cc index b7c5264..77ef282 100644 --- a/ppapi/proxy/ppapi_command_buffer_proxy.cc +++ b/ppapi/proxy/ppapi_command_buffer_proxy.cc
@@ -262,11 +262,6 @@ return -1; } -int32_t PpapiCommandBufferProxy::GetImageGpuMemoryBufferId(unsigned image_id) { - NOTREACHED(); - return -1; -} - bool PpapiCommandBufferProxy::Send(IPC::Message* msg) { DCHECK(last_state_.error == gpu::error::kNoError);
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.h b/ppapi/proxy/ppapi_command_buffer_proxy.h index cc4ef372..3cb7f4232 100644 --- a/ppapi/proxy/ppapi_command_buffer_proxy.h +++ b/ppapi/proxy/ppapi_command_buffer_proxy.h
@@ -64,7 +64,6 @@ size_t height, unsigned internalformat, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query, const base::Closure& callback) override; void SetLock(base::Lock*) override; void EnsureWorkVisible() override;
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index 7b0afbb..eaf2feb 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h
@@ -1045,14 +1045,15 @@ ppapi::HostResource) // PPB_Graphics3D. -IPC_SYNC_MESSAGE_ROUTED3_4(PpapiHostMsg_PPBGraphics3D_Create, - PP_Instance /* instance */, - ppapi::HostResource /* share_context */, - std::vector<int32_t> /* attrib_list */, - ppapi::HostResource /* result */, - gpu::Capabilities /* capabilities */, - ppapi::proxy::SerializedHandle /* shared_state */, - gpu::CommandBufferId /* command_buffer_id */) +IPC_SYNC_MESSAGE_ROUTED3_4( + PpapiHostMsg_PPBGraphics3D_Create, + PP_Instance /* instance */, + ppapi::HostResource /* share_context */, + gpu::gles2::ContextCreationAttribHelper /* attrib_helper */, + ppapi::HostResource /* result */, + gpu::Capabilities /* capabilities */, + ppapi::proxy::SerializedHandle /* shared_state */, + gpu::CommandBufferId /* command_buffer_id */) IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_SetGetBuffer, ppapi::HostResource /* context */, int32_t /* transfer_buffer_id */)
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc index ca29adc..ac08224 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -175,24 +175,42 @@ share_gles2 = share_graphics->gles2_impl(); } + gpu::gles2::ContextCreationAttribHelper attrib_helper; std::vector<int32_t> attribs; if (attrib_list) { - for (const int32_t* attr = attrib_list; - attr[0] != PP_GRAPHICS3DATTRIB_NONE; + for (const int32_t* attr = attrib_list; attr[0] != PP_GRAPHICS3DATTRIB_NONE; attr += 2) { - attribs.push_back(attr[0]); - attribs.push_back(attr[1]); + switch (attr[0]) { + case PP_GRAPHICS3DATTRIB_WIDTH: + attrib_helper.offscreen_framebuffer_size.set_width(attr[1]); + break; + case PP_GRAPHICS3DATTRIB_HEIGHT: + attrib_helper.offscreen_framebuffer_size.set_height(attr[1]); + break; + case PP_GRAPHICS3DATTRIB_GPU_PREFERENCE: + attrib_helper.gpu_preference = + (attr[1] == PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER) + ? gl::PreferIntegratedGpu + : gl::PreferDiscreteGpu; + break; + default: + attribs.push_back(attr[0]); + attribs.push_back(attr[1]); + break; + } } + attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); } - attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); + if (!attrib_helper.Parse(attribs)) + return 0; HostResource result; gpu::Capabilities capabilities; ppapi::proxy::SerializedHandle shared_state; gpu::CommandBufferId command_buffer_id; - dispatcher->Send(new PpapiHostMsg_PPBGraphics3D_Create(API_ID_PPB_GRAPHICS_3D, - instance, share_host, attribs, &result, &capabilities, &shared_state, - &command_buffer_id)); + dispatcher->Send(new PpapiHostMsg_PPBGraphics3D_Create( + API_ID_PPB_GRAPHICS_3D, instance, share_host, attrib_helper, &result, + &capabilities, &shared_state, &command_buffer_id)); if (result.is_null()) return 0; @@ -243,16 +261,12 @@ void PPB_Graphics3D_Proxy::OnMsgCreate( PP_Instance instance, HostResource share_context, - const std::vector<int32_t>& attribs, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, HostResource* result, gpu::Capabilities* capabilities, SerializedHandle* shared_state, gpu::CommandBufferId* command_buffer_id) { shared_state->set_null_shmem(); - if (attribs.empty() || - attribs.back() != PP_GRAPHICS3DATTRIB_NONE || - !(attribs.size() & 1)) - return; // Bad message. thunk::EnterResourceCreation enter(instance); @@ -261,13 +275,9 @@ base::SharedMemoryHandle handle = base::SharedMemory::NULLHandle(); result->SetHostResource( - instance, - enter.functions()->CreateGraphics3DRaw(instance, - share_context.host_resource(), - &attribs.front(), - capabilities, - &handle, - command_buffer_id)); + instance, enter.functions()->CreateGraphics3DRaw( + instance, share_context.host_resource(), attrib_helper, + capabilities, &handle, command_buffer_id)); if (!result->is_null()) { shared_state->set_shmem(TransportSHMHandle(dispatcher(), handle), sizeof(gpu::CommandBuffer::State));
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.h b/ppapi/proxy/ppb_graphics_3d_proxy.h index 9536ee20..2ae06e9 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.h +++ b/ppapi/proxy/ppb_graphics_3d_proxy.h
@@ -22,6 +22,9 @@ #include "ppapi/utility/completion_callback_factory.h" namespace gpu { +namespace gles2 { +struct ContextCreationAttribHelper; +} struct Capabilities; } @@ -88,7 +91,7 @@ private: void OnMsgCreate(PP_Instance instance, HostResource share_context, - const std::vector<int32_t>& attribs, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, HostResource* result, gpu::Capabilities* capabilities, SerializedHandle* handle,
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index f86ffdb..1c79bc5c 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -265,7 +265,7 @@ PP_Resource ResourceCreationProxy::CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) {
diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h index 30267456..9e7ca263 100644 --- a/ppapi/proxy/resource_creation_proxy.h +++ b/ppapi/proxy/resource_creation_proxy.h
@@ -123,7 +123,7 @@ PP_Resource CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) override;
diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index 5636b5f4..ae6dae6 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h
@@ -36,6 +36,9 @@ struct PP_Size; namespace gpu { +namespace gles2 { +struct ContextCreationAttribHelper; +} struct Capabilities; } @@ -142,7 +145,7 @@ virtual PP_Resource CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) = 0;
diff --git a/remoting/android/BUILD.gn b/remoting/android/BUILD.gn index 45a184b..5941237 100644 --- a/remoting/android/BUILD.gn +++ b/remoting/android/BUILD.gn
@@ -14,6 +14,7 @@ "host/src/org/chromium/chromoting/host/jni/Host.java", "java/src/org/chromium/chromoting/jni/Client.java", "java/src/org/chromium/chromoting/jni/Display.java", + "java/src/org/chromium/chromoting/jni/GlDisplay.java", "java/src/org/chromium/chromoting/jni/JniInterface.java", "java/src/org/chromium/chromoting/jni/TouchEventData.java", ]
diff --git a/remoting/android/client_java_tmpl.gni b/remoting/android/client_java_tmpl.gni index f4cb6d7..20e076d9 100644 --- a/remoting/android/client_java_tmpl.gni +++ b/remoting/android/client_java_tmpl.gni
@@ -9,6 +9,7 @@ android_library(target_name) { _java_file_prefix = "//remoting/android/java/src/org/chromium/chromoting" _java_files = [ + "AbstractDesktopView.java", "AccountsAdapter.java", "ActivityLifecycleListener.java", "AnimationJob.java", @@ -21,7 +22,7 @@ "Desktop.java", "DesktopCanvas.java", "DesktopView.java", - "DesktopViewInterface.java", + "DesktopViewFactory.java", "DummyActivityLifecycleListener.java", "DummyClientExtension.java", "Event.java", @@ -78,6 +79,7 @@ "jni/Client.java", "jni/ConnectionListener.java", "jni/Display.java", + "jni/GlDisplay.java", "jni/JniInterface.java", "jni/TouchEventData.java", ]
diff --git a/remoting/android/java/res/layout/desktop.xml b/remoting/android/java/res/layout/desktop.xml index 0850c7c..763a85e 100644 --- a/remoting/android/java/res/layout/desktop.xml +++ b/remoting/android/java/res/layout/desktop.xml
@@ -8,7 +8,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> - <org.chromium.chromoting.DesktopView android:id="@+id/desktop_view" + <FrameLayout android:id="@+id/desktop_view_placeholder" android:layout_width="match_parent" android:layout_height="match_parent"/> <RelativeLayout
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java b/remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java similarity index 61% rename from remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java rename to remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java index 3263739..63202bc 100644 --- a/remoting/android/java/src/org/chromium/chromoting/DesktopViewInterface.java +++ b/remoting/android/java/src/org/chromium/chromoting/AbstractDesktopView.java
@@ -4,65 +4,72 @@ package org.chromium.chromoting; +import android.content.Context; import android.graphics.Point; +import android.view.SurfaceView; import org.chromium.chromoting.jni.Client; /** * Callback interface to allow the TouchInputHandler to request actions on the DesktopView. */ -public interface DesktopViewInterface { +public abstract class AbstractDesktopView extends SurfaceView { + public AbstractDesktopView(Context context) { + super(context); + } + /** * Initializes the instance. Implementations can assume this function will be called exactly * once after constructor but before other functions. */ - void init(Desktop desktop, Client client); + public abstract void init(Desktop desktop, Client client); /** Triggers a brief animation to indicate the existence and location of an input event. */ - void showInputFeedback(DesktopView.InputFeedbackType feedbackToShow, Point pos); + public abstract void showInputFeedback(DesktopView.InputFeedbackType feedbackToShow, Point pos); + // TODO(yuweih): move showActionBar and showKeyboard out of this abstract class. /** Shows the action bar. */ - void showActionBar(); + public abstract void showActionBar(); /** Shows the software keyboard. */ - void showKeyboard(); + public abstract void showKeyboard(); /** * Informs the view that its transformation matrix (for rendering the remote desktop bitmap) * has been changed by the TouchInputHandler, which requires repainting. */ - void transformationChanged(); + public abstract void transformationChanged(); /** * Informs the view that the cursor has been moved by the TouchInputHandler, which requires * repainting. */ - void cursorMoved(); + public abstract void cursorMoved(); /** * Informs the view that the cursor visibility has been changed (for different input mode) by * the TouchInputHandler, which requires repainting. */ - void cursorVisibilityChanged(); + public abstract void cursorVisibilityChanged(); /** * Starts or stops an animation. Whilst the animation is running, the DesktopView will * periodically call TouchInputHandler.processAnimation() and repaint itself. */ - void setAnimationEnabled(boolean enabled); + public abstract void setAnimationEnabled(boolean enabled); /** * An {@link Event} which is triggered when the view is being painted. Adding handlers to this * event causes painting to be triggered continuously until they are all removed. */ - Event<PaintEventParameter> onPaint(); + public abstract Event<PaintEventParameter> onPaint(); /** An {@link Event} which is triggered when the client size is changed. */ - Event<SizeChangedEventParameter> onClientSizeChanged(); + public abstract Event<SizeChangedEventParameter> onClientSizeChanged(); /** An {@link Event} which is triggered when the host size is changed. */ - Event<SizeChangedEventParameter> onHostSizeChanged(); + public abstract Event<SizeChangedEventParameter> onHostSizeChanged(); - /** An {@link Event} which is triggered when user touchs the screen. */ - Event<TouchEventParameter> onTouch(); + /** An {@link Event} which is triggered when user touches the screen. */ + public abstract Event<TouchEventParameter> onTouch(); }
diff --git a/remoting/android/java/src/org/chromium/chromoting/Desktop.java b/remoting/android/java/src/org/chromium/chromoting/Desktop.java index 4ad4324..d328a030 100644 --- a/remoting/android/java/src/org/chromium/chromoting/Desktop.java +++ b/remoting/android/java/src/org/chromium/chromoting/Desktop.java
@@ -24,6 +24,7 @@ import android.view.View; import android.view.View.OnLayoutChangeListener; import android.view.View.OnTouchListener; +import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; import org.chromium.chromoting.cardboard.DesktopActivity; @@ -104,7 +105,10 @@ mToolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(mToolbar); - DesktopView remoteHostDesktop = (DesktopView) findViewById(R.id.desktop_view); + AbstractDesktopView remoteHostDesktop = mClient.createDesktopView(this); + remoteHostDesktop.setLayoutParams(new ViewGroup.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); + ((ViewGroup) findViewById(R.id.desktop_view_placeholder)).addView(remoteHostDesktop); remoteHostDesktop.init(this, mClient); mSwitchToCardboardDesktopActivity = false; @@ -163,8 +167,6 @@ super.onStart(); mActivityLifecycleListener.onActivityStarted(this); mClient.enableVideoChannel(true); - DesktopView desktopView = (DesktopView) findViewById(R.id.desktop_view); - desktopView.attachRedrawCallback(); mClient.getCapabilityManager().addListener(this); }
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java b/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java index 16739441..b0e9d31 100644 --- a/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java +++ b/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java
@@ -18,7 +18,7 @@ */ private static final float MAX_ZOOM_FACTOR = 100.0f; - private final DesktopViewInterface mViewer; + private final AbstractDesktopView mViewer; private final RenderData mRenderData; /** @@ -34,7 +34,7 @@ */ private Rect mSystemUiOffsetPixels = new Rect(); - public DesktopCanvas(DesktopViewInterface viewer, RenderData renderData) { + public DesktopCanvas(AbstractDesktopView viewer, RenderData renderData) { mViewer = viewer; mRenderData = renderData; }
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java index b66b041..c6f427b 100644 --- a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java +++ b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java
@@ -13,10 +13,8 @@ import android.os.Looper; import android.os.SystemClock; import android.text.InputType; -import android.util.AttributeSet; import android.view.MotionEvent; import android.view.SurfaceHolder; -import android.view.SurfaceView; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; @@ -31,8 +29,7 @@ * multitouch pan and zoom gestures, and collects and forwards input events. */ /** GUI element that holds the drawing canvas. */ -public class DesktopView extends SurfaceView implements DesktopViewInterface, - SurfaceHolder.Callback { +public class DesktopView extends AbstractDesktopView implements SurfaceHolder.Callback { /** Used to define the animation feedback shown when a user touches the screen. */ public enum InputFeedbackType { NONE, SMALL_ANIMATION, LARGE_ANIMATION } @@ -75,8 +72,11 @@ /** Whether the TouchInputHandler has requested animation to be performed. */ private boolean mInputAnimationRunning = false; - public DesktopView(Context context, AttributeSet attributes) { - super(context, attributes); + public DesktopView(Context context, Display display) { + super(context); + + Preconditions.notNull(display); + mDisplay = display; // Give this view keyboard focus, allowing us to customize the soft keyboard's settings. setFocusableInTouchMode(true); @@ -93,14 +93,10 @@ public void init(Desktop desktop, Client client) { Preconditions.isNull(mDesktop); Preconditions.isNull(mClient); - Preconditions.isNull(mDisplay); Preconditions.notNull(desktop); Preconditions.notNull(client); - Preconditions.notNull(client.getDisplay()); - Preconditions.isTrue(client.getDisplay() instanceof Display); mDesktop = desktop; mClient = client; - mDisplay = (Display) client.getDisplay(); mInputHandler.init(desktop, new InputEventSender(client)); }
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopViewFactory.java b/remoting/android/java/src/org/chromium/chromoting/DesktopViewFactory.java new file mode 100644 index 0000000..3cb55ba --- /dev/null +++ b/remoting/android/java/src/org/chromium/chromoting/DesktopViewFactory.java
@@ -0,0 +1,18 @@ +// 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. + +package org.chromium.chromoting; + +import android.content.Context; + +/** + * Interface for creating a implementation specific desktop view. + */ +public interface DesktopViewFactory { + /** + * Creates an uninitialized implementation specific desktop view. Initializing and adding the + * view should done separately. + */ + AbstractDesktopView createDesktopView(Context context); +}
diff --git a/remoting/android/java/src/org/chromium/chromoting/FeedbackAnimator.java b/remoting/android/java/src/org/chromium/chromoting/FeedbackAnimator.java index d08e881..37c2ab3 100644 --- a/remoting/android/java/src/org/chromium/chromoting/FeedbackAnimator.java +++ b/remoting/android/java/src/org/chromium/chromoting/FeedbackAnimator.java
@@ -34,7 +34,7 @@ } /** Begins a new animation sequence at position (|pos|). */ - public static void startAnimation(DesktopViewInterface view, + public static void startAnimation(AbstractDesktopView view, Point pos, DesktopView.InputFeedbackType feedbackType) { if (feedbackType == DesktopView.InputFeedbackType.NONE) {
diff --git a/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java b/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java index 9d2c596..3f518a6f 100644 --- a/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java +++ b/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java
@@ -20,7 +20,7 @@ * are passed to the InputStrategyInterface implementation set by the DesktopView. */ public class TouchInputHandler { - private final DesktopViewInterface mViewer; + private final AbstractDesktopView mViewer; private final Context mContext; private final RenderData mRenderData; private final DesktopCanvas mDesktopCanvas; @@ -179,7 +179,7 @@ } } - public TouchInputHandler(DesktopViewInterface viewer, Context context, RenderData renderData) { + public TouchInputHandler(AbstractDesktopView viewer, Context context, RenderData renderData) { mViewer = viewer; mContext = context; mRenderData = renderData; @@ -242,7 +242,7 @@ }); } - private void attachViewEvents(DesktopViewInterface viewer) { + private void attachViewEvents(AbstractDesktopView viewer) { viewer.onTouch().add(new Event.ParameterRunnable<TouchEventParameter>() { @Override public void run(TouchEventParameter parameter) {
diff --git a/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java b/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java index 2163b9c..72cc570 100644 --- a/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java +++ b/remoting/android/java/src/org/chromium/chromoting/cardboard/CardboardRenderer.java
@@ -106,10 +106,10 @@ // Flag to indicate whether to show menu bar. private boolean mMenuBarVisible; - public CardboardRenderer(Activity activity, Client client) { + public CardboardRenderer(Activity activity, Client client, Display display) { mActivity = activity; mClient = client; - mDisplay = (Display) client.getDisplay(); + mDisplay = display; mCameraPosition = 0.0f; mCameraMatrix = new float[16]; @@ -154,7 +154,7 @@ mDesktop = new Desktop(mDisplay); mMenuBar = new MenuBar(mActivity); mPhotosphere = new Photosphere(mActivity); - mCursor = new Cursor(mClient); + mCursor = new Cursor(mClient, mDisplay); initializeRedrawCallback(); }
diff --git a/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java b/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java index 24127b2..0f49a82 100644 --- a/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java +++ b/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java
@@ -80,9 +80,9 @@ private PointF mCursorPosition; - public Cursor(Client client) { + public Cursor(Client client, Display display) { mClient = client; - mDisplay = (Display) client.getDisplay(); + mDisplay = display; mHalfFrameSize = new PointF(0.0f, 0.0f); mCursorPosition = new PointF(0.0f, 0.0f);
diff --git a/remoting/android/java/src/org/chromium/chromoting/cardboard/DesktopActivity.java b/remoting/android/java/src/org/chromium/chromoting/cardboard/DesktopActivity.java index e5ac3ba..8f42c4a 100644 --- a/remoting/android/java/src/org/chromium/chromoting/cardboard/DesktopActivity.java +++ b/remoting/android/java/src/org/chromium/chromoting/cardboard/DesktopActivity.java
@@ -44,7 +44,11 @@ mSwitchToDesktopActivity = false; CardboardView cardboardView = (CardboardView) findViewById(R.id.cardboard_view); - mRenderer = new CardboardRenderer(this, mClient); + + // THE CODE BELOW IS BROKEN. + // To make it work, you have to somehow get the reference to the Display object and pass + // it into the constructor. + mRenderer = new CardboardRenderer(this, mClient, null); mIsListening = false; // Associate a CardboardView.StereoRenderer with cardboard view.
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/Client.java b/remoting/android/java/src/org/chromium/chromoting/jni/Client.java index 058fcac..3a8114d 100644 --- a/remoting/android/java/src/org/chromium/chromoting/jni/Client.java +++ b/remoting/android/java/src/org/chromium/chromoting/jni/Client.java
@@ -4,11 +4,16 @@ package org.chromium.chromoting.jni; +import android.content.Context; + import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.JNINamespace; import org.chromium.base.annotations.SuppressFBWarnings; +import org.chromium.chromoting.AbstractDesktopView; import org.chromium.chromoting.CapabilityManager; +import org.chromium.chromoting.DesktopViewFactory; import org.chromium.chromoting.InputStub; +import org.chromium.chromoting.Preconditions; import org.chromium.chromoting.SessionAuthenticator; /** @@ -23,8 +28,8 @@ // Pointer to the C++ object, cast to a |long|. private long mNativeJniClient; - // Implementation-dependent display object used by the desktop view. - private Object mDisplay; + // The factory to create implementation-dependent desktop view. + private DesktopViewFactory mDesktopViewFactory; // The global Client instance (may be null). This needs to be a global singleton so that the // Client can be passed between Activities. @@ -40,21 +45,20 @@ } /** - * Sets the display object. Called by the native code when the connection starts. - * @param display the implementation-dependent object used by the desktop view. + * Sets the desktop view factory. Called by the native code when the connection starts. + * @param factory The factory to create implementation-dependent desktop view. */ @CalledByNative - private void setDisplay(Object display) { - mDisplay = display; + private void setDesktopViewFactory(DesktopViewFactory factory) { + mDesktopViewFactory = factory; } /** - * Returns the display object. It will be null before calling connectToHost() or after calling - * disconnectFromHost(). - * @return the display object. + * Creates an implementation specific desktop view. */ - public Object getDisplay() { - return mDisplay; + public AbstractDesktopView createDesktopView(Context context) { + Preconditions.notNull(mDesktopViewFactory); + return mDesktopViewFactory.createDesktopView(context); } // Suppress FindBugs warning, since |sClient| is only used on the UI thread. @@ -130,8 +134,6 @@ mConnectionListener = null; mConnected = false; mCapabilityManager.onHostDisconnect(); - - mDisplay = null; } /** Called whenever the connection status changes. */
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/Display.java b/remoting/android/java/src/org/chromium/chromoting/jni/Display.java index d496207e..f7c7a10 100644 --- a/remoting/android/java/src/org/chromium/chromoting/jni/Display.java +++ b/remoting/android/java/src/org/chromium/chromoting/jni/Display.java
@@ -4,6 +4,7 @@ package org.chromium.chromoting.jni; +import android.content.Context; import android.graphics.Bitmap; import android.graphics.Point; import android.os.Looper; @@ -11,6 +12,9 @@ import org.chromium.base.Log; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.JNINamespace; +import org.chromium.chromoting.AbstractDesktopView; +import org.chromium.chromoting.DesktopView; +import org.chromium.chromoting.DesktopViewFactory; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -56,13 +60,6 @@ } /** - * @return the pointer to the native C++ object. - */ - public long getNativePointer() { - return mNativeJniDisplayHandler; - } - - /** * Sets the redraw callback to the provided functor. Provide a value of null whenever the * window is no longer visible so that we don't continue to draw onto it. Called on the UI * thread. @@ -173,6 +170,16 @@ } @CalledByNative + private DesktopViewFactory createDesktopViewFactory() { + return new DesktopViewFactory() { + @Override + public AbstractDesktopView createDesktopView(Context context) { + return new DesktopView(context, Display.this); + } + }; + } + + @CalledByNative private static Display createJavaDisplayObject(long nativeDisplayHandler) { return new Display(nativeDisplayHandler); }
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/GlDisplay.java b/remoting/android/java/src/org/chromium/chromoting/jni/GlDisplay.java new file mode 100644 index 0000000..2c99bd2 --- /dev/null +++ b/remoting/android/java/src/org/chromium/chromoting/jni/GlDisplay.java
@@ -0,0 +1,191 @@ +// 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. + +package org.chromium.chromoting.jni; + +import android.content.Context; +import android.view.Surface; + +import org.chromium.base.annotations.CalledByNative; +import org.chromium.base.annotations.JNINamespace; +import org.chromium.chromoting.AbstractDesktopView; +import org.chromium.chromoting.DesktopViewFactory; +import org.chromium.chromoting.Event; +import org.chromium.chromoting.SizeChangedEventParameter; + +/** + * This class is the JNI interface class that helps bridging GlDesktopView with the OpenGL renderer + * in native code. The lifetime of this class is managed by the native JniGlDisplayHandler. + * + * This class works entirely on the UI thread: + * Functions should all be called on UI. + * Events will only be triggered on UI. + */ +@JNINamespace("remoting") +public class GlDisplay { + private volatile long mNativeJniGlDisplay; + private final Event.Raisable<SizeChangedEventParameter> mOnHostSizeChanged = + new Event.Raisable<>(); + private final Event.Raisable<Void> mOnCanvasRendered = + new Event.Raisable<>(); + + private GlDisplay(long nativeJniGlDisplay) { + mNativeJniGlDisplay = nativeJniGlDisplay; + } + + /** + * Invalidates this object and disconnects from the native display handler. Called on the + * display thread by the native code. + */ + @CalledByNative + private void invalidate() { + mNativeJniGlDisplay = 0; + } + + /** + * Notifies the OpenGL renderer that a surface for OpenGL to draw is created. + * @param surface the surface to be drawn on + */ + public void surfaceCreated(Surface surface) { + if (mNativeJniGlDisplay != 0) { + nativeOnSurfaceCreated(mNativeJniGlDisplay, surface); + } + } + + /** + * Notifies the OpenGL renderer the size of the surface. Should be called after surfaceCreated() + * and before surfaceDestroyed(). + * @param width the width of the surface + * @param height the height of the surface + */ + public void surfaceChanged(int width, int height) { + if (mNativeJniGlDisplay != 0) { + nativeOnSurfaceChanged(mNativeJniGlDisplay, width, height); + } + } + + /** + * Notifies the OpenGL renderer that the current surface being used is about to be destroyed. + */ + public void surfaceDestroyed() { + if (mNativeJniGlDisplay != 0) { + nativeOnSurfaceDestroyed(mNativeJniGlDisplay); + } + } + + /** + * Sets the transformation matrix (in pixel coordinates). + * @param matrix the transformation matrix + */ + public void pixelTransformationChanged(float[] matrix) { + if (mNativeJniGlDisplay != 0) { + nativeOnPixelTransformationChanged(mNativeJniGlDisplay, matrix); + } + } + + /** + * Moves the cursor to the corresponding location on the desktop. + */ + public void cursorPixelPositionChanged(int x, int y) { + if (mNativeJniGlDisplay != 0) { + nativeOnCursorPixelPositionChanged(mNativeJniGlDisplay, x, y); + } + } + + /** + * Decides whether the cursor should be shown on the canvas. + */ + public void cursorVisibilityChanged(boolean visible) { + if (mNativeJniGlDisplay != 0) { + nativeOnCursorVisibilityChanged(mNativeJniGlDisplay, visible); + } + } + + /** + * Called by native code to notify GlDisplay that the size of the canvas (=size of desktop) has + * changed. + * @param width width of the canvas + * @param height height of the canvas + */ + @CalledByNative + private void changeCanvasSize(int width, int height) { + mOnHostSizeChanged.raise(new SizeChangedEventParameter(width, height)); + } + + /** + * An {@link Event} triggered when the size of the host desktop is changed. + */ + public Event<SizeChangedEventParameter> onHostSizeChanged() { + return mOnHostSizeChanged; + } + + /** + * Called by native code when a render request has been done by the OpenGL renderer. This + * will only be called when the render event callback is enabled. + */ + @CalledByNative + private void canvasRendered() { + mOnCanvasRendered.raise(null); + } + + /** + * An {@link} triggered when render event callback is enabled and a render request has been done + * by the OpenGL renderer. + */ + public Event<Void> onCanvasRendered() { + return mOnCanvasRendered; + } + + /** + * Enables or disables render event callback. {@link GlDisplay#onCanvasRendered()} will only be + * triggered if this is set to true. + * @param enabled true to enable and false to disable + */ + public void setRenderEventEnabled(boolean enabled) { + if (mNativeJniGlDisplay != 0) { + nativeSetRenderEventEnabled(mNativeJniGlDisplay, enabled); + } + } + + /** + * Shows the cursor input feedback animation with the given diameter at the given desktop + * location. + */ + public void showCursorInputFeedback(int x, int y, float diameter) { + if (mNativeJniGlDisplay != 0) { + nativeOnCursorInputFeedback(mNativeJniGlDisplay, x, y, diameter); + } + } + + @CalledByNative + private DesktopViewFactory createDesktopViewFactory() { + return new DesktopViewFactory() { + @Override + public AbstractDesktopView createDesktopView(Context context) { + // UNIMPLEMENTED. + return null; + } + }; + } + + @CalledByNative + private static GlDisplay createJavaDisplayObject(long nativeDisplayHandler) { + return new GlDisplay(nativeDisplayHandler); + } + + private native void nativeOnSurfaceCreated(long nativeJniGlDisplayHandler, Surface surface); + private native void nativeOnSurfaceChanged(long nativeJniGlDisplayHandler, + int width, int height); + private native void nativeOnSurfaceDestroyed(long nativeJniGlDisplayHandler); + private native void nativeOnPixelTransformationChanged(long nativeJniGlDisplayHandler, + float[] matrix); + private native void nativeOnCursorPixelPositionChanged(long nativeJniGlDisplayHandler, + int x, int y); + private native void nativeOnCursorInputFeedback(long nativeJniGlDisplayHandler, + int x, int y, float diameter); + private native void nativeOnCursorVisibilityChanged(long nativeJniGlDisplayHandler, + boolean visible); + private native void nativeSetRenderEventEnabled(long nativeJniGlDisplayHandler, + boolean enabled); +}
diff --git a/remoting/client/jni/jni_client.cc b/remoting/client/jni/jni_client.cc index 3408bfec..90db7a9 100644 --- a/remoting/client/jni/jni_client.cc +++ b/remoting/client/jni/jni_client.cc
@@ -12,6 +12,7 @@ #include "remoting/client/jni/chromoting_jni_runtime.h" #include "remoting/client/jni/display_updater_factory.h" #include "remoting/client/jni/jni_display_handler.h" +#include "remoting/client/jni/jni_gl_display_handler.h" #include "remoting/client/jni/jni_pairing_secret_fetcher.h" #include "remoting/client/jni/jni_touch_event_data.h" #include "remoting/client/jni/jni_video_renderer.h" @@ -161,12 +162,13 @@ const base::android::JavaParamRef<jstring>& capabilities, const base::android::JavaParamRef<jstring>& flags) { #if defined(REMOTING_ANDROID_ENABLE_OPENGL_RENDERER) -#error Feature not implemented. + JniGlDisplayHandler* raw_display_handler = new JniGlDisplayHandler(runtime_); #else JniDisplayHandler* raw_display_handler = new JniDisplayHandler(runtime_); #endif // defined(REMOTING_ANDROID_ENABLE_OPENGL_RENDERER) - Java_Client_setDisplay(env, java_client_.obj(), - raw_display_handler->GetJavaDisplay().obj()); + Java_Client_setDesktopViewFactory( + env, java_client_.obj(), + raw_display_handler->CreateDesktopViewFactory().obj()); display_handler_.reset(raw_display_handler); ConnectToHost(raw_display_handler, ConvertJavaStringToUTF8(env, username),
diff --git a/remoting/client/jni/jni_display_handler.cc b/remoting/client/jni/jni_display_handler.cc index e847507..185a972 100644 --- a/remoting/client/jni/jni_display_handler.cc +++ b/remoting/client/jni/jni_display_handler.cc
@@ -66,8 +66,10 @@ java_display_.obj()); } -base::android::ScopedJavaLocalRef<jobject> JniDisplayHandler::GetJavaDisplay() { - return base::android::ScopedJavaLocalRef<jobject>(java_display_); +base::android::ScopedJavaLocalRef<jobject> +JniDisplayHandler::CreateDesktopViewFactory() { + return Java_Display_createDesktopViewFactory( + base::android::AttachCurrentThread(), java_display_.obj()); } void JniDisplayHandler::UpdateCursorShape(
diff --git a/remoting/client/jni/jni_display_handler.h b/remoting/client/jni/jni_display_handler.h index b8fb366..e62d354 100644 --- a/remoting/client/jni/jni_display_handler.h +++ b/remoting/client/jni/jni_display_handler.h
@@ -30,7 +30,7 @@ // Must be deleted on the display thread. ~JniDisplayHandler() override; - base::android::ScopedJavaLocalRef<jobject> GetJavaDisplay(); + base::android::ScopedJavaLocalRef<jobject> CreateDesktopViewFactory(); void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape);
diff --git a/remoting/client/jni/jni_gl_display_handler.cc b/remoting/client/jni/jni_gl_display_handler.cc index c6876b8..20e24e9 100644 --- a/remoting/client/jni/jni_gl_display_handler.cc +++ b/remoting/client/jni/jni_gl_display_handler.cc
@@ -5,14 +5,29 @@ #include "remoting/client/jni/jni_gl_display_handler.h" #include "base/logging.h" +#include "jni/GlDisplay_jni.h" #include "remoting/client/jni/chromoting_jni_runtime.h" -#include "remoting/client/jni/jni_video_renderer.h" +#include "remoting/protocol/video_renderer.h" namespace remoting { -JniGlDisplayHandler::JniGlDisplayHandler() {} +JniGlDisplayHandler::JniGlDisplayHandler(ChromotingJniRuntime* runtime) : + runtime_(runtime) { + java_display_.Reset(Java_GlDisplay_createJavaDisplayObject( + base::android::AttachCurrentThread(), reinterpret_cast<intptr_t>(this))); +} -JniGlDisplayHandler::~JniGlDisplayHandler() {} +JniGlDisplayHandler::~JniGlDisplayHandler() { + DCHECK(runtime_->display_task_runner()->BelongsToCurrentThread()); + Java_GlDisplay_invalidate(base::android::AttachCurrentThread(), + java_display_.obj()); +} + +base::android::ScopedJavaLocalRef<jobject> +JniGlDisplayHandler::CreateDesktopViewFactory() { + return Java_GlDisplay_createDesktopViewFactory( + base::android::AttachCurrentThread(), java_display_.obj()); +} std::unique_ptr<protocol::CursorShapeStub> JniGlDisplayHandler::CreateCursorShapeStub() { @@ -28,13 +43,14 @@ // static bool JniGlDisplayHandler::RegisterJni(JNIEnv* env) { - NOTIMPLEMENTED(); - return false; + return RegisterNativesImpl(env); } void JniGlDisplayHandler::OnSurfaceCreated( JNIEnv* env, - const base::android::JavaParamRef<jobject>& caller) { + const base::android::JavaParamRef<jobject>& caller, + const base::android::JavaParamRef<jobject>& surface) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); NOTIMPLEMENTED(); } @@ -43,13 +59,74 @@ const base::android::JavaParamRef<jobject>& caller, int width, int height) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); NOTIMPLEMENTED(); } -void JniGlDisplayHandler::OnDrawFrame( +void JniGlDisplayHandler::OnSurfaceDestroyed( JNIEnv* env, const base::android::JavaParamRef<jobject>& caller) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); NOTIMPLEMENTED(); } +void JniGlDisplayHandler::OnPixelTransformationChanged( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + const base::android::JavaParamRef<jfloatArray>& jmatrix) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); + NOTIMPLEMENTED(); +} + +void JniGlDisplayHandler::OnCursorPixelPositionChanged( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + int x, + int y) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); + NOTIMPLEMENTED(); +} + +void JniGlDisplayHandler::OnCursorVisibilityChanged( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + bool visible) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); + NOTIMPLEMENTED(); +} + +void JniGlDisplayHandler::OnCursorInputFeedback( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + int x, + int y, + float diameter) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); + NOTIMPLEMENTED(); +} + +void JniGlDisplayHandler::SetRenderEventEnabled( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + jboolean enabled) { + DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); + NOTIMPLEMENTED(); +} + +// static +void JniGlDisplayHandler::NotifyRenderEventOnUiThread( + base::android::ScopedJavaGlobalRef<jobject> java_client) { + Java_GlDisplay_canvasRendered(base::android::AttachCurrentThread(), + java_client.obj()); +} + +// static +void JniGlDisplayHandler::ChangeCanvasSizeOnUiThread( + base::android::ScopedJavaGlobalRef<jobject> java_client, + int width, + int height) { + JNIEnv* env = base::android::AttachCurrentThread(); + Java_GlDisplay_changeCanvasSize(env, java_client.obj(), width, height); +} + } // namespace remoting
diff --git a/remoting/client/jni/jni_gl_display_handler.h b/remoting/client/jni/jni_gl_display_handler.h index e825cce..45ec72fc 100644 --- a/remoting/client/jni/jni_gl_display_handler.h +++ b/remoting/client/jni/jni_gl_display_handler.h
@@ -15,33 +15,80 @@ namespace remoting { class ChromotingJniRuntime; -class JniVideoRenderer; // Handles OpenGL display operations. Draws desktop and cursor on the OpenGL // surface. +// JNI functions should all be called on the UI thread. The display handler +// itself should be deleted on the display thread. +// Please see GlDisplay.java for documentations. class JniGlDisplayHandler : public DisplayUpdaterFactory { public: - JniGlDisplayHandler(); + JniGlDisplayHandler(ChromotingJniRuntime* runtime); ~JniGlDisplayHandler() override; + base::android::ScopedJavaLocalRef<jobject> CreateDesktopViewFactory(); + // DisplayUpdaterFactory overrides. std::unique_ptr<protocol::CursorShapeStub> CreateCursorShapeStub() override; std::unique_ptr<protocol::VideoRenderer> CreateVideoRenderer() override; static bool RegisterJni(JNIEnv* env); - void OnSurfaceCreated(JNIEnv* env, - const base::android::JavaParamRef<jobject>& caller); + void OnSurfaceCreated( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + const base::android::JavaParamRef<jobject>& surface); void OnSurfaceChanged(JNIEnv* env, const base::android::JavaParamRef<jobject>& caller, int width, int height); - void OnDrawFrame(JNIEnv* env, - const base::android::JavaParamRef<jobject>& caller); + void OnSurfaceDestroyed( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller); + + void OnPixelTransformationChanged( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + const base::android::JavaParamRef<jfloatArray>& matrix + ); + + void OnCursorPixelPositionChanged( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + int x, + int y); + + void OnCursorVisibilityChanged( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + bool visible); + + void OnCursorInputFeedback( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + int x, + int y, + float diameter); + + void SetRenderEventEnabled(JNIEnv* env, + const base::android::JavaParamRef<jobject>& caller, + jboolean enabled); private: + static void NotifyRenderEventOnUiThread( + base::android::ScopedJavaGlobalRef<jobject> java_client); + + static void ChangeCanvasSizeOnUiThread( + base::android::ScopedJavaGlobalRef<jobject> java_client, + int width, + int height); + + ChromotingJniRuntime* runtime_; + + base::android::ScopedJavaGlobalRef<jobject> java_display_; + DISALLOW_COPY_AND_ASSIGN(JniGlDisplayHandler); };
diff --git a/remoting/client/plugin/pepper_video_renderer_3d.cc b/remoting/client/plugin/pepper_video_renderer_3d.cc index 796415ad7..b60f9bd7 100644 --- a/remoting/client/plugin/pepper_video_renderer_3d.cc +++ b/remoting/client/plugin/pepper_video_renderer_3d.cc
@@ -218,7 +218,7 @@ // Don't need to do anything if the packet is empty. Host sends empty video // packets when the screen is not changing. - if (!packet_ptr->data().size()) + if (packet_ptr->data().empty()) return; if (!frame_received_) {
diff --git a/sandbox/win/src/win_utils.cc b/sandbox/win/src/win_utils.cc index 8e4da5f..c31c25e 100644 --- a/sandbox/win/src/win_utils.cc +++ b/sandbox/win/src/win_utils.cc
@@ -132,8 +132,7 @@ bool ResolveRegistryName(base::string16 name, base::string16* resolved_name) { for (size_t i = 0; i < arraysize(kKnownKey); ++i) { - if (base::StartsWith(name, kKnownKey[i].name, - base::CompareCase::SENSITIVE)) { + if (name.find(kKnownKey[i].name) == 0) { HKEY key; DWORD disposition; if (ERROR_SUCCESS != ::RegCreateKeyEx(kKnownKey[i].key, L"", 0, NULL, 0,
diff --git a/services/navigation/BUILD.gn b/services/navigation/BUILD.gn index 4d84fa5..d719ed4 100644 --- a/services/navigation/BUILD.gn +++ b/services/navigation/BUILD.gn
@@ -58,12 +58,17 @@ "view_impl.h", ] - deps = [ + public_deps = [ "//base", - "//content/public/browser", + "//content/public/common", + "//mojo/public/cpp/bindings", "//services/navigation/public/interfaces", "//services/shell/public/cpp", "//services/ui/public/cpp", + ] + + deps = [ + "//content/public/browser", "//skia", "//ui/gfx/geometry/mojo", "//ui/views",
diff --git a/services/navigation/content_client/content_browser_client.cc b/services/navigation/content_client/content_browser_client.cc index c59aead..744a4f3 100644 --- a/services/navigation/content_client/content_browser_client.cc +++ b/services/navigation/content_client/content_browser_client.cc
@@ -36,8 +36,8 @@ void ContentBrowserClient::RegisterInProcessMojoApplications( StaticMojoApplicationMap* apps) { - content::MojoShellConnection::GetForProcess()->MergeService( - base::WrapUnique(new Navigation)); + content::MojoShellConnection::GetForProcess()->AddConnectionFilter( + base::MakeUnique<Navigation>()); } } // namespace navigation
diff --git a/services/navigation/navigation.cc b/services/navigation/navigation.cc index 91e46ce..3a86644 100644 --- a/services/navigation/navigation.cc +++ b/services/navigation/navigation.cc
@@ -6,24 +6,37 @@ #include "base/bind.h" #include "base/message_loop/message_loop.h" +#include "base/threading/thread_task_runner_handle.h" #include "services/navigation/view_impl.h" +#include "services/shell/public/cpp/connector.h" namespace navigation { +namespace { + +void CreateViewOnViewTaskRunner( + std::unique_ptr<shell::Connector> connector, + const std::string& client_user_id, + mojom::ViewClientPtr client, + mojom::ViewRequest request, + std::unique_ptr<shell::ServiceContextRef> context_ref) { + // Owns itself. + new ViewImpl(std::move(connector), client_user_id, std::move(client), + std::move(request), std::move(context_ref)); +} + +} // namespace + Navigation::Navigation() - : ref_factory_(base::MessageLoop::QuitWhenIdleClosure()) { + : view_task_runner_(base::ThreadTaskRunnerHandle::Get()), + ref_factory_(base::MessageLoop::QuitWhenIdleClosure()) { bindings_.set_connection_error_handler( base::Bind(&Navigation::ViewFactoryLost, base::Unretained(this))); } Navigation::~Navigation() {} -void Navigation::OnStart(shell::Connector* connector, - const shell::Identity& identity, - uint32_t instance_id) { - connector_ = connector; -} - -bool Navigation::OnConnect(shell::Connection* connection) { +bool Navigation::OnConnect(shell::Connection* connection, + shell::Connector* connector) { std::string remote_user_id = connection->GetRemoteIdentity().user_id(); if (!client_user_id_.empty() && client_user_id_ != remote_user_id) { LOG(ERROR) << "Must have a separate Navigation service instance for " @@ -44,8 +57,14 @@ void Navigation::CreateView(mojom::ViewClientPtr client, mojom::ViewRequest request) { - new ViewImpl(connector_, client_user_id_, std::move(client), - std::move(request), ref_factory_.CreateRef()); + std::unique_ptr<shell::Connector> new_connector = connector_->Clone(); + std::unique_ptr<shell::ServiceContextRef> context_ref = + ref_factory_.CreateRef(); + view_task_runner_->PostTask( + FROM_HERE, + base::Bind(&CreateViewOnViewTaskRunner, base::Passed(&new_connector), + client_user_id_, base::Passed(&client), base::Passed(&request), + base::Passed(&context_ref))); } void Navigation::ViewFactoryLost() {
diff --git a/services/navigation/navigation.h b/services/navigation/navigation.h index 3a731dd6..ded2c7db 100644 --- a/services/navigation/navigation.h +++ b/services/navigation/navigation.h
@@ -5,6 +5,9 @@ #ifndef SERVICES_NAVIGATION_NAVIGATION_H_ #define SERVICES_NAVIGATION_NAVIGATION_H_ +#include "base/memory/ref_counted.h" +#include "base/sequenced_task_runner.h" +#include "content/public/common/connection_filter.h" #include "mojo/public/cpp/bindings/binding_set.h" #include "services/navigation/public/interfaces/view.mojom.h" #include "services/shell/public/cpp/interface_factory.h" @@ -17,7 +20,7 @@ namespace navigation { -class Navigation : public shell::Service, +class Navigation : public content::ConnectionFilter, public shell::InterfaceFactory<mojom::ViewFactory>, public mojom::ViewFactory { public: @@ -25,11 +28,9 @@ ~Navigation() override; private: - // shell::Service: - void OnStart(shell::Connector* connector, - const shell::Identity& identity, - uint32_t instance_id) override; - bool OnConnect(shell::Connection* connection) override; + // content::ConnectionFilter: + bool OnConnect(shell::Connection* connection, + shell::Connector* connector) override; // shell::InterfaceFactory<mojom::ViewFactory>: void Create(shell::Connection* connection, @@ -41,6 +42,8 @@ void ViewFactoryLost(); + scoped_refptr<base::SequencedTaskRunner> view_task_runner_; + shell::Connector* connector_ = nullptr; std::string client_user_id_;
diff --git a/services/navigation/view_impl.cc b/services/navigation/view_impl.cc index 6bb54cf85..9a85fec0 100644 --- a/services/navigation/view_impl.cc +++ b/services/navigation/view_impl.cc
@@ -15,6 +15,7 @@ #include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "content/public/browser/web_contents.h" +#include "services/shell/public/cpp/connector.h" #include "services/ui/public/cpp/window_tree_client.h" #include "ui/views/controls/webview/webview.h" #include "ui/views/mus/native_widget_mus.h" @@ -56,12 +57,12 @@ } // namespace -ViewImpl::ViewImpl(shell::Connector* connector, +ViewImpl::ViewImpl(std::unique_ptr<shell::Connector> connector, const std::string& client_user_id, mojom::ViewClientPtr client, mojom::ViewRequest request, std::unique_ptr<shell::ServiceContextRef> ref) - : connector_(connector), + : connector_(std::move(connector)), binding_(this, std::move(request)), client_(std::move(client)), ref_(std::move(ref)), @@ -148,8 +149,9 @@ const std::string new_user_id = content::BrowserContext::GetShellUserIdFor( new_contents->GetBrowserContext()); - ViewImpl* impl = new ViewImpl(connector_, new_user_id, std::move(client), - std::move(view_request), ref_->Clone()); + ViewImpl* impl = new ViewImpl( + connector_->Clone(), new_user_id, std::move(client), + std::move(view_request), ref_->Clone()); // TODO(beng): This is a bit crappy. should be able to create the ViewImpl // with |new_contents| instead. impl->web_view_->SetWebContents(new_contents); @@ -272,7 +274,7 @@ params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; params.delegate = this; params.native_widget = new views::NativeWidgetMus( - widget_.get(), connector_, root, ui::mojom::SurfaceType::DEFAULT); + widget_.get(), connector_.get(), root, ui::mojom::SurfaceType::DEFAULT); widget_->Init(params); widget_->Show(); }
diff --git a/services/navigation/view_impl.h b/services/navigation/view_impl.h index 427afa1..ad9b7edc 100644 --- a/services/navigation/view_impl.h +++ b/services/navigation/view_impl.h
@@ -5,6 +5,8 @@ #ifndef SERVICES_NAVIGATION_VIEW_IMPL_H_ #define SERVICES_NAVIGATION_VIEW_IMPL_H_ +#include <memory> + #include "base/macros.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -32,7 +34,7 @@ public ui::WindowTreeClientDelegate, public views::WidgetDelegate { public: - ViewImpl(shell::Connector* connector, + ViewImpl(std::unique_ptr<shell::Connector> connector, const std::string& client_user_id, mojom::ViewClientPtr client, mojom::ViewRequest request, @@ -87,7 +89,7 @@ views::Widget* GetWidget() override; const views::Widget* GetWidget() const override; - shell::Connector* connector_; + std::unique_ptr<shell::Connector> connector_; mojo::StrongBinding<mojom::View> binding_; mojom::ViewClientPtr client_; std::unique_ptr<shell::ServiceContextRef> ref_;
diff --git a/services/shell/public/cpp/connection.h b/services/shell/public/cpp/connection.h index eb49c2c8..1c78c7a1 100644 --- a/services/shell/public/cpp/connection.h +++ b/services/shell/public/cpp/connection.h
@@ -37,8 +37,7 @@ // interface_registry.h for more information. // // A Connection returned via Shell::ConnectToApplication() is owned by the -// caller. -// An Connection received via OnConnect is owned by the ServiceContext. +// caller. A Connection received via OnConnect is owned by the ServiceContext. // To close a connection, call CloseConnection which will destroy this object. class Connection { public:
diff --git a/services/shell/public/cpp/connector.h b/services/shell/public/cpp/connector.h index 2f26e4c..dfc440b 100644 --- a/services/shell/public/cpp/connector.h +++ b/services/shell/public/cpp/connector.h
@@ -72,6 +72,10 @@ DISALLOW_COPY_AND_ASSIGN(ConnectParams); }; + // Creates a new Connector instance and fills in |*request| with a request + // for the other end the Connector's interface. + static std::unique_ptr<Connector> Create(mojom::ConnectorRequest* request); + // Requests a new connection to an application. Returns a pointer to the // connection if the connection is permitted by this application's delegate, // or nullptr otherwise. Caller takes ownership.
diff --git a/services/shell/public/cpp/interface_provider.h b/services/shell/public/cpp/interface_provider.h index fe6930e..865ab8b 100644 --- a/services/shell/public/cpp/interface_provider.h +++ b/services/shell/public/cpp/interface_provider.h
@@ -18,6 +18,8 @@ // Connection. class InterfaceProvider { public: + using ForwardCallback = base::Callback<void(const mojo::String&, + mojo::ScopedMessagePipeHandle)>; class TestApi { public: explicit TestApi(InterfaceProvider* provider) : provider_(provider) {} @@ -41,8 +43,17 @@ InterfaceProvider(); ~InterfaceProvider(); + // Binds this InterfaceProvider to an actual mojom::InterfaceProvider pipe. + // It is an error to call this on a forwarding InterfaceProvider, i.e. this + // call is exclusive to Forward(). void Bind(mojom::InterfaceProviderPtr interface_provider); + // Sets this InterfaceProvider to forward all GetInterface() requests to + // |callback|. It is an error to call this on a bound InterfaceProvider, i.e. + // this call is exclusive to Bind(). In addition, and unlike Bind(), this MUST + // be called before any calls to GetInterface() are made. + void Forward(const ForwardCallback& callback); + // Returns a raw pointer to the remote InterfaceProvider. mojom::InterfaceProvider* get() { return interface_provider_.get(); } @@ -83,6 +94,10 @@ mojom::InterfaceProviderPtr interface_provider_; mojom::InterfaceProviderRequest pending_request_; + // A callback to receive all GetInterface() requests in lieu of the + // InterfaceProvider pipe. + ForwardCallback forward_callback_; + base::WeakPtrFactory<InterfaceProvider> weak_factory_; DISALLOW_COPY_AND_ASSIGN(InterfaceProvider);
diff --git a/services/shell/public/cpp/interface_registry.h b/services/shell/public/cpp/interface_registry.h index 98f85550..0c6624e 100644 --- a/services/shell/public/cpp/interface_registry.h +++ b/services/shell/public/cpp/interface_registry.h
@@ -6,7 +6,10 @@ #define SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_ #include <memory> +#include <queue> +#include <utility> +#include "base/callback.h" #include "base/memory/ptr_util.h" #include "mojo/public/cpp/bindings/binding.h" #include "services/shell/public/cpp/lib/callback_binder.h" @@ -40,6 +43,9 @@ // class InterfaceRegistry : public mojom::InterfaceProvider { public: + using Binder = base::Callback<void(const mojo::String&, + mojo::ScopedMessagePipeHandle)>; + class TestApi { public: explicit TestApi(InterfaceRegistry* registry) : registry_(registry) {} @@ -64,6 +70,10 @@ explicit InterfaceRegistry(Connection* connection); ~InterfaceRegistry() override; + // Sets a default handler for incoming interface requests which are allowed by + // capability filters but have no registered handler in this registry. + void set_default_binder(const Binder& binder) { default_binder_ = binder; } + void Bind(mojom::InterfaceProviderRequest local_interfaces_request); base::WeakPtr<InterfaceRegistry> GetWeakPtr(); @@ -132,6 +142,15 @@ NameToInterfaceBinderMap name_to_binder_; + Binder default_binder_; + + bool is_paused_ = false; + + // Pending interface requests which can accumulate if GetInterface() is called + // while binding is paused. + std::queue<std::pair<mojo::String, mojo::ScopedMessagePipeHandle>> + pending_interface_requests_; + base::WeakPtrFactory<InterfaceRegistry> weak_factory_; DISALLOW_COPY_AND_ASSIGN(InterfaceRegistry);
diff --git a/services/shell/public/cpp/lib/connector_impl.cc b/services/shell/public/cpp/lib/connector_impl.cc index 73c6723e..84af886 100644 --- a/services/shell/public/cpp/lib/connector_impl.cc +++ b/services/shell/public/cpp/lib/connector_impl.cc
@@ -19,11 +19,12 @@ Connector::ConnectParams::~ConnectParams() {} ConnectorImpl::ConnectorImpl(mojom::ConnectorPtrInfo unbound_state) - : unbound_state_(std::move(unbound_state)) {} + : unbound_state_(std::move(unbound_state)) { + thread_checker_.DetachFromThread(); +} ConnectorImpl::ConnectorImpl(mojom::ConnectorPtr connector) : connector_(std::move(connector)) { - thread_checker_.reset(new base::ThreadChecker); connector_.set_connection_error_handler( base::Bind(&ConnectorImpl::OnConnectionError, base::Unretained(this))); } @@ -31,7 +32,7 @@ ConnectorImpl::~ConnectorImpl() {} void ConnectorImpl::OnConnectionError() { - DCHECK(thread_checker_->CalledOnValidThread()); + DCHECK(thread_checker_.CalledOnValidThread()); connector_.reset(); } @@ -41,23 +42,12 @@ } std::unique_ptr<Connection> ConnectorImpl::Connect(ConnectParams* params) { - // Bind this object to the current thread the first time it is used to - // connect. - if (!connector_.is_bound()) { - if (!unbound_state_.is_valid()) { - // It's possible to get here when the link to the shell has been severed - // (and so the connector pipe has been closed) but the app has chosen not - // to quit. - return nullptr; - } - connector_.Bind(std::move(unbound_state_)); - connector_.set_connection_error_handler( - base::Bind(&ConnectorImpl::OnConnectionError, base::Unretained(this))); - thread_checker_.reset(new base::ThreadChecker); - } - DCHECK(thread_checker_->CalledOnValidThread()); + if (!BindIfNecessary()) + return nullptr; + DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(params); + // We allow all interfaces on outgoing connections since we are presumably in // a position to know who we're talking to. CapabilityRequest request; @@ -112,9 +102,41 @@ } std::unique_ptr<Connector> ConnectorImpl::Clone() { + if (!BindIfNecessary()) + return nullptr; + mojom::ConnectorPtr connector; - connector_->Clone(GetProxy(&connector)); - return base::WrapUnique(new ConnectorImpl(connector.PassInterface())); + mojom::ConnectorRequest request = GetProxy(&connector); + connector_->Clone(std::move(request)); + return base::MakeUnique<ConnectorImpl>(connector.PassInterface()); +} + +bool ConnectorImpl::BindIfNecessary() { + // Bind this object to the current thread the first time it is used to + // connect. + if (!connector_.is_bound()) { + if (!unbound_state_.is_valid()) { + // It's possible to get here when the link to the shell has been severed + // (and so the connector pipe has been closed) but the app has chosen not + // to quit. + return false; + } + + // Bind the ThreadChecker to this thread. + DCHECK(thread_checker_.CalledOnValidThread()); + + connector_.Bind(std::move(unbound_state_)); + connector_.set_connection_error_handler( + base::Bind(&ConnectorImpl::OnConnectionError, base::Unretained(this))); + } + + return true; +} + +std::unique_ptr<Connector> Connector::Create(mojom::ConnectorRequest* request) { + mojom::ConnectorPtr proxy; + *request = mojo::GetProxy(&proxy); + return base::MakeUnique<ConnectorImpl>(proxy.PassInterface()); } } // namespace shell
diff --git a/services/shell/public/cpp/lib/connector_impl.h b/services/shell/public/cpp/lib/connector_impl.h index 9ab5bebe..003e3fd 100644 --- a/services/shell/public/cpp/lib/connector_impl.h +++ b/services/shell/public/cpp/lib/connector_impl.h
@@ -28,10 +28,12 @@ std::unique_ptr<Connection> Connect(ConnectParams* params) override; std::unique_ptr<Connector> Clone() override; + bool BindIfNecessary(); + mojom::ConnectorPtrInfo unbound_state_; mojom::ConnectorPtr connector_; - std::unique_ptr<base::ThreadChecker> thread_checker_; + base::ThreadChecker thread_checker_; DISALLOW_COPY_AND_ASSIGN(ConnectorImpl); };
diff --git a/services/shell/public/cpp/lib/interface_provider.cc b/services/shell/public/cpp/lib/interface_provider.cc index 209d356..0934ee15 100644 --- a/services/shell/public/cpp/lib/interface_provider.cc +++ b/services/shell/public/cpp/lib/interface_provider.cc
@@ -4,19 +4,32 @@ #include "services/shell/public/cpp/interface_provider.h" +#include "base/macros.h" +#include "mojo/public/cpp/bindings/strong_binding.h" + namespace shell { InterfaceProvider::InterfaceProvider() : weak_factory_(this) { pending_request_ = GetProxy(&interface_provider_); } + InterfaceProvider::~InterfaceProvider() {} void InterfaceProvider::Bind(mojom::InterfaceProviderPtr interface_provider) { DCHECK(pending_request_.is_pending()); + DCHECK(forward_callback_.is_null()); mojo::FuseInterface(std::move(pending_request_), interface_provider.PassInterface()); } +void InterfaceProvider::Forward(const ForwardCallback& callback) { + DCHECK(pending_request_.is_pending()); + DCHECK(forward_callback_.is_null()); + interface_provider_.reset(); + pending_request_.PassMessagePipe().reset(); + forward_callback_ = callback; +} + void InterfaceProvider::SetConnectionLostClosure( const base::Closure& connection_lost_closure) { interface_provider_.set_connection_error_handler(connection_lost_closure); @@ -35,7 +48,14 @@ it->second.Run(std::move(request_handle)); return; } - interface_provider_->GetInterface(name, std::move(request_handle)); + + if (!forward_callback_.is_null()) { + DCHECK(!interface_provider_.is_bound()); + forward_callback_.Run(name, std::move(request_handle)); + } else { + DCHECK(interface_provider_.is_bound()); + interface_provider_->GetInterface(name, std::move(request_handle)); + } } void InterfaceProvider::ClearBinders() {
diff --git a/services/shell/public/cpp/lib/interface_registry.cc b/services/shell/public/cpp/lib/interface_registry.cc index ebfaddd..b585eae 100644 --- a/services/shell/public/cpp/lib/interface_registry.cc +++ b/services/shell/public/cpp/lib/interface_registry.cc
@@ -39,20 +39,29 @@ } void InterfaceRegistry::PauseBinding() { - DCHECK(!pending_request_.is_pending()); - DCHECK(binding_.is_bound()); - pending_request_ = binding_.Unbind(); + DCHECK(!is_paused_); + is_paused_ = true; } void InterfaceRegistry::ResumeBinding() { - DCHECK(pending_request_.is_pending()); - DCHECK(!binding_.is_bound()); - binding_.Bind(std::move(pending_request_)); + DCHECK(is_paused_); + is_paused_ = false; + + while (!pending_interface_requests_.empty()) { + auto& request = pending_interface_requests_.front(); + GetInterface(request.first, std::move(request.second)); + pending_interface_requests_.pop(); + } } // mojom::InterfaceProvider: void InterfaceRegistry::GetInterface(const mojo::String& interface_name, mojo::ScopedMessagePipeHandle handle) { + if (is_paused_) { + pending_interface_requests_.emplace(interface_name, std::move(handle)); + return; + } + auto iter = name_to_binder_.find(interface_name); if (iter != name_to_binder_.end()) { iter->second->BindInterface(connection_, interface_name, std::move(handle)); @@ -61,6 +70,8 @@ << "interface: " << interface_name << " connection_name:" << connection_->GetConnectionName() << " remote_name:" << connection_->GetRemoteIdentity().name(); + } else if (!default_binder_.is_null()) { + default_binder_.Run(interface_name, std::move(handle)); } }
diff --git a/services/shell/public/cpp/lib/service_context.cc b/services/shell/public/cpp/lib/service_context.cc index e5458dd..1a9cd42 100644 --- a/services/shell/public/cpp/lib/service_context.cc +++ b/services/shell/public/cpp/lib/service_context.cc
@@ -10,7 +10,6 @@ #include "mojo/public/cpp/bindings/interface_ptr.h" #include "mojo/public/cpp/bindings/interface_request.h" #include "services/shell/public/cpp/capabilities.h" -#include "services/shell/public/cpp/connector.h" #include "services/shell/public/cpp/lib/connection_impl.h" #include "services/shell/public/cpp/lib/connector_impl.h" #include "services/shell/public/cpp/service.h" @@ -20,29 +19,24 @@ //////////////////////////////////////////////////////////////////////////////// // ServiceContext, public: -ServiceContext::ServiceContext(shell::Service* client, - mojom::ServiceRequest request) - : client_(client), binding_(this) { - mojom::ConnectorPtr connector; - pending_connector_request_ = GetProxy(&connector); - connector_.reset(new ConnectorImpl(std::move(connector))); - - DCHECK(request.is_pending()); - binding_.Bind(std::move(request)); +ServiceContext::ServiceContext(shell::Service* service, + mojom::ServiceRequest request, + std::unique_ptr<Connector> connector, + mojom::ConnectorRequest connector_request) + : pending_connector_request_(std::move(connector_request)), + service_(service), + binding_(this, std::move(request)), + connector_(std::move(connector)) { + DCHECK(binding_.is_bound()); + if (!connector_) { + connector_ = Connector::Create(&pending_connector_request_); + } else { + DCHECK(pending_connector_request_.is_pending()); + } } ServiceContext::~ServiceContext() {} -void ServiceContext::set_initialize_handler(const base::Closure& callback) { - initialize_handler_ = callback; -} - -void ServiceContext::SetAppTestConnectorForTesting( - mojom::ConnectorPtr connector) { - pending_connector_request_ = nullptr; - connector_.reset(new ConnectorImpl(std::move(connector))); -} - void ServiceContext::SetConnectionLostClosure(const base::Closure& closure) { connection_lost_closure_ = closure; if (should_run_connection_lost_closure_ && @@ -66,7 +60,7 @@ binding_.set_connection_error_handler( base::Bind(&ServiceContext::OnConnectionError, base::Unretained(this))); - client_->OnStart(connector_.get(), identity_, id); + service_->OnStart(connector_.get(), identity_, id); } void ServiceContext::OnConnect( @@ -81,29 +75,16 @@ allowed_capabilities.To<CapabilityRequest>(), Connection::State::CONNECTED)); - InterfaceRegistry* exposed_interfaces = - client_->GetInterfaceRegistryForConnection(); - if (exposed_interfaces) { - exposed_interfaces->Bind(std::move(local_interfaces)); - registry->set_exposed_interfaces(exposed_interfaces); - } else { - std::unique_ptr<InterfaceRegistry> interfaces( - new InterfaceRegistry(registry.get())); - interfaces->Bind(std::move(local_interfaces)); - registry->SetExposedInterfaces(std::move(interfaces)); - } - shell::InterfaceProvider* remote_interface_provider = - client_->GetInterfaceProviderForConnection(); - if (remote_interface_provider) { - remote_interface_provider->Bind(std::move(remote_interfaces)); - registry->set_remote_interfaces(remote_interface_provider); - } else { - std::unique_ptr<InterfaceProvider> interfaces(new InterfaceProvider); - interfaces->Bind(std::move(remote_interfaces)); - registry->SetRemoteInterfaces(std::move(interfaces)); - } + std::unique_ptr<InterfaceRegistry> exposed_interfaces( + new InterfaceRegistry(registry.get())); + exposed_interfaces->Bind(std::move(local_interfaces)); + registry->SetExposedInterfaces(std::move(exposed_interfaces)); - if (!client_->OnConnect(registry.get())) + std::unique_ptr<InterfaceProvider> interfaces(new InterfaceProvider); + interfaces->Bind(std::move(remote_interfaces)); + registry->SetRemoteInterfaces(std::move(interfaces)); + + if (!service_->OnConnect(registry.get())) return; // TODO(beng): it appears we never prune this list. We should, when the @@ -118,7 +99,7 @@ // Note that the Service doesn't technically have to quit now, it may live // on to service existing connections. All existing Connectors however are // invalid. - should_run_connection_lost_closure_ = client_->OnStop(); + should_run_connection_lost_closure_ = service_->OnStop(); if (should_run_connection_lost_closure_ && !connection_lost_closure_.is_null()) connection_lost_closure_.Run();
diff --git a/services/shell/public/cpp/service_context.h b/services/shell/public/cpp/service_context.h index 2cad395..504efd0f 100644 --- a/services/shell/public/cpp/service_context.h +++ b/services/shell/public/cpp/service_context.h
@@ -11,17 +11,15 @@ #include "base/callback.h" #include "base/macros.h" -#include "base/memory/scoped_vector.h" #include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/system/core.h" +#include "services/shell/public/cpp/connector.h" #include "services/shell/public/cpp/service.h" #include "services/shell/public/interfaces/connector.mojom.h" #include "services/shell/public/interfaces/service.mojom.h" namespace shell { -class Connector; - // Encapsulates a connection to the Service Manager in two parts: // - a bound InterfacePtr to mojom::Connector, the primary mechanism // by which the instantiating service connects to other services, @@ -45,22 +43,20 @@ public: // Creates a new ServiceContext bound to |request|. This connection may be // used immediately to make outgoing connections via connector(). Does not - // take ownership of |client|, which must remain valid for the lifetime of - // ServiceContext. - ServiceContext(shell::Service* client, - mojom::ServiceRequest request); + // take ownership of |service|, which must remain valid for the lifetime of + // ServiceContext. If either |connector| or |connector_request| is non-null + // both must be non-null. If both are null, the connection will create its own + // Connector and request to pass to the Service Manager on initialization. + ServiceContext(shell::Service* service, + mojom::ServiceRequest request, + std::unique_ptr<Connector> connector = nullptr, + mojom::ConnectorRequest connector_request = nullptr); ~ServiceContext() override; Connector* connector() { return connector_.get(); } const Identity& identity() { return identity_; } - // TODO(rockot): Remove this. http://crbug.com/594852. - void set_initialize_handler(const base::Closure& callback); - - // TODO(rockot): Remove this once we get rid of app tests. - void SetAppTestConnectorForTesting(mojom::ConnectorPtr connector); - // Specify a function to be called when the connection to the shell is lost. // Note that if connection has already been lost, then |closure| is called // immediately. @@ -85,13 +81,13 @@ // We track the lifetime of incoming connection registries as it more // convenient for the client. - ScopedVector<Connection> incoming_connections_; + std::vector<std::unique_ptr<Connection>> incoming_connections_; // A pending Connector request which will eventually be passed to the Service // Manager. mojom::ConnectorRequest pending_connector_request_; - shell::Service* client_; + shell::Service* service_; mojo::Binding<mojom::Service> binding_; std::unique_ptr<Connector> connector_; shell::Identity identity_;
diff --git a/services/ui/common/gpu_service.cc b/services/ui/common/gpu_service.cc index 7b7ed5f..955035a5 100644 --- a/services/ui/common/gpu_service.cc +++ b/services/ui/common/gpu_service.cc
@@ -89,12 +89,8 @@ runner->PostTask(FROM_HERE, callback); return; } - - base::Closure wrapper_callback = - IsMainThread() ? callback - : base::Bind(PostTask, runner, FROM_HERE, callback); - establish_callbacks_.push_back(wrapper_callback); - + establish_callbacks_.push_back( + base::Bind(PostTask, runner, FROM_HERE, callback)); if (!is_establishing_) { is_establishing_ = true; main_task_runner_->PostTask( @@ -219,11 +215,11 @@ is_establishing_ = false; gpu_channel_ = gpu_channel; establishing_condition_.Broadcast(); + gpu_service_.reset(); for (const auto& i : establish_callbacks_) i.Run(); establish_callbacks_.clear(); - gpu_service_.reset(); } bool GpuService::IsMainThread() {
diff --git a/services/ui/demo/mus_demo.cc b/services/ui/demo/mus_demo.cc index ea9ff606..982399b68 100644 --- a/services/ui/demo/mus_demo.cc +++ b/services/ui/demo/mus_demo.cc
@@ -126,10 +126,6 @@ base::Bind(&MusDemo::DrawFrame, base::Unretained(this))); } -void MusDemo::OnAccelerator(uint32_t id, const ui::Event& event) { - // Don't care -} - void MusDemo::OnWmPerformMoveLoop(ui::Window* window, ui::mojom::MoveLoopSource source, const gfx::Point& cursor_location,
diff --git a/services/ui/demo/mus_demo.h b/services/ui/demo/mus_demo.h index cbc9f0d..d1867b1 100644 --- a/services/ui/demo/mus_demo.h +++ b/services/ui/demo/mus_demo.h
@@ -59,7 +59,6 @@ bool janky) override; void OnWmNewDisplay(ui::Window* window, const display::Display& display) override; - void OnAccelerator(uint32_t id, const ui::Event& event) override; void OnWmPerformMoveLoop(ui::Window* window, ui::mojom::MoveLoopSource source, const gfx::Point& cursor_location,
diff --git a/services/ui/display/BUILD.gn b/services/ui/display/BUILD.gn new file mode 100644 index 0000000..453fe0e --- /dev/null +++ b/services/ui/display/BUILD.gn
@@ -0,0 +1,34 @@ +# 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. + +import("//build/config/ui.gni") + +source_set("display") { + sources = [ + "platform_screen.h", + ] + + deps = [ + "//base", + "//ui/display", + "//ui/gfx", + ] + + if (use_ozone && is_chromeos) { + sources += [ + "platform_screen_impl_ozone.cc", + "platform_screen_impl_ozone.h", + ] + + deps += [ + "//skia", + "//ui/ozone:ozone", + ] + } else { + sources += [ + "platform_screen_impl.cc", + "platform_screen_impl.h", + ] + } +}
diff --git a/services/ui/ws/platform_screen.h b/services/ui/display/platform_screen.h similarity index 83% rename from services/ui/ws/platform_screen.h rename to services/ui/display/platform_screen.h index 075dc25..e8a3f15 100644 --- a/services/ui/ws/platform_screen.h +++ b/services/ui/display/platform_screen.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 SERVICES_UI_WS_PLATFORM_SCREEN_H_ -#define SERVICES_UI_WS_PLATFORM_SCREEN_H_ +#ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ +#define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ #include <stdint.h> @@ -14,7 +14,7 @@ } namespace ui { -namespace ws { +namespace display { // PlatformScreen provides the necessary functionality to configure all // attached physical displays. @@ -37,7 +37,7 @@ const ConfiguredDisplayCallback& callback) = 0; }; -} // namespace ws +} // namespace display } // namespace ui -#endif // SERVICES_UI_WS_PLATFORM_SCREEN_H_ +#endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_
diff --git a/services/ui/ws/platform_screen_impl.cc b/services/ui/display/platform_screen_impl.cc similarity index 91% rename from services/ui/ws/platform_screen_impl.cc rename to services/ui/display/platform_screen_impl.cc index de930db..0ad362a5 100644 --- a/services/ui/ws/platform_screen_impl.cc +++ b/services/ui/display/platform_screen_impl.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 "services/ui/ws/platform_screen_impl.h" +#include "services/ui/display/platform_screen_impl.h" #include "base/bind.h" #include "base/location.h" @@ -12,7 +12,7 @@ namespace ui { -namespace ws { +namespace display { namespace { void FixedSizeScreenConfiguration( @@ -39,5 +39,5 @@ FROM_HERE, base::Bind(&FixedSizeScreenConfiguration, callback)); } -} // namespace ws +} // namespace display } // namespace ui
diff --git a/services/ui/ws/platform_screen_impl.h b/services/ui/display/platform_screen_impl.h similarity index 73% rename from services/ui/ws/platform_screen_impl.h rename to services/ui/display/platform_screen_impl.h index 891d409..c8075bf 100644 --- a/services/ui/ws/platform_screen_impl.h +++ b/services/ui/display/platform_screen_impl.h
@@ -2,20 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_H_ -#define SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_H_ +#ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_ +#define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_ #include <stdint.h> #include "base/callback.h" -#include "services/ui/ws/platform_screen.h" - -namespace gfx { -class Rect; -} +#include "services/ui/display/platform_screen.h" namespace ui { -namespace ws { +namespace display { // PlatformScreenImpl provides the necessary functionality to configure all // attached physical displays on non-ozone platforms. @@ -33,7 +29,7 @@ DISALLOW_COPY_AND_ASSIGN(PlatformScreenImpl); }; -} // namespace ws +} // namespace display } // namespace ui -#endif // SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_H_ +#endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_H_
diff --git a/services/ui/ws/platform_screen_impl_ozone.cc b/services/ui/display/platform_screen_impl_ozone.cc similarity index 96% rename from services/ui/ws/platform_screen_impl_ozone.cc rename to services/ui/display/platform_screen_impl_ozone.cc index 498b360..5f36de6 100644 --- a/services/ui/ws/platform_screen_impl_ozone.cc +++ b/services/ui/display/platform_screen_impl_ozone.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 "services/ui/ws/platform_screen_impl_ozone.h" +#include "services/ui/display/platform_screen_impl_ozone.h" #include "base/memory/ptr_util.h" #include "base/sys_info.h" @@ -16,7 +16,7 @@ namespace ui { -namespace ws { +namespace display { namespace { // TODO(rjkroege): Remove this code once ozone headless has the same @@ -92,5 +92,5 @@ callback_.Reset(); } -} // namespace ws +} // namespace display } // namespace ui
diff --git a/services/ui/ws/platform_screen_impl_ozone.h b/services/ui/display/platform_screen_impl_ozone.h similarity index 84% rename from services/ui/ws/platform_screen_impl_ozone.h rename to services/ui/display/platform_screen_impl_ozone.h index e026bf6..7c3cfd6f 100644 --- a/services/ui/ws/platform_screen_impl_ozone.h +++ b/services/ui/display/platform_screen_impl_ozone.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 SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_OZONE_H_ -#define SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_OZONE_H_ +#ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ +#define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ #include <stdint.h> @@ -11,11 +11,11 @@ #include "base/callback.h" #include "base/macros.h" -#include "services/ui/ws/platform_screen.h" +#include "services/ui/display/platform_screen.h" #include "ui/display/chromeos/display_configurator.h" namespace ui { -namespace ws { +namespace display { // PlatformScreenImplOzone provides the necessary functionality to configure all // attached physical displays on the ozone platform. @@ -47,7 +47,7 @@ DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone); }; -} // namespace ws +} // namespace display } // namespace ui -#endif // SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_OZONE_H_ +#endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_
diff --git a/services/ui/gles2/command_buffer_local.cc b/services/ui/gles2/command_buffer_local.cc index e7a2e827..b6dcaaa5 100644 --- a/services/ui/gles2/command_buffer_local.cc +++ b/services/ui/gles2/command_buffer_local.cc
@@ -299,14 +299,6 @@ return CreateImage(buffer->AsClientBuffer(), width, height, internal_format); } -int32_t CommandBufferLocal::GetImageGpuMemoryBufferId(unsigned image_id) { - // TODO(erikchen): Once this class supports IOSurface GpuMemoryBuffer backed - // images, it will also need to keep a local cache from image id to - // GpuMemoryBuffer id. - NOTIMPLEMENTED(); - return -1; -} - void CommandBufferLocal::SignalQuery(uint32_t query_id, const base::Closure& callback) { DCHECK(CalledOnValidThread());
diff --git a/services/ui/gles2/command_buffer_local.h b/services/ui/gles2/command_buffer_local.h index 2c5f4c79..919b7133 100644 --- a/services/ui/gles2/command_buffer_local.h +++ b/services/ui/gles2/command_buffer_local.h
@@ -86,7 +86,6 @@ size_t height, unsigned internal_format, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query_id, const base::Closure& callback) override; void SetLock(base::Lock*) override; void EnsureWorkVisible() override;
diff --git a/services/ui/gpu/gpu_service_mus.cc b/services/ui/gpu/gpu_service_mus.cc index b94b3fb..dd1ddade 100644 --- a/services/ui/gpu/gpu_service_mus.cc +++ b/services/ui/gpu/gpu_service_mus.cc
@@ -151,7 +151,7 @@ #endif void GpuServiceMus::SetActiveURL(const GURL& url) { - NOTIMPLEMENTED(); + // TODO(penghuang): implement this function. } void GpuServiceMus::Initialize() {
diff --git a/services/ui/public/cpp/BUILD.gn b/services/ui/public/cpp/BUILD.gn index 3be5c79..d7c96f6 100644 --- a/services/ui/public/cpp/BUILD.gn +++ b/services/ui/public/cpp/BUILD.gn
@@ -28,6 +28,7 @@ "property_type_converters.h", "scoped_window_ptr.h", "window.h", + "window_manager_delegate.cc", "window_manager_delegate.h", "window_observer.h", "window_property.h",
diff --git a/services/ui/public/cpp/lib/command_buffer_client_impl.cc b/services/ui/public/cpp/lib/command_buffer_client_impl.cc index c4566d5f..3ca0993 100644 --- a/services/ui/public/cpp/lib/command_buffer_client_impl.cc +++ b/services/ui/public/cpp/lib/command_buffer_client_impl.cc
@@ -255,14 +255,6 @@ return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); } -int32_t CommandBufferClientImpl::GetImageGpuMemoryBufferId(unsigned image_id) { - // TODO(erikchen): Once this class supports IOSurface GpuMemoryBuffer backed - // images, it will also need to keep a local cache from image id to - // GpuMemoryBuffer id. - NOTIMPLEMENTED(); - return -1; -} - void CommandBufferClientImpl::SignalQuery(uint32_t query, const base::Closure& callback) { // TODO(piman)
diff --git a/services/ui/public/cpp/lib/command_buffer_client_impl.h b/services/ui/public/cpp/lib/command_buffer_client_impl.h index 4ef9756..18fe179 100644 --- a/services/ui/public/cpp/lib/command_buffer_client_impl.h +++ b/services/ui/public/cpp/lib/command_buffer_client_impl.h
@@ -61,7 +61,6 @@ size_t height, unsigned internalformat, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query, const base::Closure& callback) override; void SetLock(base::Lock*) override; void EnsureWorkVisible() override;
diff --git a/services/ui/public/cpp/lib/window_tree_client.cc b/services/ui/public/cpp/lib/window_tree_client.cc index 570d3e10..8c13573 100644 --- a/services/ui/public/cpp/lib/window_tree_client.cc +++ b/services/ui/public/cpp/lib/window_tree_client.cc
@@ -1187,10 +1187,14 @@ window_manager_delegate_->OnWmCancelMoveLoop(window); } -void WindowTreeClient::OnAccelerator(uint32_t id, +void WindowTreeClient::OnAccelerator(uint32_t ack_id, + uint32_t accelerator_id, std::unique_ptr<ui::Event> event) { DCHECK(event); - window_manager_delegate_->OnAccelerator(id, *event.get()); + const mojom::EventResult result = + window_manager_delegate_->OnAccelerator(accelerator_id, *event.get()); + if (ack_id && window_manager_internal_client_) + window_manager_internal_client_->OnAcceleratorAck(ack_id, result); } void WindowTreeClient::SetFrameDecorationValues(
diff --git a/services/ui/public/cpp/tests/window_server_test_base.cc b/services/ui/public/cpp/tests/window_server_test_base.cc index 1a72fdc..e3fa201 100644 --- a/services/ui/public/cpp/tests/window_server_test_base.cc +++ b/services/ui/public/cpp/tests/window_server_test_base.cc
@@ -131,11 +131,6 @@ window_manager_delegate_->OnWmNewDisplay(window, display); } -void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) { - if (window_manager_delegate_) - window_manager_delegate_->OnAccelerator(id, event); -} - void WindowServerTestBase::OnWmPerformMoveLoop( Window* window, mojom::MoveLoopSource source, @@ -152,6 +147,13 @@ window_manager_delegate_->OnWmCancelMoveLoop(window); } +mojom::EventResult WindowServerTestBase::OnAccelerator(uint32_t accelerator_id, + const ui::Event& event) { + return window_manager_delegate_ + ? window_manager_delegate_->OnAccelerator(accelerator_id, event) + : mojom::EventResult::UNHANDLED; +} + void WindowServerTestBase::Create(shell::Connection* connection, mojom::WindowTreeClientRequest request) { new WindowTreeClient(this, nullptr, std::move(request));
diff --git a/services/ui/public/cpp/tests/window_server_test_base.h b/services/ui/public/cpp/tests/window_server_test_base.h index 9294305..6c846e5 100644 --- a/services/ui/public/cpp/tests/window_server_test_base.h +++ b/services/ui/public/cpp/tests/window_server_test_base.h
@@ -82,12 +82,13 @@ void OnWmClientJankinessChanged(const std::set<Window*>& client_windows, bool not_responding) override; void OnWmNewDisplay(Window* window, const display::Display& display) override; - void OnAccelerator(uint32_t id, const ui::Event& event) override; void OnWmPerformMoveLoop(Window* window, mojom::MoveLoopSource source, const gfx::Point& cursor_location, const base::Callback<void(bool)>& on_done) override; void OnWmCancelMoveLoop(Window* window) override; + mojom::EventResult OnAccelerator(uint32_t accelerator_id, + const ui::Event& event) override; // InterfaceFactory<WindowTreeClient>: void Create(shell::Connection* connection,
diff --git a/services/ui/public/cpp/window_manager_delegate.cc b/services/ui/public/cpp/window_manager_delegate.cc new file mode 100644 index 0000000..e049b4e1 --- /dev/null +++ b/services/ui/public/cpp/window_manager_delegate.cc
@@ -0,0 +1,15 @@ +// 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 "services/ui/public/cpp/window_manager_delegate.h" + +namespace ui { + +mojom::EventResult WindowManagerDelegate::OnAccelerator( + uint32_t id, + const ui::Event& event) { + return mojom::EventResult::UNHANDLED; +} + +} // namespace ui
diff --git a/services/ui/public/cpp/window_manager_delegate.h b/services/ui/public/cpp/window_manager_delegate.h index f9d3a15..fe3b72b 100644 --- a/services/ui/public/cpp/window_manager_delegate.h +++ b/services/ui/public/cpp/window_manager_delegate.h
@@ -106,7 +106,7 @@ virtual void OnWmNewDisplay(Window* window, const display::Display& display) = 0; - virtual void OnAccelerator(uint32_t id, const ui::Event& event) = 0; + virtual mojom::EventResult OnAccelerator(uint32_t id, const ui::Event& event); virtual void OnWmPerformMoveLoop( Window* window,
diff --git a/services/ui/public/cpp/window_surface_client.h b/services/ui/public/cpp/window_surface_client.h index 43793d9..cc99c82 100644 --- a/services/ui/public/cpp/window_surface_client.h +++ b/services/ui/public/cpp/window_surface_client.h
@@ -5,6 +5,12 @@ #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_SURFACE_CLIENT_H_ #define SERVICES_UI_PUBLIC_CPP_WINDOW_SURFACE_CLIENT_H_ +#include "mojo/public/cpp/bindings/array.h" + +namespace cc { +struct ReturnedResource; +} + namespace ui { class WindowSurface;
diff --git a/services/ui/public/cpp/window_tree_client.h b/services/ui/public/cpp/window_tree_client.h index 07b6635..898178c 100644 --- a/services/ui/public/cpp/window_tree_client.h +++ b/services/ui/public/cpp/window_tree_client.h
@@ -341,7 +341,9 @@ mojom::MoveLoopSource source, const gfx::Point& cursor_location) override; void WmCancelMoveLoop(uint32_t window_id) override; - void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override; + void OnAccelerator(uint32_t ack_id, + uint32_t accelerator_id, + std::unique_ptr<ui::Event> event) override; // Overridden from WindowManagerClient: void SetFrameDecorationValues(
diff --git a/services/ui/public/interfaces/event_matcher.mojom b/services/ui/public/interfaces/event_matcher.mojom index 33e74aa..0ef8b50 100644 --- a/services/ui/public/interfaces/event_matcher.mojom +++ b/services/ui/public/interfaces/event_matcher.mojom
@@ -42,6 +42,7 @@ // A matcher to match any key-press event would be: // - |type_matcher.type| = ui::mojom::EventType::KEY_PRESSED struct EventMatcher { + // |accelerator_phase| is only applicable to accelerators. // TODO(jamescook): Move this to somewhere accelerator-specific. ui.mojom.AcceleratorPhase accelerator_phase; EventTypeMatcher? type_matcher;
diff --git a/services/ui/public/interfaces/window_manager.mojom b/services/ui/public/interfaces/window_manager.mojom index 66dd5069..85e0dd5 100644 --- a/services/ui/public/interfaces/window_manager.mojom +++ b/services/ui/public/interfaces/window_manager.mojom
@@ -93,8 +93,10 @@ // Asks the WindowManager to cancel any outstanding move loop on |change_id|. WmCancelMoveLoop(uint32 change_id); - // An accelerator registered via AddAccelerator() has been triggered. - OnAccelerator(uint32 id, ui.mojom.Event event); + // An accelerator registered via AddAccelerator() has been triggered. If + // |ack_id| is non-zero the accelerator matches a PRE_TARGET and must be + // acknowledged by WindowManagerClient::OnAcceleratorAck(). + OnAccelerator(uint32 ack_id, uint32 accelerator_id, ui.mojom.Event event); }; // This interface is only used as an associated interface and is associated @@ -121,6 +123,8 @@ // easily identify the accelerator's action. If an accelerator with the same // id or the same matcher already exists, then the accelerator is not added. // Accelerator ids 1 << 31 and above are reserved for internal use. + // + // See WindowTree for details on event dispatch. AddAccelerator(uint32 id, EventMatcher matcher) => (bool success); RemoveAccelerator(uint32 id); @@ -141,4 +145,8 @@ // Response from WmCreateTopLevelWindow() informing the client of the id for // the new window. OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); + + // See description in WindowManager::OnAccelerator(). |ack_id| is the value + // that was passed to OnAccelerator(). + OnAcceleratorAck(uint32 ack_id, EventResult event_result); };
diff --git a/services/ui/public/interfaces/window_tree.mojom b/services/ui/public/interfaces/window_tree.mojom index a15f7bf..6440e2a 100644 --- a/services/ui/public/interfaces/window_tree.mojom +++ b/services/ui/public/interfaces/window_tree.mojom
@@ -29,6 +29,19 @@ // rather than a callback to ensure ordering. The server does not interpret the // change id in anyway, it is up to the client to assign a value and use it. // Generally the change id is an ever increasing integer. +// +// Event processing happens in the following order: +// . The event is sent to the accelerator registered for the PRE_TARGET. If +// the client consumes the event, matching event observers are notified and +// processing stops. If the client does not consume the event processing +// continues. +// . Target window (lookup of the target window depends upon the event type) and +// matching event observers are notified at the same time. The target is only +// notified once, even if it has a matching event observer registered. If the +// target consumes the event, processing stops. +// . Accelerator registered for POST_TARGET. No response is expected from the +// client for the POST_TARGET and processing of the next continues +// immediately. interface WindowTree { // Creates a new window with the specified id. It is up to the client to // ensure the id is unique to the connection (the id need not be globally @@ -73,6 +86,8 @@ // this window tree) or OnEventObserved (if the target is another tree). The // client must supply a non-zero |observer_id|, which is reported back with // observed events. Set the matcher to null to clear the observer. + // + // See class description for details on event delivery. SetEventObserver(EventMatcher? matcher, uint32 observer_id); // Sets the specified bounds of the specified window.
diff --git a/services/ui/service.cc b/services/ui/service.cc index bb5f044..e229e59 100644 --- a/services/ui/service.cc +++ b/services/ui/service.cc
@@ -19,13 +19,13 @@ #include "services/tracing/public/cpp/tracing_impl.h" #include "services/ui/clipboard/clipboard_impl.h" #include "services/ui/common/switches.h" +#include "services/ui/display/platform_screen.h" #include "services/ui/gles2/gpu_impl.h" #include "services/ui/gpu/gpu_service_impl.h" #include "services/ui/gpu/gpu_service_mus.h" #include "services/ui/ws/display.h" #include "services/ui/ws/display_binding.h" #include "services/ui/ws/display_manager.h" -#include "services/ui/ws/platform_screen.h" #include "services/ui/ws/user_activity_monitor.h" #include "services/ui/ws/user_display_manager.h" #include "services/ui/ws/window_server.h" @@ -87,7 +87,7 @@ #else use_chrome_gpu_command_buffer_(true), #endif - platform_screen_(ws::PlatformScreen::Create()), + platform_screen_(display::PlatformScreen::Create()), weak_ptr_factory_(this) { }
diff --git a/services/ui/service.h b/services/ui/service.h index 48c11efe..5251e9b 100644 --- a/services/ui/service.h +++ b/services/ui/service.h
@@ -51,9 +51,13 @@ } namespace ui { + +namespace display { +class PlatformScreen; +} + namespace ws { class ForwardingWindowManager; -class PlatformScreen; class WindowServer; } @@ -169,7 +173,7 @@ std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; #endif - std::unique_ptr<ws::PlatformScreen> platform_screen_; + std::unique_ptr<display::PlatformScreen> platform_screen_; std::unique_ptr<ws::TouchController> touch_controller_; base::WeakPtrFactory<Service> weak_ptr_factory_;
diff --git a/services/ui/test_wm/test_wm.cc b/services/ui/test_wm/test_wm.cc index 8739c1f..78f5a9d 100644 --- a/services/ui/test_wm/test_wm.cc +++ b/services/ui/test_wm/test_wm.cc
@@ -86,9 +86,6 @@ window_manager_client_->SetFrameDecorationValues( std::move(frame_decoration_values)); } - void OnAccelerator(uint32_t id, const ui::Event& event) override { - // Don't care. - } void OnWmPerformMoveLoop(Window* window, mojom::MoveLoopSource source, const gfx::Point& cursor_location,
diff --git a/services/ui/ws/BUILD.gn b/services/ui/ws/BUILD.gn index 60f5477..456a5d8 100644 --- a/services/ui/ws/BUILD.gn +++ b/services/ui/ws/BUILD.gn
@@ -46,9 +46,6 @@ "platform_display_factory.h", "platform_display_init_params.cc", "platform_display_init_params.h", - "platform_screen.h", - "platform_screen_impl.cc", - "platform_screen_impl.h", "scheduled_animation_group.cc", "scheduled_animation_group.h", "server_window.cc", @@ -114,6 +111,7 @@ "//services/shell/public/interfaces", "//services/tracing/public/cpp", "//services/ui/common:mus_common", + "//services/ui/display", "//services/ui/gles2", "//services/ui/public/interfaces", "//services/ui/surfaces", @@ -132,17 +130,6 @@ ] if (use_ozone) { - if (is_chromeos) { - sources -= [ - "platform_screen_impl.cc", - "platform_screen_impl.h", - ] - sources += [ - "platform_screen_impl_ozone.cc", - "platform_screen_impl_ozone.h", - ] - } - public_deps += [ "//ui/ozone:ozone" ] } }
diff --git a/services/ui/ws/display_manager.cc b/services/ui/ws/display_manager.cc index fdfcee0..fadbfe9 100644 --- a/services/ui/ws/display_manager.cc +++ b/services/ui/ws/display_manager.cc
@@ -61,7 +61,7 @@ // If we have no more roots left, let the app know so it can terminate. // TODO(sky): move to delegate/observer. - if (!displays_.size() && !pending_displays_.size()) + if (displays_.empty() && pending_displays_.empty()) delegate_->OnNoMoreDisplays(); }
diff --git a/services/ui/ws/event_dispatcher.cc b/services/ui/ws/event_dispatcher.cc index 47914788..d86edb2 100644 --- a/services/ui/ws/event_dispatcher.cc +++ b/services/ui/ws/event_dispatcher.cc
@@ -253,18 +253,35 @@ accelerators_.erase(it); } -void EventDispatcher::ProcessEvent(const ui::Event& event) { +void EventDispatcher::ProcessEvent(const ui::Event& event, + AcceleratorMatchPhase match_phase) { +#if !defined(NDEBUG) + if (match_phase == AcceleratorMatchPhase::POST_ONLY) { + // POST_ONLY should always be preceeded by ANY with the same event. + DCHECK(previous_event_); + // Event doesn't define ==, so this compares the key fields. + DCHECK(event.type() == previous_event_->type() && + event.time_stamp() == previous_event_->time_stamp() && + event.flags() == previous_event_->flags()); + DCHECK_EQ(previous_accelerator_match_phase_, AcceleratorMatchPhase::ANY); + } + previous_event_ = Event::Clone(event); + previous_accelerator_match_phase_ = match_phase; +#endif if (event.IsKeyEvent()) { const ui::KeyEvent* key_event = event.AsKeyEvent(); - if (event.type() == ui::ET_KEY_PRESSED && !key_event->is_char()) { + if (event.type() == ui::ET_KEY_PRESSED && !key_event->is_char() && + match_phase == AcceleratorMatchPhase::ANY) { Accelerator* pre_target = FindAccelerator(*key_event, ui::mojom::AcceleratorPhase::PRE_TARGET); if (pre_target) { - delegate_->OnAccelerator(pre_target->id(), event); + delegate_->OnAccelerator( + pre_target->id(), event, + EventDispatcherDelegate::AcceleratorPhase::PRE); return; } } - ProcessKeyEvent(*key_event); + ProcessKeyEvent(*key_event, match_phase); return; } @@ -276,7 +293,8 @@ NOTREACHED(); } -void EventDispatcher::ProcessKeyEvent(const ui::KeyEvent& event) { +void EventDispatcher::ProcessKeyEvent(const ui::KeyEvent& event, + AcceleratorMatchPhase match_phase) { Accelerator* post_target = FindAccelerator(event, ui::mojom::AcceleratorPhase::POST_TARGET); ServerWindow* focused_window = @@ -292,7 +310,8 @@ } delegate_->OnEventTargetNotFound(event); if (post_target) - delegate_->OnAccelerator(post_target->id(), event); + delegate_->OnAccelerator(post_target->id(), event, + EventDispatcherDelegate::AcceleratorPhase::POST); } void EventDispatcher::ProcessLocatedEvent(const ui::LocatedEvent& event) { @@ -511,9 +530,8 @@ const ui::KeyEvent& event, const ui::mojom::AcceleratorPhase phase) { for (const auto& pair : accelerators_) { - if (pair.second->MatchesEvent(event, phase)) { + if (pair.second->MatchesEvent(event, phase)) return pair.second.get(); - } } return nullptr; }
diff --git a/services/ui/ws/event_dispatcher.h b/services/ui/ws/event_dispatcher.h index 8d0ca291..aeeffd0 100644 --- a/services/ui/ws/event_dispatcher.h +++ b/services/ui/ws/event_dispatcher.h
@@ -22,9 +22,7 @@ class Event; class KeyEvent; class LocatedEvent; -} -namespace ui { namespace ws { class Accelerator; @@ -38,6 +36,15 @@ // Handles dispatching events to the right location as well as updating focus. class EventDispatcher : public ServerWindowObserver { public: + enum class AcceleratorMatchPhase { + // Both pre and post should be considered. + ANY, + + // PRE_TARGETs are not considered, only the actual target and any + // accelerators registered with POST_TARGET. + POST_ONLY, + }; + explicit EventDispatcher(EventDispatcherDelegate* delegate); ~EventDispatcher() override; @@ -104,8 +111,11 @@ void RemoveAccelerator(uint32_t id); // Processes the supplied event, informing the delegate as approriate. This - // may result in generating any number of events. - void ProcessEvent(const ui::Event& event); + // may result in generating any number of events. If |match_phase| is + // ANY and there is a matching accelerator with PRE_TARGET found, than only + // OnAccelerator() is called. The expectation is after the PRE_TARGET has been + // handled this is again called with an AcceleratorMatchPhase of POST_ONLY. + void ProcessEvent(const ui::Event& event, AcceleratorMatchPhase match_phase); private: friend class test::EventDispatcherTestApi; @@ -130,7 +140,8 @@ bool is_pointer_down; }; - void ProcessKeyEvent(const ui::KeyEvent& event); + void ProcessKeyEvent(const ui::KeyEvent& event, + AcceleratorMatchPhase match_phase); bool IsTrackingPointer(int32_t pointer_id) const { return pointer_targets_.count(pointer_id) > 0; @@ -227,6 +238,12 @@ // Keeps track of number of observe requests for each observed window. std::map<const ServerWindow*, uint8_t> observed_windows_; +#if !defined(NDEBUG) + std::unique_ptr<ui::Event> previous_event_; + AcceleratorMatchPhase previous_accelerator_match_phase_ = + AcceleratorMatchPhase::ANY; +#endif + DISALLOW_COPY_AND_ASSIGN(EventDispatcher); };
diff --git a/services/ui/ws/event_dispatcher_delegate.h b/services/ui/ws/event_dispatcher_delegate.h index 1564811..6bba319 100644 --- a/services/ui/ws/event_dispatcher_delegate.h +++ b/services/ui/ws/event_dispatcher_delegate.h
@@ -26,7 +26,14 @@ // Used by EventDispatcher for mocking in tests. class EventDispatcherDelegate { public: - virtual void OnAccelerator(uint32_t accelerator, const ui::Event& event) = 0; + enum class AcceleratorPhase { + PRE, + POST, + }; + + virtual void OnAccelerator(uint32_t accelerator, + const ui::Event& event, + AcceleratorPhase phase) = 0; virtual void SetFocusedWindowFromEventDispatcher(ServerWindow* window) = 0; virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0;
diff --git a/services/ui/ws/event_dispatcher_unittest.cc b/services/ui/ws/event_dispatcher_unittest.cc index ea22068..066aaae 100644 --- a/services/ui/ws/event_dispatcher_unittest.cc +++ b/services/ui/ws/event_dispatcher_unittest.cc
@@ -67,9 +67,14 @@ uint32_t GetAndClearLastAccelerator() { uint32_t return_value = last_accelerator_; last_accelerator_ = 0; + last_accelerator_phase_ = AcceleratorPhase::POST; return return_value; } + AcceleratorPhase last_accelerator_phase() const { + return last_accelerator_phase_; + } + void set_root(ServerWindow* root) { root_ = root; } // Returns the last dispatched event, or null if there are no more. @@ -100,9 +105,12 @@ private: // EventDispatcherDelegate: - void OnAccelerator(uint32_t accelerator, const ui::Event& event) override { + void OnAccelerator(uint32_t accelerator, + const ui::Event& event, + AcceleratorPhase phase) override { EXPECT_EQ(0u, last_accelerator_); last_accelerator_ = accelerator; + last_accelerator_phase_ = phase; } ServerWindow* GetFocusedWindowForEventDispatcher() override { return focused_window_; @@ -142,6 +150,7 @@ ServerWindow* focused_window_; ServerWindow* lost_capture_window_; uint32_t last_accelerator_; + AcceleratorPhase last_accelerator_phase_ = AcceleratorPhase::POST; std::queue<std::unique_ptr<DispatchedEventDetails>> dispatched_event_queue_; ServerWindow* root_ = nullptr; std::unique_ptr<ui::Event> last_event_target_not_found_; @@ -190,9 +199,11 @@ ASSERT_FALSE(dispatcher_delegate->has_queued_events()) << " unexpected queued events before running " << i; if (test.input_event.IsMouseWheelEvent()) - dispatcher->ProcessEvent(test.input_event); + dispatcher->ProcessEvent(test.input_event, + EventDispatcher::AcceleratorMatchPhase::ANY); else - dispatcher->ProcessEvent(ui::PointerEvent(test.input_event)); + dispatcher->ProcessEvent(ui::PointerEvent(test.input_event), + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); @@ -331,7 +342,8 @@ const ui::PointerEvent ui_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(20, 25), gfx::Point(20, 25), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(ui_event); + event_dispatcher()->ProcessEvent(ui_event, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -349,7 +361,8 @@ TEST_F(EventDispatcherTest, ProcessEventNoTarget) { // Send event without a target. ui::KeyEvent key(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE); - event_dispatcher()->ProcessEvent(key); + event_dispatcher()->ProcessEvent(key, + EventDispatcher::AcceleratorMatchPhase::ANY); // Event wasn't dispatched to a target. std::unique_ptr<DispatchedEventDetails> details = @@ -413,7 +426,7 @@ dispatcher->AddAccelerator(accelerator_1, std::move(matcher)); ui::KeyEvent key(ui::ET_KEY_PRESSED, ui::VKEY_W, ui::EF_CONTROL_DOWN); - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(accelerator_1, event_dispatcher_delegate->GetAndClearLastAccelerator()); @@ -421,24 +434,24 @@ // ignoring. key = ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_W, ui::EF_CONTROL_DOWN | ui::EF_NUM_LOCK_ON); - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(accelerator_1, event_dispatcher_delegate->GetAndClearLastAccelerator()); key = ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_W, ui::EF_NONE); - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(0u, event_dispatcher_delegate->GetAndClearLastAccelerator()); uint32_t accelerator_2 = 2; matcher = ui::CreateKeyMatcher(ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagNone); dispatcher->AddAccelerator(accelerator_2, std::move(matcher)); - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(accelerator_2, event_dispatcher_delegate->GetAndClearLastAccelerator()); dispatcher->RemoveAccelerator(accelerator_2); - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(0u, event_dispatcher_delegate->GetAndClearLastAccelerator()); } @@ -456,7 +469,7 @@ ui::KeyEvent key(ui::ET_KEY_PRESSED, ui::VKEY_W, ui::EF_CONTROL_DOWN); // The post-target accelerator should be fired if there is no focused window. - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(accelerator_1, event_dispatcher_delegate->GetAndClearLastAccelerator()); std::unique_ptr<DispatchedEventDetails> details = @@ -468,7 +481,7 @@ event_dispatcher_delegate->SetFocusedWindowFromEventDispatcher(child.get()); // With a focused window the event should be dispatched. - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(0u, event_dispatcher_delegate->GetAndClearLastAccelerator()); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_TRUE(details); @@ -480,13 +493,57 @@ EXPECT_FALSE(accelerator_weak_ptr); // Post deletion there should be no accelerator - dispatcher->ProcessEvent(key); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); EXPECT_EQ(0u, event_dispatcher_delegate->GetAndClearLastAccelerator()); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_TRUE(details); EXPECT_FALSE(details->accelerator); } +TEST_F(EventDispatcherTest, ProcessPost) { + TestEventDispatcherDelegate* event_dispatcher_delegate = + test_event_dispatcher_delegate(); + EventDispatcher* dispatcher = event_dispatcher(); + + uint32_t pre_id = 1; + { + mojom::EventMatcherPtr matcher = ui::CreateKeyMatcher( + ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagControlDown); + matcher->accelerator_phase = ui::mojom::AcceleratorPhase::PRE_TARGET; + dispatcher->AddAccelerator(pre_id, std::move(matcher)); + } + + uint32_t post_id = 2; + { + mojom::EventMatcherPtr matcher = ui::CreateKeyMatcher( + ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagControlDown); + matcher->accelerator_phase = ui::mojom::AcceleratorPhase::POST_TARGET; + dispatcher->AddAccelerator(post_id, std::move(matcher)); + } + + // Set focused window for EventDispatcher dispatches key events. + std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3)); + event_dispatcher_delegate->SetFocusedWindowFromEventDispatcher(child.get()); + + // Dispatch for ANY, which should trigger PRE and not call + // DispatchInputEventToWindow(). + ui::KeyEvent key(ui::ET_KEY_PRESSED, ui::VKEY_W, ui::EF_CONTROL_DOWN); + dispatcher->ProcessEvent(key, EventDispatcher::AcceleratorMatchPhase::ANY); + EXPECT_EQ(EventDispatcherDelegate::AcceleratorPhase::PRE, + event_dispatcher_delegate->last_accelerator_phase()); + EXPECT_EQ(pre_id, event_dispatcher_delegate->GetAndClearLastAccelerator()); + EXPECT_FALSE(event_dispatcher_delegate->has_queued_events()); + + // Dispatch for POST, which should trigger POST. + dispatcher->ProcessEvent(key, + EventDispatcher::AcceleratorMatchPhase::POST_ONLY); + std::unique_ptr<DispatchedEventDetails> details = + event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); + ASSERT_TRUE(details); + ASSERT_TRUE(details->accelerator); + EXPECT_EQ(post_id, details->accelerator->id()); +} + TEST_F(EventDispatcherTest, Capture) { ServerWindow* root = root_window(); std::unique_ptr<ServerWindow> child = CreateChildWindow(WindowId(1, 3)); @@ -589,7 +646,8 @@ const ui::PointerEvent press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(12, 12), gfx::Point(12, 12), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(press_event); + dispatcher->ProcessEvent(press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // Events should target child and be in the non-client area. std::unique_ptr<DispatchedEventDetails> details = @@ -603,7 +661,8 @@ const ui::PointerEvent move_event( ui::MouseEvent(ui::ET_MOUSE_MOVED, gfx::Point(17, 18), gfx::Point(17, 18), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, 0)); - dispatcher->ProcessEvent(move_event); + dispatcher->ProcessEvent(move_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // Still same target. details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); @@ -615,7 +674,8 @@ const ui::PointerEvent release_event(ui::MouseEvent( ui::ET_MOUSE_RELEASED, gfx::Point(17, 18), gfx::Point(17, 18), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(release_event); + dispatcher->ProcessEvent(release_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // The event should not have been dispatched to the delegate. details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); @@ -628,7 +688,8 @@ const ui::PointerEvent press_event2(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(21, 22), gfx::Point(21, 22), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(press_event2); + dispatcher->ProcessEvent(press_event2, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_TRUE(event_dispatcher_delegate->has_queued_events()); ASSERT_EQ(child.get(), details->window); @@ -658,7 +719,8 @@ const ui::PointerEvent press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(28, 11), gfx::Point(28, 11), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(press_event); + event_dispatcher()->ProcessEvent(press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // Events should target child and be in the client area. std::unique_ptr<DispatchedEventDetails> details = @@ -679,7 +741,8 @@ const ui::PointerEvent move1(ui::MouseEvent( ui::ET_MOUSE_MOVED, gfx::Point(11, 11), gfx::Point(11, 11), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, 0)); - event_dispatcher()->ProcessEvent(move1); + event_dispatcher()->ProcessEvent(move1, + EventDispatcher::AcceleratorMatchPhase::ANY); // Event went through the child window and hit the root. std::unique_ptr<DispatchedEventDetails> details1 = @@ -693,7 +756,8 @@ const ui::PointerEvent move2(ui::MouseEvent( ui::ET_MOUSE_MOVED, gfx::Point(11, 12), gfx::Point(11, 12), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, 0)); - event_dispatcher()->ProcessEvent(move2); + event_dispatcher()->ProcessEvent(move2, + EventDispatcher::AcceleratorMatchPhase::ANY); // Mouse exits the root. std::unique_ptr<DispatchedEventDetails> details2 = @@ -723,7 +787,8 @@ const ui::PointerEvent press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(12, 12), gfx::Point(12, 12), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(press_event); + dispatcher->ProcessEvent(press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_FALSE(event_dispatcher_delegate->has_queued_events()); @@ -735,7 +800,8 @@ // but focus should not change. const ui::PointerEvent touch_event(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(53, 54), 2, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event); + dispatcher->ProcessEvent(touch_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_FALSE(event_dispatcher_delegate->has_queued_events()); EXPECT_EQ(child2.get(), details->window); @@ -757,7 +823,8 @@ // Press on child1. const ui::PointerEvent touch_event1(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(12, 13), 1, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event1); + dispatcher->ProcessEvent(touch_event1, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(child1.get(), details->window); @@ -765,38 +832,44 @@ // Drag over child2, child1 should get the drag. const ui::PointerEvent drag_event1(ui::TouchEvent( ui::ET_TOUCH_MOVED, gfx::Point(53, 54), 1, base::TimeTicks())); - dispatcher->ProcessEvent(drag_event1); + dispatcher->ProcessEvent(drag_event1, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(child1.get(), details->window); // Press on child2 with a different touch id. const ui::PointerEvent touch_event2(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(54, 55), 2, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event2); + dispatcher->ProcessEvent(touch_event2, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(child2.get(), details->window); // Drag over child1 with id 2, child2 should continue to get the drag. const ui::PointerEvent drag_event2(ui::TouchEvent( ui::ET_TOUCH_MOVED, gfx::Point(13, 14), 2, base::TimeTicks())); - dispatcher->ProcessEvent(drag_event2); + dispatcher->ProcessEvent(drag_event2, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(child2.get(), details->window); // Drag again with id 1, child1 should continue to get it. - dispatcher->ProcessEvent(drag_event1); + dispatcher->ProcessEvent(drag_event1, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(child1.get(), details->window); // Release touch id 1, and click on 2. 2 should get it. const ui::PointerEvent touch_release(ui::TouchEvent( ui::ET_TOUCH_RELEASED, gfx::Point(54, 55), 1, base::TimeTicks())); - dispatcher->ProcessEvent(touch_release); + dispatcher->ProcessEvent(touch_release, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(child1.get(), details->window); const ui::PointerEvent touch_event3(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(54, 55), 2, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event3); + dispatcher->ProcessEvent(touch_event3, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(child2.get(), details->window); } @@ -814,7 +887,8 @@ // Press on child. const ui::PointerEvent touch_event1(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(12, 13), 1, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event1); + dispatcher->ProcessEvent(touch_event1, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_FALSE(event_dispatcher_delegate->has_queued_events()); @@ -825,7 +899,8 @@ const ui::PointerEvent drag_event1(ui::TouchEvent( ui::ET_TOUCH_MOVED, gfx::Point(53, 54), 1, base::TimeTicks())); - dispatcher->ProcessEvent(drag_event1); + dispatcher->ProcessEvent(drag_event1, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(nullptr, details.get()); } @@ -845,7 +920,8 @@ const ui::PointerEvent ui_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(8, 9), gfx::Point(8, 9), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(ui_event); + dispatcher->ProcessEvent(ui_event, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); ASSERT_EQ(root, details->window); @@ -854,7 +930,8 @@ const ui::PointerEvent release_event(ui::MouseEvent( ui::ET_MOUSE_RELEASED, gfx::Point(8, 9), gfx::Point(8, 9), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(release_event); + dispatcher->ProcessEvent(release_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_FALSE(event_dispatcher_delegate->has_queued_events()); ASSERT_EQ(root, details->window); @@ -863,7 +940,8 @@ // Change the extended hit test region and send event in extended hit test // region. Should result in exit for root, followed by press for child. child->set_extended_hit_test_region(gfx::Insets(5, 5, 5, 5)); - dispatcher->ProcessEvent(ui_event); + dispatcher->ProcessEvent(ui_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_EQ(root, details->window); EXPECT_EQ(ui::ET_POINTER_EXITED, details->event->type()); @@ -928,7 +1006,8 @@ const ui::PointerEvent left_press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(5, 5), gfx::Point(5, 5), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(left_press_event); + dispatcher->ProcessEvent(left_press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // Events should target child. std::unique_ptr<DispatchedEventDetails> details = @@ -944,7 +1023,8 @@ ui::ET_MOUSE_PRESSED, gfx::Point(5, 5), gfx::Point(5, 5), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON, ui::EF_RIGHT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(right_press_event); + dispatcher->ProcessEvent(right_press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_TRUE(IsMouseButtonDown()); @@ -953,14 +1033,16 @@ ui::ET_MOUSE_RELEASED, gfx::Point(5, 5), gfx::Point(5, 5), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(left_release_event); + dispatcher->ProcessEvent(left_release_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_TRUE(IsMouseButtonDown()); // Touch Event while mouse is down should not affect state. const ui::PointerEvent touch_event(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(15, 15), 2, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event); + dispatcher->ProcessEvent(touch_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_TRUE(IsMouseButtonDown()); @@ -969,7 +1051,8 @@ ui::MouseEvent(ui::ET_MOUSE_MOVED, gfx::Point(15, 5), gfx::Point(15, 5), base::TimeTicks(), ui::EF_RIGHT_MOUSE_BUTTON, ui::EF_RIGHT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(move_event); + dispatcher->ProcessEvent(move_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_TRUE(IsMouseButtonDown()); @@ -978,7 +1061,8 @@ ui::MouseEvent(ui::ET_MOUSE_RELEASED, gfx::Point(5, 5), gfx::Point(5, 5), base::TimeTicks(), ui::EF_RIGHT_MOUSE_BUTTON, ui::EF_RIGHT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(right_release_event); + dispatcher->ProcessEvent(right_release_event, + EventDispatcher::AcceleratorMatchPhase::ANY); details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); EXPECT_FALSE(IsMouseButtonDown()); } @@ -989,7 +1073,8 @@ const ui::PointerEvent press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(5, 5), gfx::Point(5, 5), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(press_event); + dispatcher->ProcessEvent(press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // Events should target the root. std::unique_ptr<DispatchedEventDetails> details = @@ -1047,7 +1132,8 @@ { const ui::PointerEvent touch_event(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(12, 13), 1, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event); + dispatcher->ProcessEvent(touch_event, + EventDispatcher::AcceleratorMatchPhase::ANY); } std::unique_ptr<DispatchedEventDetails> details = @@ -1079,7 +1165,8 @@ const ui::PointerEvent press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(15, 15), gfx::Point(15, 15), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(press_event); + dispatcher->ProcessEvent(press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // Events should target the root. details = event_dispatcher_delegate->GetAndAdvanceDispatchedEventDetails(); @@ -1099,7 +1186,8 @@ const ui::PointerEvent press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(5, 5), gfx::Point(5, 5), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - dispatcher->ProcessEvent(press_event); + dispatcher->ProcessEvent(press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1109,7 +1197,8 @@ { const ui::PointerEvent touch_event(ui::TouchEvent( ui::ET_TOUCH_PRESSED, gfx::Point(12, 13), 1, base::TimeTicks())); - dispatcher->ProcessEvent(touch_event); + dispatcher->ProcessEvent(touch_event, + EventDispatcher::AcceleratorMatchPhase::ANY); } ASSERT_TRUE(AreAnyPointersDown()); @@ -1179,7 +1268,8 @@ const ui::PointerEvent press_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(6, 6), gfx::Point(6, 6), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(press_event); + event_dispatcher()->ProcessEvent(press_event, + EventDispatcher::AcceleratorMatchPhase::ANY); // Events should target child and be in the client area. std::unique_ptr<DispatchedEventDetails> details = @@ -1199,7 +1289,8 @@ const ui::PointerEvent pointer_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(20, 25), gfx::Point(20, 25), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(pointer_event); + event_dispatcher()->ProcessEvent( + pointer_event, EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1219,7 +1310,8 @@ const ui::PointerEvent pointer_event( ui::TouchEvent(ui::ET_TOUCH_RELEASED, gfx::Point(25, 20), touch_id, base::TimeTicks())); - event_dispatcher()->ProcessEvent(pointer_event); + event_dispatcher()->ProcessEvent( + pointer_event, EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1246,7 +1338,8 @@ const ui::PointerEvent ui_event(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(20, 25), gfx::Point(20, 25), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(ui_event); + event_dispatcher()->ProcessEvent(ui_event, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1289,7 +1382,8 @@ const ui::PointerEvent mouse_pressed(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(15, 15), gfx::Point(15, 15), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(mouse_pressed); + event_dispatcher()->ProcessEvent(mouse_pressed, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1321,7 +1415,8 @@ const ui::PointerEvent mouse_pressed(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(55, 15), gfx::Point(55, 15), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(mouse_pressed); + event_dispatcher()->ProcessEvent(mouse_pressed, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1356,7 +1451,8 @@ const ui::PointerEvent mouse_pressed(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(75, 15), gfx::Point(75, 15), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(mouse_pressed); + event_dispatcher()->ProcessEvent(mouse_pressed, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1392,7 +1488,8 @@ const ui::PointerEvent mouse_pressed(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(25, 25), gfx::Point(25, 25), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(mouse_pressed); + event_dispatcher()->ProcessEvent(mouse_pressed, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1420,7 +1517,8 @@ const ui::PointerEvent mouse_pressed(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(15, 15), gfx::Point(15, 15), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(mouse_pressed); + event_dispatcher()->ProcessEvent(mouse_pressed, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1449,7 +1547,8 @@ const ui::PointerEvent mouse_pressed(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(45, 15), gfx::Point(45, 15), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(mouse_pressed); + event_dispatcher()->ProcessEvent(mouse_pressed, + EventDispatcher::AcceleratorMatchPhase::ANY); std::unique_ptr<DispatchedEventDetails> details = test_event_dispatcher_delegate()->GetAndAdvanceDispatchedEventDetails(); @@ -1577,7 +1676,8 @@ const ui::PointerEvent mouse_pressed(ui::MouseEvent( ui::ET_MOUSE_PRESSED, gfx::Point(15, 15), gfx::Point(15, 15), base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); - event_dispatcher()->ProcessEvent(mouse_pressed); + event_dispatcher()->ProcessEvent(mouse_pressed, + EventDispatcher::AcceleratorMatchPhase::ANY); event_dispatcher()->SetCaptureWindow(w11.get(), kClientAreaId); std::unique_ptr<DispatchedEventDetails> details =
diff --git a/services/ui/ws/test_utils.cc b/services/ui/ws/test_utils.cc index e8d648f..f870d0a7 100644 --- a/services/ui/ws/test_utils.cc +++ b/services/ui/ws/test_utils.cc
@@ -192,10 +192,11 @@ void TestWindowManager::WmCancelMoveLoop(uint32_t window_id) {} -void TestWindowManager::OnAccelerator(uint32_t id, +void TestWindowManager::OnAccelerator(uint32_t ack_id, + uint32_t accelerator_id, std::unique_ptr<ui::Event> event) { on_accelerator_called_ = true; - on_accelerator_id_ = id; + on_accelerator_id_ = accelerator_id; } // TestWindowTreeClient -------------------------------------------------------
diff --git a/services/ui/ws/test_utils.h b/services/ui/ws/test_utils.h index 18ec321..e701b55 100644 --- a/services/ui/ws/test_utils.h +++ b/services/ui/ws/test_utils.h
@@ -102,6 +102,9 @@ void AckLastEvent(mojom::EventResult result) { tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); } + void AckLastAccelerator(mojom::EventResult result) { + tree_->OnAcceleratorAck(tree_->event_ack_id_, result); + } void SetEventObserver(mojom::EventMatcherPtr matcher, uint32_t event_observer_id); @@ -282,6 +285,11 @@ return true; } + void ClearAcceleratorCalled() { + on_accelerator_id_ = 0u; + on_accelerator_called_ = false; + } + bool on_perform_move_loop_called() { return on_perform_move_loop_called_; } bool on_accelerator_called() { return on_accelerator_called_; } uint32_t on_accelerator_id() { return on_accelerator_id_; } @@ -310,7 +318,9 @@ mojom::MoveLoopSource source, const gfx::Point& cursor_location) override; void WmCancelMoveLoop(uint32_t window_id) override; - void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override; + void OnAccelerator(uint32_t ack_id, + uint32_t accelerator_id, + std::unique_ptr<ui::Event> event) override; bool on_perform_move_loop_called_ = false;
diff --git a/services/ui/ws/window_manager_client_unittest.cc b/services/ui/ws/window_manager_client_unittest.cc index 2864e65..f91f761a 100644 --- a/services/ui/ws/window_manager_client_unittest.cc +++ b/services/ui/ws/window_manager_client_unittest.cc
@@ -61,7 +61,6 @@ bool janky) override {} void OnWmNewDisplay(Window* window, const display::Display& display) override {} - void OnAccelerator(uint32_t id, const ui::Event& event) override {} void OnWmPerformMoveLoop(Window* window, mojom::MoveLoopSource source, const gfx::Point& cursor_location,
diff --git a/services/ui/ws/window_manager_state.cc b/services/ui/ws/window_manager_state.cc index e70ec273..4f4d2eee 100644 --- a/services/ui/ws/window_manager_state.cc +++ b/services/ui/ws/window_manager_state.cc
@@ -199,12 +199,15 @@ QueueEvent(event, nullptr); return; } - event_dispatcher_.ProcessEvent(event); + + event_dispatcher_.ProcessEvent(event, + EventDispatcher::AcceleratorMatchPhase::ANY); } void WindowManagerState::OnEventAck(mojom::WindowTree* tree, mojom::EventResult result) { - if (tree_awaiting_input_ack_ != tree) { + if (tree_awaiting_input_ack_ != tree || + event_dispatch_phase_ != EventDispatchPhase::TARGET) { // TODO(sad): The ack must have arrived after the timeout. We should do // something here, and in OnEventAckTimeout(). return; @@ -212,12 +215,39 @@ tree_awaiting_input_ack_ = nullptr; event_ack_timer_.Stop(); - if (result == mojom::EventResult::UNHANDLED && post_target_accelerator_) - OnAccelerator(post_target_accelerator_->id(), *event_awaiting_input_ack_); + if (result == mojom::EventResult::UNHANDLED && post_target_accelerator_) { + OnAccelerator(post_target_accelerator_->id(), *event_awaiting_input_ack_, + AcceleratorPhase::POST); + } + event_dispatch_phase_ = EventDispatchPhase::NONE; ProcessNextEventFromQueue(); } +void WindowManagerState::OnAcceleratorAck(mojom::EventResult result) { + if (event_dispatch_phase_ != EventDispatchPhase::PRE_TARGET_ACCELERATOR) { + // TODO(sad): The ack must have arrived after the timeout. We should do + // something here, and in OnEventAckTimeout(). + return; + } + + tree_awaiting_input_ack_ = nullptr; + event_ack_timer_.Stop(); + event_dispatch_phase_ = EventDispatchPhase::NONE; + + if (result == mojom::EventResult::UNHANDLED) { + event_dispatcher_.ProcessEvent( + *event_awaiting_input_ack_, + EventDispatcher::AcceleratorMatchPhase::POST_ONLY); + } else { + // We're not going to process the event any further, notify event observers. + // We don't do this first to ensure we don't send an event twice to clients. + window_server()->SendToEventObservers(*event_awaiting_input_ack_, user_id(), + nullptr); + ProcessNextEventFromQueue(); + } +} + const WindowServer* WindowManagerState::window_server() const { return window_tree_->window_server(); } @@ -258,7 +288,10 @@ WindowTree* hung_tree = window_server()->GetTreeWithId(client_id); if (hung_tree && !hung_tree->janky()) window_tree_->ClientJankinessChanged(hung_tree); - OnEventAck(tree_awaiting_input_ack_, mojom::EventResult::UNHANDLED); + if (event_dispatch_phase_ == EventDispatchPhase::PRE_TARGET_ACCELERATOR) + OnAcceleratorAck(mojom::EventResult::UNHANDLED); + else + OnEventAck(tree_awaiting_input_ack_, mojom::EventResult::UNHANDLED); } void WindowManagerState::QueueEvent( @@ -277,7 +310,8 @@ std::unique_ptr<QueuedEvent> queued_event = std::move(event_queue_.front()); event_queue_.pop(); if (!queued_event->processed_target) { - event_dispatcher_.ProcessEvent(*queued_event->event); + event_dispatcher_.ProcessEvent( + *queued_event->event, EventDispatcher::AcceleratorMatchPhase::ANY); return; } if (queued_event->processed_target->IsValid()) { @@ -309,18 +343,12 @@ } } + event_dispatch_phase_ = EventDispatchPhase::TARGET; + WindowTree* tree = window_server()->GetTreeWithId(client_id); - // TOOD(sad): Adjust this delay, possibly make this dynamic. - const base::TimeDelta max_delay = base::debug::BeingDebugged() - ? base::TimeDelta::FromDays(1) - : GetDefaultAckTimerDelay(); - event_ack_timer_.Start( - FROM_HERE, max_delay, - base::Bind(&WindowManagerState::OnEventAckTimeout, - weak_factory_.GetWeakPtr(), tree->id())); + ScheduleInputEventTimeout(tree); - tree_awaiting_input_ack_ = tree; if (accelerator) { event_awaiting_input_ack_ = ui::Event::Clone(event); post_target_accelerator_ = accelerator; @@ -361,15 +389,35 @@ return false; } +void WindowManagerState::ScheduleInputEventTimeout(WindowTree* tree) { + // TOOD(sad): Adjust this delay, possibly make this dynamic. + const base::TimeDelta max_delay = base::debug::BeingDebugged() + ? base::TimeDelta::FromDays(1) + : GetDefaultAckTimerDelay(); + event_ack_timer_.Start(FROM_HERE, max_delay, + base::Bind(&WindowManagerState::OnEventAckTimeout, + weak_factory_.GetWeakPtr(), tree->id())); + + tree_awaiting_input_ack_ = tree; +} + //////////////////////////////////////////////////////////////////////////////// // EventDispatcherDelegate: void WindowManagerState::OnAccelerator(uint32_t accelerator_id, - const ui::Event& event) { + const ui::Event& event, + AcceleratorPhase phase) { DCHECK(IsActive()); if (HandleDebugAccelerator(accelerator_id)) return; - window_tree_->OnAccelerator(accelerator_id, event); + const bool needs_ack = phase == AcceleratorPhase::PRE; + if (needs_ack) { + DCHECK_EQ(EventDispatchPhase::NONE, event_dispatch_phase_); + event_dispatch_phase_ = EventDispatchPhase::PRE_TARGET_ACCELERATOR; + event_awaiting_input_ack_ = ui::Event::Clone(event); + ScheduleInputEventTimeout(window_tree_); + } + window_tree_->OnAccelerator(accelerator_id, event, needs_ack); } void WindowManagerState::SetFocusedWindowFromEventDispatcher(
diff --git a/services/ui/ws/window_manager_state.h b/services/ui/ws/window_manager_state.h index c9a3b72..9c75881 100644 --- a/services/ui/ws/window_manager_state.h +++ b/services/ui/ws/window_manager_state.h
@@ -79,11 +79,25 @@ // TODO(sky): make this private and use a callback. void OnEventAck(mojom::WindowTree* tree, mojom::EventResult result); + // Called when the WindowManager acks an accelerator. + void OnAcceleratorAck(mojom::EventResult result); + private: class ProcessedEventTarget; friend class Display; friend class test::WindowManagerStateTestApi; + enum class EventDispatchPhase { + // Not actively dispatching. + NONE, + + // A PRE_TARGET accelerator has been encountered and we're awaiting the ack. + PRE_TARGET_ACCELERATOR, + + // Dispatching to the target, awaiting the ack. + TARGET, + }; + // There are two types of events that may be queued, both occur only when // waiting for an ack from a client. // . We get an event from the PlatformDisplay. This results in |event| being @@ -113,6 +127,8 @@ // |window|. |window| corresponds to the root of a Display. ServerWindow* GetWindowManagerRoot(ServerWindow* window); + // Called if the client doesn't ack an event in the appropriate amount of + // time. void OnEventAckTimeout(ClientSpecificId client_id); // Schedules an event to be processed later. @@ -136,8 +152,13 @@ // Returns true if the accelerator was handled. bool HandleDebugAccelerator(uint32_t accelerator_id); + // Called when waiting for an event or accelerator to be processed by |tree|. + void ScheduleInputEventTimeout(WindowTree* tree); + // EventDispatcherDelegate: - void OnAccelerator(uint32_t accelerator_id, const ui::Event& event) override; + void OnAccelerator(uint32_t accelerator_id, + const ui::Event& event, + AcceleratorPhase phase) override; void SetFocusedWindowFromEventDispatcher(ServerWindow* window) override; ServerWindow* GetFocusedWindowForEventDispatcher() override; void SetNativeCapture(ServerWindow* window) override; @@ -161,7 +182,10 @@ bool got_frame_decoration_values_ = false; mojom::FrameDecorationValuesPtr frame_decoration_values_; + EventDispatchPhase event_dispatch_phase_ = EventDispatchPhase::NONE; + // The tree we're waiting to process the current accelerator or event. mojom::WindowTree* tree_awaiting_input_ack_ = nullptr; + // The event we're awaiting an accelerator or input ack from. std::unique_ptr<ui::Event> event_awaiting_input_ack_; base::WeakPtr<Accelerator> post_target_accelerator_; std::queue<std::unique_ptr<QueuedEvent>> event_queue_;
diff --git a/services/ui/ws/window_manager_state_unittest.cc b/services/ui/ws/window_manager_state_unittest.cc index 663cd7f..186f55f 100644 --- a/services/ui/ws/window_manager_state_unittest.cc +++ b/services/ui/ws/window_manager_state_unittest.cc
@@ -53,9 +53,12 @@ Accelerator* accelerator); void OnEventAckTimeout(ClientSpecificId client_id); + // This is the tree associated with the WindowManagerState. WindowTree* tree() { return window_event_targeting_helper_.window_server()->GetTreeWithId(1); } + // This is *not* the tree associated with the WindowManagerState, use tree() + // if you need the window manager tree. WindowTree* window_tree() { return window_tree_; } TestWindowTreeClient* window_tree_client() { return window_tree_client_; } ServerWindow* window() { return window_; } @@ -161,6 +164,13 @@ window_tree_client_->tracker()->changes()->clear(); } +void SetCanFocusUp(ServerWindow* window) { + while (window) { + window->set_can_focus(true); + window = window->parent(); + } +} + // Tests that when an event is dispatched with no accelerator, that post target // accelerator is not triggered. TEST_F(WindowManagerStateTest, NullAccelerator) { @@ -198,6 +208,63 @@ EXPECT_EQ(accelerator->id(), window_manager()->on_accelerator_id()); } +// Tests that if a pre target accelerator consumes the event no other processing +// is done. +TEST_F(WindowManagerStateTest, PreTargetConsumed) { + // Set up two trees with focus on a child in the second. + const ClientWindowId child_window_id(11); + window_tree()->NewWindow(child_window_id, ServerWindow::Properties()); + ServerWindow* child_window = + window_tree()->GetWindowByClientId(child_window_id); + window_tree()->AddWindow(FirstRootId(window_tree()), child_window_id); + child_window->SetVisible(true); + SetCanFocusUp(child_window); + tree()->GetDisplay(child_window)->AddActivationParent(child_window->parent()); + ASSERT_TRUE(window_tree()->SetFocus(child_window_id)); + + // Register a pre-accelerator. + uint32_t accelerator_id = 11; + { + mojom::EventMatcherPtr matcher = ui::CreateKeyMatcher( + ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagControlDown); + ASSERT_TRUE(window_manager_state()->event_dispatcher()->AddAccelerator( + accelerator_id, std::move(matcher))); + } + TestChangeTracker* tracker = wm_client()->tracker(); + tracker->changes()->clear(); + TestChangeTracker* tracker2 = window_tree_client()->tracker(); + tracker2->changes()->clear(); + + // Send an ensure only the pre accelerator is called. + ui::KeyEvent key(ui::ET_KEY_PRESSED, ui::VKEY_W, ui::EF_CONTROL_DOWN); + window_manager_state()->ProcessEvent(key); + EXPECT_TRUE(window_manager()->on_accelerator_called()); + EXPECT_EQ(accelerator_id, window_manager()->on_accelerator_id()); + EXPECT_TRUE(tracker->changes()->empty()); + EXPECT_TRUE(tracker2->changes()->empty()); + + // Ack the accelerator, saying we consumed it. + WindowTreeTestApi(tree()).AckLastAccelerator(mojom::EventResult::HANDLED); + // Nothing should change. + EXPECT_TRUE(tracker->changes()->empty()); + EXPECT_TRUE(tracker2->changes()->empty()); + + window_manager()->ClearAcceleratorCalled(); + + // Repeat, but respond with UNHANDLED. + window_manager_state()->ProcessEvent(key); + EXPECT_TRUE(window_manager()->on_accelerator_called()); + EXPECT_EQ(accelerator_id, window_manager()->on_accelerator_id()); + EXPECT_TRUE(tracker->changes()->empty()); + EXPECT_TRUE(tracker2->changes()->empty()); + WindowTreeTestApi(tree()).AckLastAccelerator(mojom::EventResult::UNHANDLED); + + EXPECT_TRUE(tracker->changes()->empty()); + // The focused window should get the event. + EXPECT_EQ("InputEvent window=0,11 event_action=7", + SingleChangeToDescription(*tracker2->changes())); +} + // Tests that when a client handles an event that post target accelerators are // not called. TEST_F(WindowManagerStateTest, ClientHandlesEvent) {
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc index 7b67759..8a62bdd 100644 --- a/services/ui/ws/window_tree.cc +++ b/services/ui/ws/window_tree.cc
@@ -431,11 +431,16 @@ } void WindowTree::OnAccelerator(uint32_t accelerator_id, - const ui::Event& event) { + const ui::Event& event, + bool needs_ack) { DCHECK(window_manager_internal_); + if (needs_ack) + GenerateEventAckId(); + else + DCHECK_EQ(0u, event_ack_id_); // TODO(moshayedi): crbug.com/617167. Don't clone even once we map // mojom::Event directly to ui::Event. - window_manager_internal_->OnAccelerator(accelerator_id, + window_manager_internal_->OnAccelerator(event_ack_id_, accelerator_id, ui::Event::Clone(event)); } @@ -959,14 +964,18 @@ window->Remove(window->children().front()); } -void WindowTree::DispatchInputEventImpl(ServerWindow* target, - const ui::Event& event) { +uint32_t WindowTree::GenerateEventAckId() { DCHECK(!event_ack_id_); // We do not want to create a sequential id for each event, because that can // leak some information to the client. So instead, manufacture the id // randomly. - // TODO(moshayedi): Find a faster way to generate ids. event_ack_id_ = 0x1000000 | (rand() & 0xffffff); + return event_ack_id_; +} + +void WindowTree::DispatchInputEventImpl(ServerWindow* target, + const ui::Event& event) { + GenerateEventAckId(); WindowManagerDisplayRoot* display_root = GetWindowManagerDisplayRoot(target); DCHECK(display_root); event_source_wms_ = display_root->window_manager_state(); @@ -1297,6 +1306,7 @@ // TODO(sad): Something bad happened. Kill the client? NOTIMPLEMENTED() << ": Wrong event acked. event_id=" << event_id << ", event_ack_id_=" << event_ack_id_; + DVLOG(1) << "OnWindowInputEventAck supplied unexpected event_id"; } event_ack_id_ = 0; @@ -1610,6 +1620,18 @@ window_server_->WindowManagerCreatedTopLevelWindow(this, change_id, window); } +void WindowTree::OnAcceleratorAck(uint32_t event_id, + mojom::EventResult result) { + if (event_ack_id_ == 0 || event_id != event_ack_id_) { + DVLOG(1) << "OnAcceleratorAck supplied invalid event_id"; + window_server_->WindowManagerSentBogusMessage(); + return; + } + event_ack_id_ = 0; + DCHECK(window_manager_state_); + window_manager_state_->OnAcceleratorAck(result); +} + bool WindowTree::HasRootForAccessPolicy(const ServerWindow* window) const { return HasRoot(window); }
diff --git a/services/ui/ws/window_tree.h b/services/ui/ws/window_tree.h index c975b06..6555ff33 100644 --- a/services/ui/ws/window_tree.h +++ b/services/ui/ws/window_tree.h
@@ -180,7 +180,12 @@ // Calls through to the client. void OnChangeCompleted(uint32_t change_id, bool success); - void OnAccelerator(uint32_t accelerator_id, const ui::Event& event); + // |state_to_ack| is the WindowManagerState to call through to when the ack + // from the accelerator is received. If |needs_ack| is true an ack is + // required. + void OnAccelerator(uint32_t accelerator_id, + const ui::Event& event, + bool needs_ack); // Called when |tree|'s jankiness changes (see janky_ for definition). // Notifies the window manager client so it can update UI for the affected @@ -326,6 +331,10 @@ void PrepareForEmbed(ServerWindow* window); void RemoveChildrenAsPartOfEmbed(ServerWindow* window); + // Generates a new event id for an accelerator or event ack, sets it in + // |event_ack_id_| and returns it. + uint32_t GenerateEventAckId(); + void DispatchInputEventImpl(ServerWindow* target, const ui::Event& event); // Calls OnChangeCompleted() on the client. @@ -432,6 +441,7 @@ mojom::Cursor cursor_id) override; void OnWmCreatedTopLevelWindow(uint32_t change_id, Id transport_window_id) override; + void OnAcceleratorAck(uint32_t event_id, mojom::EventResult result) override; // AccessPolicyDelegate: bool HasRootForAccessPolicy(const ServerWindow* window) const override;
diff --git a/services/ui/ws/window_tree_client_unittest.cc b/services/ui/ws/window_tree_client_unittest.cc index 31c0d683..6e9ce1b 100644 --- a/services/ui/ws/window_tree_client_unittest.cc +++ b/services/ui/ws/window_tree_client_unittest.cc
@@ -421,7 +421,9 @@ NOTIMPLEMENTED(); } void WmCancelMoveLoop(uint32_t window_id) override { NOTIMPLEMENTED(); } - void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override { + void OnAccelerator(uint32_t ack_id, + uint32_t accelerator_id, + std::unique_ptr<ui::Event> event) override { NOTIMPLEMENTED(); }
diff --git a/storage/browser/fileapi/file_system_url_request_job_factory.cc b/storage/browser/fileapi/file_system_url_request_job_factory.cc index 90dd81f..f2481b5 100644 --- a/storage/browser/fileapi/file_system_url_request_job_factory.cc +++ b/storage/browser/fileapi/file_system_url_request_job_factory.cc
@@ -52,7 +52,7 @@ // If the path ends with a /, we know it's a directory. If the path refers // to a directory and gets dispatched to FileSystemURLRequestJob, that class // redirects back here, by adding a / to the URL. - if (!path.empty() && path[path.size() - 1] == '/') { + if (!path.empty() && path.back() == '/') { return new FileSystemDirURLRequestJob( request, network_delegate, storage_domain_, file_system_context_); }
diff --git a/storage/common/fileapi/file_system_util.cc b/storage/common/fileapi/file_system_util.cc index 3bb9b14..f3d7ddb 100644 --- a/storage/common/fileapi/file_system_util.cc +++ b/storage/common/fileapi/file_system_util.cc
@@ -38,7 +38,7 @@ // Keep everything after the final separator, but if the pathname is only // one character and it's a separator, leave it alone. - while (path.size() > 1 && base::FilePath::IsSeparator(path[path.size() - 1])) + while (path.size() > 1 && base::FilePath::IsSeparator(path.back())) path.resize(path.size() - 1); base::FilePath::StringType::size_type last_separator = path.find_last_of(base::FilePath::kSeparators); @@ -57,7 +57,7 @@ // that this version never cares about '//' or drive-letters even on win32. // Strip trailing separators. - while (path.size() > 1 && base::FilePath::IsSeparator(path[path.size() - 1])) + while (path.size() > 1 && base::FilePath::IsSeparator(path.back())) path.resize(path.size() - 1); StringType::size_type last_separator = @@ -74,7 +74,7 @@ path.resize(last_separator); // Strip trailing separators. - while (path.size() > 1 && base::FilePath::IsSeparator(path[path.size() - 1])) + while (path.size() > 1 && base::FilePath::IsSeparator(path.back())) path.resize(path.size() - 1); if (path.empty())
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 6da7e6ac..c6c1e341 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -282,10 +282,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -592,10 +592,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -891,10 +891,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1189,10 +1189,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1487,10 +1487,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1785,10 +1785,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2146,10 +2146,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_angle_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2169,10 +2169,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2521,10 +2521,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_angle_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2544,10 +2544,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2906,7 +2906,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -2932,10 +2933,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_angle_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2955,10 +2956,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -3317,7 +3318,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -3343,10 +3345,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_angle_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -3366,10 +3368,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -3728,7 +3730,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -3754,10 +3757,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_angle_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -3777,10 +3780,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -4173,7 +4176,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_angle_tests", @@ -4199,7 +4203,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -4225,10 +4230,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_angle_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -4248,10 +4253,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -4610,7 +4615,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_angle_tests", @@ -4636,10 +4642,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_angle_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -4659,10 +4665,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -5011,10 +5017,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -5363,10 +5369,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -5725,7 +5731,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -5751,10 +5758,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -6119,7 +6126,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -6145,10 +6153,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -6512,10 +6520,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -6897,7 +6905,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -6924,10 +6933,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -7292,10 +7301,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -7677,7 +7686,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -7704,10 +7714,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -7780,7 +7790,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -7844,7 +7855,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -7910,7 +7922,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -7977,7 +7990,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -8079,7 +8093,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -8105,10 +8120,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -8230,7 +8245,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -8256,10 +8272,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -8279,10 +8295,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -8668,10 +8684,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -8691,10 +8707,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9080,10 +9096,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9103,10 +9119,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9126,10 +9142,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9515,10 +9531,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9538,10 +9554,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9943,7 +9959,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -9969,10 +9986,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9992,10 +10009,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -10391,7 +10408,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -10417,10 +10435,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -10440,10 +10458,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -10839,7 +10857,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -10865,10 +10884,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -10888,10 +10907,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -10911,10 +10930,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -11357,7 +11376,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -11383,10 +11403,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -11406,10 +11426,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -11429,10 +11449,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -11828,7 +11848,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -11854,10 +11875,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -11877,10 +11898,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12266,10 +12287,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12289,10 +12310,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12312,10 +12333,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12744,7 +12765,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -12770,10 +12792,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12793,10 +12815,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12816,10 +12838,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13205,10 +13227,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13228,10 +13250,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13251,10 +13273,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13656,7 +13678,8 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", "--webgl-conformance-version=2.0.0", - "--webgl2-only=true" + "--webgl2-only=true", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" ], "isolate_name": "telemetry_gpu_integration_test", "name": "webgl2_conformance_tests", @@ -13682,10 +13705,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=d3d9" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_d3d9_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13705,10 +13728,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=gl" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_gl_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13728,10 +13751,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true,
diff --git a/testing/buildbot/chromium.gpu.json b/testing/buildbot/chromium.gpu.json index d55b9c3..fc2c33f2 100644 --- a/testing/buildbot/chromium.gpu.json +++ b/testing/buildbot/chromium.gpu.json
@@ -294,10 +294,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -614,10 +614,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -918,10 +918,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1238,10 +1238,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1554,10 +1554,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1888,10 +1888,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2193,10 +2193,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2513,10 +2513,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2833,10 +2833,10 @@ "-v", "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "webgl_conformance_tests", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true,
diff --git a/testing/variations/fieldtrial_testing_config_android.json b/testing/variations/fieldtrial_testing_config_android.json index a674d538..39241df 100644 --- a/testing/variations/fieldtrial_testing_config_android.json +++ b/testing/variations/fieldtrial_testing_config_android.json
@@ -252,6 +252,14 @@ "group_name": "Enabled" } ], + "PassiveDocumentEventListeners": [ + { + "enable_features": [ + "PassiveDocumentEventListeners" + ], + "group_name": "Enabled" + } + ], "PasswordBranding": [ { "group_name": "SmartLockBrandingSavePromptOnly"
diff --git a/testing/variations/fieldtrial_testing_config_chromeos.json b/testing/variations/fieldtrial_testing_config_chromeos.json index 42fbd20..56fde3f 100644 --- a/testing/variations/fieldtrial_testing_config_chromeos.json +++ b/testing/variations/fieldtrial_testing_config_chromeos.json
@@ -120,6 +120,14 @@ "group_name": "Enabled" } ], + "PassiveDocumentEventListeners": [ + { + "enable_features": [ + "PassiveDocumentEventListeners" + ], + "group_name": "Enabled" + } + ], "PasswordBranding": [ { "group_name": "SmartLockBrandingSavePromptOnly"
diff --git a/testing/variations/fieldtrial_testing_config_linux.json b/testing/variations/fieldtrial_testing_config_linux.json index 053e69a..9a910c46 100644 --- a/testing/variations/fieldtrial_testing_config_linux.json +++ b/testing/variations/fieldtrial_testing_config_linux.json
@@ -151,6 +151,14 @@ "group_name": "Enabled" } ], + "PassiveDocumentEventListeners": [ + { + "enable_features": [ + "PassiveDocumentEventListeners" + ], + "group_name": "Enabled" + } + ], "PasswordBranding": [ { "group_name": "SmartLockBrandingSavePromptOnly"
diff --git a/testing/variations/fieldtrial_testing_config_mac.json b/testing/variations/fieldtrial_testing_config_mac.json index a7d2d8f3..d2d5faa 100644 --- a/testing/variations/fieldtrial_testing_config_mac.json +++ b/testing/variations/fieldtrial_testing_config_mac.json
@@ -188,6 +188,14 @@ "group_name": "Enabled" } ], + "PassiveDocumentEventListeners": [ + { + "enable_features": [ + "PassiveDocumentEventListeners" + ], + "group_name": "Enabled" + } + ], "PasswordBranding": [ { "group_name": "SmartLockBrandingSavePromptOnly"
diff --git a/testing/variations/fieldtrial_testing_config_win.json b/testing/variations/fieldtrial_testing_config_win.json index 72b2a5c..ffafb44 100644 --- a/testing/variations/fieldtrial_testing_config_win.json +++ b/testing/variations/fieldtrial_testing_config_win.json
@@ -226,6 +226,14 @@ "group_name": "Enabled" } ], + "PassiveDocumentEventListeners": [ + { + "enable_features": [ + "PassiveDocumentEventListeners" + ], + "group_name": "Enabled" + } + ], "PasswordBranding": [ { "group_name": "SmartLockBrandingSavePromptOnly"
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 2f1c133..61b8d73 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -833,6 +833,12 @@ crbug.com/623120 fast/canvas/webgl/webgl-array-invalid-ranges.html [ NeedsManualRebaseline ] crbug.com/623120 virtual/display_list_2d_canvas/fast/canvas/webgl/webgl-array-invalid-ranges.html [ NeedsManualRebaseline ] +crbug.com/602509 fast/canvas/canvas-pattern-no-repeat-with-transformations.html [ NeedsRebaseline ] +crbug.com/602509 virtual/gpu/fast/canvas/canvas-pattern-no-repeat-with-transformations.html [ NeedsRebaseline ] +crbug.com/602509 virtual/display_list_2d_canvas/fast/canvas/canvas-pattern-no-repeat-with-transformations.html [ NeedsRebaseline ] +crbug.com/602509 fast/canvas/image-object-in-canvas.html [ NeedsRebaseline ] +crbug.com/602509 virtual/display_list_2d_canvas/fast/canvas/image-object-in-canvas.html [ NeedsRebaseline ] + # When drawing subpixel smoothed glyphs, CoreGraphics will fake bold the glyphs. # In this configuration, the pixel smoothed glyphs will be created from subpixel smoothed glyphs. # This means that CoreGraphics may draw outside the reported glyph bounds, and in this case does.
diff --git a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.norepeat.coord3-expected.txt b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.norepeat.coord3-expected.txt index 02ff8fb7a..db418b2 100644 --- a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.norepeat.coord3-expected.txt +++ b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.norepeat.coord3-expected.txt
@@ -1,4 +1,2 @@ -Failed assertion: got pixel [255,0,0,255] at (1,1), expected [0,255,0,255] -Failed assertion: got pixel [255,0,0,255] at (98,1), expected [0,255,0,255] -Failed assertion: got pixel [255,0,0,255] at (1,48), expected [0,255,0,255] +Passed
diff --git a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeatx.coord1-expected.txt b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeatx.coord1-expected.txt index a8be970..db418b2 100644 --- a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeatx.coord1-expected.txt +++ b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeatx.coord1-expected.txt
@@ -1,3 +1,2 @@ -Failed assertion: got pixel [255,0,0,255] at (1,1), expected [0,255,0,255] -Failed assertion: got pixel [255,0,0,255] at (98,1), expected [0,255,0,255] +Passed
diff --git a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeaty.coord1-expected.txt b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeaty.coord1-expected.txt index 6fd33e3..db418b2 100644 --- a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeaty.coord1-expected.txt +++ b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.pattern.paint.repeaty.coord1-expected.txt
@@ -1,3 +1,2 @@ -Failed assertion: got pixel [255,0,0,255] at (1,1), expected [0,255,0,255] -Failed assertion: got pixel [255,0,0,255] at (1,48), expected [0,255,0,255] +Passed
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png new file mode 100644 index 0000000..a1ae22d --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.txt new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations-expected.txt
@@ -0,0 +1 @@ +
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations.html new file mode 100644 index 0000000..12575ed8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-pattern-no-repeat-with-transformations.html
@@ -0,0 +1,64 @@ +<canvas id="canvas" width="270" height="420"></canvas> +<canvas id="pattern" width="20" height="20"></canvas> +<script type="text/javascript"> +if (window.testRunner) + testRunner.dumpAsTextWithPixelResults(); + +var canvas = document.getElementById("canvas"); +var ctx = canvas.getContext("2d"); +ctx.strokeRect(0, 0, canvas.width, canvas.height); + +var pCanvas = document.getElementById("pattern"); +var pctx = pCanvas.getContext("2d"); +pctx.fillStyle = "red"; +pctx.fillRect(0, 0, 20, 20); +pctx.fillStyle = "green"; +pctx.fillRect(1, 1, 18, 18); +var pattern = pctx.createPattern(pCanvas, 'no-repeat'); +ctx.fillStyle = pattern; +ctx.strokeStyle = "blue"; + +function test(testPosX, testPosY, transformCallback) +{ + ctx.save(); + ctx.beginPath(); + ctx.translate(testPosX, testPosY); + ctx.rect(0, 0, 100, 100); + // After transformCallback, no-repeat pattern should follow the new + // position; but rect will stay at wherever it was. + transformCallback(); + ctx.fill(); // See the pattern + ctx.stroke(); // See the rect + ctx.restore(); +} + +function rotateCallback() { ctx.rotate(Math.PI / 180 * 25); } +function translateCallback() { ctx.translate(50, 50); } +function scaleCallback() { ctx.scale(2, 2); } +function transformCallback() { ctx.transform(1, 1, 0, 1, 0, 0); } +function resetTransformCallback() { ctx.resetTransform() } +function multipleTransformCallback() +{ + ctx.translate(20, 20); + ctx.rotate(Math.PI / 180 * 10); +} + +// Rotate the canvas by 90 degrees +// This is to test whether after save(), restore(), the canvas can return to +// this 90-degree-rotated state instead of its very initial state +ctx.translate(canvas.width/2, canvas.height/2); +ctx.rotate(Math.PI/2); +ctx.translate(-canvas.height/2, -canvas.width/2); + +// Since the canvas is rotated 90 degrees, these three rectangles will appear +// on right side, from top to bottom. +test(10, 10, scaleCallback); +test(160, 10, rotateCallback); +test(310, 10, translateCallback); + +// These three rectangles will appear on left side, from top to bottom. +test(10, 160, resetTransformCallback); +test(160, 160, transformCallback); +test(310, 160, multipleTransformCallback); + +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/encoding/api/textencoder-labels.html b/third_party/WebKit/LayoutTests/fast/encoding/api/textencoder-labels.html deleted file mode 100644 index 1ec3daf..0000000 --- a/third_party/WebKit/LayoutTests/fast/encoding/api/textencoder-labels.html +++ /dev/null
@@ -1,51 +0,0 @@ -<!DOCTYPE html> -<title>Encoding API: TextEncoder labels and whitespace</title> -<script src="../../../resources/testharness.js"></script> -<script src="../../../resources/testharnessreport.js"></script> -<script src="resources/encodings.js"></script> -<script> -var tests = [], failure_tests = []; -setup(function() { - var whitespace = [' ', '\t', '\n', '\f', '\r']; - var bad_whitespace = ['\u000B', '\u00A0', '\u2028', '\u2029']; - encodings_table.forEach(function(section) { - section.encodings.filter(function(encoding) { - return utf_encodings.indexOf(encoding.name) !== -1; - }).forEach(function(encoding) { - var name = encoding.name; - encoding.labels.forEach(function(label) { - tests.push([label, encoding.name]); - whitespace.forEach(function(ws) { - tests.push([ws + label, encoding.name]); - tests.push([label + ws, encoding.name]); - tests.push([ws + label + ws, encoding.name]); - }); - bad_whitespace.forEach(function(ws) { - failure_tests.push([ws + label, encoding.name]); - failure_tests.push([label + ws, encoding.name]); - failure_tests.push([ws + label + ws, encoding.name]); - }); - }); - }); - }); -}); - -tests.forEach(function(t) { - var input = t[0], output = t[1]; - test(function() { - assert_equals(new TextEncoder(input).encoding, output, - 'label for encoding should match'); - assert_equals(new TextEncoder(input.toUpperCase()).encoding, output, - 'label matching should be case-insensitive'); - }, format_value(input) + " => " + format_value(output)); -}); - -failure_tests.forEach(function(t) { - var input = t[0], output = t[1]; - test(function() { - assert_throws({name:'RangeError'}, - function() { new TextEncoder(input); }, - 'non-ASCII whitespace should not be stripped'); - }, format_value(input) + " => " + format_value(output)); -}); -</script>
diff --git a/third_party/WebKit/LayoutTests/fast/encoding/api/utf-round-trip.html b/third_party/WebKit/LayoutTests/fast/encoding/api/utf-round-trip.html index b190fffd..58b363bf 100644 --- a/third_party/WebKit/LayoutTests/fast/encoding/api/utf-round-trip.html +++ b/third_party/WebKit/LayoutTests/fast/encoding/api/utf-round-trip.html
@@ -31,16 +31,41 @@ } utf_encodings.forEach(function(encoding) { + if (encoding === 'utf-8') { + test(function() { + for (var i = 0; i < 0x10FFFF; i += BATCH_SIZE) { + var string = makeBatch(i); + var encoded = new TextEncoder().encode(string); + var decoded = new TextDecoder(encoding).decode(encoded); + assert_equals(string, decoded); + } + }, encoding + ' - encode/decode round trip'); + } +}); + +['utf-16le', 'utf-16be'].forEach(function(encoding) { test(function() { for (var i = 0; i < 0x10FFFF; i += BATCH_SIZE) { var string = makeBatch(i); - var encoded = new TextEncoder(encoding).encode(string); + + if (encoding === 'utf-16le') + var encoded = encode_utf16(string, true); + else + var encoded = encode_utf16(string, false); + var decoded = new TextDecoder(encoding).decode(encoded); - assert_equals(decoded, string); + assert_equals(string, decoded); } }, encoding + ' - encode/decode round trip'); }); +function encode_utf16(s, littleEndian) { + var a = new Uint8Array(s.length * 2), view = new DataView(a.buffer); + s.split('').forEach(function(c, i) { + view.setUint16(i * 2, c.charCodeAt(0), littleEndian); + }); + return a; +} // Inspired by: // http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html @@ -61,7 +86,7 @@ for (var i = 0; i < 0x10FFFF; i += BATCH_SIZE) { var string = makeBatch(i); var expected = encode_utf8(string); - var actual = new TextEncoder('UTF-8').encode(string); + var actual = new TextEncoder().encode(string); assert_array_equals(actual, expected); } }, 'UTF-8 encoding (compare against unescape/encodeURIComponent)'); @@ -71,9 +96,8 @@ var string = makeBatch(i); var encoded = encode_utf8(string); var expected = decode_utf8(encoded); - var actual = new TextDecoder('UTF-8').decode(new Uint8Array(encoded)); + var actual = new TextDecoder().decode(new Uint8Array(encoded)); assert_equals(actual, expected); } }, 'UTF-8 decoding (compare against decodeURIComponent/escape)'); - -</script> +</script> \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/resources/svg-no-store.pl b/third_party/WebKit/LayoutTests/http/tests/misc/resources/svg-no-store.pl new file mode 100755 index 0000000..a1e5ca0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/misc/resources/svg-no-store.pl
@@ -0,0 +1,13 @@ +#!/usr/bin/perl -wT + +print "Content-Type: image/svg+xml\r\n"; +print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n"; +print "Cache-Control: no-store, no-cache, must-revalidate\r\n"; +print "Pragma: no-cache\r\n"; +print "\r\n"; + +open(FILE, "embedded.svg"); +while (<FILE>) { + print $_; +} +close(FILE);
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content-expected.html b/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content-expected.html new file mode 100644 index 0000000..632c68f1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content-expected.html
@@ -0,0 +1,10 @@ +<!doctype html> +<style> +body { margin: 0 } +img { + width: 100px; + height: 100px; +} +</style> +<title>Test SVG background icons</title> +<img src="resources/embedded.svg">
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content.html b/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content.html new file mode 100644 index 0000000..e0c7241 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content.html
@@ -0,0 +1,12 @@ +<!doctype html> +<style> +body { margin: 0 } +.tst span::after { + display: block; + width: 100px; + height: 100px; + content: url(resources/svg-no-store.pl); +} +</style> +<title>Test SVG background icons</title> +<span class="tst"><span/></span>
diff --git a/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js index a8c49f2..623d5cc1 100644 --- a/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js +++ b/third_party/WebKit/LayoutTests/http/tests/origin_trials/resources/origin_trials.js
@@ -101,5 +101,11 @@ assert_true(window.internals.frobulateMethodPartial(), 'Method should return boolean value'); }, 'Method should exist on partial interface and return value'); +test(() => { + var internalsInterface = window.internals.constructor; + assert_exists(internalsInterface, 'frobulateStatic'); + assert_true(internalsInterface.frobulateStatic, 'Static attribute should return boolean value'); + }, 'Static attribute should exist on partial interface and return value'); + fetch_tests_from_worker(new Worker('resources/enabled-worker.js')); };
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-iframe.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-iframe.html index 3f1684f..beba595 100644 --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-iframe.html +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/registration-iframe.html
@@ -47,7 +47,7 @@ '- normal case'); // Set script url and scope url relative to the iframe's document's url. -// Assert the implementation throws a NetworkError exception. +// Assert the implementation throws a TypeError exception. async_test(function(t) { var url = 'resources/blank.html'; var scope = 'registration-for-iframe-from-calling-frame'; @@ -68,7 +68,7 @@ assert_unreached('register() should reject'); }, function(e) { - assert_equals(e.name, 'NetworkError'); + assert_equals(e.name, 'TypeError'); frame.remove(); return service_worker_unregister_and_done(t, scope); })
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/registration-tests.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/registration-tests.js index 18ba45c..60ec9cd 100644 --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/registration-tests.js +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/registration-tests.js
@@ -96,7 +96,7 @@ var script = 'resources/no-such-worker.js'; var scope = 'resources/scope/no-such-worker'; return promise_rejects(t, - check_error_types ? 'NetworkError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), navigator.serviceWorker.register(script, {scope: scope}), 'Registration of non-existent script should fail.'); @@ -106,7 +106,7 @@ var script = 'resources/invalid-chunked-encoding.php'; var scope = 'resources/scope/invalid-chunked-encoding/'; return promise_rejects(t, - check_error_types ? 'NetworkError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), 'Registration of invalid chunked encoding script should fail.'); }, 'Registering invalid chunked encoding script'); @@ -115,7 +115,7 @@ var script = 'resources/invalid-chunked-encoding-with-flush.php'; var scope = 'resources/scope/invalid-chunked-encoding-with-flush/'; return promise_rejects(t, - check_error_types ? 'NetworkError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), 'Registration of invalid chunked encoding script should fail.'); }, 'Registering invalid chunked encoding script with flush'); @@ -152,7 +152,7 @@ var script = 'resources/malformed-worker.php?parse-error'; var scope = 'resources/scope/parse-error'; return promise_rejects(t, - check_error_types ? 'AbortError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), 'Registration of script including parse error should fail.'); }, 'Registering script including parse error'); @@ -161,7 +161,7 @@ var script = 'resources/malformed-worker.php?undefined-error'; var scope = 'resources/scope/undefined-error'; return promise_rejects(t, - check_error_types ? 'AbortError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), 'Registration of script including undefined error should fail.'); }, 'Registering script including undefined error'); @@ -170,7 +170,7 @@ var script = 'resources/malformed-worker.php?uncaught-exception'; var scope = 'resources/scope/uncaught-exception'; return promise_rejects(t, - check_error_types ? 'AbortError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), 'Registration of script including uncaught exception should fail.'); }, 'Registering script including uncaught exception'); @@ -191,7 +191,7 @@ var script = 'resources/malformed-worker.php?import-malformed-script'; var scope = 'resources/scope/import-malformed-script'; return promise_rejects(t, - check_error_types ? 'AbortError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), 'Registration of script importing malformed script should fail.'); }, 'Registering script importing malformed script'); @@ -200,7 +200,7 @@ var script = 'resources/malformed-worker.php?import-no-such-script'; var scope = 'resources/scope/import-no-such-script'; return promise_rejects(t, - check_error_types ? 'AbortError' : null, + check_error_types ? new TypeError : null, register_method(script, {scope: scope}), 'Registration of script importing non-existent script should fail.'); }, 'Registering script importing non-existent script');
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/encoding/textencoder-constructor-non-utf-expected.txt b/third_party/WebKit/LayoutTests/imported/wpt/encoding/textencoder-constructor-non-utf-expected.txt deleted file mode 100644 index 9960c24..0000000 --- a/third_party/WebKit/LayoutTests/imported/wpt/encoding/textencoder-constructor-non-utf-expected.txt +++ /dev/null
@@ -1,82 +0,0 @@ -This is a testharness.js-based test. -PASS Encoding argument supported for decode: utf-8 -PASS Encoding argument not considered for encode: utf-8 -PASS Encoding argument supported for decode: ibm866 -FAIL Encoding argument not considered for encode: ibm866 Failed to construct 'TextEncoder': The encoding provided ('ibm866') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-2 -FAIL Encoding argument not considered for encode: iso-8859-2 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-2') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-3 -FAIL Encoding argument not considered for encode: iso-8859-3 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-3') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-4 -FAIL Encoding argument not considered for encode: iso-8859-4 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-4') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-5 -FAIL Encoding argument not considered for encode: iso-8859-5 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-5') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-6 -FAIL Encoding argument not considered for encode: iso-8859-6 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-6') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-7 -FAIL Encoding argument not considered for encode: iso-8859-7 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-7') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-8 -FAIL Encoding argument not considered for encode: iso-8859-8 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-8') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-8-i -FAIL Encoding argument not considered for encode: iso-8859-8-i Failed to construct 'TextEncoder': The encoding provided ('iso-8859-8-i') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-10 -FAIL Encoding argument not considered for encode: iso-8859-10 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-10') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-13 -FAIL Encoding argument not considered for encode: iso-8859-13 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-13') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-14 -FAIL Encoding argument not considered for encode: iso-8859-14 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-14') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-15 -FAIL Encoding argument not considered for encode: iso-8859-15 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-15') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-8859-16 -FAIL Encoding argument not considered for encode: iso-8859-16 Failed to construct 'TextEncoder': The encoding provided ('iso-8859-16') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: koi8-r -FAIL Encoding argument not considered for encode: koi8-r Failed to construct 'TextEncoder': The encoding provided ('koi8-r') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: koi8-u -FAIL Encoding argument not considered for encode: koi8-u Failed to construct 'TextEncoder': The encoding provided ('koi8-u') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: macintosh -FAIL Encoding argument not considered for encode: macintosh Failed to construct 'TextEncoder': The encoding provided ('macintosh') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-874 -FAIL Encoding argument not considered for encode: windows-874 Failed to construct 'TextEncoder': The encoding provided ('windows-874') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1250 -FAIL Encoding argument not considered for encode: windows-1250 Failed to construct 'TextEncoder': The encoding provided ('windows-1250') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1251 -FAIL Encoding argument not considered for encode: windows-1251 Failed to construct 'TextEncoder': The encoding provided ('windows-1251') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1252 -FAIL Encoding argument not considered for encode: windows-1252 Failed to construct 'TextEncoder': The encoding provided ('windows-1252') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1253 -FAIL Encoding argument not considered for encode: windows-1253 Failed to construct 'TextEncoder': The encoding provided ('windows-1253') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1254 -FAIL Encoding argument not considered for encode: windows-1254 Failed to construct 'TextEncoder': The encoding provided ('windows-1254') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1255 -FAIL Encoding argument not considered for encode: windows-1255 Failed to construct 'TextEncoder': The encoding provided ('windows-1255') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1256 -FAIL Encoding argument not considered for encode: windows-1256 Failed to construct 'TextEncoder': The encoding provided ('windows-1256') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1257 -FAIL Encoding argument not considered for encode: windows-1257 Failed to construct 'TextEncoder': The encoding provided ('windows-1257') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: windows-1258 -FAIL Encoding argument not considered for encode: windows-1258 Failed to construct 'TextEncoder': The encoding provided ('windows-1258') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: x-mac-cyrillic -FAIL Encoding argument not considered for encode: x-mac-cyrillic Failed to construct 'TextEncoder': The encoding provided ('x-mac-cyrillic') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: gbk -FAIL Encoding argument not considered for encode: gbk Failed to construct 'TextEncoder': The encoding provided ('gbk') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: gb18030 -FAIL Encoding argument not considered for encode: gb18030 Failed to construct 'TextEncoder': The encoding provided ('gb18030') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: big5 -FAIL Encoding argument not considered for encode: big5 Failed to construct 'TextEncoder': The encoding provided ('big5') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: euc-jp -FAIL Encoding argument not considered for encode: euc-jp Failed to construct 'TextEncoder': The encoding provided ('euc-jp') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: iso-2022-jp -FAIL Encoding argument not considered for encode: iso-2022-jp Failed to construct 'TextEncoder': The encoding provided ('iso-2022-jp') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: shift_jis -FAIL Encoding argument not considered for encode: shift_jis Failed to construct 'TextEncoder': The encoding provided ('shift_jis') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -PASS Encoding argument supported for decode: euc-kr -FAIL Encoding argument not considered for encode: euc-kr Failed to construct 'TextEncoder': The encoding provided ('euc-kr') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -FAIL Encoding argument not considered for encode: replacement Failed to construct 'TextEncoder': The encoding label provided ('replacement') is invalid. -PASS Encoding argument supported for decode: utf-16be -FAIL Encoding argument not considered for encode: utf-16be assert_equals: expected "utf-8" but got "utf-16be" -PASS Encoding argument supported for decode: utf-16le -FAIL Encoding argument not considered for encode: utf-16le assert_equals: expected "utf-8" but got "utf-16le" -PASS Encoding argument supported for decode: x-user-defined -FAIL Encoding argument not considered for encode: x-user-defined Failed to construct 'TextEncoder': The encoding provided ('x-user-defined') is not one of 'utf-8', 'utf-16', or 'utf-16be'. -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges-expected.txt index a1b1e067..2969deb4 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges-expected.txt
@@ -5,11 +5,11 @@ notBlackboxedBoo: 17:12 testFunction: 8:4 -Try to set positions: [{"line":0,"column":0},{"line":0,"column":0}] +Try to set positions: [{"lineNumber":0,"columnNumber":0},{"lineNumber":0,"columnNumber":0}] Input positions array is not sorted or contains duplicate values. -Try to set positions: [{"line":0,"column":1},{"line":0,"column":0}] +Try to set positions: [{"lineNumber":0,"columnNumber":1},{"lineNumber":0,"columnNumber":0}] Input positions array is not sorted or contains duplicate values. -Try to set positions: [{"line":0,"column":-1}] +Try to set positions: [{"lineNumber":0,"columnNumber":-1}] Position missing 'column' or 'column' < 0. action: stepOut notBlackboxedFoo: 4:4
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html index e31f596..bdce550 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/stepping-with-blackboxed-ranges.html
@@ -33,14 +33,14 @@ printCallFrames(callFrames); InspectorTest.sendCommand("Debugger.setBlackboxedRanges", { scriptId: callFrames[1].location.scriptId, - positions: [ { line: 0, column: 0 } ] // blackbox ranges for blackboxed.js + positions: [ { lineNumber: 0, columnNumber: 0 } ] // blackbox ranges for blackboxed.js }, setIncorrectRanges.bind(null, callFrames[2].location.scriptId)); } var incorrectPositions = [ - [ { line: 0, column: 0 }, { line: 0, column: 0 } ], - [ { line: 0, column: 1 }, { line: 0, column: 0 } ], - [ { line: 0, column: -1 } ], + [ { lineNumber: 0, columnNumber: 0 }, { lineNumber: 0, columnNumber: 0 } ], + [ { lineNumber: 0, columnNumber: 1 }, { lineNumber: 0, columnNumber: 0 } ], + [ { lineNumber: 0, columnNumber: -1 } ], ]; function setIncorrectRanges(scriptId, response) @@ -64,7 +64,7 @@ InspectorTest.eventHandler["Debugger.paused"] = runAction; InspectorTest.sendCommandOrDie("Debugger.setBlackboxedRanges", { scriptId: scriptId, - positions: [ { line: 8, column: 0 }, { line: 15, column: 0 } ] // blackbox ranges for mixed.js + positions: [ { lineNumber: 8, columnNumber: 0 }, { lineNumber: 15, columnNumber: 0 } ] // blackbox ranges for mixed.js }, runAction); }
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-external-array-expected.txt b/third_party/WebKit/LayoutTests/inspector/console/console-external-array-expected.txt index 3e21f43..54a268a9 100644 --- a/third_party/WebKit/LayoutTests/inspector/console/console-external-array-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/console/console-external-array-expected.txt
@@ -16,14 +16,14 @@ CONSOLE MESSAGE: line 25: [object Float64Array] Tests that console logging detects external arrays as arrays. -console-external-array.html:9 Int8Array[10] -console-external-array.html:10 Int16Array[10] -console-external-array.html:11 Int32Array[10] -console-external-array.html:12 Uint8Array[10] -console-external-array.html:13 Uint16Array[10] -console-external-array.html:14 Uint32Array[10] -console-external-array.html:15 Float32Array[10] -console-external-array.html:16 Float64Array[10] +console-external-array.html:9 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +console-external-array.html:10 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +console-external-array.html:11 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +console-external-array.html:12 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +console-external-array.html:13 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +console-external-array.html:14 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +console-external-array.html:15 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +console-external-array.html:16 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] console-external-array.html:18 Int8Array[10] console-external-array.html:19 Int16Array[10] console-external-array.html:20 Int32Array[10]
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-external-array.html b/third_party/WebKit/LayoutTests/inspector/console/console-external-array.html index 77571d8..4c995173 100644 --- a/third_party/WebKit/LayoutTests/inspector/console/console-external-array.html +++ b/third_party/WebKit/LayoutTests/inspector/console/console-external-array.html
@@ -4,7 +4,7 @@ <script src="../../http/tests/inspector/console-test.js"></script> <script> -function onload() +function logToConsole() { console.log(new Int8Array(10)); console.log(new Int16Array(10)); @@ -23,20 +23,29 @@ console.dir(new Uint32Array(10)); console.dir(new Float32Array(10)); console.dir(new Float64Array(10)); - - runTest(); } function test() { - InspectorTest.dumpConsoleMessages(); - InspectorTest.completeTest(); + InspectorTest.evaluateInPage("logToConsole()", onLoggedToConsole); + + + function onLoggedToConsole() + { + InspectorTest.waitForRemoteObjectsConsoleMessages(onRemoteObjectsLoaded) + } + + function onRemoteObjectsLoaded() + { + InspectorTest.dumpConsoleMessages(); + InspectorTest.completeTest(); + } } </script> </head> -<body onload="onload()"> +<body onload="runTest()"> <p> Tests that console logging detects external arrays as arrays. </p>
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html b/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html index 56305ef9..e424e06 100644 --- a/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html +++ b/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html
@@ -36,7 +36,7 @@ { var text = result.description; InspectorTest.assertEquals(15, text.length, "text length"); - InspectorTest.assertEquals(8, countTextNodes(text), "nodes count"); + InspectorTest.assertEquals(7, countTextNodes(text), "nodes count"); InspectorTest.addResult("PASS: Found all nodes with the broken text"); InspectorTest.completeTest(); }
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-format-expected.txt b/third_party/WebKit/LayoutTests/inspector/console/console-format-expected.txt index 1e635de4..e1c6446 100644 --- a/third_party/WebKit/LayoutTests/inspector/console/console-format-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/console/console-format-expected.txt
@@ -305,6 +305,12 @@ __proto__: Array[0] globals[21] ["test", "test2", undefined × 2, "test4", undefined × 5] + 0: "test" + 1: "test2" + 4: "test4" + foo: Object + length: 10 + __proto__: Array[0] console-format.html:7 Object {} __proto__: Object console-format.html:8 [Object] @@ -323,7 +329,10 @@ length: 1 __proto__: Array[0] globals[23] -[anonymous()] +[function] + 0: () + length: 1 + __proto__: Array[0] console-format.html:7 Object {bar: "bar"} bar: "bar" __proto__: Object @@ -471,6 +480,15 @@ __proto__: Array[0] globals[34] [1, 2, 3] + 0: 1 + 1: 2 + 2: 3 + buffer: (...) + byteLength: (...) + byteOffset: (...) + length: (...) + Symbol(Symbol.toStringTag): (...) + __proto__: TypedArray console-format.html:7 #text console-format.html:8 [text] 0: text
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions-expected.txt b/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions-expected.txt index 5ba837d..3c0faf22 100644 --- a/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions-expected.txt +++ b/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions-expected.txt
@@ -4,6 +4,7 @@ PASS exc is an instance of RangeError +PASS exc is an instance of RangeError PASS exc is an instance of DOMException PASS exc.code is DOMException.SYNTAX_ERR PASS exc is an instance of DOMException
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions.html b/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions.html index 03a6c2b..a266655 100644 --- a/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions.html +++ b/third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions.html
@@ -16,6 +16,14 @@ } try { + new IntersectionObserver(e => {}, {threshold: ["foo"]}); + testFailed("IntersectionObserver constructor did not throw due to invalid threshold."); + } catch(e) { + exc = e; + shouldBeType("exc", "RangeError"); + } + + try { new IntersectionObserver(e => {}, {rootMargin: "1"}); testFailed("IntersectionObserver constructor did not throw due to invalid rootMargin."); } catch(e) {
diff --git a/third_party/WebKit/LayoutTests/paint/background/body-background-when-table-cell-expected.html b/third_party/WebKit/LayoutTests/paint/background/body-background-when-table-cell-expected.html new file mode 100644 index 0000000..32fdbc0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/background/body-background-when-table-cell-expected.html
@@ -0,0 +1,4 @@ +<!DOCTYPE html> +<style> + html { background: url(../invalidation/resources/bluesquare.png) } +</style>
diff --git a/third_party/WebKit/LayoutTests/paint/background/body-background-when-table-cell.html b/third_party/WebKit/LayoutTests/paint/background/body-background-when-table-cell.html new file mode 100644 index 0000000..53e42af --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/background/body-background-when-table-cell.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<!-- The document shoudl be entirely blue. The red background on the 20x20-sized body should not appear. --> +<style> + body { display:table-cell; vertical-align:middle; background:red url(../invalidation/resources/bluesquare.png) } +</style> +<body style="width: 20px; height: 20px"></body>
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash-expected.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash-expected.txt
@@ -0,0 +1 @@ +
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash.html b/third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash.html new file mode 100644 index 0000000..2e4db76f --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash.html
@@ -0,0 +1,27 @@ +<!DOCTYPE html> +<!-- Passes if doesn't crash --> +<head> +<script> +if (window.testRunner) + testRunner.dumpAsText(); + +document.getElementsByTagName('script')[0].remove(); +document.addEventListener('selectionchange', function() { + getSelection().deleteFromDocument(); +}); +onload = function() { + var newBody = document.body; + // This will create a new <body> and an empty <head>. + newBody.outerHTML = ''; + newBody.className = 'new-body'; + document.documentElement.insertBefore(newBody, document.head.nextSibling); + document.execCommand("SelectAll", false); + document.getElementsByTagName('body')[1].outerHTML = ''; + getSelection().getRangeAt(0).extractContents(); +}; +</script> +<style> +* { -webkit-appearance: radio } +.new-body { backface-visibility: hidden } +</style> +</head>
diff --git a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html index f580608..c0854654 100644 --- a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html +++ b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
@@ -167,65 +167,17 @@ }, 'Non-negative total value should not throw.'); test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails('total', {'value': '-0.01'})); - }); -}, 'Negative total value should throw a TypeError.'); - -test(function() { new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails('displayItems.0', {'value': '-0.01'})); }, 'Negative line item value should not throw.'); test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], {'displayItems': [buildItem()]}); - }); -}, 'Absence of total should throw TypeError.'); - -test(function() { new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': undefined}); }, 'Undefined modifiers should not throw.'); test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': []}); - }); -}, 'Empty modifiers should throw TypeError.'); - -test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'total': buildItem()}]}); - }); -}, 'Absence of supportedMethods in modifiers should throw TypeError.'); - -test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': []}]}); - }); -}, 'Empty supportedMethods in modifiers should throw TypeError.'); - -test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': undefined}]}); - }); -}, 'Undefined supportedMethods in modifiers should throw TypeError.'); - -test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': null}]}); - }); -}, 'Null supportedMethods in modifiers should throw TypeError.'); - -test(function() { new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': ['foo'], 'total': buildItem({'value': '0.0'})}]}); }, 'Non-negative total value in PaymentDetailsModifier should not throw.'); -test(function() { - assert_throws(new TypeError(), function() { - new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': ['foo'], 'total': buildItem({'value': '-0.01'})}]}); - }); -}, 'Negative total value in PaymentDetailsModifier should throw a TypeError.'); - promise_test(function(t) { return promise_rejects(t, null, new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails()).abort()); }, 'abort() without show() should reject with error'); @@ -252,12 +204,36 @@ ['Duplicate supported payment method identifiers should throw TypeError.', null, function() { new PaymentRequest([{'supportedMethods': ['foo']}, {'supportedMethods': ['foo']}], buildDetails(), {}) }], + ['Absence of total should throw TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], {'displayItems': [buildItem()]}) + }], + ['Negative total value should throw a TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], buildDetails('total', {'value': '-0.01'})) + }], ['Duplicate supported payment method identifiers in modifiers should throw TypeError.', null, function() { new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': ['foo', 'foo']}]}) }], ['Duplicate supported payment method identifiers in modifiers should throw TypeError.', null, function() { new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': ['foo']}, {'supportedMethods': ['foo']}]}) }], + ['Negative total value in PaymentDetailsModifier should throw a TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': ['foo'], 'total': buildItem({'value': '-0.01'})}]}) + }], + ['Null supportedMethods in modifiers should throw TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': null}]}) + }], + ['Undefined supportedMethods in modifiers should throw TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': undefined}]}) + }], + ['Empty supportedMethods in modifiers should throw TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'supportedMethods': []}]}) + }], + ['Absence of supportedMethods in modifiers should throw TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': [{'total': buildItem()}]}) + }], + ['Empty modifiers should throw TypeError.', null, function() { + new PaymentRequest([{'supportedMethods': ['foo']}], {'total': buildItem(), 'modifiers': []}) + }], ['Empty details should throw', null, function() { new PaymentRequest([{'supportedMethods': ['foo']}], {}) }],
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt b/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt index 9045115..2a0320e 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt
@@ -18,26 +18,25 @@ request2 = indexedDB.deleteDatabase(dbname) request2.onsuccess = deleteSuccessCallback -versionChangeCallback(): -PASS event.oldVersion is 1 -PASS event.newVersion is null -PASS sawOpenSuccess is false -sawVersionChange = true -Connection not closed at the end of 'versionchange', so 'blocked' should fire - openSuccess(): PASS sawUpgradeNeeded is true -PASS sawVersionChange is true +PASS sawVersionChange is false sawOpenSuccess = true db = event.target.result PASS db.version is 1 -Closing here is too late to prevent the in-flight 'blocked' event, but it does unblock the delete. -db.close() + +versionChangeCallback(): +PASS event.oldVersion is 1 +PASS event.newVersion is null +PASS sawOpenSuccess is true +sawVersionChange = true +Connection not closed at the end of 'versionchange', so 'blocked' should fire deleteBlockedCallback(): PASS sawVersionChange is true PASS sawOpenSuccess is true sawDeleteBlocked = true +db.close() deleteSuccessCallback(): PASS sawVersionChange is true
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt b/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt index a14081cc..c04758d 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt
@@ -11,6 +11,7 @@ upgradeNeededCallback(): PASS sawUpgradeNeeded is false +PASS sawOpenSuccess is false sawUpgradeNeeded = true PASS event.oldVersion is 0 PASS event.newVersion is 1 @@ -18,11 +19,16 @@ deleteRequest = indexedDB.deleteDatabase(dbname) request2.onsuccess = deleteSuccessCallback +openSuccessCallback(): +PASS sawUpgradeNeeded is true +PASS sawVersionChange is false +sawOpenSuccess = true + versionChangeCallback(): +PASS sawOpenSuccess is true PASS event.oldVersion is 1 PASS event.newVersion is null sawVersionChange = true -Closing the connection before the IDBOpenDBRequest's success fires will cause the open to fail. db.close() deleteSuccessCallback():
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt b/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt index 4d2c84c..a5817888 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt
@@ -13,6 +13,12 @@ h = event.target.result indexedDB.deleteDatabase(dbname) +transactionOnComplete(): +upgradeTransactionComplete = true + +onOpenSuccess(): +h = event.target.result + onVersionChange(): PASS event.target.version is 1 PASS event.oldVersion is 1 @@ -20,16 +26,9 @@ sawVersionChange = true Connection is not closed, so 'blocked' should fire -transactionOnComplete(): -upgradeTransactionComplete = true - -onOpenSuccess(): -h = event.target.result -h.close() -Closing too late to prevent the in-flight 'blocked' event - deleteDatabaseOnBlocked(): PASS sawVersionChange is true +h.close() deleteDatabaseOnSuccess(): PASS upgradeTransactionComplete is true
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt b/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt index 066304f..ef14d1a 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers-expected.txt
@@ -14,6 +14,12 @@ [Worker] h = event.target.result [Worker] indexedDB.deleteDatabase(dbname) [Worker] +[Worker] transactionOnComplete(): +[Worker] upgradeTransactionComplete = true +[Worker] +[Worker] onOpenSuccess(): +[Worker] h = event.target.result +[Worker] [Worker] onVersionChange(): PASS [Worker] event.target.version is 1 PASS [Worker] event.oldVersion is 1 @@ -21,16 +27,9 @@ [Worker] sawVersionChange = true [Worker] Connection is not closed, so 'blocked' should fire [Worker] -[Worker] transactionOnComplete(): -[Worker] upgradeTransactionComplete = true -[Worker] -[Worker] onOpenSuccess(): -[Worker] h = event.target.result -[Worker] h.close() -[Worker] Closing too late to prevent the in-flight 'blocked' event -[Worker] [Worker] deleteDatabaseOnBlocked(): PASS [Worker] sawVersionChange is true +[Worker] h.close() [Worker] [Worker] deleteDatabaseOnSuccess(): PASS [Worker] upgradeTransactionComplete is true
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html b/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html index d6f5f71..1ba2cd3 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html
@@ -5,17 +5,6 @@ <script src='resources/testharness-helpers.js'></script> <script> -function expect(t, expected) { - var results = []; - return result => { - results.push(result); - if (results.length === expected.length) { - assert_array_equals(results, expected); - t.done(); - } - }; -} - indexeddb_test( (t, db) => { db.createObjectStore('store');
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js index 8e74fbfb..1c7b6264 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js
@@ -47,16 +47,10 @@ { preamble(evt); shouldBeTrue("sawUpgradeNeeded"); - shouldBeTrue("sawVersionChange"); + shouldBeFalse("sawVersionChange"); evalAndLog("sawOpenSuccess = true"); evalAndLog("db = event.target.result"); shouldBe('db.version', '1'); - - // Event ordering between 'success' and 'blocked' is not strictly defined - // in the spec. This documents current Chromium behavior to detect - // unexpected changes. - debug("Closing here is too late to prevent the in-flight 'blocked' event, but it does unblock the delete."); - evalAndLog("db.close()"); } function versionChangeCallback(evt) @@ -64,7 +58,7 @@ preamble(evt); shouldBe("event.oldVersion", "1"); shouldBeNull("event.newVersion"); - shouldBeFalse("sawOpenSuccess"); + shouldBeTrue("sawOpenSuccess"); evalAndLog("sawVersionChange = true"); debug("Connection not closed at the end of 'versionchange', so 'blocked' should fire"); } @@ -75,6 +69,7 @@ shouldBeTrue("sawVersionChange"); shouldBeTrue("sawOpenSuccess"); evalAndLog("sawDeleteBlocked = true"); + evalAndLog("db.close()"); } function deleteSuccessCallback(evt)
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js index 8282873..0acff69 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js
@@ -15,19 +15,21 @@ } var sawUpgradeNeeded = false; +var sawOpenSuccess = false; var sawVersionChange = false; function initiallyDeleted(evt) { preamble(evt); evalAndLog("request = indexedDB.open(dbname, 1)"); request.onupgradeneeded = upgradeNeededCallback; - request.onsuccess = unexpectedSuccessCallback; + request.onsuccess = openSuccessCallback; } function upgradeNeededCallback(evt) { preamble(evt); shouldBeFalse("sawUpgradeNeeded"); + shouldBeFalse("sawOpenSuccess"); evalAndLog("sawUpgradeNeeded = true"); shouldBe("event.oldVersion", "0"); shouldBe("event.newVersion", "1"); @@ -42,14 +44,21 @@ function versionChangeCallback(evt) { preamble(evt); + shouldBeTrue("sawOpenSuccess"); shouldBe("event.oldVersion", "1"); shouldBeNull("event.newVersion"); evalAndLog("sawVersionChange = true"); - - debug("Closing the connection before the IDBOpenDBRequest's success fires will cause the open to fail."); evalAndLog("db.close()"); } +function openSuccessCallback(evt) +{ + preamble(evt); + shouldBeTrue("sawUpgradeNeeded"); + shouldBeFalse("sawVersionChange"); + evalAndLog("sawOpenSuccess = true"); +} + function deleteSuccessCallback(evt) { preamble(evt);
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js index 0f00576..29bce0b3 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js
@@ -33,6 +33,7 @@ request.onblocked = function deleteDatabaseOnBlocked(evt) { preamble(evt); shouldBeTrue("sawVersionChange"); + evalAndLog("h.close()"); }; request.onsuccess = function deleteDatabaseOnSuccess(evt) { preamble(evt); @@ -45,9 +46,4 @@ { preamble(evt); evalAndLog("h = event.target.result"); - evalAndLog("h.close()"); - debug("Closing too late to prevent the in-flight 'blocked' event"); - // Event ordering between 'success' and 'blocked' is not strictly defined - // in the spec. This documents current Chromium behavior to detect - // unexpected changes. }
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/testharness-helpers.js b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/testharness-helpers.js index ceec0aa8..846481f5 100644 --- a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/testharness-helpers.js +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/testharness-helpers.js
@@ -19,3 +19,18 @@ function assert_key_equals(a, b, message) { assert_equals(indexedDB.cmp(a, b), 0, message); } + +// Call with a Test and an array of expected results in order. Returns +// a function; call the function when a result arrives and when the +// expected number appear the order will be asserted and test +// completed. +function expect(t, expected) { + var results = []; + return result => { + results.push(result); + if (results.length === expected.length) { + assert_array_equals(results, expected); + t.done(); + } + }; +}
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-delete-versionchange.html b/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-delete-versionchange.html new file mode 100644 index 0000000..7181008 --- /dev/null +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-delete-versionchange.html
@@ -0,0 +1,39 @@ +<!DOCTYPE html> +<title>IndexedDB: delete should be blocked by open/upgrade</title> +<script src='../../resources/testharness.js'></script> +<script src='../../resources/testharnessreport.js'></script> +<script> + +async_test(t => { + let dbName = self.location.pathname + ' - ' + t.name; + let delete_request = indexedDB.deleteDatabase(dbName); + delete_request.onerror = t.unreached_func('deleteDatabase should not fail'); + delete_request.onsuccess = t.step_func(() => { + + let saw_versionchange = false; + + let open_request = indexedDB.open(dbName); + open_request.onerror = t.unreached_func('open should succeed'); + open_request.onupgradeneeded = t.step_func(e => { + let db = open_request.result; + db.onversionchange = + t.unreached_func('versionchange should not be seen before open success'); + }); + open_request.onsuccess = t.step_func(e => { + let db = open_request.result; + db.onversionchange = e => { + saw_versionchange = true; + db.close(); + }; + }); + + let delete_request2 = indexedDB.deleteDatabase(dbName); + delete_request2.onerror = t.unreached_func('deleteDatabase should not fail'); + delete_request2.onblocked = t.unreached_func('blocked should not fire'); + delete_request2.onsuccess = t.step_func(e => { + assert_true(saw_versionchange, 'delete should occur after versionchange'); + t.done(); + }); + }); +}, 'delete should be blocked by upgrade'); +</script>
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-multiple-deletes.html b/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-multiple-deletes.html new file mode 100644 index 0000000..7345559 --- /dev/null +++ b/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-multiple-deletes.html
@@ -0,0 +1,25 @@ +<!DOCTYPE html> +<title>IndexedDB: ordering of deletes made during open's upgradeneeded and success</title> +<script src='../../resources/testharness.js'></script> +<script src='../../resources/testharnessreport.js'></script> +<script src='resources/testharness-helpers.js'></script> +<script> + +let saw; +indexeddb_test( + (t, db) => { + saw = expect(t, ['delete1', 'delete2']); + let r = indexedDB.deleteDatabase(db.name); + r.onerror = t.unreached_func('delete should succeed'); + r.onsuccess = t.step_func(e => saw('delete1')); + }, + (t, db) => { + let r = indexedDB.deleteDatabase(db.name); + r.onerror = t.unreached_func('delete should succeed'); + r.onsuccess = t.step_func(e => saw('delete2')); + + db.close(); + }, + 'Deletes are processed in order'); + +</script>
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js b/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js index 1709ea80..494fd2b7 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js
@@ -10,15 +10,12 @@ if (window.testRunner) { var s = document.createElement('style'); - s.innerHTML += ".running h1, .running pre, .running div#console, .running p { display:none }"; s.innerHTML += "h1, pre, div#console, p { opacity: 0 }"; s.innerHTML += "body { overflow: hidden }"; document.head.appendChild(s); - document.head.parentNode.classList.add("running"); } function afterTest() { - document.head.parentNode.classList.remove("running"); finishJSTest(); }
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html index a323604..5990947 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html
@@ -41,8 +41,17 @@ assert_false(proxy.supports('あ')); // This is a hack to get a 16-bit string for a supported property. - var transform16 = new TextDecoder('utf-16').decode(new TextEncoder('utf-16').encode('transform')); + var encoded = encode_utf16('transform', true); + var transform16 = new TextDecoder('utf-16').decode(encoded); assert_true(transform16 === 'transform'); assert_true(proxy.supports(transform16)); }, "This test ensures that supports correctly handles queries with strings that a prefix of a property or vice versa."); + +function encode_utf16(s, littleEndian) { + var a = new Uint8Array(s.length * 2), view = new DataView(a.buffer); + s.split('').forEach(function(c, i) { + view.setUint16(i * 2, c.charCodeAt(0), littleEndian); + }); + return a; +} </script>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js index 995c75a..f72eb5e7 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
@@ -18,7 +18,8 @@ function check() { if (proxy.initialized) resolve(proxy); - requestAnimationFrame(check); + else + requestAnimationFrame(check); } requestAnimationFrame(check); });
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js index ea92349..9ec4ac3a 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js
@@ -19,7 +19,8 @@ function check() { if (proxy.initialized) resolve(proxy); - requestAnimationFrame(check); + else + requestAnimationFrame(check); } requestAnimationFrame(check); });
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-disconnect.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-disconnect.js index 06513ecb..fca760a7 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-disconnect.js +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-disconnect.js
@@ -16,7 +16,8 @@ function check() { if (proxy.initialized) resolve(proxy); - requestAnimationFrame(check); + else + requestAnimationFrame(check); } requestAnimationFrame(check); });
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js index 01ea707..645f5758 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js
@@ -21,7 +21,8 @@ function check() { if (proxy.initialized) resolve(proxy); - requestAnimationFrame(check); + else + requestAnimationFrame(check); } requestAnimationFrame(check); });
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/visual-update.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/visual-update.js index 8eef0666..0e663de8 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/visual-update.js +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/visual-update.js
@@ -15,7 +15,8 @@ function check() { if (proxy.initialized) resolve(proxy); - requestAnimationFrame(check); + else + requestAnimationFrame(check); } requestAnimationFrame(check); });
diff --git a/third_party/WebKit/Source/bindings/core/v8/CallbackPromiseAdapter.h b/third_party/WebKit/Source/bindings/core/v8/CallbackPromiseAdapter.h index 97c401d..af758ce3 100644 --- a/third_party/WebKit/Source/bindings/core/v8/CallbackPromiseAdapter.h +++ b/third_party/WebKit/Source/bindings/core/v8/CallbackPromiseAdapter.h
@@ -116,34 +116,13 @@ template <typename T> static CallbackPromiseAdapterTrivialWebTypeHolder<T> webTypeHolderMatcher(...); template <typename T> using WebTypeHolder = decltype(webTypeHolderMatcher<T>(nullptr)); - // The following templates should be gone when the repositories are merged - // and we can use C++11 libraries. - template <typename T> - struct PassTypeImpl { - using Type = T; - }; - template <typename T> - struct PassTypeImpl<std::unique_ptr<T>> { - using Type = std::unique_ptr<T>; - }; - template <typename T> - struct WebPassTypeImpl { - using Type = T; - }; - template <typename T> - struct WebPassTypeImpl<std::unique_ptr<T>> { - using Type = std::unique_ptr<T>; - }; - template <typename T> using PassType = typename PassTypeImpl<T>::Type; - template <typename T> using WebPassType = typename WebPassTypeImpl<T>::Type; template <typename T> static T& adopt(T& x) { return x; } - template <typename T> - static std::unique_ptr<T> adopt(std::unique_ptr<T>& x) { return std::move(x); } - template <typename T> static PassType<T> pass(T& x) { return x; } + template <typename T> static std::unique_ptr<T> adopt(std::unique_ptr<T>& x) { return std::move(x); } + template <typename T> static T pass(T& x) { return x; } template <typename T> static std::unique_ptr<T> pass(std::unique_ptr<T>& x) { return std::move(x); } template <typename S, typename T> - class Base : public WebCallbacks<WebPassType<typename S::WebType>, WebPassType<typename T::WebType>> { + class Base : public WebCallbacks<typename S::WebType, typename T::WebType> { public: explicit Base(ScriptPromiseResolver* resolver) : m_resolver(resolver) {} ScriptPromiseResolver* resolver() { return m_resolver; } @@ -156,7 +135,7 @@ class OnSuccess : public Base<S, T> { public: explicit OnSuccess(ScriptPromiseResolver* resolver) : Base<S, T>(resolver) {} - void onSuccess(WebPassType<typename S::WebType> r) override + void onSuccess(typename S::WebType r) override { typename S::WebType result(adopt(r)); ScriptPromiseResolver* resolver = this->resolver(); @@ -181,7 +160,7 @@ class OnError : public OnSuccess<S, T> { public: explicit OnError(ScriptPromiseResolver* resolver) : OnSuccess<S, T>(resolver) {} - void onError(WebPassType<typename T::WebType> e) override + void onError(typename T::WebType e) override { typename T::WebType result(adopt(e)); ScriptPromiseResolver* resolver = this->resolver();
diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp index 1abbf99..21e1fee 100644 --- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp +++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
@@ -543,37 +543,29 @@ ScriptState::Scope scope(scriptState); v8::Local<v8::Object> global = context->Global(); - v8::Isolate* isolate = scriptState->isolate(); if (!originTrialContext->featureBindingsInstalled("DurableStorage") && (RuntimeEnabledFeatures::durableStorageEnabled() || originTrialContext->isFeatureEnabled("DurableStorage", nullptr))) { - v8::Local<v8::String> navigatorName = v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>("navigator"), v8::NewStringType::kNormal).ToLocalChecked(); if (executionContext->isDocument()) { - v8::Local<v8::Object> navigator = global->Get(context, navigatorName).ToLocalChecked()->ToObject(); V8WindowPartial::installDurableStorage(scriptState, global); - V8NavigatorPartial::installDurableStorage(scriptState, navigator); + V8NavigatorPartial::installDurableStorage(scriptState); } else if (executionContext->isSharedWorkerGlobalScope()) { - v8::Local<v8::Object> navigator = global->Get(context, navigatorName).ToLocalChecked()->ToObject(); V8SharedWorkerGlobalScopePartial::installDurableStorage(scriptState, global); - V8WorkerNavigatorPartial::installDurableStorage(scriptState, navigator); + V8WorkerNavigatorPartial::installDurableStorage(scriptState); } else if (executionContext->isDedicatedWorkerGlobalScope()) { - v8::Local<v8::Object> navigator = global->Get(context, navigatorName).ToLocalChecked()->ToObject(); V8DedicatedWorkerGlobalScopePartial::installDurableStorage(scriptState, global); - V8WorkerNavigatorPartial::installDurableStorage(scriptState, navigator); + V8WorkerNavigatorPartial::installDurableStorage(scriptState); } else if (executionContext->isServiceWorkerGlobalScope()) { - v8::Local<v8::Object> navigator = global->Get(context, navigatorName).ToLocalChecked()->ToObject(); V8ServiceWorkerGlobalScope::installDurableStorage(scriptState, global); - V8WorkerNavigatorPartial::installDurableStorage(scriptState, navigator); + V8WorkerNavigatorPartial::installDurableStorage(scriptState); } } if (!originTrialContext->featureBindingsInstalled("WebBluetooth") && (RuntimeEnabledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled("WebBluetooth", nullptr))) { - v8::Local<v8::String> navigatorName = v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>("navigator"), v8::NewStringType::kNormal).ToLocalChecked(); if (executionContext->isDocument()) { - v8::Local<v8::Object> navigator = global->Get(context, navigatorName).ToLocalChecked()->ToObject(); // For global interfaces e.g. BluetoothUUID. V8WindowPartial::installWebBluetooth(scriptState, global); // For navigator interfaces e.g. navigator.bluetooth. - V8NavigatorPartial::installWebBluetooth(scriptState, navigator); + V8NavigatorPartial::installWebBluetooth(scriptState); } } }
diff --git a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py index 2658442..aed7e83 100644 --- a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py +++ b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
@@ -328,7 +328,7 @@ def generate_code_internal(self, definitions, definition_name): if not definition_name in definitions.dictionaries: - raise ValueError('%s is not an IDL dictionary') + raise ValueError('%s is not an IDL dictionary' % definition_name) interfaces_info = self.info_provider.interfaces_info dictionary = definitions.dictionaries[definition_name] interface_info = interfaces_info[definition_name]
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py index 2b1a8c9..7e86b2b4 100644 --- a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py +++ b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
@@ -182,13 +182,6 @@ if not has_custom_setter(attribute) and has_setter(interface, attribute): setter_context(interface, attribute, context) - # [OriginTrialEnabled] - # TODO(iclelland): Allow origin trials on static interfaces - # (crbug.com/614352) - if context['origin_trial_feature_name'] and context['on_interface']: - raise Exception('[OriginTrialEnabled] cannot be specified on static ' - 'attributes: %s.%s' % (interface.name, attribute.name)) - return context
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py index 22e4f2f..f2b579d 100644 --- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py +++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -36,7 +36,7 @@ from collections import defaultdict import itertools -from operator import itemgetter +from operator import itemgetter, or_ from idl_definitions import IdlOperation, IdlArgument from idl_types import IdlType, inherits_interface @@ -98,23 +98,35 @@ 'origin_trial_enabled_constants': filter_origin_trial_enabled} -def origin_trial_feature_names(interface, constants, attributes, methods): - """ Returns a list of the names of each origin trial feature used in this interface. +def origin_trial_features(interface, constants, attributes, methods): + """ Returns a list of the origin trial features used in this interface. - This list is the union of the sets of names used for constants, attributes and methods. + Each element is a dictionary with keys 'name' and 'needs_instance'. + 'needs_instance' is true if any member associated with the interface needs + to be installed on every instance of the interface. This list is the union + of the sets of features used for constants, attributes and methods. """ - feature_names = set( - [constant['origin_trial_feature_name'] for constant in constants if constant['origin_trial_feature_name']] + - [attribute['origin_trial_feature_name'] for attribute in attributes if attribute['origin_trial_feature_name']] + - [method['origin_trial_feature_name'] for method in methods if ( + # Collect all members visible on this interface with a defined origin trial + origin_trial_members = ( + [constant for constant in constants if constant['origin_trial_feature_name']] + + [attribute for attribute in attributes if attribute['origin_trial_feature_name']] + + [method for method in methods if ( v8_methods.method_is_visible(method, interface.is_partial) and method['origin_trial_feature_name'])] ) - if feature_names: + # Group members by origin_trial_feature_name + members_by_name = itertools.groupby(origin_trial_members, itemgetter('origin_trial_feature_name')) + # Construct the list of dictionaries. 'needs_instance' will be true if any + # member for the feature has 'on_instance' defined as true. + features = [{'name': name, + 'needs_instance': reduce(or_, (member.get('on_instance', False) + for member in members))} + for name, members in members_by_name] + if features: includes.add('bindings/core/v8/ScriptState.h') includes.add('core/origin_trials/OriginTrials.h') - return sorted(feature_names) + return sorted(features) def interface_context(interface): @@ -570,7 +582,7 @@ # Origin Trials context.update({ - 'origin_trial_feature_names': origin_trial_feature_names(interface, context['constants'], context['attributes'], context['methods']), + 'origin_trial_features': origin_trial_features(interface, context['constants'], context['attributes'], context['methods']), }) return context
diff --git a/third_party/WebKit/Source/bindings/templates/interface.h b/third_party/WebKit/Source/bindings/templates/interface.h index b03ec968..5e85103 100644 --- a/third_party/WebKit/Source/bindings/templates/interface.h +++ b/third_party/WebKit/Source/bindings/templates/interface.h
@@ -168,8 +168,11 @@ {{exported}}static void register{{method.name | blink_capitalize}}MethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); {% endfor %} {% endif %} - {% for origin_trial_feature_name in origin_trial_feature_names %}{{newline}} - static void install{{origin_trial_feature_name}}(ScriptState*, v8::Local<v8::Object> instance); + {% for origin_trial_feature in origin_trial_features %}{{newline}} + static void install{{origin_trial_feature.name}}(ScriptState*, v8::Local<v8::Object> instance); + {% if not origin_trial_feature.needs_instance %} + static void install{{origin_trial_feature.name}}(ScriptState*); + {% endif %} {% endfor %} {% if has_partial_interface %}
diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp b/third_party/WebKit/Source/bindings/templates/interface_base.cpp index a045536..61f832f6 100644 --- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp +++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp
@@ -368,25 +368,21 @@ {% from 'attributes.cpp' import attribute_configuration with context %} {% from 'constants.cpp' import constant_configuration with context %} {% from 'methods.cpp' import method_configuration with context %} -{% for origin_trial_feature_name in origin_trial_feature_names %}{{newline}} -void {{v8_class_or_partial}}::install{{origin_trial_feature_name}}(ScriptState* scriptState, v8::Local<v8::Object> instance) +{% for origin_trial_feature in origin_trial_features %}{{newline}} +void {{v8_class_or_partial}}::install{{origin_trial_feature.name}}(ScriptState* scriptState, v8::Local<v8::Object> instance) { - v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptState->isolate()); - - {# Origin-Trial-enabled attributes #} - {% if attributes | for_origin_trial_feature(origin_trial_feature_name) or - methods | method_for_origin_trial_feature(origin_trial_feature_name, is_partial) %} - V8PerIsolateData* perIsolateData = V8PerIsolateData::from(scriptState->isolate()); - v8::Local<v8::FunctionTemplate> interfaceTemplate = perIsolateData->findInterfaceTemplate(scriptState->world(), &{{v8_class}}::wrapperTypeInfo); + {% if attributes | for_origin_trial_feature(origin_trial_feature.name) or + methods | method_for_origin_trial_feature(origin_trial_feature.name, is_partial) %} + v8::Local<v8::FunctionTemplate> interfaceTemplate = {{v8_class}}::wrapperTypeInfo.domTemplate(scriptState->isolate(), scriptState->world()); v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate(), interfaceTemplate); ALLOW_UNUSED_LOCAL(signature); {% endif %} - {% if constants | for_origin_trial_feature(origin_trial_feature_name) or - methods | method_for_origin_trial_feature(origin_trial_feature_name, is_partial) %} V8PerContextData* perContextData = V8PerContextData::from(scriptState->context()); + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&{{v8_class}}::wrapperTypeInfo); v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8_class}}::wrapperTypeInfo); - {% endif %} - {% for attribute in attributes | for_origin_trial_feature(origin_trial_feature_name) | unique_by('name') | sort %} + ALLOW_UNUSED_LOCAL(interface); + {# Origin-Trial-enabled attributes #} + {% for attribute in attributes | for_origin_trial_feature(origin_trial_feature.name) | unique_by('name') | sort %} {% if attribute.is_data_type_property %} const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}}Configuration = \ {{attribute_configuration(attribute)}}; @@ -394,22 +390,29 @@ {% else %} const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Configuration = \ {{attribute_configuration(attribute)}}; - V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, v8::Local<v8::Function>(), signature, accessor{{attribute.name}}Configuration); + V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, accessor{{attribute.name}}Configuration); {% endif %} {% endfor %} {# Origin-Trial-enabled constants #} - {% for constant in constants | for_origin_trial_feature(origin_trial_feature_name) | unique_by('name') | sort %} + {% for constant in constants | for_origin_trial_feature(origin_trial_feature.name) | unique_by('name') | sort %} {% set constant_name = constant.name.title().replace('_', '') %} const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Configuration = {{constant_configuration(constant)}}; V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constant{{constant_name}}Configuration); {% endfor %} {# Origin-Trial-enabled methods (no overloads) #} - {% for method in methods | method_for_origin_trial_feature(origin_trial_feature_name, is_partial) | unique_by('name') | sort %} + {% for method in methods | method_for_origin_trial_feature(origin_trial_feature.name, is_partial) | unique_by('name') | sort %} {% set method_name = method.name.title().replace('_', '') %} const V8DOMConfiguration::MethodConfiguration method{{method_name}}Configuration = {{method_configuration(method)}}; V8DOMConfiguration::installMethod(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, method{{method_name}}Configuration); {% endfor %} } +{% if not origin_trial_feature.needs_instance %} + +void {{v8_class_or_partial}}::install{{origin_trial_feature.name}}(ScriptState* scriptState) +{ + install{{origin_trial_feature.name}}(scriptState, v8::Local<v8::Object>()); +} +{% endif %} {% endfor %} {% endblock %} {##############################################################################}
diff --git a/third_party/WebKit/Source/bindings/templates/partial_interface.h b/third_party/WebKit/Source/bindings/templates/partial_interface.h index cfe9776..420328e0 100644 --- a/third_party/WebKit/Source/bindings/templates/partial_interface.h +++ b/third_party/WebKit/Source/bindings/templates/partial_interface.h
@@ -28,8 +28,11 @@ {% endfor %} {# Custom internal fields #} static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8::FunctionTemplate>); - {% for origin_trial_feature_name in origin_trial_feature_names %}{{newline}} - static void install{{origin_trial_feature_name}}(ScriptState*, v8::Local<v8::Object> instance); + {% for origin_trial_feature in origin_trial_features %}{{newline}} + static void install{{origin_trial_feature.name}}(ScriptState*, v8::Local<v8::Object> instance); + {% if not origin_trial_feature.needs_instance %} + static void install{{origin_trial_feature.name}}(ScriptState*); + {% endif %} {% endfor %} private: static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate);
diff --git a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl index d84829b..7071777 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl
@@ -12,8 +12,7 @@ const unsigned short PARTIAL4_UNSIGNED_SHORT = 4; attribute long partial4LongAttribute; - // TODO(chasej): Uncomment when static attributes are supported for origin trials (crbug.com/614352) - //static attribute long partial4StaticLongAttribute; + static attribute long partial4StaticLongAttribute; // TODO(chasej): Uncomment when methods are supported for origin trials (crbug.com/621641) void partial4VoidMethod();
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp index fdb37cb0..9696b4e 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -11735,59 +11735,78 @@ void V8TestObject::installFeatureName(ScriptState* scriptState, v8::Local<v8::Object> instance) { - v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptState->isolate()); - - V8PerIsolateData* perIsolateData = V8PerIsolateData::from(scriptState->isolate()); - v8::Local<v8::FunctionTemplate> interfaceTemplate = perIsolateData->findInterfaceTemplate(scriptState->world(), &V8TestObject::wrapperTypeInfo); + v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestObject::wrapperTypeInfo.domTemplate(scriptState->isolate(), scriptState->world()); v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate(), interfaceTemplate); ALLOW_UNUSED_LOCAL(signature); V8PerContextData* perContextData = V8PerContextData::from(scriptState->context()); + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestObject::wrapperTypeInfo); v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestObject::wrapperTypeInfo); + ALLOW_UNUSED_LOCAL(interface); const V8DOMConfiguration::AccessorConfiguration accessororiginTrialEnabledLongAttributeConfiguration = \ {"originTrialEnabledLongAttribute", TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; - V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, v8::Local<v8::Function>(), signature, accessororiginTrialEnabledLongAttributeConfiguration); + V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, accessororiginTrialEnabledLongAttributeConfiguration); const V8DOMConfiguration::AccessorConfiguration accessorunscopeableOriginTrialEnabledLongAttributeConfiguration = \ {"unscopeableOriginTrialEnabledLongAttribute", TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; - V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, v8::Local<v8::Function>(), signature, accessorunscopeableOriginTrialEnabledLongAttributeConfiguration); + V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, accessorunscopeableOriginTrialEnabledLongAttributeConfiguration); const V8DOMConfiguration::MethodConfiguration methodOrigintrialenabledvoidmethodConfiguration = {"originTrialEnabledVoidMethod", TestObjectV8Internal::originTrialEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; V8DOMConfiguration::installMethod(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, methodOrigintrialenabledvoidmethodConfiguration); const V8DOMConfiguration::MethodConfiguration methodPerworldbindingsorigintrialenabledvoidmethodConfiguration = {"perWorldBindingsOriginTrialEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; V8DOMConfiguration::installMethod(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, methodPerworldbindingsorigintrialenabledvoidmethodConfiguration); } +void V8TestObject::installFeatureName(ScriptState* scriptState) +{ + installFeatureName(scriptState, v8::Local<v8::Object>()); +} + void V8TestObject::installFeatureName1(ScriptState* scriptState, v8::Local<v8::Object> instance) { - v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptState->isolate()); - V8PerContextData* perContextData = V8PerContextData::from(scriptState->context()); + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestObject::wrapperTypeInfo); v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestObject::wrapperTypeInfo); + ALLOW_UNUSED_LOCAL(interface); const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst1Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1", 1, 0, V8DOMConfiguration::ConstantTypeShort}; V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constantFeature1OriginTrialEnabledConst1Configuration); const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst2Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2", 2, 0, V8DOMConfiguration::ConstantTypeShort}; V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constantFeature1OriginTrialEnabledConst2Configuration); } +void V8TestObject::installFeatureName1(ScriptState* scriptState) +{ + installFeatureName1(scriptState, v8::Local<v8::Object>()); +} + void V8TestObject::installFeatureName2(ScriptState* scriptState, v8::Local<v8::Object> instance) { - v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptState->isolate()); - V8PerContextData* perContextData = V8PerContextData::from(scriptState->context()); + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestObject::wrapperTypeInfo); v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestObject::wrapperTypeInfo); + ALLOW_UNUSED_LOCAL(interface); const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst1Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1", 3, 0, V8DOMConfiguration::ConstantTypeShort}; V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constantFeature2OriginTrialEnabledConst1Configuration); const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst2Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2", 4, 0, V8DOMConfiguration::ConstantTypeShort}; V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constantFeature2OriginTrialEnabledConst2Configuration); } +void V8TestObject::installFeatureName2(ScriptState* scriptState) +{ + installFeatureName2(scriptState, v8::Local<v8::Object>()); +} + void V8TestObject::installFeatureName3(ScriptState* scriptState, v8::Local<v8::Object> instance) { - v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptState->isolate()); - V8PerContextData* perContextData = V8PerContextData::from(scriptState->context()); + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestObject::wrapperTypeInfo); v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestObject::wrapperTypeInfo); + ALLOW_UNUSED_LOCAL(interface); const V8DOMConfiguration::ConstantConfiguration constantFeature3OriginTrialEnabledConst1Configuration = {"FEATURE3_ORIGIN_TRIAL_ENABLED_CONST1", 5, 0, V8DOMConfiguration::ConstantTypeShort}; V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constantFeature3OriginTrialEnabledConst1Configuration); } + +void V8TestObject::installFeatureName3(ScriptState* scriptState) +{ + installFeatureName3(scriptState, v8::Local<v8::Object>()); +} v8::Local<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) { return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestObjectTemplate);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h index 040b4b37..e88e2b78 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h
@@ -89,12 +89,16 @@ CORE_EXPORT static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate); static void installFeatureName(ScriptState*, v8::Local<v8::Object> instance); + static void installFeatureName(ScriptState*); static void installFeatureName1(ScriptState*, v8::Local<v8::Object> instance); + static void installFeatureName1(ScriptState*); static void installFeatureName2(ScriptState*, v8::Local<v8::Object> instance); + static void installFeatureName2(ScriptState*); static void installFeatureName3(ScriptState*, v8::Local<v8::Object> instance); + static void installFeatureName3(ScriptState*); }; template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp index 7e8293f..eafe7ab 100644 --- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
@@ -58,6 +58,32 @@ TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSetter(v8Value, info); } +static void partial4StaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) +{ + v8SetReturnValueInt(info, TestInterfacePartial4::partial4StaticLongAttribute()); +} + +static void partial4StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) +{ + TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeGetter(info); +} + +static void partial4StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) +{ + v8::Local<v8::Object> holder = info.Holder(); + ExceptionState exceptionState(ExceptionState::SetterContext, "partial4StaticLongAttribute", "TestInterface", holder, info.GetIsolate()); + int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); + if (exceptionState.throwIfNeeded()) + return; + TestInterfacePartial4::setPartial4StaticLongAttribute(cppValue); +} + +static void partial4StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) +{ + v8::Local<v8::Value> v8Value = info[0]; + TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetter(v8Value, info); +} + static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::Value>& info) { TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); @@ -358,22 +384,29 @@ void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scriptState, v8::Local<v8::Object> instance) { - v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptState->isolate()); - - V8PerIsolateData* perIsolateData = V8PerIsolateData::from(scriptState->isolate()); - v8::Local<v8::FunctionTemplate> interfaceTemplate = perIsolateData->findInterfaceTemplate(scriptState->world(), &V8TestInterface::wrapperTypeInfo); + v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTypeInfo.domTemplate(scriptState->isolate(), scriptState->world()); v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate(), interfaceTemplate); ALLOW_UNUSED_LOCAL(signature); V8PerContextData* perContextData = V8PerContextData::from(scriptState->context()); + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInterface::wrapperTypeInfo); v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestInterface::wrapperTypeInfo); + ALLOW_UNUSED_LOCAL(interface); const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeConfiguration = \ {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; - V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, v8::Local<v8::Function>(), signature, accessorpartial4LongAttributeConfiguration); + V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, accessorpartial4LongAttributeConfiguration); + const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttributeConfiguration = \ + {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, accessorpartial4StaticLongAttributeConfiguration); const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}; V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constantPartial4UnsignedShortConfiguration); const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfiguration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; V8DOMConfiguration::installMethod(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, methodPartial4VoidmethodConfiguration); } + +void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scriptState) +{ + installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>()); +} void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) { V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeObject, interfaceObject, interfaceTemplate);
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h index 163e7b7..9a50bb5d 100644 --- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h +++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h
@@ -26,6 +26,7 @@ static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8::FunctionTemplate>); static void installOriginTrialPartialFeature(ScriptState*, v8::Local<v8::Object> instance); + static void installOriginTrialPartialFeature(ScriptState*); private: static void installV8TestInterfaceTemplate(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); };
diff --git a/third_party/WebKit/Source/core/core.gypi b/third_party/WebKit/Source/core/core.gypi index a5e5d17..922edf53 100644 --- a/third_party/WebKit/Source/core/core.gypi +++ b/third_party/WebKit/Source/core/core.gypi
@@ -4182,6 +4182,7 @@ 'page/WindowFeaturesTest.cpp', 'page/scrolling/ScrollStateTest.cpp', 'page/scrolling/SnapCoordinatorTest.cpp', + 'paint/HTMLCanvasPainterTest.cpp', 'paint/LayerClipRecorderTest.cpp', 'paint/LayoutObjectDrawingRecorderTest.cpp', 'paint/NinePieceImageGridTest.cpp', @@ -4190,6 +4191,7 @@ 'paint/PaintInfoTest.cpp', 'paint/PaintLayerPainterTest.cpp', 'paint/PaintPropertyTreeBuilderTest.cpp', + 'paint/StubChromeClientForSPv2.h', 'paint/TableCellPainterTest.cpp', 'paint/TextPainterTest.cpp', 'paint/VideoPainterTest.cpp',
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp index fbe2e1b..4f24510 100644 --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -112,8 +112,8 @@ } for (auto thresholdValue : thresholds) { - if (thresholdValue < 0.0 || thresholdValue > 1.0) { - exceptionState.throwRangeError("Threshold values must be between 0 and 1"); + if (std::isnan(thresholdValue) || thresholdValue < 0.0 || thresholdValue > 1.0) { + exceptionState.throwRangeError("Threshold values must be numbers between 0 and 1"); break; } }
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp index 2d84b43a..fa8b388 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.cpp +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -164,7 +164,6 @@ , m_crossOriginForThrottling(false) , m_subtreeThrottled(false) , m_currentUpdateLifecyclePhasesTargetState(DocumentLifecycle::Uninitialized) - , m_scrollAnchor(this) , m_needsScrollbarsUpdate(false) , m_suppressAdjustViewSize(false) , m_allowsLayoutInvalidationAfterLayoutClean(true) @@ -813,6 +812,16 @@ document->updateStyleAndLayoutTree(); lifecycle().advanceTo(DocumentLifecycle::StyleClean); + if (m_frame->isMainFrame() && !m_viewportScrollableArea) { + ScrollableArea& visualViewport = m_frame->host()->visualViewport(); + ScrollableArea* layoutViewport = layoutViewportScrollableArea(); + DCHECK(layoutViewport); + m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *layoutViewport); + } + + if (!m_scrollAnchor.hasScroller()) + m_scrollAnchor.setScroller(m_viewportScrollableArea ? m_viewportScrollableArea : this); + if (RuntimeEnabledFeatures::scrollAnchoringEnabled()) m_scrollAnchor.save(); } @@ -2621,10 +2630,6 @@ if (!layoutViewItem.isNull()) layoutViewItem.layer()->clearNeedsRepaintRecursively(); }); - -#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS - DisplayItemClient::endShouldKeepAliveAllClients(); -#endif } void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer) @@ -3381,8 +3386,15 @@ frame().loader().saveScrollState(); frame().loader().client()->didChangeScrollOffset(); - if (RuntimeEnabledFeatures::scrollAnchoringEnabled() && scrollType != AnchoringScroll) - m_scrollAnchor.clear(); + if (scrollType != AnchoringScroll) + clearScrollAnchor(); +} + +void FrameView::clearScrollAnchor() +{ + if (!RuntimeEnabledFeatures::scrollAnchoringEnabled()) + return; + m_scrollAnchor.clear(); } void FrameView::windowResizerRectChanged()
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h index 808842b6..e9c1059 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.h +++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -393,6 +393,7 @@ bool shouldPlaceVerticalScrollbarOnLeft() const override; Widget* getWidget() override; CompositorAnimationTimeline* compositorAnimationTimeline() const override; + LayoutBox* layoutBox() const override { return layoutView(); } LayoutRect scrollIntoView( const LayoutRect& rectInContent, @@ -606,6 +607,7 @@ FloatSize viewportSizeForViewportUnits() const; ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } + void clearScrollAnchor(); // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into PaintInvalidator. void invalidatePaintIfNeeded(const PaintInvalidationState&);
diff --git a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp index 2eed1f5a..5b1435d3 100644 --- a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp +++ b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
@@ -23,6 +23,11 @@ m_layoutViewport = &newLayoutViewport; } +LayoutBox* RootFrameViewport::layoutBox() const +{ + return layoutViewport().layoutBox(); +} + void RootFrameViewport::updateScrollAnimator() { scrollAnimator().setCurrentPosition(toFloatPoint(scrollOffsetFromScrollAnimators())); @@ -82,8 +87,13 @@ if (scrollType == ProgrammaticScroll && !layoutViewport().isProgrammaticallyScrollable()) return; + if (scrollType == AnchoringScroll) { + distributeScrollBetweenViewports(position, scrollType, scrollBehavior, LayoutViewport); + return; + } + if (scrollBehavior == ScrollBehaviorSmooth) { - distributeScrollBetweenViewports(position, scrollType, scrollBehavior); + distributeScrollBetweenViewports(position, scrollType, scrollBehavior, VisualViewport); return; } @@ -124,10 +134,10 @@ void RootFrameViewport::setScrollOffset(const DoublePoint& offset, ScrollType scrollType) { - distributeScrollBetweenViewports(DoublePoint(offset), scrollType, ScrollBehaviorInstant); + distributeScrollBetweenViewports(DoublePoint(offset), scrollType, ScrollBehaviorInstant, VisualViewport); } -void RootFrameViewport::distributeScrollBetweenViewports(const DoublePoint& offset, ScrollType scrollType, ScrollBehavior behavior) +void RootFrameViewport::distributeScrollBetweenViewports(const DoublePoint& offset, ScrollType scrollType, ScrollBehavior behavior, ViewportToScrollFirst scrollFirst) { // Make sure we use the scroll positions as reported by each viewport's ScrollAnimatorBase, since its // ScrollableArea's position may have the fractional part truncated off. @@ -138,22 +148,25 @@ if (delta.isZero()) return; - DoublePoint targetPosition = visualViewport().clampScrollPosition( - visualViewport().scrollAnimator().currentPosition() + delta); + ScrollableArea& primary = scrollFirst == VisualViewport ? visualViewport() : layoutViewport(); + ScrollableArea& secondary = scrollFirst == VisualViewport ? layoutViewport() : visualViewport(); - visualViewport().setScrollPosition(targetPosition, scrollType, behavior); + DoublePoint targetPosition = primary.clampScrollPosition( + primary.scrollAnimator().currentPosition() + delta); + + primary.setScrollPosition(targetPosition, scrollType, behavior); // Scroll the secondary viewport if all of the scroll was not applied to the // primary viewport. - DoublePoint updatedPosition = layoutViewport().scrollAnimator().currentPosition() + FloatPoint(targetPosition); + DoublePoint updatedPosition = secondary.scrollAnimator().currentPosition() + FloatPoint(targetPosition); DoubleSize applied = updatedPosition - oldPosition; delta -= applied; if (delta.isZero()) return; - targetPosition = layoutViewport().clampScrollPosition(layoutViewport().scrollAnimator().currentPosition() + delta); - layoutViewport().setScrollPosition(targetPosition, scrollType, behavior); + targetPosition = secondary.clampScrollPosition(secondary.scrollAnimator().currentPosition() + delta); + secondary.setScrollPosition(targetPosition, scrollType, behavior); } IntPoint RootFrameViewport::scrollPosition() const
diff --git a/third_party/WebKit/Source/core/frame/RootFrameViewport.h b/third_party/WebKit/Source/core/frame/RootFrameViewport.h index 1342700f..75cfe52 100644 --- a/third_party/WebKit/Source/core/frame/RootFrameViewport.h +++ b/third_party/WebKit/Source/core/frame/RootFrameViewport.h
@@ -34,6 +34,7 @@ void setLayoutViewport(ScrollableArea&); // ScrollableArea Implementation + bool isRootFrameViewport() const override { return true; } void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = ScrollBehaviorInstant) override; LayoutRect scrollIntoView( const LayoutRect& rectInContent, @@ -73,13 +74,19 @@ ScrollBehavior scrollBehaviorStyle() const override; Widget* getWidget() override; void clearScrollAnimators() override; + LayoutBox* layoutBox() const override; private: RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutViewport); + enum ViewportToScrollFirst { + VisualViewport, + LayoutViewport + }; + DoublePoint scrollOffsetFromScrollAnimators() const; - void distributeScrollBetweenViewports(const DoublePoint&, ScrollType, ScrollBehavior); + void distributeScrollBetweenViewports(const DoublePoint&, ScrollType, ScrollBehavior, ViewportToScrollFirst); // If either of the layout or visual viewports are scrolled explicitly (i.e. not // through this class), their updated offset will not be reflected in this class' @@ -93,6 +100,8 @@ Member<ScrollableArea> m_layoutViewport; }; +DEFINE_TYPE_CASTS(RootFrameViewport, ScrollableArea, scrollableArea, scrollableArea->isRootFrameViewport(), scrollableArea.isRootFrameViewport()); + } // namespace blink #endif // RootFrameViewport_h
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h index d86e3558..5708f12 100644 --- a/third_party/WebKit/Source/core/frame/UseCounter.h +++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -1234,10 +1234,17 @@ MediaSourceAbortRemove = 1428, MediaSourceDurationTruncatingBuffered = 1429, AudioContextCrossOriginIframe = 1430, + // The above items are available in M53 branch + PointerEventSetCapture = 1431, PointerEventDispatch = 1432, MIDIMessageEventReceivedTime = 1433, SummaryElementWithDisplayBlockAuthorRule = 1434, + V8MediaStream_Active_AttributeGetter = 1435, + BeforeInstallPromptEvent = 1436, + BeforeInstallPromptEventUserChoice = 1437, + BeforeInstallPromptEventPreventDefault = 1438, + BeforeInstallPromptEventPrompt = 1439, // 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/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp index fe5ac44..d442a554 100644 --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -53,19 +53,10 @@ #include "platform/scroll/Scrollbar.h" #include "platform/scroll/ScrollbarThemeOverlay.h" #include "public/platform/WebCompositorSupport.h" -#include "public/platform/WebLayer.h" -#include "public/platform/WebLayerTreeView.h" #include "public/platform/WebScrollbar.h" #include "public/platform/WebScrollbarLayer.h" #include <memory> -using blink::WebLayer; -using blink::WebLayerTreeView; -using blink::WebScrollbar; -using blink::WebScrollbarLayer; -using blink::FrameHost; -using blink::GraphicsLayer; - namespace blink { VisualViewport::VisualViewport(FrameHost& owner) @@ -273,8 +264,14 @@ void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location) { + if (didSetScaleOrLocation(scale, location)) + clearScrollAnchor(); +} + +bool VisualViewport::didSetScaleOrLocation(float scale, const FloatPoint& location) +{ if (!mainFrame()) - return; + return false; bool valuesChanged = false; @@ -307,12 +304,23 @@ } if (!valuesChanged) - return; + return false; InspectorInstrumentation::didUpdateLayout(mainFrame()); mainFrame()->loader().saveScrollState(); clampToBoundaries(); + + return true; +} + +void VisualViewport::clearScrollAnchor() +{ + if (RuntimeEnabledFeatures::scrollAnchoringEnabled()) { + LocalFrame* frame = mainFrame(); + if (frame && frame->view()) + frame->view()->clearScrollAnchor(); + } } bool VisualViewport::magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoint& anchor) @@ -476,29 +484,13 @@ scrollbarGraphicsLayer->setContentsRect(IntRect(0, 0, width, height)); } -void VisualViewport::registerLayersWithTreeView(WebLayerTreeView* layerTreeView) const +void VisualViewport::setScrollLayerOnScrollbars(WebLayer* scrollLayer) const { - TRACE_EVENT0("blink", "VisualViewport::registerLayersWithTreeView"); - ASSERT(layerTreeView); - - if (!mainFrame()) - return; - - ASSERT(!frameHost().page().deprecatedLocalMainFrame()->contentLayoutItem().isNull()); - - PaintLayerCompositor* compositor = frameHost().page().deprecatedLocalMainFrame()->contentLayoutItem().compositor(); - // Get the outer viewport scroll layer. - WebLayer* scrollLayer = compositor->scrollLayer() ? compositor->scrollLayer()->platformLayer() : 0; - + // TODO(bokan): This is currently done while registering viewport layers + // with the compositor but could it actually be done earlier, like in + // setupScrollbars? Then we wouldn't need this method. m_webOverlayScrollbarHorizontal->setScrollLayer(scrollLayer); m_webOverlayScrollbarVertical->setScrollLayer(scrollLayer); - - ASSERT(compositor); - layerTreeView->registerViewportLayers( - m_overscrollElasticityLayer->platformLayer(), - m_pageScaleLayer->platformLayer(), - m_innerViewportScrollLayer->platformLayer(), - scrollLayer); } bool VisualViewport::visualViewportSuppliesScrollbars() const @@ -511,13 +503,6 @@ return frameHost().settings().scrollAnimatorEnabled(); } -void VisualViewport::clearLayersForTreeView(WebLayerTreeView* layerTreeView) const -{ - ASSERT(layerTreeView); - - layerTreeView->clearViewportLayers(); -} - HostWindow* VisualViewport::getHostWindow() const { return &frameHost().chromeClient(); @@ -631,9 +616,10 @@ return frame->view()->visibleContentRect(IncludeScrollbars).size(); } -void VisualViewport::setScrollOffset(const DoublePoint& offset, ScrollType) +void VisualViewport::setScrollOffset(const DoublePoint& offset, ScrollType scrollType) { - setLocation(toFloatPoint(offset)); + if (didSetScaleOrLocation(m_scale, toFloatPoint(offset)) && scrollType != AnchoringScroll) + clearScrollAnchor(); } GraphicsLayer* VisualViewport::layerForContainer() const
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.h b/third_party/WebKit/Source/core/frame/VisualViewport.h index 295c52a..fa8e461 100644 --- a/third_party/WebKit/Source/core/frame/VisualViewport.h +++ b/third_party/WebKit/Source/core/frame/VisualViewport.h
@@ -43,8 +43,8 @@ #include <memory> namespace blink { -class WebLayerTreeView; class WebScrollbarLayer; +class WebLayer; } namespace blink { @@ -89,6 +89,14 @@ { return m_innerViewportScrollLayer.get(); } + GraphicsLayer* pageScaleLayer() + { + return m_pageScaleLayer.get(); + } + GraphicsLayer* overscrollElasticityLayer() + { + return m_overscrollElasticityLayer.get(); + } void initializeScrollbars(); @@ -124,8 +132,7 @@ // scale factor is left unchanged. bool magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoint& anchor); - void registerLayersWithTreeView(WebLayerTreeView*) const; - void clearLayersForTreeView(WebLayerTreeView*) const; + void setScrollLayerOnScrollbars(WebLayer*) const; // The portion of the unzoomed frame visible in the visual viewport, // in partial CSS pixels. Relative to the main frame. @@ -219,6 +226,10 @@ private: explicit VisualViewport(FrameHost&); + bool didSetScaleOrLocation(float scale, const FloatPoint& location); + + void clearScrollAnchor(); + bool visualViewportSuppliesScrollbars() const; void updateStyleAndLayoutIgnorePendingStylesheets();
diff --git a/third_party/WebKit/Source/core/frame/Window.idl b/third_party/WebKit/Source/core/frame/Window.idl index c1dbef5..e1f79701c 100644 --- a/third_party/WebKit/Source/core/frame/Window.idl +++ b/third_party/WebKit/Source/core/frame/Window.idl
@@ -69,7 +69,7 @@ // the user agent [LogActivity=GetterOnly] readonly attribute Navigator navigator; - [RuntimeEnabled=ApplicationCache, LogActivity=GetterOnly] readonly attribute ApplicationCache applicationCache; + [LogActivity=GetterOnly] readonly attribute ApplicationCache applicationCache; // user prompts [Measure, CallWith=ScriptState] void alert();
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLToken.h b/third_party/WebKit/Source/core/html/parser/HTMLToken.h index 3f0d7637..62a2bd57 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLToken.h +++ b/third_party/WebKit/Source/core/html/parser/HTMLToken.h
@@ -94,7 +94,7 @@ // Check Range instance that is actively being parsed. inline void checkValidStart() const { - DCHECK(start != kInvalidOffset); + DCHECK_NE(start, kInvalidOffset); DCHECK_GE(start, 0); } @@ -102,7 +102,7 @@ inline void checkValid() const { checkValidStart(); - DCHECK(end != kInvalidOffset); + DCHECK_NE(end, kInvalidOffset); DCHECK_GE(end, 0); DCHECK_LE(start, end); }
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.json b/third_party/WebKit/Source/core/inspector/browser_protocol.json index eb201e2..7de6c22a 100644 --- a/third_party/WebKit/Source/core/inspector/browser_protocol.json +++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json
@@ -4318,8 +4318,8 @@ "type": "object", "properties": [ { "name": "devices", "type": "array", "items": { "$ref": "GPUDevice" }, "description": "The graphics devices on the system. Element 0 is the primary GPU." }, - { "name": "auxAttributes", "type": "object", "optional": "true", "description": "An optional dictionary of additional GPU related attributes." }, - { "name": "featureStatus", "type": "object", "optional": "true", "description": "An optional dictionary of graphics features and their status." }, + { "name": "auxAttributes", "type": "object", "optional": true, "description": "An optional dictionary of additional GPU related attributes." }, + { "name": "featureStatus", "type": "object", "optional": true, "description": "An optional dictionary of graphics features and their status." }, { "name": "driverBugWorkarounds", "type": "array", "items": { "type": "string" }, "description": "An optional array of GPU driver bug workarounds." } ], "description": "Provides information about the GPU(s) on the system."
diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp index 41f37ef..813f6a0 100644 --- a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
@@ -28,6 +28,7 @@ #include "core/layout/LayoutImageResourceStyleImage.h" #include "core/fetch/ImageResource.h" +#include "core/layout/LayoutReplaced.h" #include "core/style/StyleFetchedImage.h" namespace blink { @@ -68,6 +69,12 @@ return m_styleImage->image(*m_layoutObject, size, zoom); } +LayoutSize LayoutImageResourceStyleImage::imageSize(float multiplier) const +{ + // TODO(davve): Find out the correct default object size in this context. + return m_styleImage->imageSize(*m_layoutObject, multiplier, LayoutSize(LayoutReplaced::defaultWidth, LayoutReplaced::defaultHeight)); +} + DEFINE_TRACE(LayoutImageResourceStyleImage) { visitor->trace(m_styleImage);
diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h index 8f4da9b..9f9a04a 100644 --- a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h +++ b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h
@@ -50,13 +50,7 @@ bool errorOccurred() const override { return m_styleImage->errorOccurred(); } bool imageHasRelativeSize() const override { return m_styleImage->imageHasRelativeSize(); } - - LayoutSize imageSize(float multiplier) const override - { - // TODO(davve): Find out the default object size, if any, in this context. - return m_styleImage->imageSize(*m_layoutObject, multiplier, LayoutSize()); - } - + LayoutSize imageSize(float multiplier) const override; WrappedImagePtr imagePtr() const override { return m_styleImage->data(); } DECLARE_VIRTUAL_TRACE();
diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp index f5b375e..e88385e 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp
@@ -181,10 +181,8 @@ { if (!oldChild.isRooted()) return; - if (oldChild.isBody()) { + if (oldChild.isBody()) oldChild.view()->setShouldDoFullPaintInvalidation(); - return; - } oldChild.slowSetPaintingLayerNeedsRepaint(); oldChild.invalidatePaintOfPreviousPaintInvalidationRect(oldChild.containerForPaintInvalidation(), PaintInvalidationLayoutObjectRemoval); }
diff --git a/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp b/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp index 0c674bbe..0c3d5bc 100644 --- a/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
@@ -45,6 +45,11 @@ LayoutScrollbarPart::~LayoutScrollbarPart() { +#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS + // We may not have invalidated the painting layer for now, but the + // scrollable area will invalidate during paint invalidation. + endShouldKeepAlive(); +#endif } static void recordScrollbarPartStats(Document& document, ScrollbarPart part)
diff --git a/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp b/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp index 928a3f1..a916ee5 100644 --- a/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp +++ b/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp
@@ -16,37 +16,42 @@ static const int kMaxAdjustments = 20; -ScrollAnchor::ScrollAnchor(ScrollableArea* scroller) - : m_scroller(scroller) - , m_hasBounced(false) +ScrollAnchor::ScrollAnchor() + : m_hasBounced(false) , m_adjustmentCount(0) { - ASSERT(m_scroller); - ASSERT(m_scroller->isFrameView() || m_scroller->isPaintLayerScrollableArea()); +} + +ScrollAnchor::ScrollAnchor(ScrollableArea* scroller) + : ScrollAnchor() +{ + setScroller(scroller); } ScrollAnchor::~ScrollAnchor() { } +void ScrollAnchor::setScroller(ScrollableArea* scroller) +{ + DCHECK(!m_scroller); + DCHECK(scroller); + DCHECK(scroller->isRootFrameViewport() || scroller->isFrameView() || scroller->isPaintLayerScrollableArea()); + m_scroller = scroller; +} + // TODO(pilgrim) replace all instances of scrollerLayoutBox with scrollerLayoutBoxItem // https://crbug.com/499321 static LayoutBox* scrollerLayoutBox(const ScrollableArea* scroller) { - LayoutBox* box = scroller->isFrameView() - ? toFrameView(scroller)->layoutView() - : &toPaintLayerScrollableArea(scroller)->box(); - ASSERT(box); + LayoutBox* box = scroller->layoutBox(); + DCHECK(box); return box; } static LayoutBoxItem scrollerLayoutBoxItem(const ScrollableArea* scroller) { - LayoutBoxItem box = scroller->isFrameView() - ? toFrameView(scroller)->layoutViewItem() - : LayoutBoxItem(&toPaintLayerScrollableArea(scroller)->box()); - ASSERT(!box.isNull()); - return box; + return LayoutBoxItem(scrollerLayoutBox(scroller)); } static Corner cornerFromCandidateRect(const LayoutObject* layoutObject) @@ -97,7 +102,7 @@ // part of the scroll offset so that the rounding in restore() matches the snapping of // the anchor node to the pixel grid of the layer it paints into. For non-FrameView // scrollers, we rely on the flooring behavior of LayoutBox::scrolledContentOffset. - if (scroller->isFrameView()) + if (scroller->isFrameView() || scroller->isRootFrameViewport()) relativeBounds.moveBy(-flooredIntPoint(scroller->scrollPositionDouble())); return relativeBounds; } @@ -187,6 +192,7 @@ void ScrollAnchor::save() { + DCHECK(m_scroller); if (m_scroller->scrollPosition() == IntPoint::zero()) { clear(); return; @@ -234,6 +240,7 @@ void ScrollAnchor::restore() { + DCHECK(m_scroller); if (m_lastAdjusted && m_lastAdjusted.m_anchorObject != m_current.m_anchorObject && !m_hasBounced && computeAdjustment(m_lastAdjusted) == -m_lastAdjustment) { // If previous anchor point has bounced, follow the bounce. @@ -262,7 +269,7 @@ void ScrollAnchor::adjust(IntSize adjustment) { - m_scroller->scrollAnimator().adjustAnimationAndSetScrollPosition(adjustment, AnchoringScroll); + m_scroller->setScrollPosition(m_scroller->scrollPositionDouble() + adjustment, AnchoringScroll); if (m_current && m_lastAdjusted.m_anchorObject != m_current.m_anchorObject) { m_lastAdjusted.clear();
diff --git a/third_party/WebKit/Source/core/layout/ScrollAnchor.h b/third_party/WebKit/Source/core/layout/ScrollAnchor.h index df5d4c4..06ccf0b 100644 --- a/third_party/WebKit/Source/core/layout/ScrollAnchor.h +++ b/third_party/WebKit/Source/core/layout/ScrollAnchor.h
@@ -19,9 +19,17 @@ DISALLOW_NEW(); public: - ScrollAnchor(ScrollableArea*); + ScrollAnchor(); + explicit ScrollAnchor(ScrollableArea*); ~ScrollAnchor(); + // The scroller that is scrolled to componsate for layout movements. Note + // that the scroller can only be initialized once. + void setScroller(ScrollableArea*); + + // Returns true if the underlying scroller is set. + bool hasScroller() const { return m_scroller; } + // The LayoutObject we are currently anchored to. Lazily computed during // save() and cached until the next call to clear(). LayoutObject* anchorObject() const { return m_current.m_anchorObject; }
diff --git a/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp b/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp index 3f2d730..2fb1618 100644 --- a/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp +++ b/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
@@ -4,6 +4,8 @@ #include "core/layout/ScrollAnchor.h" +#include "core/dom/ClientRect.h" +#include "core/frame/VisualViewport.h" #include "core/layout/LayoutBox.h" #include "core/layout/LayoutTestHelper.h" #include "core/paint/PaintLayerScrollableArea.h" @@ -30,6 +32,11 @@ return document().view()->layoutViewportScrollableArea(); } + VisualViewport& visualViewport() + { + return document().view()->page()->frameHost().visualViewport(); + } + ScrollableArea* scrollerForElement(Element* element) { return toLayoutBox(element->layoutObject())->getScrollableArea(); @@ -111,6 +118,43 @@ EXPECT_EQ(nullptr, scrollAnchor(viewport).anchorObject()); } +TEST_F(ScrollAnchorTest, VisualViewportAnchors) +{ + setBodyInnerHTML( + "<style>" + " * { font-size: 1.2em; font-family: sans-serif; }" + " div { height: 100px; width: 20px; background-color: pink; }" + "</style>" + "<div id='div'></div>" + "<div id='text'><b>This is a scroll anchoring test</div>"); + + ScrollableArea* lViewport = layoutViewport(); + VisualViewport& vViewport = visualViewport(); + + vViewport.setScale(2.0); + + // No anchor at origin (0,0). + EXPECT_EQ(nullptr, scrollAnchor(lViewport).anchorObject()); + + // Scroll the visual viewport to bring #text to the top. + int top = document().getElementById("text")->getBoundingClientRect()->top(); + vViewport.setLocation(FloatPoint(0, top)); + + setHeight(document().getElementById("div"), 10); + EXPECT_EQ(document().getElementById("text")->layoutObject(), + scrollAnchor(lViewport).anchorObject()); + EXPECT_EQ(top - 90, vViewport.scrollPosition().y()); + + setHeight(document().getElementById("div"), 100); + EXPECT_EQ(document().getElementById("text")->layoutObject(), + scrollAnchor(lViewport).anchorObject()); + EXPECT_EQ(top, vViewport.scrollPosition().y()); + + // Scrolling the visual viewport should clear the anchor. + vViewport.setLocation(FloatPoint(0, 0)); + EXPECT_EQ(nullptr, scrollAnchor(lViewport).anchorObject()); +} + TEST_F(ScrollAnchorTest, FractionalOffsetsAreRoundedBeforeComparing) { setBodyInnerHTML(
diff --git a/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.cpp b/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.cpp index 033c678..aed634e7 100644 --- a/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.cpp +++ b/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.cpp
@@ -27,4 +27,10 @@ return true; } +// static +bool InternalsFrobulate::frobulateStatic() +{ + return true; +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.h b/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.h index a4f7aa0..055b82e92 100644 --- a/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.h +++ b/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.h
@@ -18,6 +18,7 @@ public: static bool frobulate(ScriptState*, Internals&, ExceptionState&); static bool frobulateNoEnabledCheck(Internals&); + static bool frobulateStatic(); }; } // namespace blink
diff --git a/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.idl b/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.idl index 23a6841..457aa87 100644 --- a/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.idl +++ b/third_party/WebKit/Source/core/origin_trials/testing/InternalsFrobulate.idl
@@ -6,6 +6,7 @@ [CallWith=ScriptState, RaisesException] readonly attribute boolean frobulate; readonly attribute boolean frobulateNoEnabledCheck; [OriginTrialEnabled=OriginTrialsSampleAPI, ImplementedAs=frobulateNoEnabledCheck] readonly attribute boolean frobulateBindings; + [OriginTrialEnabled=OriginTrialsSampleAPI] static readonly attribute boolean frobulateStatic; [OriginTrialEnabled=OriginTrialsSampleAPI] const unsigned short FROBULATE_CONST = 1; };
diff --git a/third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp b/third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp index a1136eb..4ec8ab0 100644 --- a/third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp +++ b/third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp
@@ -5,25 +5,41 @@ #include "core/paint/HTMLCanvasPainter.h" #include "core/html/HTMLCanvasElement.h" +#include "core/html/canvas/CanvasRenderingContext.h" #include "core/layout/LayoutHTMLCanvas.h" #include "core/paint/LayoutObjectDrawingRecorder.h" #include "core/paint/PaintInfo.h" #include "platform/geometry/LayoutPoint.h" #include "platform/graphics/paint/ClipRecorder.h" +#include "platform/graphics/paint/ForeignLayerDisplayItem.h" namespace blink { void HTMLCanvasPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { GraphicsContext& context = paintInfo.context; - if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, m_layoutHTMLCanvas, paintInfo.phase)) - return; LayoutRect contentRect = m_layoutHTMLCanvas.contentBoxRect(); contentRect.moveBy(paintOffset); LayoutRect paintRect = m_layoutHTMLCanvas.replacedContentRect(); paintRect.moveBy(paintOffset); + HTMLCanvasElement* canvas = toHTMLCanvasElement(m_layoutHTMLCanvas.node()); + + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() + && canvas->renderingContext() && canvas->renderingContext()->isAccelerated()) { + if (WebLayer* layer = canvas->renderingContext()->platformLayer()) { + IntRect pixelSnappedRect = pixelSnappedIntRect(contentRect); + recordForeignLayer( + context, m_layoutHTMLCanvas, DisplayItem::ForeignLayerCanvas, + layer, pixelSnappedRect.location(), pixelSnappedRect.size()); + return; + } + } + + if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, m_layoutHTMLCanvas, paintInfo.phase)) + return; + LayoutObjectDrawingRecorder drawingRecorder(context, m_layoutHTMLCanvas, paintInfo.phase, contentRect); #if ENABLE(ASSERT) // The drawing may be in display list mode or image mode, producing different pictures for the same result. @@ -45,7 +61,7 @@ InterpolationQuality previousInterpolationQuality = context.imageInterpolationQuality(); context.setImageInterpolationQuality(interpolationQuality); - toHTMLCanvasElement(m_layoutHTMLCanvas.node())->paint(context, paintRect); + canvas->paint(context, paintRect); context.setImageInterpolationQuality(previousInterpolationQuality); if (clip)
diff --git a/third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp b/third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp new file mode 100644 index 0000000..f80897d --- /dev/null +++ b/third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp
@@ -0,0 +1,98 @@ +// 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 "core/paint/HTMLCanvasPainter.h" + +#include "core/frame/FrameView.h" +#include "core/frame/Settings.h" +#include "core/html/HTMLCanvasElement.h" +#include "core/html/canvas/CanvasContextCreationAttributes.h" +#include "core/html/canvas/CanvasRenderingContext.h" +#include "core/loader/EmptyClients.h" +#include "core/paint/StubChromeClientForSPv2.h" +#include "core/testing/DummyPageHolder.h" +#include "platform/graphics/Canvas2DImageBufferSurface.h" +#include "platform/graphics/Canvas2DLayerBridge.h" +#include "platform/graphics/test/FakeGLES2Interface.h" +#include "platform/graphics/test/FakeWebGraphicsContext3DProvider.h" +#include "public/platform/WebLayer.h" +#include "public/platform/WebSize.h" +#include "testing/gtest/include/gtest/gtest.h" + +// Integration tests of canvas painting code (in SPv2 mode). + +namespace blink { + +class HTMLCanvasPainterTestForSPv2 : public ::testing::TestWithParam<WebLayerTreeViewImplForTesting::LayerListPolicy> { +protected: + void SetUp() override + { + RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); + m_chromeClient = new StubChromeClientForSPv2(GetParam()); + Page::PageClients clients; + fillWithEmptyClients(clients); + clients.chromeClient = m_chromeClient.get(); + m_pageHolder = DummyPageHolder::create(IntSize(800, 600), &clients, nullptr, + [](Settings& settings) + { + settings.setAcceleratedCompositingEnabled(true); + // LayoutHTMLCanvas doesn't exist if script is disabled. + settings.setScriptEnabled(true); + }); + document().view()->setParentVisible(true); + document().view()->setSelfVisible(true); + } + + void TearDown() override + { + m_featuresBackup.restore(); + } + + Document& document() { return m_pageHolder->document(); } + bool hasLayerAttached(const WebLayer& layer) { return m_chromeClient->hasLayer(layer); } + + PassRefPtr<Canvas2DLayerBridge> makeCanvas2DLayerBridge(const IntSize& size) + { + return adoptRef(new Canvas2DLayerBridge( + wrapUnique(new FakeWebGraphicsContext3DProvider(&m_gl)), + size, 0, NonOpaque, Canvas2DLayerBridge::ForceAccelerationForTesting)); + } + +private: + RuntimeEnabledFeatures::Backup m_featuresBackup; + Persistent<StubChromeClientForSPv2> m_chromeClient; + FakeGLES2Interface m_gl; + std::unique_ptr<DummyPageHolder> m_pageHolder; +}; + +INSTANTIATE_TEST_CASE_P(, HTMLCanvasPainterTestForSPv2, ::testing::Values( + WebLayerTreeViewImplForTesting::DontUseLayerLists, + WebLayerTreeViewImplForTesting::UseLayerLists)); + +TEST_P(HTMLCanvasPainterTestForSPv2, Canvas2DLayerAppearsInLayerTree) +{ + // Insert a <canvas> and force it into accelerated mode. + document().body()->setInnerHTML("<canvas width=300 height=200>", ASSERT_NO_EXCEPTION); + HTMLCanvasElement* element = toHTMLCanvasElement(document().body()->firstChild()); + CanvasContextCreationAttributes attributes; + attributes.setAlpha(true); + CanvasRenderingContext* context = element->getCanvasRenderingContext("2d", attributes); + RefPtr<Canvas2DLayerBridge> bridge = makeCanvas2DLayerBridge(IntSize(300, 200)); + element->createImageBufferUsingSurfaceForTesting( + wrapUnique(new Canvas2DImageBufferSurface(bridge, IntSize(300, 200)))); + ASSERT_EQ(context, element->renderingContext()); + ASSERT_TRUE(context->isAccelerated()); + + // Force the page to paint. + document().view()->updateAllLifecyclePhases(); + + // Fetch the layer associated with the <canvas>, and check that it was + // correctly configured in the layer tree. + const WebLayer* layer = context->platformLayer(); + ASSERT_TRUE(layer); + EXPECT_TRUE(hasLayerAttached(*layer)); + EXPECT_EQ(WebSize(300, 200), layer->bounds()); +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h index 7a8bb6d0..2aa1d6a 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
@@ -393,6 +393,7 @@ IntRect resizerCornerRect(const IntRect&, ResizerHitTestType) const; + // TODO(ymalik): Remove box() and update callers to use layoutBox() instead. LayoutBox& box() const; PaintLayer* layer() const; @@ -408,6 +409,8 @@ ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } bool isPaintLayerScrollableArea() const override { return true; } + LayoutBox* layoutBox() const override { return &box(); } + bool shouldRebuildHorizontalScrollbarLayer() const { return m_rebuildHorizontalScrollbarLayer; } bool shouldRebuildVerticalScrollbarLayer() const { return m_rebuildVerticalScrollbarLayer; } void resetRebuildScrollbarLayerFlags();
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp index 65fa062..d0860a4 100644 --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -263,6 +263,11 @@ return; AffineTransform transformToBorderBox = SVGRootPainter(toLayoutSVGRoot(object)).transformToPixelSnappedBorderBox(context.paintOffset); + + // The paint offset is included in |transformToBorderBox| so SVG does not need to handle paint + // offset internally. + context.paintOffset = LayoutPoint(); + if (transformToBorderBox.isIdentity()) return;
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp index 92b8bfa..466906e 100644 --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -1086,4 +1086,25 @@ EXPECT_EQ(dPaintOffset, dProperties->localBorderBoxProperties()->paintOffset); } +TEST_F(PaintPropertyTreeBuilderTest, SvgPixelSnappingShouldResetPaintOffset) +{ + setBodyInnerHTML( + "<svg id='svg' style='position: relative; left: 0.1px; transform: matrix(1, 0, 0, 1, 0, 0);'>" + " <rect id='rect' transform='translate(1, 1)'/>" + "</svg>"); + + LayoutObject& svgWithTransform = *document().getElementById("svg")->layoutObject(); + ObjectPaintProperties* svgWithTransformProperties = svgWithTransform.objectPaintProperties(); + EXPECT_EQ(TransformationMatrix(), svgWithTransformProperties->transform()->matrix()); + EXPECT_EQ(LayoutPoint(FloatPoint(0.1, 0)), svgWithTransformProperties->localBorderBoxProperties()->paintOffset); + EXPECT_EQ(nullptr, svgWithTransformProperties->svgLocalToBorderBoxTransform()); + + LayoutObject& rectWithTransform = *document().getElementById("rect")->layoutObject(); + ObjectPaintProperties* rectWithTransformProperties = rectWithTransform.objectPaintProperties(); + EXPECT_EQ(TransformationMatrix().translate(1, 1), rectWithTransformProperties->transform()->matrix()); + + // Ensure there is no PaintOffset transform between the rect and the svg's transform. + EXPECT_EQ(svgWithTransformProperties->transform(), rectWithTransformProperties->transform()->parent()); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/paint/StubChromeClientForSPv2.h b/third_party/WebKit/Source/core/paint/StubChromeClientForSPv2.h new file mode 100644 index 0000000..9160b4d --- /dev/null +++ b/third_party/WebKit/Source/core/paint/StubChromeClientForSPv2.h
@@ -0,0 +1,40 @@ +// 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 StubChromeClientForSPv2_h +#define StubChromeClientForSPv2_h + +#include "core/loader/EmptyClients.h" +#include "platform/graphics/compositing/PaintArtifactCompositor.h" +#include "platform/testing/WebLayerTreeViewImplForTesting.h" + +namespace blink { + +// A simple ChromeClient implementation which forwards painted artifacts to a +// PaintArtifactCompositor attached to a testing WebLayerTreeView, and permits +// simple analysis of the results. +class StubChromeClientForSPv2 : public EmptyChromeClient { +public: + StubChromeClientForSPv2(WebLayerTreeViewImplForTesting::LayerListPolicy layerListPolicy) + : m_layerTreeView(layerListPolicy) + { + m_layerTreeView.setRootLayer(*m_paintArtifactCompositor.getWebLayer()); + } + + bool hasLayer(const WebLayer& layer) { return m_layerTreeView.hasLayer(layer); } + + // ChromeClient + void didPaint(const PaintArtifact& artifact) override + { + m_paintArtifactCompositor.update(artifact); + } + +private: + WebLayerTreeViewImplForTesting m_layerTreeView; + PaintArtifactCompositor m_paintArtifactCompositor; +}; + +} // namespace blink + +#endif // StubChromeClientForSPv2_h
diff --git a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp index 4e49f04..77288009 100644 --- a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp +++ b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp
@@ -151,6 +151,9 @@ void TableCellPainter::paintBackground(const PaintInfo& paintInfo, const LayoutRect& paintRect, const LayoutObject& backgroundObject) { + if (m_layoutTableCell.backgroundStolenForBeingBody()) + return; + Color c = backgroundObject.resolveColor(CSSPropertyBackgroundColor); const FillLayer& bgLayer = backgroundObject.styleRef().backgroundLayers(); if (bgLayer.hasImage() || c.alpha()) {
diff --git a/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp b/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp index 29551ff..c888750 100644 --- a/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp +++ b/third_party/WebKit/Source/core/paint/VideoPainterTest.cpp
@@ -8,10 +8,9 @@ #include "core/frame/Settings.h" #include "core/html/HTMLMediaElement.h" #include "core/loader/EmptyClients.h" +#include "core/paint/StubChromeClientForSPv2.h" #include "core/testing/DummyPageHolder.h" -#include "platform/graphics/compositing/PaintArtifactCompositor.h" #include "platform/testing/UnitTestHelpers.h" -#include "platform/testing/WebLayerTreeViewImplForTesting.h" #include "public/platform/Platform.h" #include "public/platform/WebCompositorSupport.h" #include "public/platform/WebLayer.h" @@ -24,27 +23,6 @@ namespace blink { namespace { -class StubChromeClient : public EmptyChromeClient { -public: - StubChromeClient(WebLayerTreeViewImplForTesting::LayerListPolicy layerListPolicy) - : m_layerTreeView(layerListPolicy) - { - m_layerTreeView.setRootLayer(*m_paintArtifactCompositor.getWebLayer()); - } - - bool hasLayer(const WebLayer& layer) { return m_layerTreeView.hasLayer(layer); } - - // ChromeClient - void didPaint(const PaintArtifact& artifact) - { - m_paintArtifactCompositor.update(artifact); - } - -private: - WebLayerTreeViewImplForTesting m_layerTreeView; - PaintArtifactCompositor m_paintArtifactCompositor; -}; - class StubWebMediaPlayer : public WebMediaPlayer { public: StubWebMediaPlayer(WebMediaPlayerClient* client) @@ -112,7 +90,7 @@ void SetUp() override { RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); - m_chromeClient = new StubChromeClient(GetParam()); + m_chromeClient = new StubChromeClientForSPv2(GetParam()); m_frameLoaderClient = new StubFrameLoaderClient; Page::PageClients clients; fillWithEmptyClients(clients); @@ -134,7 +112,7 @@ private: RuntimeEnabledFeatures::Backup m_featuresBackup; - Persistent<StubChromeClient> m_chromeClient; + Persistent<StubChromeClientForSPv2> m_chromeClient; Persistent<StubFrameLoaderClient> m_frameLoaderClient; std::unique_ptr<DummyPageHolder> m_pageHolder; };
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp index f8bf56c..a059f7f 100644 --- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp +++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -556,7 +556,7 @@ AtomicString("UTF-8"), KURL(), ForceSynchronousLoad))); // Set the concrete object size before a container size is available. - m_intrinsicSize = roundedIntSize(concreteObjectSize(FloatSize(300, 150))); + m_intrinsicSize = roundedIntSize(concreteObjectSize(FloatSize(LayoutReplaced::defaultWidth, LayoutReplaced::defaultHeight))); } return m_page;
diff --git a/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp b/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp index 1421e18..b1e85df 100644 --- a/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp +++ b/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp
@@ -99,15 +99,14 @@ v8::Local<v8::Object> global = context->Global(); v8::Isolate* isolate = scriptState->isolate(); - v8::Local<v8::String> internalsName = v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>("internals"), v8::NewStringType::kNormal).ToLocalChecked(); - v8::Local<v8::Value> v8Internals = global->Get(context, internalsName).ToLocalChecked(); - if (v8Internals->IsObject()) { - v8::Local<v8::Object> internals = v8Internals->ToObject(); - if (!originTrialContext->featureBindingsInstalled("Frobulate") && originTrialContext->isFeatureEnabled("Frobulate", nullptr)) { + if (!originTrialContext->featureBindingsInstalled("Frobulate") && originTrialContext->isFeatureEnabled("Frobulate", nullptr)) { + v8::Local<v8::String> internalsName = v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>("internals"), v8::NewStringType::kNormal).ToLocalChecked(); + v8::Local<v8::Value> v8Internals = global->Get(context, internalsName).ToLocalChecked(); + if (v8Internals->IsObject()) { if (executionContext->isDocument()) - V8Internals::installOriginTrialsSampleAPI(scriptState, internals); + V8Internals::installOriginTrialsSampleAPI(scriptState); else if (executionContext->isWorkerGlobalScope()) - V8WorkerInternals::installOriginTrialsSampleAPI(scriptState, internals); + V8WorkerInternals::installOriginTrialsSampleAPI(scriptState); originTrialContext->setFeatureBindingsInstalled("Frobulate"); } }
diff --git a/third_party/WebKit/Source/devtools/front_end/Runtime.js b/third_party/WebKit/Source/devtools/front_end/Runtime.js index 2f0b1ee..a1e681f 100644 --- a/third_party/WebKit/Source/devtools/front_end/Runtime.js +++ b/third_party/WebKit/Source/devtools/front_end/Runtime.js
@@ -214,6 +214,30 @@ Runtime.cachedResources = { __proto__: null }; /** + * @param {string} url + * @param {boolean} appendSourceURL + * @return {!Promise<undefined>} + */ +Runtime.loadResourceIntoCache = function(url, appendSourceURL) +{ + return loadResourcePromise(url).then(cacheResource.bind(this, url), cacheResource.bind(this, url, undefined)); + + /** + * @param {string} path + * @param {string=} content + */ + function cacheResource(path, content) + { + if (!content) { + console.error("Failed to load resource: " + path); + return; + } + var sourceURL = appendSourceURL ? Runtime.resolveSourceURL(path) : ""; + Runtime.cachedResources[path] = content + sourceURL; + } +} + +/** * @return {boolean} */ Runtime.isReleaseMode = function() @@ -773,22 +797,9 @@ var promises = []; for (var i = 0; i < resources.length; ++i) { var url = this._modularizeURL(resources[i]); - promises.push(loadResourcePromise(url).then(cacheResource.bind(this, url), cacheResource.bind(this, url, undefined))); + promises.push(Runtime.loadResourceIntoCache(url, true)); } return Promise.all(promises).then(undefined); - - /** - * @param {string} path - * @param {string=} content - */ - function cacheResource(path, content) - { - if (!content) { - console.error("Failed to load resource: " + path); - return; - } - Runtime.cachedResources[path] = content + Runtime.resolveSourceURL(path); - } }, /**
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js index 5d1628f..4492c4e 100644 --- a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js +++ b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
@@ -98,9 +98,9 @@ */ function comparator(a, b) { - if (a.lineNumber !== b.line) - return a.lineNumber - b.line; - return a.columnNumber - b.column; + if (a.lineNumber !== b.lineNumber) + return a.lineNumber - b.lineNumber; + return a.columnNumber - b.columnNumber; } }, @@ -162,12 +162,12 @@ var positions = []; // If content in script file begin is not mapped and one or more ranges are blackboxed then blackbox it. if (mappings[0].lineNumber !== 0 || mappings[0].columnNumber !== 0) { - positions.push({ line: 0, column: 0}); + positions.push({ lineNumber: 0, columnNumber: 0}); currentBlackboxed = true; } for (var mapping of mappings) { if (mapping.sourceURL && currentBlackboxed !== this.isBlackboxedURL(mapping.sourceURL)) { - positions.push({ line: mapping.lineNumber, column: mapping.columnNumber }); + positions.push({ lineNumber: mapping.lineNumber, columnNumber: mapping.columnNumber }); currentBlackboxed = !currentBlackboxed; } isBlackboxed = currentBlackboxed || isBlackboxed; @@ -346,7 +346,7 @@ _addScript: function(script) { var blackboxed = this._isBlackboxedScript(script); - return this._setScriptState(script, blackboxed ? [ { line: 0, column: 0 } ] : []); + return this._setScriptState(script, blackboxed ? [ { lineNumber: 0, columnNumber: 0 } ] : []); }, /** @@ -393,7 +393,7 @@ var hasChanged = false; hasChanged = previousScriptState.length !== positions.length; for (var i = 0; !hasChanged && i < positions.length; ++i) - hasChanged = positions[i].line !== previousScriptState[i].line || positions[i].column !== previousScriptState[i].column; + hasChanged = positions[i].lineNumber !== previousScriptState[i].lineNumber || positions[i].columnNumber !== previousScriptState[i].columnNumber; if (!hasChanged) return Promise.resolve(); } else {
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js index 4b185c2..957a49a 100644 --- a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js +++ b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
@@ -46,7 +46,7 @@ WebInspector.FileSystemWorkspaceBinding._styleSheetExtensions = new Set(["css", "scss", "sass", "less"]); WebInspector.FileSystemWorkspaceBinding._documentExtensions = new Set(["htm", "html", "asp", "aspx", "phtml", "jsp"]); -WebInspector.FileSystemWorkspaceBinding._scriptExtensions = new Set(["asp", "aspx", "c", "cc", "cljs", "coffee", "cpp", "cs", "dart", "java", "js", "jsp", "jsx", "h", "m", "mm", "py", "sh", "ts", "tsx"]); +WebInspector.FileSystemWorkspaceBinding._scriptExtensions = new Set(["asp", "aspx", "c", "cc", "cljs", "coffee", "cpp", "cs", "dart", "java", "js", "jsp", "jsx", "h", "m", "mm", "py", "sh", "ts", "tsx", "ls"]); WebInspector.FileSystemWorkspaceBinding._imageExtensions = WebInspector.IsolatedFileSystem.ImageExtensions;
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js index adf4bad..de5cc8f 100644 --- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js +++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -420,13 +420,26 @@ titleElement.createTextChild(obj.description || ""); } } + + var section = this._buildExpandableObjectSection(obj, titleElement); + elem.appendChild(section.element); + }, + + /** + * @param {!WebInspector.RemoteObject} obj + * @param {!Element} titleElement + * @return {!WebInspector.ObjectPropertiesSection} + */ + _buildExpandableObjectSection: function(obj, titleElement) + { var note = titleElement.createChild("span", "object-state-note"); note.classList.add("info-note"); note.title = WebInspector.UIString("Object value at left was snapshotted when logged, value below was evaluated just now."); + var section = new WebInspector.ObjectPropertiesSection(obj, titleElement, this._linkifier); - section.enableContextMenu(); - elem.appendChild(section.element); section.element.classList.add("console-view-object-properties-section"); + section.enableContextMenu(); + return section; }, /** @@ -444,7 +457,7 @@ */ function formatTargetFunction(targetFunction) { - var functionElement = createElement("span") + var functionElement = createElement("span"); WebInspector.ObjectPropertiesSection.formatObjectAsFunction(targetFunction, functionElement, true, includePreview); element.appendChild(functionElement); if (targetFunction !== func) { @@ -528,7 +541,7 @@ if (this.useArrayPreviewInFormatter(array) || array.arrayLength() > maxFlatArrayLength) this._formatParameterAsArrayOrObject(array, elem, this.useArrayPreviewInFormatter(array) || array.arrayLength() <= maxFlatArrayLength); else - array.getAllProperties(false, this._printArray.bind(this, array, elem)); + array.getAllProperties(false, this._printArrayResult.bind(this, array, elem)); }, /** @@ -641,13 +654,14 @@ * @param {!Element} elem * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties */ - _printArray: function(array, elem, properties) + _printArrayResult: function(array, elem, properties) { if (!properties) { this._formatParameterAsObject(array, elem, false); return; } + var titleElement = createElement("span"); var elements = {}; for (var i = 0; i < properties.length; ++i) { var property = properties[i]; @@ -660,14 +674,14 @@ elements[name] = this._formatAsArrayEntry(property.value); } - elem.createTextChild("["); + titleElement.createTextChild("["); var lastNonEmptyIndex = -1; - function appendUndefined(elem, index) + function appendUndefined(titleElement, index) { if (index - lastNonEmptyIndex <= 1) return; - var span = elem.createChild("span", "object-value-undefined"); + var span = titleElement.createChild("span", "object-value-undefined"); span.textContent = WebInspector.UIString("undefined × %d", index - lastNonEmptyIndex - 1); } @@ -678,19 +692,21 @@ continue; if (i - lastNonEmptyIndex > 1) { - appendUndefined(elem, i); - elem.createTextChild(", "); + appendUndefined(titleElement, i); + titleElement.createTextChild(", "); } - elem.appendChild(element); + titleElement.appendChild(element); lastNonEmptyIndex = i; if (i < length - 1) - elem.createTextChild(", "); + titleElement.createTextChild(", "); } - appendUndefined(elem, length); + appendUndefined(titleElement, length); - elem.createTextChild("]"); - elem.addEventListener("contextmenu", this._contextMenuEventFired.bind(this, array), false); + titleElement.createTextChild("]"); + + var section = this._buildExpandableObjectSection(array, titleElement); + elem.appendChild(section.element); }, /** @@ -699,8 +715,11 @@ */ _formatAsArrayEntry: function(output) { - // Prevent infinite expansion of cross-referencing arrays. - return this._formatParameter(output, output.subtype === "array", false); + if (this._message.type === WebInspector.ConsoleMessage.MessageType.DirXML) { + // Prevent infinite expansion of cross-referencing arrays. + return this._formatParameter(output, output.subtype === "array", false); + } + return this._previewFormatter.renderPropertyPreview(output.type, output.subtype, output.description); }, /**
diff --git a/third_party/WebKit/Source/devtools/front_end/inspector.js b/third_party/WebKit/Source/devtools/front_end/inspector.js index 322527d..0b71b5b 100644 --- a/third_party/WebKit/Source/devtools/front_end/inspector.js +++ b/third_party/WebKit/Source/devtools/front_end/inspector.js
@@ -2,4 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -Runtime.startApplication("inspector"); +// Preload protocol resources for hosted mode. +if (!/** @type {?Object} */(window.InspectorFrontendHost)) { + Promise.all([ + Runtime.loadResourceIntoCache("./sdk/protocol/browser_protocol.json", false /* appendSourceURL */), + Runtime.loadResourceIntoCache("./sdk/protocol/js_protocol.json", false /* appendSourceURL */) + ]).then(() => Runtime.startApplication("inspector")); +} else { + Runtime.startApplication("inspector"); +} +
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js b/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js index 7c98b73..d34516f1 100644 --- a/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js +++ b/third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackendHostedMode.js
@@ -6,21 +6,18 @@ WebInspector.InspectorBackendHostedMode = {}; -/** - * @param {string} jsonUrl - */ -WebInspector.InspectorBackendHostedMode.loadFromJSONIfNeeded = function(jsonUrl) +WebInspector.InspectorBackendHostedMode.loadFromJSONIfNeeded = function() { if (InspectorBackend.isInitialized()) return; - var xhr = new XMLHttpRequest(); - xhr.open("GET", jsonUrl, false); - xhr.send(null); - - var schema = JSON.parse(xhr.responseText); - var code = WebInspector.InspectorBackendHostedMode.generateCommands(schema); - eval(code); + for (var url of Object.keys(Runtime.cachedResources)) { + if (url.indexOf("protocol.json") !== -1) { + var protocol = Runtime.cachedResources[url]; + var code = WebInspector.InspectorBackendHostedMode.generateCommands(JSON.parse(protocol)); + eval(code); + } + } } /** @@ -122,4 +119,4 @@ return result.join("\n"); } -WebInspector.InspectorBackendHostedMode.loadFromJSONIfNeeded("../inspector.json"); +WebInspector.InspectorBackendHostedMode.loadFromJSONIfNeeded();
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/protocol/README.md b/third_party/WebKit/Source/devtools/front_end/sdk/protocol/README.md new file mode 100644 index 0000000..98fd5cb --- /dev/null +++ b/third_party/WebKit/Source/devtools/front_end/sdk/protocol/README.md
@@ -0,0 +1,8 @@ +These protocol descriptors are copies of the following files: + + - [src/third_party/WebKit/Source/core/inspector/browser_protocol.json](https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/core/inspector/browser_protocol.json) + - [src/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json](https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json) + +**Important:** These files are **not** rolled automatically and should be updated manually from time to time. + +Protocol descriptors are needed for the DevTools [hosted mode](https://docs.google.com/document/d/1WNF-KqRSzPLUUfZqQG5AFeU_Ll8TfWYcJasa_XGf7ro/view#heading=h.9t7np5fa400) only.
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/protocol/browser_protocol.json b/third_party/WebKit/Source/devtools/front_end/sdk/protocol/browser_protocol.json new file mode 100644 index 0000000..eb201e2 --- /dev/null +++ b/third_party/WebKit/Source/devtools/front_end/sdk/protocol/browser_protocol.json
@@ -0,0 +1,4378 @@ +{ + "version": { "major": "1", "minor": "1" }, + "domains": [{ + "domain": "Inspector", + "hidden": true, + "types": [], + "commands": [ + { + "name": "enable", + "description": "Enables inspector domain notifications.", + "handlers": ["browser"] + }, + { + "name": "disable", + "description": "Disables inspector domain notifications.", + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "detached", + "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.", + "parameters": [ + { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." } + ], + "handlers": ["browser"] + }, + { + "name": "targetCrashed", + "description": "Fired when debugging target has crashed", + "handlers": ["browser"] + } + ] + }, + { + "domain": "Memory", + "hidden": true, + "types": [ + { + "id": "PressureLevel", + "type": "string", + "enum": ["moderate", "critical"], + "description": "Memory pressure level." + } + ], + "commands": [ + { + "name": "getDOMCounters", + "returns": [ + { "name": "documents", "type": "integer" }, + { "name": "nodes", "type": "integer" }, + { "name": "jsEventListeners", "type": "integer" } + ] + }, + { + "name": "setPressureNotificationsSuppressed", + "description": "Enable/disable suppressing memory pressure notifications in all processes.", + "parameters": [ + { "name": "suppressed", "type": "boolean", "description": "If true, memory pressure notifications will be suppressed."} + ], + "handlers": ["browser"] + }, + { + "name": "simulatePressureNotification", + "description": "Simulate a memory pressure notification in all processes.", + "parameters": [ + { "name": "level", "$ref": "PressureLevel", "description": "Memory pressure level of the notification." } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "Page", + "description": "Actions and events related to the inspected page belong to the page domain.", + "dependencies": ["Debugger", "DOM"], + "types": [ + { + "id": "ResourceType", + "type": "string", + "enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "EventSource", "WebSocket", "Manifest", "Other"], + "description": "Resource type as it was perceived by the rendering engine." + }, + { + "id": "FrameId", + "type": "string", + "description": "Unique frame identifier." + }, + { + "id": "Frame", + "type": "object", + "description": "Information about the Frame on the page.", + "properties": [ + { "name": "id", "type": "string", "description": "Frame unique identifier." }, + { "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier." }, + { "name": "loaderId", "$ref": "Network.LoaderId", "description": "Identifier of the loader associated with this frame." }, + { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." }, + { "name": "url", "type": "string", "description": "Frame document's URL." }, + { "name": "securityOrigin", "type": "string", "description": "Frame document's security origin." }, + { "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." } + ] + }, + { + "id": "FrameResource", + "type": "object", + "description": "Information about the Resource on the page.", + "properties": [ + { "name": "url", "type": "string", "description": "Resource URL." }, + { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." }, + { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, + { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." }, + { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." } + ], + "hidden": true + }, + { + "id": "FrameResourceTree", + "type": "object", + "description": "Information about the Frame hierarchy along with their cached resources.", + "properties": [ + { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." }, + { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." }, + { "name": "resources", "type": "array", "items": { "$ref": "FrameResource" }, "description": "Information about frame resources." } + ], + "hidden": true + }, + { + "id": "ScriptIdentifier", + "type": "string", + "description": "Unique script identifier.", + "hidden": true + }, + { + "id": "NavigationEntry", + "type": "object", + "description": "Navigation history entry.", + "properties": [ + { "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." }, + { "name": "url", "type": "string", "description": "URL of the navigation history entry." }, + { "name": "title", "type": "string", "description": "Title of the navigation history entry." } + ], + "hidden": true + }, + { + "id": "ScreencastFrameMetadata", + "type": "object", + "description": "Screencast frame metadata.", + "properties": [ + { "name": "offsetTop", "type": "number", "hidden": true, "description": "Top offset in DIP." }, + { "name": "pageScaleFactor", "type": "number", "hidden": true, "description": "Page scale factor." }, + { "name": "deviceWidth", "type": "number", "hidden": true, "description": "Device screen width in DIP." }, + { "name": "deviceHeight", "type": "number", "hidden": true, "description": "Device screen height in DIP." }, + { "name": "scrollOffsetX", "type": "number", "hidden": true, "description": "Position of horizontal scroll in CSS pixels." }, + { "name": "scrollOffsetY", "type": "number", "hidden": true, "description": "Position of vertical scroll in CSS pixels." }, + { "name": "timestamp", "type": "number", "optional": true, "hidden": true, "description": "Frame swap timestamp." } + ], + "hidden": true + }, + { + "id": "DialogType", + "description": "Javascript dialog type.", + "type": "string", + "enum": ["alert", "confirm", "prompt", "beforeunload"], + "hidden": true + }, + { + "id": "AppManifestError", + "description": "Error while paring app manifest.", + "type": "object", + "properties": [ + { "name": "message", "type": "string", "description": "Error message." }, + { "name": "critical", "type": "integer", "description": "If criticial, this is a non-recoverable parse error." }, + { "name": "line", "type": "integer", "description": "Error line." }, + { "name": "column", "type": "integer", "description": "Error column." } + ], + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables page domain notifications.", + "handlers": ["browser", "renderer"] + }, + { + "name": "disable", + "description": "Disables page domain notifications.", + "handlers": ["browser", "renderer"] + }, + { + "name": "addScriptToEvaluateOnLoad", + "parameters": [ + { "name": "scriptSource", "type": "string" } + ], + "returns": [ + { "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." } + ], + "hidden": true + }, + { + "name": "removeScriptToEvaluateOnLoad", + "parameters": [ + { "name": "identifier", "$ref": "ScriptIdentifier" } + ], + "hidden": true + }, + { + "name": "setAutoAttachToCreatedPages", + "parameters": [ + { "name": "autoAttach", "type": "boolean", "description": "If true, browser will open a new inspector window for every page created from this one." } + ], + "description": "Controls whether browser will open a new inspector window for connected pages.", + "hidden": true + }, + { + "name": "reload", + "parameters": [ + { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." }, + { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." } + ], + "description": "Reloads given page optionally ignoring the cache.", + "handlers": ["browser", "renderer"] + }, + { + "name": "navigate", + "parameters": [ + { "name": "url", "type": "string", "description": "URL to navigate the page to." } + ], + "returns": [ + { "name": "frameId", "$ref": "FrameId", "hidden": true, "description": "Frame id that will be navigated." } + ], + "description": "Navigates current page to the given URL.", + "handlers": ["browser", "renderer"] + }, + { + "name": "getNavigationHistory", + "returns": [ + { "name": "currentIndex", "type": "integer", "description": "Index of the current navigation history entry." }, + { "name": "entries", "type": "array", "items": { "$ref": "NavigationEntry" }, "description": "Array of navigation history entries." } + ], + "description": "Returns navigation history for the current page.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "navigateToHistoryEntry", + "parameters": [ + { "name": "entryId", "type": "integer", "description": "Unique id of the entry to navigate to." } + ], + "description": "Navigates current page to the given history entry.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "getCookies", + "returns": [ + { "name": "cookies", "type": "array", "items": { "$ref": "Network.Cookie" }, "description": "Array of cookie objects." } + ], + "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.", + "handlers": ["browser"], + "async": true, + "hidden": true, + "redirect": "Network" + }, + { + "name": "deleteCookie", + "parameters": [ + { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." }, + { "name": "url", "type": "string", "description": "URL to match cooke domain and path." } + ], + "description": "Deletes browser cookie with given name, domain and path.", + "handlers": ["browser"], + "async": true, + "hidden": true, + "redirect": "Network" + }, + { + "name": "getResourceTree", + "description": "Returns present frame / resource tree structure.", + "returns": [ + { "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." } + ], + "hidden": true + }, + { + "name": "getResourceContent", + "async": true, + "description": "Returns content of the given resource.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Frame id to get resource for." }, + { "name": "url", "type": "string", "description": "URL of the resource to get content for." } + ], + "returns": [ + { "name": "content", "type": "string", "description": "Resource content." }, + { "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." } + ], + "hidden": true + }, + { + "name": "searchInResource", + "async": true, + "description": "Searches for given string in resource content.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Frame id for resource to search in." }, + { "name": "url", "type": "string", "description": "URL of the resource to search in." }, + { "name": "query", "type": "string", "description": "String to search for." }, + { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, + { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "Debugger.SearchMatch" }, "description": "List of search matches." } + ], + "hidden": true + }, + { + "name": "setDocumentContent", + "description": "Sets given markup as the document's HTML.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Frame id to set HTML for." }, + { "name": "html", "type": "string", "description": "HTML content to set." } + ], + "hidden": true + }, + { + "name": "setDeviceMetricsOverride", + "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).", + "parameters": [ + { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." }, + { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." }, + { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }, + { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, + { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." }, + { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." }, + { "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenOrientation", "$ref": "Emulation.ScreenOrientation", "optional": true, "description": "Screen orientation override." } + ], + "handlers": ["browser"], + "redirect": "Emulation", + "hidden": true + }, + { + "name": "clearDeviceMetricsOverride", + "description": "Clears the overriden device metrics.", + "handlers": ["browser"], + "redirect": "Emulation", + "hidden": true + }, + { + "name": "setGeolocationOverride", + "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.", + "parameters": [ + { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"}, + { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"}, + { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} + ], + "redirect": "Emulation", + "handlers": ["browser"] + }, + { + "name": "clearGeolocationOverride", + "description": "Clears the overriden Geolocation Position and Error.", + "redirect": "Emulation", + "handlers": ["browser"] + }, + { + "name": "setDeviceOrientationOverride", + "description": "Overrides the Device Orientation.", + "parameters": [ + { "name": "alpha", "type": "number", "description": "Mock alpha"}, + { "name": "beta", "type": "number", "description": "Mock beta"}, + { "name": "gamma", "type": "number", "description": "Mock gamma"} + ], + "redirect": "DeviceOrientation", + "hidden": true + }, + { + "name": "clearDeviceOrientationOverride", + "description": "Clears the overridden Device Orientation.", + "redirect": "DeviceOrientation", + "hidden": true + }, + { + "name": "setTouchEmulationEnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }, + { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." } + ], + "description": "Toggles mouse event-based touch event emulation.", + "hidden": true, + "redirect": "Emulation", + "handlers": ["browser", "renderer"] + }, + { + "name": "captureScreenshot", + "async": true, + "description": "Capture page screenshot.", + "returns": [ + { "name": "data", "type": "string", "description": "Base64-encoded image data (PNG)." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "startScreencast", + "description": "Starts sending each frame using the <code>screencastFrame</code> event.", + "parameters": [ + { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." }, + { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100]." }, + { "name": "maxWidth", "type": "integer", "optional": true, "description": "Maximum screenshot width." }, + { "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." }, + { "name": "everyNthFrame", "type": "integer", "optional": true, "description": "Send every n-th frame." } + ], + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "stopScreencast", + "description": "Stops sending each frame in the <code>screencastFrame</code>.", + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "screencastFrameAck", + "description": "Acknowledges that a screencast frame has been received by the frontend.", + "parameters": [ + { "name": "sessionId", "type": "integer", "description": "Frame number." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "handleJavaScriptDialog", + "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).", + "parameters": [ + { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." }, + { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "setColorPickerEnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Shows / hides color picker" } + ], + "description": "Shows / hides color picker", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "setOverlayMessage", + "parameters": [ + { "name": "message", "type": "string", "optional": true, "description": "Overlay message to display when paused in debugger." } + ], + "hidden": true, + "description": "Sets overlay message." + }, + { + "name": "getAppManifest", + "hidden": true, + "returns": [ + { "name": "url", "type": "string", "description": "Manifest location." }, + { "name": "errors", "type": "array", "items": { "$ref": "AppManifestError" } }, + { "name": "data", "type": "string", "optional": true, "description": "Manifest content." } + ], + "handlers": ["none"] + }, + { + "name": "requestAppBanner", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "setBlockedEventsWarningThreshold", + "hidden": true, + "parameters": [ + { "name": "threshold", "type": "number", "description": "If set to a positive number, specifies threshold in seconds for input event latency that will cause a console warning about blocked event to be issued. If zero or less, the warning is disabled." } + ] + } + ], + "events": [ + { + "name": "domContentEventFired", + "parameters": [ + { "name": "timestamp", "type": "number" } + ] + }, + { + "name": "loadEventFired", + "parameters": [ + { "name": "timestamp", "type": "number" } + ] + }, + { + "name": "frameAttached", + "description": "Fired when frame has been attached to its parent.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." }, + { "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." } + ] + }, + { + "name": "frameNavigated", + "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.", + "parameters": [ + { "name": "frame", "$ref": "Frame", "description": "Frame object." } + ] + }, + { + "name": "frameDetached", + "description": "Fired when frame has been detached from its parent.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been detached." } + ] + }, + { + "name": "frameStartedLoading", + "description": "Fired when frame has started loading.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has started loading." } + ], + "hidden": true + }, + { + "name": "frameStoppedLoading", + "description": "Fired when frame has stopped loading.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." } + ], + "hidden": true + }, + { + "name": "frameScheduledNavigation", + "description": "Fired when frame schedules a potential navigation.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has scheduled a navigation." }, + { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." } + ], + "hidden": true + }, + { + "name": "frameClearedScheduledNavigation", + "description": "Fired when frame no longer has a scheduled navigation.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has cleared its scheduled navigation." } + ], + "hidden": true + }, + { + "name": "frameResized", + "hidden": true + }, + { + "name": "javascriptDialogOpening", + "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.", + "parameters": [ + { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." }, + { "name": "type", "$ref": "DialogType", "description": "Dialog type." } + ], + "hidden": true + }, + { + "name": "javascriptDialogClosed", + "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.", + "parameters": [ + { "name": "result", "type": "boolean", "description": "Whether dialog was confirmed." } + ], + "hidden": true + }, + { + "name": "screencastFrame", + "description": "Compressed image data requested by the <code>startScreencast</code>.", + "parameters": [ + { "name": "data", "type": "string", "description": "Base64-encoded compressed image." }, + { "name": "metadata", "$ref": "ScreencastFrameMetadata", "description": "Screencast frame metadata."}, + { "name": "sessionId", "type": "integer", "description": "Frame number."} + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "screencastVisibilityChanged", + "description": "Fired when the page with currently enabled screencast was shown or hidden </code>.", + "parameters": [ + { "name": "visible", "type": "boolean", "description": "True if the page is visible." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "colorPicked", + "description": "Fired when a color has been picked.", + "parameters": [ + { "name": "color", "$ref": "DOM.RGBA", "description": "RGBA of the picked color." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "interstitialShown", + "description": "Fired when interstitial page was shown", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "interstitialHidden", + "description": "Fired when interstitial page was hidden", + "hidden": true, + "handlers": ["browser"] + } + ] + }, + { + "domain": "Rendering", + "description": "This domain allows to control rendering of the page.", + "hidden": true, + "commands": [ + { + "name": "setShowPaintRects", + "description": "Requests that backend shows paint rectangles", + "parameters": [ + { "name": "result", "type": "boolean", "description": "True for showing paint rectangles" } + ] + }, + { + "name": "setShowDebugBorders", + "description": "Requests that backend shows debug borders on layers", + "parameters": [ + { "name": "show", "type": "boolean", "description": "True for showing debug borders" } + ] + }, + { + "name": "setShowFPSCounter", + "description": "Requests that backend shows the FPS counter", + "parameters": [ + { "name": "show", "type": "boolean", "description": "True for showing the FPS counter" } + ] + }, + { + "name": "setShowScrollBottleneckRects", + "description": "Requests that backend shows scroll bottleneck rects", + "parameters": [ + { "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" } + ] + }, + { + "name": "setShowViewportSizeOnResize", + "description": "Paints viewport size upon main frame resize.", + "parameters": [ + { "name": "show", "type": "boolean", "description": "Whether to paint size or not." } + ] + } + ] + }, + { + "domain": "Emulation", + "description": "This domain emulates different environments for the page.", + "hidden": true, + "types": [ + { + "id": "ScreenOrientation", + "type": "object", + "description": "Screen orientation.", + "properties": [ + { "name": "type", "type": "string", "enum": ["portraitPrimary", "portraitSecondary", "landscapePrimary", "landscapeSecondary"], "description": "Orientation type." }, + { "name": "angle", "type": "integer", "description": "Orientation angle." } + ] + }, + { + "id": "VirtualTimePolicy", + "type": "string", + "enum": [ + "advance", + "pause", + "pauseIfNetworkFetchesPending" + ], + "description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches." + } + ], + "commands": [ + { + "name": "setDeviceMetricsOverride", + "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).", + "parameters": [ + { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." }, + { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." }, + { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }, + { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, + { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." }, + { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." }, + { "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." } + ], + "handlers": ["browser"] + }, + { + "name": "clearDeviceMetricsOverride", + "description": "Clears the overriden device metrics.", + "handlers": ["browser"] + }, + { + "name": "resetPageScaleFactor", + "description": "Requests that page scale factor is reset to initial values." + }, + { + "name": "setPageScaleFactor", + "description": "Sets a specified page scale factor.", + "parameters": [ + { "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." } + ] + }, + { + "name": "setScriptExecutionDisabled", + "description": "Switches script execution in the page.", + "parameters": [ + { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." } + ] + }, + { + "name": "setGeolocationOverride", + "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.", + "parameters": [ + { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"}, + { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"}, + { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} + ], + "handlers": ["browser"] + }, + { + "name": "clearGeolocationOverride", + "description": "Clears the overriden Geolocation Position and Error.", + "handlers": ["browser"] + }, + { + "name": "setTouchEmulationEnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }, + { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." } + ], + "description": "Toggles mouse event-based touch event emulation.", + "handlers": ["browser", "renderer"] + }, + { + "name": "setEmulatedMedia", + "parameters": [ + { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." } + ], + "description": "Emulates the given media for CSS media queries." + }, + { + "name": "setCPUThrottlingRate", + "parameters": [ + { "name": "rate", "type": "number", "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc)." } + ], + "description": "Enables CPU throttling to emulate slow CPUs." + }, + { + "name": "canEmulate", + "description": "Tells whether emulation is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if emulation is supported." } + ], + "handlers": ["browser"] + }, + { + "name": "setVirtualTimePolicy", + "description": "Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy.", + "parameters": [ + { "name": "policy", "$ref": "VirtualTimePolicy" } + ], + "hidden": true + } + ] + }, + { + "domain": "Security", + "description": "Security", + "hidden": true, + "types": [ + { + "id": "CertificateId", + "type": "integer", + "description": "An internal certificate ID value." + }, + { + "id": "SecurityState", + "type": "string", + "enum": ["unknown", "neutral", "insecure", "warning", "secure", "info"], + "description": "The security level of a page or resource." + }, + { + "id": "SecurityStateExplanation", + "type": "object", + "properties": [ + { "name": "securityState", "$ref": "SecurityState", "description": "Security state representing the severity of the factor being explained." }, + { "name": "summary", "type": "string", "description": "Short phrase describing the type of factor." }, + { "name": "description", "type": "string", "description": "Full text explanation of the factor." }, + { "name": "certificateId", "$ref": "CertificateId", "optional": true, "description": "Associated certificate id." } + ], + "description": "An explanation of an factor contributing to the security state." + }, + { + "id": "MixedContentStatus", + "type": "object", + "properties": [ + { "name": "ranInsecureContent", "type": "boolean", "description": "True if the page ran insecure content such as scripts." }, + { "name": "displayedInsecureContent", "type": "boolean", "description": "True if the page displayed insecure content such as images." }, + { "name": "ranInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that ran insecure content." }, + { "name": "displayedInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that displayed insecure content." } + ], + "description": "Information about mixed content on the page." + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables tracking security state changes.", + "handlers": ["browser"] + }, + { + "name": "disable", + "description": "Disables tracking security state changes.", + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "securityStateChanged", + "description": "The security state of the page changed.", + "parameters": [ + { "name": "securityState", "$ref": "SecurityState", "description": "Security state." }, + { "name": "explanations", "type": "array", "items": { "$ref": "SecurityStateExplanation" }, "description": "List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included.", "optional": true }, + { "name": "mixedContentStatus", "$ref": "MixedContentStatus", "description": "Information about mixed content on the page.", "optional": true }, + { "name": "schemeIsCryptographic", "type": "boolean", "description": "True if the page was loaded over cryptographic transport such as HTTPS.", "optional": true } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "Network", + "description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.", + "dependencies": ["Runtime", "Security"], + "types": [ + { + "id": "LoaderId", + "type": "string", + "description": "Unique loader identifier." + }, + { + "id": "RequestId", + "type": "string", + "description": "Unique request identifier." + }, + { + "id": "Timestamp", + "type": "number", + "description": "Number of seconds since epoch." + }, + { + "id": "Headers", + "type": "object", + "description": "Request / response headers as keys / values of JSON object." + }, + { + "id": "ConnectionType", + "type": "string", + "enum": ["none", "cellular2g", "cellular3g", "cellular4g", "bluetooth", "ethernet", "wifi", "wimax", "other"], + "description": "Loading priority of a resource request." + }, + { + "id": "ResourceTiming", + "type": "object", + "description": "Timing information for the request.", + "properties": [ + { "name": "requestTime", "type": "number", "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime." }, + { "name": "proxyStart", "type": "number", "description": "Started resolving proxy." }, + { "name": "proxyEnd", "type": "number", "description": "Finished resolving proxy." }, + { "name": "dnsStart", "type": "number", "description": "Started DNS address resolve." }, + { "name": "dnsEnd", "type": "number", "description": "Finished DNS address resolve." }, + { "name": "connectStart", "type": "number", "description": "Started connecting to the remote host." }, + { "name": "connectEnd", "type": "number", "description": "Connected to the remote host." }, + { "name": "sslStart", "type": "number", "description": "Started SSL handshake." }, + { "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." }, + { "name": "workerStart", "type": "number", "description": "Started running ServiceWorker.", "hidden": true }, + { "name": "workerReady", "type": "number", "description": "Finished Starting ServiceWorker.", "hidden": true }, + { "name": "sendStart", "type": "number", "description": "Started sending request." }, + { "name": "sendEnd", "type": "number", "description": "Finished sending request." }, + { "name": "pushStart", "type": "number", "description": "Time the server started pushing request.", "hidden": true }, + { "name": "pushEnd", "type": "number", "description": "Time the server finished pushing request.", "hidden": true }, + { "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." } + ] + }, + { + "id": "ResourcePriority", + "type": "string", + "enum": ["VeryLow", "Low", "Medium", "High", "VeryHigh"], + "description": "Loading priority of a resource request." + }, + { + "id": "Request", + "type": "object", + "description": "HTTP request data.", + "properties": [ + { "name": "url", "type": "string", "description": "Request URL." }, + { "name": "method", "type": "string", "description": "HTTP request method." }, + { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." }, + { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }, + { "name": "mixedContentType", "optional": true, "type": "string", "enum": ["blockable", "optionally-blockable", "none"], "description": "The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/" }, + { "name": "initialPriority", "$ref": "ResourcePriority", "description": "Priority of the resource request at the time request is sent."} + ] + }, + { + "id": "CertificateSubject", + "type": "object", + "description": "Subject of a certificate.", + "properties": [ + { "name": "name", "type": "string", "description": "Certificate subject name." }, + { "name": "sanDnsNames", "type": "array", "items": { "type": "string" }, "description": "Subject Alternative Name (SAN) DNS names." }, + { "name": "sanIpAddresses", "type": "array", "items": { "type": "string" }, "description": "Subject Alternative Name (SAN) IP addresses." } + ] + }, + { + "id": "CertificateDetails", + "type": "object", + "description": "Details about a request's certificate.", + "properties": [ + { "name": "subject", "$ref": "CertificateSubject", "description": "Certificate subject." }, + { "name": "issuer", "type": "string", "description": "Name of the issuing CA." }, + { "name": "validFrom", "$ref": "Timestamp", "description": "Certificate valid from date." }, + { "name": "validTo", "$ref": "Timestamp", "description": "Certificate valid to (expiration) date" } + ] + }, + { + "id": "CertificateValidationDetails", + "type": "object", + "description": "Details about the validation status of a request's certificate.", + "properties": [ + { "name": "numUnknownScts", "type": "integer", "description": "The number of SCTs from unknown logs." }, + { "name": "numInvalidScts", "type": "integer", "description": "The number of invalid SCTs." }, + { "name": "numValidScts", "type": "integer", "description": "The number of valid SCTs." } + ] + }, + { + "id": "SignedCertificateTimestamp", + "type" : "object", + "description": "Details of a signed certificate timestamp (SCT).", + "properties": [ + { "name": "status", "type": "string", "description": "Validation status." }, + { "name": "origin", "type": "string", "description": "Origin." }, + { "name": "logDescription", "type": "string", "description": "Log name / description." }, + { "name": "logId", "type": "string", "description": "Log ID." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Issuance date." }, + { "name": "hashAlgorithm", "type": "string", "description": "Hash algorithm." }, + { "name": "signatureAlgorithm", "type": "string", "description": "Signature algorithm." }, + { "name": "signatureData", "type": "string", "description": "Signature data." } + ] + }, + { + "id": "SecurityDetails", + "type": "object", + "description": "Security details about a request.", + "properties": [ + { "name": "protocol", "type": "string", "description": "Protocol name (e.g. \"TLS 1.2\" or \"QUIC\")." }, + { "name": "keyExchange", "type": "string", "description": "Key Exchange used by the connection." }, + { "name": "cipher", "type": "string", "description": "Cipher name." }, + { "name": "mac", "type": "string", "optional": true, "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs." }, + { "name": "certificateId", "$ref": "Security.CertificateId", "description": "Certificate ID value." }, + { "name": "certificateValidationDetails", "$ref": "CertificateValidationDetails", "optional": true, "description": "Validation details for the request's certficate." }, + { "name": "signedCertificateTimestampList", "type": "array", "items": { "$ref": "SignedCertificateTimestamp" }, "description": "List of signed certificate timestamps (SCTs)." } + ] + }, + { + "id": "BlockedReason", + "type": "string", + "description": "The reason why request was blocked.", + "enum": ["csp", "mixed-content", "origin", "inspector", "subresource-filter", "other"], + "hidden": true + }, + { + "id": "Response", + "type": "object", + "description": "HTTP response data.", + "properties": [ + { "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." }, + { "name": "status", "type": "number", "description": "HTTP response status code." }, + { "name": "statusText", "type": "string", "description": "HTTP response status text." }, + { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }, + { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." }, + { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, + { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." }, + { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." }, + { "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." }, + { "name": "connectionId", "type": "number", "description": "Physical connection id that was actually used for this request." }, + { "name": "remoteIPAddress", "type": "string", "optional": true, "hidden": true, "description": "Remote IP address." }, + { "name": "remotePort", "type": "integer", "optional": true, "hidden": true, "description": "Remote port."}, + { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache." }, + { "name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker." }, + { "name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far." }, + { "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." }, + { "name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this request." }, + { "name": "securityState", "$ref": "Security.SecurityState", "description": "Security state of the request resource." }, + { "name": "securityDetails", "$ref": "SecurityDetails", "optional": true, "description": "Security details for the request." } + ] + }, + { + "id": "WebSocketRequest", + "type": "object", + "description": "WebSocket request data.", + "hidden": true, + "properties": [ + { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." } + ] + }, + { + "id": "WebSocketResponse", + "type": "object", + "description": "WebSocket response data.", + "hidden": true, + "properties": [ + { "name": "status", "type": "number", "description": "HTTP response status code." }, + { "name": "statusText", "type": "string", "description": "HTTP response status text." }, + { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }, + { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." }, + { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "HTTP request headers." }, + { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." } + ] + }, + { + "id": "WebSocketFrame", + "type": "object", + "description": "WebSocket frame data.", + "hidden": true, + "properties": [ + { "name": "opcode", "type": "number", "description": "WebSocket frame opcode." }, + { "name": "mask", "type": "boolean", "description": "WebSocke frame mask." }, + { "name": "payloadData", "type": "string", "description": "WebSocke frame payload data." } + ] + }, + { + "id": "CachedResource", + "type": "object", + "description": "Information about the cached resource.", + "properties": [ + { "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." }, + { "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." }, + { "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." }, + { "name": "bodySize", "type": "number", "description": "Cached response body size." } + ] + }, + { + "id": "Initiator", + "type": "object", + "description": "Information about the request initiator.", + "properties": [ + { "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." }, + { "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." }, + { "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." }, + { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." } + ] + }, + { + "id": "Cookie", + "type": "object", + "description": "Cookie object", + "properties": [ + { "name": "name", "type": "string", "description": "Cookie name." }, + { "name": "value", "type": "string", "description": "Cookie value." }, + { "name": "domain", "type": "string", "description": "Cookie domain." }, + { "name": "path", "type": "string", "description": "Cookie path." }, + { "name": "expires", "type": "number", "description": "Cookie expires." }, + { "name": "size", "type": "integer", "description": "Cookie size." }, + { "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." }, + { "name": "secure", "type": "boolean", "description": "True if cookie is secure." }, + { "name": "session", "type": "boolean", "description": "True in case of session cookie." }, + { "name": "sameSite", "type": "string", "optional": true, "enum": ["Strict", "Lax"], "description": "Represents the cookies' 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies" } + ], + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables network tracking, network events will now be delivered to the client.", + "parameters": [ + { "name": "maxTotalBufferSize", "type": "integer", "optional": true, "hidden": true, "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc)." }, + { "name": "maxResourceBufferSize", "type": "integer", "optional": true, "hidden": true, "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc)." } + ] + }, + { + "name": "disable", + "description": "Disables network tracking, prevents network events from being sent to the client." + }, + { + "name": "setUserAgentOverride", + "description": "Allows overriding user agent with the given string.", + "parameters": [ + { "name": "userAgent", "type": "string", "description": "User agent to use." } + ] + }, + { + "name": "setExtraHTTPHeaders", + "description": "Specifies whether to always send extra HTTP headers with the requests from this page.", + "parameters": [ + { "name": "headers", "$ref": "Headers", "description": "Map with extra HTTP headers." } + ] + }, + { + "name": "getResponseBody", + "async": true, + "description": "Returns content served for the given request.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." } + ], + "returns": [ + { "name": "body", "type": "string", "description": "Response body." }, + { "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." } + ] + }, + { + "name": "addBlockedURL", + "description": "Blocks specific URL from loading.", + "parameters": [ + { "name": "url", "type": "string", "description": "URL to block." } + ], + "hidden": true + }, + { + "name": "removeBlockedURL", + "description": "Cancels blocking of a specific URL from loading.", + "parameters": [ + { "name": "url", "type": "string", "description": "URL to stop blocking." } + ], + "hidden": true + }, + { + "name": "replayXHR", + "description": "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Identifier of XHR to replay." } + ], + "hidden": true + }, + { + "name": "setMonitoringXHREnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." } + ], + "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.", + "hidden": true + }, + { + "name": "canClearBrowserCache", + "description": "Tells whether clearing browser cache is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if browser cache can be cleared." } + ] + }, + { + "name": "clearBrowserCache", + "description": "Clears browser cache.", + "handlers": ["browser"] + }, + { + "name": "canClearBrowserCookies", + "description": "Tells whether clearing browser cookies is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if browser cookies can be cleared." } + ] + }, + { + "name": "clearBrowserCookies", + "description": "Clears browser cookies.", + "handlers": ["browser"] + }, + { + "name": "getCookies", + "returns": [ + { "name": "cookies", "type": "array", "items": { "$ref": "Cookie" }, "description": "Array of cookie objects." } + ], + "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.", + "handlers": ["browser"], + "async": true, + "hidden": true + }, + { + "name": "deleteCookie", + "parameters": [ + { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." }, + { "name": "url", "type": "string", "description": "URL to match cooke domain and path." } + ], + "description": "Deletes browser cookie with given name, domain and path.", + "handlers": ["browser"], + "async": true, + "hidden": true + }, + { + "name": "canEmulateNetworkConditions", + "description": "Tells whether emulation of network conditions is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if emulation of network conditions is supported." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "emulateNetworkConditions", + "description": "Activates emulation of network conditions.", + "parameters": [ + { "name": "offline", "type": "boolean", "description": "True to emulate internet disconnection." }, + { "name": "latency", "type": "number", "description": "Additional latency (ms)." }, + { "name": "downloadThroughput", "type": "number", "description": "Maximal aggregated download throughput." }, + { "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput." }, + { "name": "connectionType", "$ref": "ConnectionType", "optional": true, "description": "Connection type if known."} + ], + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "setCacheDisabled", + "parameters": [ + { "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." } + ], + "description": "Toggles ignoring cache for each request. If <code>true</code>, cache will not be used." + }, + { + "name": "setBypassServiceWorker", + "parameters": [ + { "name": "bypass", "type": "boolean", "description": "Bypass service worker and load from network." } + ], + "hidden": true, + "description": "Toggles ignoring of service worker for each request." + }, + { + "name": "setDataSizeLimitsForTest", + "parameters": [ + { "name": "maxTotalSize", "type": "integer", "description": "Maximum total buffer size." }, + { "name": "maxResourceSize", "type": "integer", "description": "Maximum per-resource size." } + ], + "description": "For testing.", + "hidden": true + }, + { + "name": "getCertificateDetails", + "description": "Returns details for the given certificate.", + "parameters": [ + { "name": "certificateId", "$ref": "Security.CertificateId", "description": "ID of the certificate to get details for." } + ], + "returns": [ + { "name": "result", "$ref": "CertificateDetails", "description": "Certificate details." } + ], + "handlers": ["browser"] + }, + { + "name": "showCertificateViewer", + "description": "Displays native dialog with the certificate details.", + "parameters": [ + { "name": "certificateId", "$ref": "Security.CertificateId", "description": "Certificate id." } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "resourceChangedPriority", + "description": "Fired when resource loading priority is changed", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "newPriority", "$ref": "ResourcePriority", "description": "New priority" }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." } + ], + "hidden": true + }, + { + "name": "requestWillBeSent", + "description": "Fired when page is about to send HTTP request.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true }, + { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." }, + { "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." }, + { "name": "request", "$ref": "Request", "description": "Request data." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." }, + { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." }, + { "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." }, + { "name": "type", "$ref": "Page.ResourceType", "optional": true, "hidden": true, "description": "Type of this resource." } + ] + }, + { + "name": "requestServedFromCache", + "description": "Fired if request ended up loading from cache.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." } + ] + }, + { + "name": "responseReceived", + "description": "Fired when HTTP response is available.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true }, + { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, + { "name": "response", "$ref": "Response", "description": "Response data." } + ] + }, + { + "name": "dataReceived", + "description": "Fired when data chunk was received over the network.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "dataLength", "type": "integer", "description": "Data chunk length." }, + { "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." } + ] + }, + { + "name": "loadingFinished", + "description": "Fired when HTTP request has finished loading.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "encodedDataLength", "type": "number", "description": "Total number of bytes received for this request." } + ] + }, + { + "name": "loadingFailed", + "description": "Fired when HTTP request has failed to load.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, + { "name": "errorText", "type": "string", "description": "User friendly error message." }, + { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }, + { "name": "blockedReason", "$ref": "BlockedReason", "optional": true, "description": "The reason why loading was blocked, if any.", "hidden": true } + ] + }, + { + "name": "webSocketWillSendHandshakeRequest", + "description": "Fired when WebSocket is about to initiate handshake.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." }, + { "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." } + ], + "hidden": true + }, + { + "name": "webSocketHandshakeResponseReceived", + "description": "Fired when WebSocket handshake response becomes available.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." } + ], + "hidden": true + }, + { + "name": "webSocketCreated", + "description": "Fired upon WebSocket creation.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "url", "type": "string", "description": "WebSocket request URL." }, + { "name": "initiator", "$ref": "Initiator", "optional": true, "description": "Request initiator." } + ], + "hidden": true + }, + { + "name": "webSocketClosed", + "description": "Fired when WebSocket is closed.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." } + ], + "hidden": true + }, + { + "name": "webSocketFrameReceived", + "description": "Fired when WebSocket frame is received.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } + ], + "hidden": true + }, + { + "name": "webSocketFrameError", + "description": "Fired when WebSocket frame error occurs.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." } + ], + "hidden": true + }, + { + "name": "webSocketFrameSent", + "description": "Fired when WebSocket frame is sent.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } + ], + "hidden": true + }, + { + "name": "eventSourceMessageReceived", + "description": "Fired when EventSource message is received.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "eventName", "type": "string", "description": "Message type." }, + { "name": "eventId", "type": "string", "description": "Message identifier." }, + { "name": "data", "type": "string", "description": "Message content." } + ], + "hidden": true + } + ] + }, + { + "domain": "Database", + "hidden": true, + "types": [ + { + "id": "DatabaseId", + "type": "string", + "description": "Unique identifier of Database object.", + "hidden": true + }, + { + "id": "Database", + "type": "object", + "description": "Database object.", + "hidden": true, + "properties": [ + { "name": "id", "$ref": "DatabaseId", "description": "Database ID." }, + { "name": "domain", "type": "string", "description": "Database domain." }, + { "name": "name", "type": "string", "description": "Database name." }, + { "name": "version", "type": "string", "description": "Database version." } + ] + }, + { + "id": "Error", + "type": "object", + "description": "Database error.", + "properties": [ + { "name": "message", "type": "string", "description": "Error message." }, + { "name": "code", "type": "integer", "description": "Error code." } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables database tracking, database events will now be delivered to the client." + }, + { + "name": "disable", + "description": "Disables database tracking, prevents database events from being sent to the client." + }, + { + "name": "getDatabaseTableNames", + "parameters": [ + { "name": "databaseId", "$ref": "DatabaseId" } + ], + "returns": [ + { "name": "tableNames", "type": "array", "items": { "type": "string" } } + ] + }, + { + "name": "executeSQL", + "async": true, + "parameters": [ + { "name": "databaseId", "$ref": "DatabaseId" }, + { "name": "query", "type": "string" } + ], + "returns": [ + { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } }, + { "name": "values", "type": "array", "optional": true, "items": { "type": "any" }}, + { "name": "sqlError", "$ref": "Error", "optional": true } + ] + } + ], + "events": [ + { + "name": "addDatabase", + "parameters": [ + { "name": "database", "$ref": "Database" } + ] + } + ] + }, + { + "domain": "IndexedDB", + "hidden": true, + "types": [ + { + "id": "DatabaseWithObjectStores", + "type": "object", + "description": "Database with an array of object stores.", + "properties": [ + { "name": "name", "type": "string", "description": "Database name." }, + { "name": "version", "type": "integer", "description": "Database version." }, + { "name": "objectStores", "type": "array", "items": { "$ref": "ObjectStore" }, "description": "Object stores in this database." } + ] + }, + { + "id": "ObjectStore", + "type": "object", + "description": "Object store.", + "properties": [ + { "name": "name", "type": "string", "description": "Object store name." }, + { "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." }, + { "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." }, + { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." } + ] + }, + { + "id": "ObjectStoreIndex", + "type": "object", + "description": "Object store index.", + "properties": [ + { "name": "name", "type": "string", "description": "Index name." }, + { "name": "keyPath", "$ref": "KeyPath", "description": "Index key path." }, + { "name": "unique", "type": "boolean", "description": "If true, index is unique." }, + { "name": "multiEntry", "type": "boolean", "description": "If true, index allows multiple entries for a key." } + ] + }, + { + "id": "Key", + "type": "object", + "description": "Key.", + "properties": [ + { "name": "type", "type": "string", "enum": ["number", "string", "date", "array"], "description": "Key type." }, + { "name": "number", "type": "number", "optional": true, "description": "Number value." }, + { "name": "string", "type": "string", "optional": true, "description": "String value." }, + { "name": "date", "type": "number", "optional": true, "description": "Date value." }, + { "name": "array", "type": "array", "optional": true, "items": { "$ref": "Key" }, "description": "Array value." } + ] + }, + { + "id": "KeyRange", + "type": "object", + "description": "Key range.", + "properties": [ + { "name": "lower", "$ref": "Key", "optional": true, "description": "Lower bound." }, + { "name": "upper", "$ref": "Key", "optional": true, "description": "Upper bound." }, + { "name": "lowerOpen", "type": "boolean", "description": "If true lower bound is open." }, + { "name": "upperOpen", "type": "boolean", "description": "If true upper bound is open." } + ] + }, + { + "id": "DataEntry", + "type": "object", + "description": "Data entry.", + "properties": [ + { "name": "key", "type": "string", "description": "JSON-stringified key object." }, + { "name": "primaryKey", "type": "string", "description": "JSON-stringified primary key object." }, + { "name": "value", "type": "string", "description": "JSON-stringified value object." } + ] + }, + { + "id": "KeyPath", + "type": "object", + "description": "Key path.", + "properties": [ + { "name": "type", "type": "string", "enum": ["null", "string", "array"], "description": "Key path type." }, + { "name": "string", "type": "string", "optional": true, "description": "String value." }, + { "name": "array", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Array value." } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables events from backend." + }, + { + "name": "disable", + "description": "Disables events from backend." + }, + { + "name": "requestDatabaseNames", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." } + ], + "returns": [ + { "name": "databaseNames", "type": "array", "items": { "type": "string" }, "description": "Database names for origin." } + ], + "description": "Requests database names for given security origin." + }, + { + "name": "requestDatabase", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." }, + { "name": "databaseName", "type": "string", "description": "Database name." } + ], + "returns": [ + { "name": "databaseWithObjectStores", "$ref": "DatabaseWithObjectStores", "description": "Database with an array of object stores." } + ], + "description": "Requests database with given name in given frame." + }, + { + "name": "requestData", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." }, + { "name": "databaseName", "type": "string", "description": "Database name." }, + { "name": "objectStoreName", "type": "string", "description": "Object store name." }, + { "name": "indexName", "type": "string", "description": "Index name, empty string for object store data requests." }, + { "name": "skipCount", "type": "integer", "description": "Number of records to skip." }, + { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." }, + { "name": "keyRange", "$ref": "KeyRange", "optional": true, "description": "Key range." } + ], + "returns": [ + { "name": "objectStoreDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." }, + { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." } + ], + "description": "Requests data from object store or index." + }, + { + "name": "clearObjectStore", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." }, + { "name": "databaseName", "type": "string", "description": "Database name." }, + { "name": "objectStoreName", "type": "string", "description": "Object store name." } + ], + "returns": [ + ], + "description": "Clears all entries from an object store." + } + ] + }, + { + "domain": "CacheStorage", + "hidden": true, + "types": [ + { + "id": "CacheId", + "type": "string", + "description": "Unique identifier of the Cache object." + }, + { + "id": "DataEntry", + "type": "object", + "description": "Data entry.", + "properties": [ + { "name": "request", "type": "string", "description": "Request url spec." }, + { "name": "response", "type": "string", "description": "Response stataus text." } + ] + }, + { + "id": "Cache", + "type": "object", + "description": "Cache identifier.", + "properties": [ + { "name": "cacheId", "$ref": "CacheId", "description": "An opaque unique id of the cache." }, + { "name": "securityOrigin", "type": "string", "description": "Security origin of the cache." }, + { "name": "cacheName", "type": "string", "description": "The name of the cache." } + ] + } + ], + "commands": [ + { + "name": "requestCacheNames", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." } + ], + "returns": [ + { "name": "caches", "type": "array", "items": { "$ref": "Cache" }, "description": "Caches for the security origin." } + ], + "description": "Requests cache names." + }, + { + "name": "requestEntries", + "async": true, + "parameters": [ + { "name": "cacheId", "$ref": "CacheId", "description": "ID of cache to get entries from." }, + { "name": "skipCount", "type": "integer", "description": "Number of records to skip." }, + { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." } + ], + "returns": [ + { "name": "cacheDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." }, + { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." } + ], + "description": "Requests data from cache." + }, + { + "name": "deleteCache", + "async": true, + "parameters": [ + { "name": "cacheId", "$ref": "CacheId", "description": "Id of cache for deletion." } + ], + "description": "Deletes a cache." + }, + { + "name": "deleteEntry", + "async": true, + "parameters": [ + { "name": "cacheId", "$ref": "CacheId", "description": "Id of cache where the entry will be deleted." }, + { "name": "request", "type": "string", "description": "URL spec of the request." } + ], + "description": "Deletes a cache entry." + } + ] + }, + { + "domain": "DOMStorage", + "hidden": true, + "description": "Query and modify DOM storage.", + "types": [ + { + "id": "StorageId", + "type": "object", + "description": "DOM Storage identifier.", + "hidden": true, + "properties": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin for the storage." }, + { "name": "isLocalStorage", "type": "boolean", "description": "Whether the storage is local storage (not session storage)." } + ] + }, + { + "id": "Item", + "type": "array", + "description": "DOM Storage item.", + "hidden": true, + "items": { "type": "string" } + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables storage tracking, storage events will now be delivered to the client." + }, + { + "name": "disable", + "description": "Disables storage tracking, prevents storage events from being sent to the client." + }, + { + "name": "getDOMStorageItems", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" } + ], + "returns": [ + { "name": "entries", "type": "array", "items": { "$ref": "Item" } } + ] + }, + { + "name": "setDOMStorageItem", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "name": "removeDOMStorageItem", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" } + ] + } + ], + "events": [ + { + "name": "domStorageItemsCleared", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" } + ] + }, + { + "name": "domStorageItemRemoved", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" } + ] + }, + { + "name": "domStorageItemAdded", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "newValue", "type": "string" } + ] + }, + { + "name": "domStorageItemUpdated", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "oldValue", "type": "string" }, + { "name": "newValue", "type": "string" } + ] + } + ] + }, + { + "domain": "ApplicationCache", + "hidden": true, + "types": [ + { + "id": "ApplicationCacheResource", + "type": "object", + "description": "Detailed application cache resource information.", + "properties": [ + { "name": "url", "type": "string", "description": "Resource url." }, + { "name": "size", "type": "integer", "description": "Resource size." }, + { "name": "type", "type": "string", "description": "Resource type." } + ] + }, + { + "id": "ApplicationCache", + "type": "object", + "description": "Detailed application cache information.", + "properties": [ + { "name": "manifestURL", "type": "string", "description": "Manifest URL." }, + { "name": "size", "type": "number", "description": "Application cache size." }, + { "name": "creationTime", "type": "number", "description": "Application cache creation time." }, + { "name": "updateTime", "type": "number", "description": "Application cache update time." }, + { "name": "resources", "type": "array", "items": { "$ref": "ApplicationCacheResource" }, "description": "Application cache resources." } + ] + }, + { + "id": "FrameWithManifest", + "type": "object", + "description": "Frame identifier - manifest URL pair.", + "properties": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier." }, + { "name": "manifestURL", "type": "string", "description": "Manifest URL." }, + { "name": "status", "type": "integer", "description": "Application cache status." } + ] + } + ], + "commands": [ + { + "name": "getFramesWithManifests", + "returns": [ + { "name": "frameIds", "type": "array", "items": { "$ref": "FrameWithManifest" }, "description": "Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache." } + ], + "description": "Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache." + }, + { + "name": "enable", + "description": "Enables application cache domain notifications." + }, + { + "name": "getManifestForFrame", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose manifest is retrieved." } + ], + "returns": [ + { "name": "manifestURL", "type": "string", "description": "Manifest URL for document in the given frame." } + ], + "description": "Returns manifest URL for document in the given frame." + }, + { + "name": "getApplicationCacheForFrame", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache is retrieved." } + ], + "returns": [ + { "name": "applicationCache", "$ref": "ApplicationCache", "description": "Relevant application cache data for the document in given frame." } + ], + "description": "Returns relevant application cache data for the document in given frame." + } + ], + "events": [ + { + "name": "applicationCacheStatusUpdated", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache updated status." }, + { "name": "manifestURL", "type": "string", "description": "Manifest URL." }, + { "name": "status", "type": "integer", "description": "Updated application cache status." } + ] + }, + { + "name": "networkStateUpdated", + "parameters": [ + { "name": "isNowOnline", "type": "boolean" } + ] + } + ] + }, + { + "domain": "DOM", + "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>", + "dependencies": ["Runtime"], + "types": [ + { + "id": "NodeId", + "type": "integer", + "description": "Unique DOM node identifier." + }, + { + "id": "BackendNodeId", + "type": "integer", + "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.", + "hidden": true + }, + { + "id": "BackendNode", + "type": "object", + "properties": [ + { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." }, + { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." }, + { "name": "backendNodeId", "$ref": "BackendNodeId" } + ], + "hidden": true, + "description": "Backend node with a friendly name." + }, + { + "id": "PseudoType", + "type": "string", + "enum": [ + "first-line", + "first-letter", + "before", + "after", + "backdrop", + "selection", + "first-line-inherited", + "scrollbar", + "scrollbar-thumb", + "scrollbar-button", + "scrollbar-track", + "scrollbar-track-piece", + "scrollbar-corner", + "resizer", + "input-list-button" + ], + "description": "Pseudo element type." + }, + { + "id": "ShadowRootType", + "type": "string", + "enum": ["user-agent", "open", "closed"], + "description": "Shadow root type." + }, + { + "id": "Node", + "type": "object", + "properties": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client." }, + { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." }, + { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." }, + { "name": "localName", "type": "string", "description": "<code>Node</code>'s localName." }, + { "name": "nodeValue", "type": "string", "description": "<code>Node</code>'s nodeValue." }, + { "name": "childNodeCount", "type": "integer", "optional": true, "description": "Child count for <code>Container</code> nodes." }, + { "name": "children", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Child nodes of this node when requested with children." }, + { "name": "attributes", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>." }, + { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that <code>Document</code> or <code>FrameOwner</code> node points to." }, + { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion.", "hidden": true }, + { "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId." }, + { "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId." }, + { "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset." }, + { "name": "xmlVersion", "type": "string", "optional": true, "description": "<code>Document</code>'s XML version in case of XML documents." }, + { "name": "name", "type": "string", "optional": true, "description": "<code>Attr</code>'s name." }, + { "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value." }, + { "name": "pseudoType", "$ref": "PseudoType", "optional": true, "description": "Pseudo element type for this node." }, + { "name": "shadowRootType", "$ref": "ShadowRootType", "optional": true, "description": "Shadow root type." }, + { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Frame ID for frame owner elements.", "hidden": true }, + { "name": "contentDocument", "$ref": "Node", "optional": true, "description": "Content document for frame owner elements." }, + { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host.", "hidden": true }, + { "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements.", "hidden": true }, + { "name": "pseudoElements", "type": "array", "items": { "$ref": "Node" }, "optional": true, "description": "Pseudo elements associated with this node.", "hidden": true }, + { "name": "importedDocument", "$ref": "Node", "optional": true, "description": "Import document for the HTMLImport links." }, + { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "optional": true, "description": "Distributed nodes for given insertion point.", "hidden": true } + ], + "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type." + }, + { + "id": "RGBA", + "type": "object", + "properties": [ + { "name": "r", "type": "integer", "description": "The red component, in the [0-255] range." }, + { "name": "g", "type": "integer", "description": "The green component, in the [0-255] range." }, + { "name": "b", "type": "integer", "description": "The blue component, in the [0-255] range." }, + { "name": "a", "type": "number", "optional": true, "description": "The alpha component, in the [0-1] range (default: 1)." } + ], + "description": "A structure holding an RGBA color." + }, + { + "id": "Quad", + "type": "array", + "items": { "type": "number" }, + "minItems": 8, + "maxItems": 8, + "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.", + "hidden": true + }, + { + "id": "BoxModel", + "type": "object", + "hidden": true, + "properties": [ + { "name": "content", "$ref": "Quad", "description": "Content box" }, + { "name": "padding", "$ref": "Quad", "description": "Padding box" }, + { "name": "border", "$ref": "Quad", "description": "Border box" }, + { "name": "margin", "$ref": "Quad", "description": "Margin box" }, + { "name": "width", "type": "integer", "description": "Node width" }, + { "name": "height", "type": "integer", "description": "Node height" }, + { "name": "shapeOutside", "$ref": "ShapeOutsideInfo", "optional": true, "description": "Shape outside coordinates" } + ], + "description": "Box model." + }, + { + "id": "ShapeOutsideInfo", + "type": "object", + "hidden": true, + "properties": [ + { "name": "bounds", "$ref": "Quad", "description": "Shape bounds" }, + { "name": "shape", "type": "array", "items": { "type": "any"}, "description": "Shape coordinate details" }, + { "name": "marginShape", "type": "array", "items": { "type": "any"}, "description": "Margin shape bounds" } + ], + "description": "CSS Shape Outside details." + }, + { + "id": "Rect", + "type": "object", + "hidden": true, + "properties": [ + { "name": "x", "type": "number", "description": "X coordinate" }, + { "name": "y", "type": "number", "description": "Y coordinate" }, + { "name": "width", "type": "number", "description": "Rectangle width" }, + { "name": "height", "type": "number", "description": "Rectangle height" } + ], + "description": "Rectangle." + }, + { + "id": "HighlightConfig", + "type": "object", + "properties": [ + { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." }, + { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." }, + { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." }, + { "name": "displayAsMaterial", "type": "boolean", "optional": true, "hidden": true}, + { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "paddingColor", "$ref": "RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." }, + { "name": "borderColor", "$ref": "RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." }, + { "name": "marginColor", "$ref": "RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." }, + { "name": "eventTargetColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The event target element highlight fill color (default: transparent)." }, + { "name": "shapeColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape outside fill color (default: transparent)." }, + { "name": "shapeMarginColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape margin fill color (default: transparent)." }, + { "name": "selectorList", "type": "string", "optional": true, "description": "Selectors to highlight relevant nodes."} + ], + "description": "Configuration data for the highlighting of page elements." + }, + { + "id": "InspectMode", + "type": "string", + "hidden": true, + "enum": [ + "searchForNode", + "searchForUAShadowDOM", + "showLayoutEditor", + "none" + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables DOM agent for the given page." + }, + { + "name": "disable", + "description": "Disables DOM agent for the given page." + }, + { + "name": "getDocument", + "returns": [ + { "name": "root", "$ref": "Node", "description": "Resulting node." } + ], + "description": "Returns the root DOM node to the caller." + }, + { + "name": "requestChildNodes", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get children for." }, + { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "hidden": true } + ], + "description": "Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth." + }, + { + "name": "querySelector", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." }, + { "name": "selector", "type": "string", "description": "Selector string." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Query selector result." } + ], + "description": "Executes <code>querySelector</code> on a given node." + }, + { + "name": "querySelectorAll", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." }, + { "name": "selector", "type": "string", "description": "Selector string." } + ], + "returns": [ + { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Query selector result." } + ], + "description": "Executes <code>querySelectorAll</code> on a given node." + }, + { + "name": "setNodeName", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set name for." }, + { "name": "name", "type": "string", "description": "New node's name." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "New node's id." } + ], + "description": "Sets node name for a node with given id." + }, + { + "name": "setNodeValue", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set value for." }, + { "name": "value", "type": "string", "description": "New node's value." } + ], + "description": "Sets node value for a node with given id." + }, + { + "name": "removeNode", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to remove." } + ], + "description": "Removes node with given id." + }, + { + "name": "setAttributeValue", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attribute for." }, + { "name": "name", "type": "string", "description": "Attribute name." }, + { "name": "value", "type": "string", "description": "Attribute value." } + ], + "description": "Sets attribute for an element with given id." + }, + { + "name": "setAttributesAsText", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attributes for." }, + { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." }, + { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." } + ], + "description": "Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs." + }, + { + "name": "removeAttribute", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to remove attribute from." }, + { "name": "name", "type": "string", "description": "Name of the attribute to remove." } + ], + "description": "Removes attribute with given name from an element with given id." + }, + { + "name": "getOuterHTML", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get markup for." } + ], + "returns": [ + { "name": "outerHTML", "type": "string", "description": "Outer HTML markup." } + ], + "description": "Returns node's HTML markup." + }, + { + "name": "setOuterHTML", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set markup for." }, + { "name": "outerHTML", "type": "string", "description": "Outer HTML markup to set." } + ], + "description": "Sets node HTML markup, returns new node id." + }, + { + "name": "performSearch", + "parameters": [ + { "name": "query", "type": "string", "description": "Plain text or query selector or XPath search query." }, + { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "True to search in user agent shadow DOM.", "hidden": true } + ], + "returns": [ + { "name": "searchId", "type": "string", "description": "Unique search session identifier." }, + { "name": "resultCount", "type": "integer", "description": "Number of search results." } + ], + "description": "Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.", + "hidden": true + }, + { + "name": "getSearchResults", + "parameters": [ + { "name": "searchId", "type": "string", "description": "Unique search session identifier." }, + { "name": "fromIndex", "type": "integer", "description": "Start index of the search result to be returned." }, + { "name": "toIndex", "type": "integer", "description": "End index of the search result to be returned." } + ], + "returns": [ + { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the search result nodes." } + ], + "description": "Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier.", + "hidden": true + }, + { + "name": "discardSearchResults", + "parameters": [ + { "name": "searchId", "type": "string", "description": "Unique search session identifier." } + ], + "description": "Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.", + "hidden": true + }, + { + "name": "requestNode", + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "JavaScript object id to convert into node." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Node id for given object." } + ], + "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications." + }, + { + "name": "setInspectMode", + "hidden": true, + "parameters": [ + { "name": "mode", "$ref": "InspectMode", "description": "Set an inspection mode." }, + { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." } + ], + "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection." + }, + { + "name": "highlightRect", + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate" }, + { "name": "y", "type": "integer", "description": "Y coordinate" }, + { "name": "width", "type": "integer", "description": "Rectangle width" }, + { "name": "height", "type": "integer", "description": "Rectangle height" }, + { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ], + "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport." + }, + { + "name": "highlightQuad", + "parameters": [ + { "name": "quad", "$ref": "Quad", "description": "Quad to highlight" }, + { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ], + "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.", + "hidden": true + }, + { + "name": "highlightNode", + "parameters": [ + { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." }, + { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Identifier of the node to highlight." }, + { "name": "backendNodeId", "$ref": "BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." }, + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "hidden": true } + ], + "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified." + }, + { + "name": "hideHighlight", + "description": "Hides DOM node highlight." + }, + { + "name": "highlightFrame", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." }, + { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "contentOutlineColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." } + ], + "description": "Highlights owner element of the frame with given id.", + "hidden": true + }, + { + "name": "pushNodeByPathToFrontend", + "parameters": [ + { "name": "path", "type": "string", "description": "Path to node in the proprietary format." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node for given path." } + ], + "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath", + "hidden": true + }, + { + "name": "pushNodesByBackendIdsToFrontend", + "parameters": [ + { "name": "backendNodeIds", "type": "array", "items": {"$ref": "BackendNodeId"}, "description": "The array of backend node ids." } + ], + "returns": [ + { "name": "nodeIds", "type": "array", "items": {"$ref": "NodeId"}, "description": "The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds." } + ], + "description": "Requests that a batch of nodes is sent to the caller given their backend node ids.", + "hidden": true + }, + { + "name": "setInspectedNode", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "DOM node id to be accessible by means of $x command line API." } + ], + "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).", + "hidden": true + }, + { + "name": "resolveNode", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to resolve." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } + ], + "returns": [ + { "name": "object", "$ref": "Runtime.RemoteObject", "description": "JavaScript object wrapper for given node." } + ], + "description": "Resolves JavaScript node object for given node id." + }, + { + "name": "getAttributes", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to retrieve attibutes for." } + ], + "returns": [ + { "name": "attributes", "type": "array", "items": { "type": "string" }, "description": "An interleaved array of node attribute names and values." } + ], + "description": "Returns attributes for the specified node." + }, + { + "name": "copyTo", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to copy." }, + { "name": "targetNodeId", "$ref": "NodeId", "description": "Id of the element to drop the copy into." }, + { "name": "insertBeforeNodeId", "$ref": "NodeId", "optional": true, "description": "Drop the copy before this node (if absent, the copy becomes the last child of <code>targetNodeId</code>)." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node clone." } + ], + "description": "Creates a deep copy of the specified node and places it into the target container before the given anchor.", + "hidden": true + }, + { + "name": "moveTo", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to move." }, + { "name": "targetNodeId", "$ref": "NodeId", "description": "Id of the element to drop the moved node into." }, + { "name": "insertBeforeNodeId", "$ref": "NodeId", "optional": true, "description": "Drop node before this one (if absent, the moved node becomes the last child of <code>targetNodeId</code>)." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "New id of the moved node." } + ], + "description": "Moves node into the new container, places it before the given anchor." + }, + { + "name": "undo", + "description": "Undoes the last performed action.", + "hidden": true + }, + { + "name": "redo", + "description": "Re-does the last undone action.", + "hidden": true + }, + { + "name": "markUndoableState", + "description": "Marks last undoable state.", + "hidden": true + }, + { + "name": "focus", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to focus." } + ], + "description": "Focuses the given element.", + "hidden": true + }, + { + "name": "setFileInputFiles", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the file input node to set files for." }, + { "name": "files", "type": "array", "items": { "type": "string" }, "description": "Array of file paths to set." } + ], + "description": "Sets files for the given file input element.", + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "getBoxModel", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get box model for." } + ], + "returns": [ + { "name": "model", "$ref": "BoxModel", "description": "Box model for the node." } + ], + "description": "Returns boxes for the currently selected nodes.", + "hidden": true + }, + { + "name": "getNodeForLocation", + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate." }, + { "name": "y", "type": "integer", "description": "Y coordinate." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node at given coordinates." } + ], + "description": "Returns node id at given location.", + "hidden": true + }, + { + "name": "getRelayoutBoundary", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Relayout boundary node id for the given node." } + ], + "description": "Returns the id of the nearest ancestor that is a relayout boundary.", + "hidden": true + }, + { + "name": "getHighlightObjectForTest", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get highlight object for." } + ], + "returns": [ + { "name": "highlight", "type": "object", "description": "Highlight data for the node." } + ], + "description": "For testing.", + "hidden": true + } + ], + "events": [ + { + "name": "documentUpdated", + "description": "Fired when <code>Document</code> has been totally updated. Node ids are no longer valid." + }, + { + "name": "inspectNodeRequested", + "parameters": [ + { "name": "backendNodeId", "$ref": "BackendNodeId", "description": "Id of the node to inspect." } + ], + "description": "Fired when the node should be inspected. This happens after call to <code>setInspectMode</code>.", + "hidden" : true + }, + { + "name": "setChildNodes", + "parameters": [ + { "name": "parentId", "$ref": "NodeId", "description": "Parent node id to populate with children." }, + { "name": "nodes", "type": "array", "items": { "$ref": "Node" }, "description": "Child nodes array." } + ], + "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids." + }, + { + "name": "attributeModified", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "name", "type": "string", "description": "Attribute name." }, + { "name": "value", "type": "string", "description": "Attribute value." } + ], + "description": "Fired when <code>Element</code>'s attribute is modified." + }, + { + "name": "attributeRemoved", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "name", "type": "string", "description": "A ttribute name." } + ], + "description": "Fired when <code>Element</code>'s attribute is removed." + }, + { + "name": "inlineStyleInvalidated", + "parameters": [ + { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the nodes for which the inline styles have been invalidated." } + ], + "description": "Fired when <code>Element</code>'s inline style is modified via a CSS property modification.", + "hidden": true + }, + { + "name": "characterDataModified", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "characterData", "type": "string", "description": "New text value." } + ], + "description": "Mirrors <code>DOMCharacterDataModified</code> event." + }, + { + "name": "childNodeCountUpdated", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "childNodeCount", "type": "integer", "description": "New node count." } + ], + "description": "Fired when <code>Container</code>'s child node count has changed." + }, + { + "name": "childNodeInserted", + "parameters": [ + { "name": "parentNodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "previousNodeId", "$ref": "NodeId", "description": "If of the previous siblint." }, + { "name": "node", "$ref": "Node", "description": "Inserted node data." } + ], + "description": "Mirrors <code>DOMNodeInserted</code> event." + }, + { + "name": "childNodeRemoved", + "parameters": [ + { "name": "parentNodeId", "$ref": "NodeId", "description": "Parent id." }, + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has been removed." } + ], + "description": "Mirrors <code>DOMNodeRemoved</code> event." + }, + { + "name": "shadowRootPushed", + "parameters": [ + { "name": "hostId", "$ref": "NodeId", "description": "Host element id." }, + { "name": "root", "$ref": "Node", "description": "Shadow root." } + ], + "description": "Called when shadow root is pushed into the element.", + "hidden": true + }, + { + "name": "shadowRootPopped", + "parameters": [ + { "name": "hostId", "$ref": "NodeId", "description": "Host element id." }, + { "name": "rootId", "$ref": "NodeId", "description": "Shadow root id." } + ], + "description": "Called when shadow root is popped from the element.", + "hidden": true + }, + { + "name": "pseudoElementAdded", + "parameters": [ + { "name": "parentId", "$ref": "NodeId", "description": "Pseudo element's parent element id." }, + { "name": "pseudoElement", "$ref": "Node", "description": "The added pseudo element." } + ], + "description": "Called when a pseudo element is added to an element.", + "hidden": true + }, + { + "name": "pseudoElementRemoved", + "parameters": [ + { "name": "parentId", "$ref": "NodeId", "description": "Pseudo element's parent element id." }, + { "name": "pseudoElementId", "$ref": "NodeId", "description": "The removed pseudo element id." } + ], + "description": "Called when a pseudo element is removed from an element.", + "hidden": true + }, + { + "name": "distributedNodesUpdated", + "parameters": [ + { "name": "insertionPointId", "$ref": "NodeId", "description": "Insertion point where distrubuted nodes were updated." }, + { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "description": "Distributed nodes for given insertion point." } + ], + "description": "Called when distrubution is changed.", + "hidden": true + }, + { + "name": "nodeHighlightRequested", + "parameters": [ + {"name": "nodeId", "$ref": "NodeId"} + ], + "hidden": true + } + ] + }, + { + "domain": "CSS", + "hidden": true, + "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated <code>id</code> used in subsequent operations on the related object. Each object type has a specific <code>id</code> structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the <code>get*ForNode()</code> calls (which accept a DOM node id). A client can also discover all the existing stylesheets with the <code>getAllStyleSheets()</code> method (or keeping track of the <code>styleSheetAdded</code>/<code>styleSheetRemoved</code> events) and subsequently load the required stylesheet contents using the <code>getStyleSheet[Text]()</code> methods.", + "dependencies": ["DOM"], + "types": [ + { + "id": "StyleSheetId", + "type": "string" + }, + { + "id": "StyleSheetOrigin", + "type": "string", + "enum": ["injected", "user-agent", "inspector", "regular"], + "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets." + }, + { + "id": "PseudoElementMatches", + "type": "object", + "properties": [ + { "name": "pseudoType", "$ref": "DOM.PseudoType", "description": "Pseudo element type."}, + { "name": "matches", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules applicable to the pseudo style."} + ], + "description": "CSS rule collection for a single pseudo style." + }, + { + "id": "InheritedStyleEntry", + "type": "object", + "properties": [ + { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain." }, + { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain." } + ], + "description": "Inherited CSS rule collection from ancestor node." + }, + { + "id": "RuleMatch", + "type": "object", + "properties": [ + { "name": "rule", "$ref": "CSSRule", "description": "CSS rule in the match." }, + { "name": "matchingSelectors", "type": "array", "items": { "type": "integer" }, "description": "Matching selector indices in the rule's selectorList selectors (0-based)." } + ], + "description": "Match data for a CSS rule." + }, + { + "id": "Value", + "type": "object", + "properties": [ + { "name": "text", "type": "string", "description": "Value text." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Value range in the underlying resource (if available)." } + ], + "description": "Data for a simple selector (these are delimited by commas in a selector list)." + }, + { + "id": "SelectorList", + "type": "object", + "properties": [ + { "name": "selectors", "type": "array", "items": { "$ref": "Value" }, "description": "Selectors in the list." }, + { "name": "text", "type": "string", "description": "Rule selector text." } + ], + "description": "Selector list data." + }, + { + "id": "CSSStyleSheetHeader", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."}, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Owner frame identifier."}, + { "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."}, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with the stylesheet (if any)." }, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Stylesheet origin."}, + { "name": "title", "type": "string", "description": "Stylesheet title."}, + { "name": "ownerNode", "$ref": "DOM.BackendNodeId", "optional": true, "description": "The backend id for the owner node of the stylesheet." }, + { "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."}, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment." }, + { "name": "isInline", "type": "boolean", "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags." }, + { "name": "startLine", "type": "number", "description": "Line offset of the stylesheet within the resource (zero based)." }, + { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." } + ], + "description": "CSS stylesheet metainformation." + }, + { + "id": "CSSRule", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, + { "name": "selectorList", "$ref": "SelectorList", "description": "Rule selector data." }, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."}, + { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." }, + { "name": "media", "type": "array", "items": { "$ref": "CSSMedia" }, "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards." } + ], + "description": "CSS rule representation." + }, + { + "id": "SourceRange", + "type": "object", + "properties": [ + { "name": "startLine", "type": "integer", "description": "Start line of range." }, + { "name": "startColumn", "type": "integer", "description": "Start column of range (inclusive)." }, + { "name": "endLine", "type": "integer", "description": "End line of range" }, + { "name": "endColumn", "type": "integer", "description": "End column of range (exclusive)." } + ], + "description": "Text range within a resource. All numbers are zero-based." + }, + { + "id": "ShorthandEntry", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "Shorthand name." }, + { "name": "value", "type": "string", "description": "Shorthand value." }, + { "name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \"!important\" annotation (implies <code>false</code> if absent)." } + ] + }, + { + "id": "CSSComputedStyleProperty", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "Computed style property name." }, + { "name": "value", "type": "string", "description": "Computed style property value." } + ] + }, + { + "id": "CSSStyle", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, + { "name": "cssProperties", "type": "array", "items": { "$ref": "CSSProperty" }, "description": "CSS properties in the style." }, + { "name": "shorthandEntries", "type": "array", "items": { "$ref": "ShorthandEntry" }, "description": "Computed values for all shorthands found in the style." }, + { "name": "cssText", "type": "string", "optional": true, "description": "Style declaration text (if available)." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Style declaration range in the enclosing stylesheet (if available)." } + ], + "description": "CSS style representation." + }, + { + "id": "CSSProperty", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "The property name." }, + { "name": "value", "type": "string", "description": "The property value." }, + { "name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \"!important\" annotation (implies <code>false</code> if absent)." }, + { "name": "implicit", "type": "boolean", "optional": true, "description": "Whether the property is implicit (implies <code>false</code> if absent)." }, + { "name": "text", "type": "string", "optional": true, "description": "The full property text as specified in the style." }, + { "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies <code>true</code> if absent)." }, + { "name": "disabled", "type": "boolean", "optional": true, "description": "Whether the property is disabled by the user (present for source-based properties only)." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The entire property range in the enclosing style declaration (if available)." } + ], + "description": "CSS property declaration data." + }, + { + "id": "CSSMedia", + "type": "object", + "properties": [ + { "name": "text", "type": "string", "description": "Media query text." }, + { "name": "source", "type": "string", "enum": ["mediaRule", "importRule", "linkedSheet", "inlineSheet"], "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if specified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked stylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline stylesheet's STYLE tag." }, + { "name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available)." }, + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists)." }, + { "name": "mediaList", "type": "array", "items": { "$ref": "MediaQuery" }, "optional": true, "hidden": true, "description": "Array of media queries." } + ], + "description": "CSS media rule descriptor." + }, + { + "id": "MediaQuery", + "type": "object", + "properties": [ + { "name": "expressions", "type": "array", "items": { "$ref": "MediaQueryExpression" }, "description": "Array of media query expressions." }, + { "name": "active", "type": "boolean", "description": "Whether the media query condition is satisfied." } + ], + "description": "Media query descriptor.", + "hidden": true + }, + { + "id": "MediaQueryExpression", + "type": "object", + "properties": [ + { "name": "value", "type": "number", "description": "Media query expression value."}, + { "name": "unit", "type": "string", "description": "Media query expression units."}, + { "name": "feature", "type": "string", "description": "Media query expression feature."}, + { "name": "valueRange", "$ref": "SourceRange", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available)." }, + { "name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable)."} + ], + "description": "Media query expression descriptor.", + "hidden": true + }, + { + "id": "PlatformFontUsage", + "type": "object", + "properties": [ + { "name": "familyName", "type": "string", "description": "Font's family name reported by platform."}, + { "name": "isCustomFont", "type": "boolean", "description": "Indicates if the font was downloaded or resolved locally."}, + { "name": "glyphCount", "type": "number", "description": "Amount of glyphs that were rendered with this font."} + ], + "description": "Information about amount of glyphs that were rendered with given font.", + "hidden": true + }, + { + "id": "CSSKeyframesRule", + "type": "object", + "properties": [ + { "name": "animationName", "$ref": "Value", "description": "Animation name." }, + { "name": "keyframes", "type": "array", "items": { "$ref": "CSSKeyframeRule" }, "description": "List of keyframes." } + ], + "description": "CSS keyframes rule representation." + }, + { + "id": "CSSKeyframeRule", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."}, + { "name": "keyText", "$ref": "Value", "description": "Associated key text." }, + { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." } + ], + "description": "CSS keyframe rule representation." + }, + { + "id": "StyleDeclarationEdit", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier." }, + { "name": "range", "$ref": "SourceRange", "description": "The range of the style text in the enclosing stylesheet." }, + { "name": "text", "type": "string", "description": "New style text."} + ], + "description": "A descriptor of operation to mutate style declaration text." + } + ], + "commands": [ + { + "name": "enable", + "async": true, + "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received." + }, + { + "name": "disable", + "description": "Disables the CSS agent for the given page." + }, + { + "name": "getMatchedStylesForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ], + "returns": [ + { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." }, + { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."}, + { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "optional": true, "description": "CSS rules matching this node, from all applicable stylesheets." }, + { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoElementMatches" }, "optional": true, "description": "Pseudo style matches for this node." }, + { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "optional": true, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." }, + { "name": "cssKeyframesRules", "type": "array", "items": { "$ref": "CSSKeyframesRule" }, "optional": true, "description": "A list of CSS keyframed animations matching this node." } + ], + "description": "Returns requested styles for a DOM node identified by <code>nodeId</code>." + }, + { + "name": "getInlineStylesForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ], + "returns": [ + { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." }, + { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."} + ], + "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>." + }, + { + "name": "getComputedStyleForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ], + "returns": [ + { "name": "computedStyle", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" }, "description": "Computed style for the specified DOM node." } + ], + "description": "Returns the computed style for a DOM node identified by <code>nodeId</code>." + }, + { + "name": "getPlatformFontsForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ], + "returns": [ + { "name": "fonts", "type": "array", "items": { "$ref": "PlatformFontUsage" }, "description": "Usage statistics for every employed platform font." } + ], + "description": "Requests information about platform fonts which we used to render child TextNodes in the given node.", + "hidden": true + }, + { + "name": "getStyleSheetText", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" } + ], + "returns": [ + { "name": "text", "type": "string", "description": "The stylesheet text." } + ], + "description": "Returns the current textual content and the URL for a stylesheet." + }, + { + "name": "setStyleSheetText", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." } + ], + "description": "Sets the new stylesheet text." + }, + { + "name": "setRuleSelector", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "selector", "type": "string" } + ], + "returns": [ + { "name": "selectorList", "$ref": "SelectorList", "description": "The resulting selector list after modification." } + ], + "description": "Modifies the rule selector." + }, + { + "name": "setKeyframeKey", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "keyText", "type": "string" } + ], + "returns": [ + { "name": "keyText", "$ref": "Value", "description": "The resulting key text after modification." } + ], + "description": "Modifies the keyframe rule key text." + }, + { + "name": "setStyleTexts", + "parameters": [ + { "name": "edits", "type": "array", "items": { "$ref": "StyleDeclarationEdit" }} + ], + "returns": [ + { "name": "styles", "type": "array", "items": { "$ref": "CSSStyle" }, "description": "The resulting styles after modification." } + ], + "description": "Applies specified style edits one after another in the given order." + }, + { + "name": "setMediaText", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { "name": "media", "$ref": "CSSMedia", "description": "The resulting CSS media rule after modification." } + ], + "description": "Modifies the rule selector." + }, + { + "name": "createStyleSheet", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame where \"via-inspector\" stylesheet should be created."} + ], + "returns": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the created \"via-inspector\" stylesheet." } + ], + "description": "Creates a new special \"via-inspector\" stylesheet in the frame with given <code>frameId</code>." + }, + { + "name": "addRule", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier where a new rule should be inserted." }, + { "name": "ruleText", "type": "string", "description": "The text of a new rule." }, + { "name": "location", "$ref": "SourceRange", "description": "Text position of a new rule in the target style sheet." } + ], + "returns": [ + { "name": "rule", "$ref": "CSSRule", "description": "The newly created rule." } + ], + "description": "Inserts a new rule with the given <code>ruleText</code> in a stylesheet with given <code>styleSheetId</code>, at the position specified by <code>location</code>." + }, + { + "name": "forcePseudoState", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." }, + { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." } + ], + "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser." + }, + { + "name": "getMediaQueries", + "returns": [ + { "name": "medias", "type": "array", "items": { "$ref": "CSSMedia" } } + ], + "description": "Returns all media queries parsed by the rendering engine.", + "hidden": true + }, + { + "name": "setEffectivePropertyValueForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to set property." }, + { "name": "propertyName", "type": "string"}, + { "name": "value", "type": "string"} + ], + "description": "Find a rule with the given active property for the given node and set the new value for this property", + "hidden": true + }, + { + "name": "getBackgroundColors", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get background colors for." } + ], + "returns": [ + { "name": "backgroundColors", "type": "array", "items": { "type": "string" }, "description": "The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).", "optional": true } + ], + "hidden": true + } + ], + "events": [ + { + "name": "mediaQueryResultChanged", + "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features." + }, + { + "name": "styleSheetChanged", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" } + ], + "description": "Fired whenever a stylesheet is changed as a result of the client operation." + }, + { + "name": "styleSheetAdded", + "parameters": [ + { "name": "header", "$ref": "CSSStyleSheetHeader", "description": "Added stylesheet metainfo." } + ], + "description": "Fired whenever an active document stylesheet is added." + }, + { + "name": "styleSheetRemoved", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the removed stylesheet." } + ], + "description": "Fired whenever an active document stylesheet is removed." + }, + { + "name": "layoutEditorChange", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the stylesheet where the modification occurred." }, + { "name": "changeRange", "$ref": "SourceRange", "description": "Range where the modification occurred." } + ] + } + ] + }, + { + "domain": "IO", + "description": "Input/Output operations for streams produced by DevTools.", + "hidden": true, + "types": [ + { + "id": "StreamHandle", + "type": "string" + } + ], + "commands": [ + { + "name": "read", + "description": "Read a chunk of the stream", + "async": true, + "parameters": [ + { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to read." }, + { "name": "offset", "type": "integer", "optional": true, "description": "Seek to the specified offset before reading (if not specificed, proceed with offset following the last read)." }, + { "name": "size", "type": "integer", "optional": true, "description": "Maximum number of bytes to read (left upon the agent discretion if not specified)." } + ], + "returns": [ + { "name": "data", "type": "string", "description": "Data that were read." }, + { "name": "eof", "type": "boolean", "description": "Set if the end-of-file condition occured while reading." } + ], + "handlers": ["browser"] + }, + { + "name": "close", + "description": "Close the stream, discard any temporary backing storage.", + "parameters": [ + { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to close." } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "DOMDebugger", + "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.", + "dependencies": ["DOM", "Debugger"], + "types": [ + { + "id": "DOMBreakpointType", + "type": "string", + "enum": ["subtree-modified", "attribute-modified", "node-removed"], + "description": "DOM breakpoint type." + }, + { + "id": "EventListener", + "type": "object", + "description": "Object event listener.", + "properties": [ + { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." }, + { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." }, + { "name": "passive", "type": "boolean", "description": "<code>EventListener</code>'s passive flag." }, + { "name": "location", "$ref": "Debugger.Location", "description": "Handler code location." }, + { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." }, + { "name": "originalHandler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event original handler function value." }, + { "name": "removeFunction", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event listener remove function." } + ], + "hidden": true + } + ], + "commands": [ + { + "name": "setDOMBreakpoint", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to set breakpoint on." }, + { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the operation to stop upon." } + ], + "description": "Sets breakpoint on particular operation with DOM." + }, + { + "name": "removeDOMBreakpoint", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to remove breakpoint from." }, + { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the breakpoint to remove." } + ], + "description": "Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>." + }, + { + "name": "setEventListenerBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "DOM Event name to stop on (any DOM event will do)." }, + { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name to stop on. If equal to <code>\"*\"</code> or not provided, will stop on any EventTarget.", "hidden": true } + ], + "description": "Sets breakpoint on particular DOM event." + }, + { + "name": "removeEventListenerBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "Event name." }, + { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name.", "hidden": true } + ], + "description": "Removes breakpoint on particular DOM event." + }, + { + "name": "setInstrumentationBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." } + ], + "description": "Sets breakpoint on particular native event.", + "hidden": true + }, + { + "name": "removeInstrumentationBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." } + ], + "description": "Removes breakpoint on particular native event.", + "hidden": true + }, + { + "name": "setXHRBreakpoint", + "parameters": [ + { "name": "url", "type": "string", "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon." } + ], + "description": "Sets breakpoint on XMLHttpRequest." + }, + { + "name": "removeXHRBreakpoint", + "parameters": [ + { "name": "url", "type": "string", "description": "Resource URL substring." } + ], + "description": "Removes breakpoint from XMLHttpRequest." + }, + { + "name": "getEventListeners", + "hidden": true, + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to return listeners for." } + ], + "returns": [ + { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." } + ], + "description": "Returns event listeners of the given object." + } + ] + }, + { + "domain": "Worker", + "hidden": true, + "types": [], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "sendMessageToWorker", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ] + }, + { + "name": "setWaitForDebuggerOnStart", + "parameters": [ + { "name": "value", "type": "boolean" } + ] + } + ], + "events": [ + { + "name": "workerCreated", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "url", "type": "string" }, + { "name": "waitingForDebugger", "type": "boolean" } + ] + }, + { + "name": "workerTerminated", + "parameters": [ + { "name": "workerId", "type": "string" } + ] + }, + { + "name": "dispatchMessageFromWorker", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ] + } + ] + }, + { + "domain": "ServiceWorker", + "hidden": true, + "types": [ + { + "id": "ServiceWorkerRegistration", + "type": "object", + "description": "ServiceWorker registration.", + "properties": [ + { "name": "registrationId", "type": "string" }, + { "name": "scopeURL", "type": "string" }, + { "name": "isDeleted", "type": "boolean" } + ] + }, + { + "id": "ServiceWorkerVersionRunningStatus", + "type": "string", + "enum": ["stopped", "starting", "running", "stopping"] + }, + { + "id": "ServiceWorkerVersionStatus", + "type": "string", + "enum": ["new", "installing", "installed", "activating", "activated", "redundant"] + }, + { + "id": "TargetID", + "type": "string" + }, + { + "id": "ServiceWorkerVersion", + "type": "object", + "description": "ServiceWorker version.", + "properties": [ + { "name": "versionId", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "scriptURL", "type": "string" }, + { "name": "runningStatus", "$ref": "ServiceWorkerVersionRunningStatus" }, + { "name": "status", "$ref": "ServiceWorkerVersionStatus" }, + { "name": "scriptLastModified", "type": "number", "optional": true, "description": "The Last-Modified header value of the main script." }, + { "name": "scriptResponseTime", "type": "number", "optional": true, "description": "The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated." }, + { "name": "controlledClients", "type": "array", "optional": true, "items": { "$ref": "TargetID" } } + ] + }, + { + "id": "ServiceWorkerErrorMessage", + "type": "object", + "description": "ServiceWorker error message.", + "properties": [ + { "name": "errorMessage", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "versionId", "type": "string" }, + { "name": "sourceURL", "type": "string" }, + { "name": "lineNumber", "type": "integer" }, + { "name": "columnNumber", "type": "integer" } + ] + }, + { + "id": "TargetInfo", + "type": "object", + "properties": [ + { "name": "id", "$ref": "TargetID" }, + { "name": "type", "type": "string" }, + { "name": "title", "type": "string" }, + { "name": "url", "type": "string" } + ] + } + ], + "commands": [ + { + "name": "enable", + "handlers": ["browser"] + }, + { + "name": "disable", + "handlers": ["browser"] + }, + { + "name": "sendMessage", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "stop", + "parameters": [ + { "name": "workerId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "unregister", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "updateRegistration", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "startWorker", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "skipWaiting", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "stopWorker", + "parameters": [ + { "name": "versionId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "inspectWorker", + "parameters": [ + { "name": "versionId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "setForceUpdateOnPageLoad", + "parameters": [ + { "name": "forceUpdateOnPageLoad", "type": "boolean" } + ], + "handlers": ["browser"] + }, + { + "name": "deliverPushMessage", + "parameters": [ + { "name": "origin", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "data", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "dispatchSyncEvent", + "parameters": [ + { "name": "origin", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "tag", "type": "string" }, + { "name": "lastChance", "type": "boolean" } + ], + "handlers": ["browser"] + }, + { + "name": "getTargetInfo", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" } + ], + "returns": [ + { "name": "targetInfo","$ref": "TargetInfo" } + ], + "handlers": ["browser"] + }, + { + "name": "activateTarget", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "workerCreated", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "url", "type": "string" }, + { "name": "versionId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "workerTerminated", + "parameters": [ + { "name": "workerId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "dispatchMessage", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "workerRegistrationUpdated", + "parameters": [ + { "name": "registrations", "type": "array", "items": { "$ref": "ServiceWorkerRegistration" } } + ], + "handlers": ["browser"] + }, + { + "name": "workerVersionUpdated", + "parameters": [ + { "name": "versions", "type": "array", "items": { "$ref": "ServiceWorkerVersion" } } + ], + "handlers": ["browser"] + }, + { + "name": "workerErrorReported", + "parameters": [ + { "name": "errorMessage", "$ref": "ServiceWorkerErrorMessage" } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "Input", + "types": [ + { + "id": "TouchPoint", + "type": "object", + "hidden": true, + "properties": [ + { "name": "state", "type": "string", "enum": ["touchPressed", "touchReleased", "touchMoved", "touchStationary", "touchCancelled"], "description": "State of the touch point." }, + { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."}, + { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."}, + { "name": "radiusX", "type": "integer", "optional": true, "description": "X radius of the touch area (default: 1)."}, + { "name": "radiusY", "type": "integer", "optional": true, "description": "Y radius of the touch area (default: 1)."}, + { "name": "rotationAngle", "type": "number", "optional": true, "description": "Rotation angle (default: 0.0)."}, + { "name": "force", "type": "number", "optional": true, "description": "Force (default: 1.0)."}, + { "name": "id", "type": "number", "optional": true, "description": "Identifier used to track touch sources between events, must be unique within an event."} + ] + }, + { + "id": "GestureSourceType", + "type": "string", + "hidden": true, + "enum": ["default", "touch", "mouse"] + } + ], + "commands": [ + { + "name": "dispatchKeyEvent", + "parameters": [ + { "name": "type", "type": "string", "enum": ["keyDown", "keyUp", "rawKeyDown", "char"], "description": "Type of the key event." }, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." }, + { "name": "text", "type": "string", "optional": true, "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: \"\")" }, + { "name": "unmodifiedText", "type": "string", "optional": true, "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \"\")." }, + { "name": "keyIdentifier", "type": "string", "optional": true, "description": "Unique key identifier (e.g., 'U+0041') (default: \"\")." }, + { "name": "code", "type": "string", "optional": true, "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\")." }, + { "name": "key", "type": "string", "optional": true, "description": "Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: \"\")." }, + { "name": "windowsVirtualKeyCode", "type": "integer", "optional": true, "description": "Windows virtual key code (default: 0)." }, + { "name": "nativeVirtualKeyCode", "type": "integer", "optional": true, "description": "Native virtual key code (default: 0)." }, + { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false)." }, + { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false)." }, + { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false)." } + ], + "description": "Dispatches a key event to the page.", + "handlers": ["browser"] + }, + { + "name": "dispatchMouseEvent", + "parameters": [ + { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved"], "description": "Type of the mouse event." }, + { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."}, + { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."}, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." }, + { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." }, + { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." } + ], + "description": "Dispatches a mouse event to the page.", + "handlers": ["browser"] + }, + { + "name": "dispatchTouchEvent", + "hidden": true, + "parameters": [ + { "name": "type", "type": "string", "enum": ["touchStart", "touchEnd", "touchMove"], "description": "Type of the touch event." }, + { "name": "touchPoints", "type": "array", "items": { "$ref": "TouchPoint" }, "description": "Touch points." }, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." } + ], + "description": "Dispatches a touch event to the page." + }, + { + "name": "emulateTouchFromMouseEvent", + "hidden": true, + "parameters": [ + { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"], "description": "Type of the mouse event." }, + { "name": "x", "type": "integer", "description": "X coordinate of the mouse pointer in DIP."}, + { "name": "y", "type": "integer", "description": "Y coordinate of the mouse pointer in DIP."}, + { "name": "timestamp", "type": "number", "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970." }, + { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "description": "Mouse button." }, + { "name": "deltaX", "type": "number", "optional": true, "description": "X delta in DIP for mouse wheel event (default: 0)."}, + { "name": "deltaY", "type": "number", "optional": true, "description": "Y delta in DIP for mouse wheel event (default: 0)."}, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." } + ], + "description": "Emulates touch event from the mouse event parameters.", + "handlers": ["browser"] + }, + { + "name": "synthesizePinchGesture", + "async": true, + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, + { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, + { "name": "scaleFactor", "type": "number", "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out)." }, + { "name": "relativeSpeed", "type": "integer", "optional": true, "description": "Relative pointer speed in pixels per second (default: 800)." }, + { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } + ], + "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "synthesizeScrollGesture", + "async": true, + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, + { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, + { "name": "xDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the X axis (positive to scroll left)." }, + { "name": "yDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the Y axis (positive to scroll up)." }, + { "name": "xOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the X axis, in addition to the given distance." }, + { "name": "yOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given distance." }, + { "name": "preventFling", "type": "boolean", "optional": true, "description": "Prevent fling (default: true)." }, + { "name": "speed", "type": "integer", "optional": true, "description": "Swipe speed in pixels per second (default: 800)." }, + { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." }, + { "name": "repeatCount", "type": "integer", "optional": true, "description": "The number of times to repeat the gesture (default: 0)." }, + { "name": "repeatDelayMs", "type": "integer", "optional": true, "description": "The number of milliseconds delay between each repeat. (default: 250)." }, + { "name": "interactionMarkerName", "type": "string", "optional": true, "description": "The name of the interaction markers to generate, if not empty (default: \"\")." } + ], + "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "synthesizeTapGesture", + "async": true, + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, + { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, + { "name": "duration", "type": "integer", "optional": true, "description": "Duration between touchdown and touchup events in ms (default: 50)." }, + { "name": "tapCount", "type": "integer", "optional": true, "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1)." }, + { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } + ], + "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.", + "hidden": true, + "handlers": ["browser"] + } + ], + "events": [] + }, + { + "domain": "LayerTree", + "hidden": true, + "dependencies": ["DOM"], + "types": [ + { + "id": "LayerId", + "type": "string", + "description": "Unique Layer identifier." + }, + { + "id": "SnapshotId", + "type": "string", + "description": "Unique snapshot identifier." + }, + { + "id": "ScrollRect", + "type": "object", + "description": "Rectangle where scrolling happens on the main thread.", + "properties": [ + { "name": "rect", "$ref": "DOM.Rect", "description": "Rectangle itself." }, + { "name": "type", "type": "string", "enum": ["RepaintsOnScroll", "TouchEventHandler", "WheelEventHandler"], "description": "Reason for rectangle to force scrolling on the main thread" } + ] + }, + { + "id": "PictureTile", + "type": "object", + "description": "Serialized fragment of layer picture along with its offset within the layer.", + "properties": [ + { "name": "x", "type": "number", "description": "Offset from owning layer left boundary" }, + { "name": "y", "type": "number", "description": "Offset from owning layer top boundary" }, + { "name": "picture", "type": "string", "description": "Base64-encoded snapshot data." } + ] + }, + { + "id": "Layer", + "type": "object", + "description": "Information about a compositing layer.", + "properties": [ + { "name": "layerId", "$ref": "LayerId", "description": "The unique id for this layer." }, + { "name": "parentLayerId", "$ref": "LayerId", "optional": true, "description": "The id of parent (not present for root)." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "The backend id for the node associated with this layer." }, + { "name": "offsetX", "type": "number", "description": "Offset from parent layer, X coordinate." }, + { "name": "offsetY", "type": "number", "description": "Offset from parent layer, Y coordinate." }, + { "name": "width", "type": "number", "description": "Layer width." }, + { "name": "height", "type": "number", "description": "Layer height." }, + { "name": "transform", "type": "array", "items": { "type": "number" }, "minItems": 16, "maxItems": 16, "optional": true, "description": "Transformation matrix for layer, default is identity matrix" }, + { "name": "anchorX", "type": "number", "optional": true, "description": "Transform anchor point X, absent if no transform specified" }, + { "name": "anchorY", "type": "number", "optional": true, "description": "Transform anchor point Y, absent if no transform specified" }, + { "name": "anchorZ", "type": "number", "optional": true, "description": "Transform anchor point Z, absent if no transform specified" }, + { "name": "paintCount", "type": "integer", "description": "Indicates how many time this layer has painted." }, + { "name": "drawsContent", "type": "boolean", "description": "Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only." }, + { "name": "invisible", "type": "boolean", "optional": true, "description": "Set if layer is not visible." }, + { "name": "scrollRects", "type": "array", "items": { "$ref": "ScrollRect"}, "optional": true, "description": "Rectangles scrolling on main thread only."} + ] + }, + { + "id": "PaintProfile", + "type": "array", + "description": "Array of timings, one per paint step.", + "items": { + "type": "number", + "description": "A time in seconds since the end of previous step (for the first step, time since painting started)" + } + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables compositing tree inspection." + }, + { + "name": "disable", + "description": "Disables compositing tree inspection." + }, + { + "name": "compositingReasons", + "parameters": [ + { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer for which we want to get the reasons it was composited." } + ], + "description": "Provides the reasons why the given layer was composited.", + "returns": [ + { "name": "compositingReasons", "type": "array", "items": { "type": "string" }, "description": "A list of strings specifying reasons for the given layer to become composited." } + ] + }, + { + "name": "makeSnapshot", + "parameters": [ + { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer." } + ], + "description": "Returns the layer snapshot identifier.", + "returns": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." } + ] + }, + { + "name": "loadSnapshot", + "parameters": [ + { "name": "tiles", "type": "array", "items": { "$ref": "PictureTile" }, "minItems": 1, "description": "An array of tiles composing the snapshot." } + ], + "description": "Returns the snapshot identifier.", + "returns": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the snapshot." } + ] + }, + { + "name": "releaseSnapshot", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." } + ], + "description": "Releases layer snapshot captured by the back-end." + }, + { + "name": "profileSnapshot", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }, + { "name": "minRepeatCount", "type": "integer", "optional": true, "description": "The maximum number of times to replay the snapshot (1, if not specified)." }, + { "name": "minDuration", "type": "number", "optional": true, "description": "The minimum duration (in seconds) to replay the snapshot." }, + { "name": "clipRect", "$ref": "DOM.Rect", "optional": true, "description": "The clip rectangle to apply when replaying the snapshot." } + ], + "returns": [ + { "name": "timings", "type": "array", "items": { "$ref": "PaintProfile" }, "description": "The array of paint profiles, one per run." } + ] + }, + { + "name": "replaySnapshot", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }, + { "name": "fromStep", "type": "integer", "optional": true, "description": "The first step to replay from (replay from the very start if not specified)." }, + { "name": "toStep", "type": "integer", "optional": true, "description": "The last step to replay to (replay till the end if not specified)." }, + { "name": "scale", "type": "number", "optional": true, "description": "The scale to apply while replaying (defaults to 1)." } + ], + "description": "Replays the layer snapshot and returns the resulting bitmap.", + "returns": [ + { "name": "dataURL", "type": "string", "description": "A data: URL for resulting image." } + ] + }, + { + "name": "snapshotCommandLog", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." } + ], + "description": "Replays the layer snapshot and returns canvas log.", + "returns": [ + { "name": "commandLog", "type": "array", "items": { "type": "object" }, "description": "The array of canvas function calls." } + ] + } + ], + "events": [ + { + "name": "layerTreeDidChange", + "parameters": [ + { "name": "layers", "type": "array", "items": { "$ref": "Layer" }, "optional": true, "description": "Layer tree, absent if not in the comspositing mode." } + ] + }, + { + "name": "layerPainted", + "parameters": [ + { "name": "layerId", "$ref": "LayerId", "description": "The id of the painted layer." }, + { "name": "clip", "$ref": "DOM.Rect", "description": "Clip rectangle." } + ] + } + ] + }, + { + "domain": "DeviceOrientation", + "hidden": true, + "commands": [ + { + "name": "setDeviceOrientationOverride", + "description": "Overrides the Device Orientation.", + "parameters": [ + { "name": "alpha", "type": "number", "description": "Mock alpha"}, + { "name": "beta", "type": "number", "description": "Mock beta"}, + { "name": "gamma", "type": "number", "description": "Mock gamma"} + ] + }, + { + "name": "clearDeviceOrientationOverride", + "description": "Clears the overridden Device Orientation." + } + ] + }, + { + "domain": "Tracing", + "types": [ + { + "id": "MemoryDumpConfig", + "type": "object", + "description": "Configuration for memory dump. Used only when \"memory-infra\" category is enabled." + }, + { + "id": "TraceConfig", + "type": "object", + "properties": [ + { "name": "recordMode", "type": "string", "optional": true, "enum": ["recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole"], "description": "Controls how the trace buffer stores data." }, + { "name": "enableSampling", "type": "boolean", "optional": true, "description": "Turns on JavaScript stack sampling." }, + { "name": "enableSystrace", "type": "boolean", "optional": true, "description": "Turns on system tracing." }, + { "name": "enableArgumentFilter", "type": "boolean", "optional": true, "description": "Turns on argument filter." }, + { "name": "includedCategories", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Included category filters." }, + { "name": "excludedCategories", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Excluded category filters." }, + { "name": "syntheticDelays", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Configuration to synthesize the delays in tracing." }, + { "name": "memoryDumpConfig", "$ref": "MemoryDumpConfig", "optional": true, "description": "Configuration for memory dump triggers. Used only when \"memory-infra\" category is enabled." } + ] + } + ], + "commands": [ + { + "name": "start", + "async": true, + "description": "Start trace events collection.", + "parameters": [ + { "name": "categories", "type": "string", "optional": true, "deprecated": true, "description": "Category/tag filter" }, + { "name": "options", "type": "string", "optional": true, "deprecated": true, "description": "Tracing options" }, + { "name": "bufferUsageReportingInterval", "type": "number", "optional": true, "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds" }, + { "name": "transferMode", "type": "string", "enum": ["ReportEvents", "ReturnAsStream"], "optional": true, "description": "Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to <code>ReportEvents</code>)." }, + { "name": "traceConfig", "$ref": "TraceConfig", "optional": true, "description": "" } + ], + "handlers": ["browser", "renderer"] + }, + { + "name": "end", + "async": true, + "description": "Stop trace events collection.", + "handlers": ["browser", "renderer"] + }, + { + "name": "getCategories", + "async": true, + "description": "Gets supported tracing categories.", + "returns": [ + { "name": "categories", "type": "array", "items": { "type": "string" }, "description": "A list of supported tracing categories." } + ], + "handlers": ["browser"] + }, + { + "name": "requestMemoryDump", + "async": true, + "description": "Request a global memory dump.", + "returns": [ + { "name": "dumpGuid", "type": "string", "description": "GUID of the resulting global memory dump." }, + { "name": "success", "type": "boolean", "description": "True iff the global memory dump succeeded." } + ], + "handlers": ["browser"] + }, + { + "name": "recordClockSyncMarker", + "description": "Record a clock sync marker in the trace.", + "parameters": [ + { "name": "syncId", "type": "string", "description": "The ID of this clock sync marker" } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "dataCollected", + "parameters": [ + { "name": "value", "type": "array", "items": { "type": "object" } } + ], + "description": "Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event.", + "handlers": ["browser"] + }, + { + "name": "tracingComplete", + "description": "Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.", + "parameters": [ + { "name": "stream", "$ref": "IO.StreamHandle", "optional": true, "description": "A handle of the stream that holds resulting trace data." } + ], + "handlers": ["browser"] + }, + { + "name": "bufferUsage", + "parameters": [ + { "name": "percentFull", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." }, + { "name": "eventCount", "type": "number", "optional": true, "description": "An approximate number of events in the trace log." }, + { "name": "value", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "Animation", + "hidden": true, + "dependencies": ["Runtime", "DOM"], + "types": [ + { + "id": "Animation", + "type": "object", + "hidden": true, + "properties": [ + { "name": "id", "type": "string", "description": "<code>Animation</code>'s id." }, + { "name": "name", "type": "string", "description": "<code>Animation</code>'s name." }, + { "name": "pausedState", "type": "boolean", "hidden": true, "description": "<code>Animation</code>'s internal paused state." }, + { "name": "playState", "type": "string", "description": "<code>Animation</code>'s play state." }, + { "name": "playbackRate", "type": "number", "description": "<code>Animation</code>'s playback rate." }, + { "name": "startTime", "type": "number", "description": "<code>Animation</code>'s start time." }, + { "name": "currentTime", "type": "number", "description": "<code>Animation</code>'s current time." }, + { "name": "source", "$ref": "AnimationEffect", "description": "<code>Animation</code>'s source animation node." }, + { "name": "type", "type": "string", "enum": ["CSSTransition", "CSSAnimation", "WebAnimation"], "description": "Animation type of <code>Animation</code>." }, + { "name": "cssId", "type": "string", "optional": true, "description": "A unique ID for <code>Animation</code> representing the sources that triggered this CSS animation/transition."} + ], + "description": "Animation instance." + }, + { + "id": "AnimationEffect", + "type": "object", + "hidden": true, + "properties": [ + { "name": "delay", "type": "number", "description": "<code>AnimationEffect</code>'s delay." }, + { "name": "endDelay", "type": "number", "description": "<code>AnimationEffect</code>'s end delay." }, + { "name": "playbackRate", "type": "number", "description": "<code>AnimationEffect</code>'s playbackRate." }, + { "name": "iterationStart", "type": "number", "description": "<code>AnimationEffect</code>'s iteration start." }, + { "name": "iterations", "type": "number", "description": "<code>AnimationEffect</code>'s iterations." }, + { "name": "duration", "type": "number", "description": "<code>AnimationEffect</code>'s iteration duration." }, + { "name": "direction", "type": "string", "description": "<code>AnimationEffect</code>'s playback direction." }, + { "name": "fill", "type": "string", "description": "<code>AnimationEffect</code>'s fill mode." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "<code>AnimationEffect</code>'s target node." }, + { "name": "keyframesRule", "$ref": "KeyframesRule", "optional": true, "description": "<code>AnimationEffect</code>'s keyframes." }, + { "name": "easing", "type": "string", "description": "<code>AnimationEffect</code>'s timing function." } + ], + "description": "AnimationEffect instance" + }, + { + "id": "KeyframesRule", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "optional": true, "description": "CSS keyframed animation's name." }, + { "name": "keyframes", "type": "array", "items": { "$ref": "KeyframeStyle" }, "description": "List of animation keyframes." } + ], + "description": "Keyframes Rule" + }, + { + "id": "KeyframeStyle", + "type": "object", + "properties": [ + { "name": "offset", "type": "string", "description": "Keyframe's time offset." }, + { "name": "easing", "type": "string", "description": "<code>AnimationEffect</code>'s timing function." } + ], + "description": "Keyframe Style" + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables animation domain notifications." + }, + { + "name": "disable", + "description": "Disables animation domain notifications." + }, + { + "name": "getPlaybackRate", + "returns": [ + { "name": "playbackRate", "type": "number", "description": "Playback rate for animations on page."} + ], + "description": "Gets the playback rate of the document timeline." + }, + { + "name": "setPlaybackRate", + "parameters": [ + { "name": "playbackRate", "type": "number", "description": "Playback rate for animations on page" } + ], + "description": "Sets the playback rate of the document timeline." + }, + { + "name": "getCurrentTime", + "parameters": [ + { "name": "id", "type": "string", "description": "Id of animation." } + ], + "returns": [ + { "name": "currentTime", "type": "number", "description": "Current time of the page." } + ], + "description": "Returns the current time of the an animation." + }, + { + "name": "setPaused", + "parameters": [ + { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "Animations to set the pause state of." }, + { "name": "paused", "type": "boolean", "description": "Paused state to set to." } + ], + "description": "Sets the paused state of a set of animations." + }, + { + "name": "setTiming", + "parameters": [ + { "name": "animationId", "type": "string", "description": "Animation id." }, + { "name": "duration", "type": "number", "description": "Duration of the animation." }, + { "name": "delay", "type": "number", "description": "Delay of the animation." } + ], + "description": "Sets the timing of an animation node." + }, + { + "name": "seekAnimations", + "parameters": [ + { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "List of animation ids to seek." }, + { "name": "currentTime", "type": "number", "description": "Set the current time of each animation." } + ], + "description": "Seek a set of animations to a particular time within each animation." + }, + { + "name": "releaseAnimations", + "parameters": [ + { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "List of animation ids to seek." } + ], + "description": "Releases a set of animations to no longer be manipulated." + }, + { + "name": "resolveAnimation", + "parameters": [ + { "name": "animationId", "type": "string", "description": "Animation id." } + ], + "returns": [ + { "name": "remoteObject", "$ref": "Runtime.RemoteObject", "description": "Corresponding remote object." } + ], + "description": "Gets the remote object of the Animation." + } + ], + "events": [ + { + "name": "animationCreated", + "parameters": [ + { "name": "id", "type": "string", "description": "Id of the animation that was created." } + ], + "description": "Event for each animation that has been created." + }, + { + "name": "animationStarted", + "parameters": [ + { "name": "animation", "$ref": "Animation", "description": "Animation that was started." } + ], + "description": "Event for animation that has been started." + }, + { + "name": "animationCanceled", + "parameters": [ + { "name": "id", "type": "string", "description": "Id of the animation that was cancelled."} + ], + "description": "Event for when an animation has been cancelled." + } + ] + }, + { + "domain": "Accessibility", + "hidden": true, + "dependencies": ["DOM"], + "types": [ + { + "id": "AXNodeId", + "type": "string", + "description": "Unique accessibility node identifier." + }, + { + "id": "AXValueType", + "type": "string", + "enum": [ "boolean", "tristate", "booleanOrUndefined", "idref", "idrefList", "integer", "node", "nodeList", "number", "string", "computedString", "token", "tokenList", "domRelation", "role", "internalRole", "valueUndefined" ], + "description": "Enum of possible property types." + }, + { + "id": "AXValueSourceType", + "type": "string", + "enum": [ "attribute", "implicit", "style", "contents", "placeholder", "relatedElement" ], + "description": "Enum of possible property sources." + }, + { "id": "AXValueNativeSourceType", + "type": "string", + "enum": [ "figcaption", "label", "labelfor", "labelwrapped", "legend", "tablecaption", "title", "other" ], + "description": "Enum of possible native property sources (as a subtype of a particular AXValueSourceType)." + }, + { + "id": "AXValueSource", + "type": "object", + "properties": [ + { "name": "type", "$ref": "AXValueSourceType", "description": "What type of source this is." }, + { "name": "value", "$ref": "AXValue", "description": "The value of this property source.", "optional": true }, + { "name": "attribute", "type": "string", "description": "The name of the relevant attribute, if any.", "optional": true }, + { "name": "attributeValue", "$ref": "AXValue", "description": "The value of the relevant attribute, if any.", "optional": true }, + { "name": "superseded", "type": "boolean", "description": "Whether this source is superseded by a higher priority source.", "optional": true }, + { "name": "nativeSource", "$ref": "AXValueNativeSourceType", "description": "The native markup source for this value, e.g. a <label> element.", "optional": true }, + { "name": "nativeSourceValue", "$ref": "AXValue", "description": "The value, such as a node or node list, of the native source.", "optional": true }, + { "name": "invalid", "type": "boolean", "description": "Whether the value for this property is invalid.", "optional": true }, + { "name": "invalidReason", "type": "string", "description": "Reason for the value being invalid, if it is.", "optional": true } + ], + "description": "A single source for a computed AX property." + }, + { + "id": "AXRelatedNode", + "type": "object", + "properties": [ + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "The BackendNodeId of the related node." }, + { "name": "idref", "type": "string", "description": "The IDRef value provided, if any.", "optional": true }, + { "name": "text", "type": "string", "description": "The text alternative of this node in the current context.", "optional": true } + ] + }, + { + "id": "AXProperty", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "The name of this property." }, + { "name": "value", "$ref": "AXValue", "description": "The value of this property." } + ] + }, + { + "id": "AXValue", + "type": "object", + "properties": [ + { "name": "type", "$ref": "AXValueType", "description": "The type of this value." }, + { "name": "value", "type": "any", "description": "The computed value of this property.", "optional": true }, + { "name": "relatedNodes", "type": "array", "items": { "$ref": "AXRelatedNode" }, "description": "One or more related nodes, if applicable.", "optional": true }, + { "name": "sources", "type": "array", "items": { "$ref": "AXValueSource" }, "description": "The sources which contributed to the computation of this property.", "optional": true } + ], + "description": "A single computed AX property." + }, + { + "id": "AXGlobalStates", + "type": "string", + "enum": [ "disabled", "hidden", "hiddenRoot", "invalid" ], + "description": "States which apply to every AX node." + }, + { + "id": "AXLiveRegionAttributes", + "type": "string", + "enum": [ "live", "atomic", "relevant", "busy", "root" ], + "description": "Attributes which apply to nodes in live regions." + }, + { + "id": "AXWidgetAttributes", + "type": "string", + "enum": [ "autocomplete", "haspopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext" ], + "description": "Attributes which apply to widgets." + }, + { + "id": "AXWidgetStates", + "type": "string", + "enum": [ "checked", "expanded", "pressed", "selected" ], + "description": "States which apply to widgets." + }, + { + "id": "AXRelationshipAttributes", + "type": "string", + "enum": [ "activedescendant", "flowto", "controls", "describedby", "labelledby", "owns" ], + "description": "Relationships between elements other than parent/child/sibling." + }, + { + "id": "AXNode", + "type": "object", + "properties": [ + { "name": "nodeId", "$ref": "AXNodeId", "description": "Unique identifier for this node." }, + { "name": "ignored", "type": "boolean", "description": "Whether this node is ignored for accessibility" }, + { "name": "ignoredReasons", "type": "array", "items": { "$ref": "AXProperty" }, "description": "Collection of reasons why this node is hidden.", "optional": true }, + { "name": "role", "$ref": "AXValue", "description": "This <code>Node</code>'s role, whether explicit or implicit.", "optional": true}, + { "name": "name", "$ref": "AXValue", "description": "The accessible name for this <code>Node</code>.", "optional": true }, + { "name": "description", "$ref": "AXValue", "description": "The accessible description for this <code>Node</code>.", "optional": true }, + { "name": "value", "$ref": "AXValue", "description": "The value for this <code>Node</code>.", "optional": true }, + { "name": "properties", "type": "array", "items": { "$ref": "AXProperty" }, "description": "All other properties", "optional": true } + ], + "description": "A node in the accessibility tree." + } + ], + "commands": [ + { + "name": "getAXNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "ID of node to get accessibility node for." } + ], + "returns": [ + { "name": "accessibilityNode", "$ref": "AXNode", "description": "The <code>Accessibility.AXNode</code> for this DOM node, if it exists.", "optional": true } + ], + "description": "Fetches the accessibility node for this DOM node, if it exists.", + "hidden": true + } + ] + }, + { + "domain": "Storage", + "hidden": true, + "types": [ + { + "id": "StorageType", + "type": "string", + "enum": [ + "appcache", + "cookies", + "file_systems", + "indexeddb", + "local_storage", + "shader_cache", + "websql", + "service_workers", + "cache_storage", + "all" + ], + "description": "Enum of possible storage types." + } + ], + "commands": [ + { + "name": "clearDataForOrigin", + "parameters": [ + { "name": "origin", "type": "string", "description": "Security origin." }, + { "name": "storageTypes", "type": "string", "description": "Comma separated origin names." } + ], + "description": "Clears storage for origin.", + "handlers": ["browser"] + } + ] + }, + { + "domain": "Browser", + "description": "The Browser domain allows listing, creating, activating and attaching to the targets.", + "hidden": true, + "types": [ + { + "id": "BrowserContextID", + "type": "string" + }, + { + "id": "TargetID", + "type": "string" + }, + { + "id": "TargetInfo", + "type": "object", + "properties": [ + { "name": "targetId", "$ref": "TargetID" }, + { "name": "type", "type": "string" }, + { "name": "title", "type": "string" }, + { "name": "url", "type": "string" } + ] + } + ], + "commands": [ + { + "name": "createBrowserContext", + "description": "Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.", + "returns": [ + { "name": "browserContextId", "$ref": "BrowserContextID", "description": "The id of the context created." } + ], + "handlers": ["browser"] + }, + { + "name": "disposeBrowserContext", + "description": "Deletes a BrowserContext, will fail of any open page uses it.", + "parameters": [ + { "name": "browserContextId", "$ref": "BrowserContextID" } + ], + "returns": [ + { "name": "success", "type": "boolean" } + ], + "handlers": ["browser"] + }, + { + "name": "createTarget", + "description": "Creates a new page.", + "parameters": [ + { "name": "initialUrl", "type": "string", "description": "The initial URL the page will be navigated to." }, + { "name": "width", "type": "integer", "description": "Window width (headless chrome only).", "optional": true }, + { "name": "height", "type": "integer", "description": "Window height (headless chrome only).", "optional": true }, + { "name": "browserContextId", "$ref": "BrowserContextID", "description": "The browser context to create the page in (headless chrome only).", "optional": true } + ], + "returns": [ + { "name": "targetId", "$ref": "TargetID", "description": "The id of the page opened." } + ], + "handlers": ["browser"] + }, + { + "name": "closeTarget", + "description": "Closes the target. If the target is a page that gets closed too.", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" } + ], + "returns": [ + { "name": "success", "type": "boolean" } + ], + "handlers": ["browser"] + }, + { + "name": "getTargets", + "returns": [ + { "name": "targetInfo", "type": "array", "items": { "$ref": "TargetInfo" } } + ], + "description": "Returns target information for all potential targets.", + "handlers": ["browser"] + }, + { + "name": "attach", + "description": "Attaches to the target with given id.", + "parameters": [ + {"name": "targetId", "$ref": "TargetID", "description": "Target id." } + ], + "handlers": ["browser"] + }, + { + "name": "detach", + "description": "Detaches from the target with given id.", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" } + ], + "handlers": ["browser"] + }, + { + "name": "sendMessage", + "description": "Sends protocol message to the target with given id.", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" }, + { "name": "message", "type": "string" } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "dispatchMessage", + "description": "Dispatches protocol message from the target with given id.", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" }, + { "name": "message", "type": "string" } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "SystemInfo", + "description": "The SystemInfo domain defines methods and events for querying low-level system information.", + "hidden": true, + "types": [ + { + "id": "GPUDevice", + "type": "object", + "properties": [ + { "name": "vendorId", "type": "number", "description": "PCI ID of the GPU vendor, if available; 0 otherwise." }, + { "name": "deviceId", "type": "number", "description": "PCI ID of the GPU device, if available; 0 otherwise." }, + { "name": "vendorString", "type": "string", "description": "String description of the GPU vendor, if the PCI ID is not available." }, + { "name": "deviceString", "type": "string", "description": "String description of the GPU device, if the PCI ID is not available." } + ], + "description": "Describes a single graphics processor (GPU)." + }, + { + "id": "GPUInfo", + "type": "object", + "properties": [ + { "name": "devices", "type": "array", "items": { "$ref": "GPUDevice" }, "description": "The graphics devices on the system. Element 0 is the primary GPU." }, + { "name": "auxAttributes", "type": "object", "optional": "true", "description": "An optional dictionary of additional GPU related attributes." }, + { "name": "featureStatus", "type": "object", "optional": "true", "description": "An optional dictionary of graphics features and their status." }, + { "name": "driverBugWorkarounds", "type": "array", "items": { "type": "string" }, "description": "An optional array of GPU driver bug workarounds." } + ], + "description": "Provides information about the GPU(s) on the system." + } + ], + "commands": [ + { + "name": "getInfo", + "async": true, + "description": "Returns information about the system.", + "returns": [ + { "name": "gpu", "$ref": "GPUInfo", "description": "Information about the GPUs on the system." }, + { "name": "modelName", "type": "string", "description": "A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported." }, + { "name": "modelVersion", "type": "string", "description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported." } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "Tethering", + "description": "The Tethering domain defines methods and events for browser port binding.", + "hidden": true, + "commands": [ + { + "name": "bind", + "async": true, + "description": "Request browser port binding.", + "parameters": [ + { "name": "port", "type": "integer", "description": "Port number to bind." } + ], + "handlers": ["browser"] + }, + { + "name": "unbind", + "async": true, + "description": "Request browser port unbinding.", + "parameters": [ + { "name": "port", "type": "integer", "description": "Port number to unbind." } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "accepted", + "description": "Informs that port was successfully bound and got a specified connection id.", + "parameters": [ + {"name": "port", "type": "integer", "description": "Port number that was successfully bound." }, + {"name": "connectionId", "type": "string", "description": "Connection id to be used." } + ], + "handlers": ["browser"] + } + ] + }] +}
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/protocol/js_protocol.json b/third_party/WebKit/Source/devtools/front_end/sdk/protocol/js_protocol.json new file mode 100644 index 0000000..9cbc9361 --- /dev/null +++ b/third_party/WebKit/Source/devtools/front_end/sdk/protocol/js_protocol.json
@@ -0,0 +1,1002 @@ +{ + "version": { "major": "1", "minor": "1" }, + "domains": [{ + "domain": "Runtime", + "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.", + "types": [ + { + "id": "ScriptId", + "type": "string", + "description": "Unique script identifier." + }, + { + "id": "RemoteObjectId", + "type": "string", + "description": "Unique object identifier." + }, + { + "id": "RemoteObject", + "type": "object", + "description": "Mirror object referencing original JavaScript object.", + "properties": [ + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." }, + { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested), or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." }, + { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, + { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }, + { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "hidden": true }, + { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "hidden": true} + ] + }, + { + "id": "CustomPreview", + "type": "object", + "hidden": true, + "properties": [ + { "name": "header", "type": "string"}, + { "name": "hasBody", "type": "boolean"}, + { "name": "formatterObjectId", "$ref": "RemoteObjectId"}, + { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjectId" }, + { "name": "configObjectId", "$ref": "RemoteObjectId", "optional": true } + ] + }, + { + "id": "ObjectPreview", + "type": "object", + "hidden": true, + "description": "Object containing abbreviated remote object value.", + "properties": [ + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, + { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." }, + { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }, + { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." } + ] + }, + { + "id": "PropertyPreview", + "type": "object", + "hidden": true, + "properties": [ + { "name": "name", "type": "string", "description": "Property name." }, + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." }, + { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." }, + { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." } + ] + }, + { + "id": "EntryPreview", + "type": "object", + "hidden": true, + "properties": [ + { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." }, + { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." } + ] + }, + { + "id": "PropertyDescriptor", + "type": "object", + "description": "Object property descriptor.", + "properties": [ + { "name": "name", "type": "string", "description": "Property name or symbol description." }, + { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }, + { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." }, + { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." }, + { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." }, + { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." }, + { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object.", "hidden": true }, + { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type.", "hidden": true } + ] + }, + { + "id": "InternalPropertyDescriptor", + "type": "object", + "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.", + "properties": [ + { "name": "name", "type": "string", "description": "Conventional property name." }, + { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." } + ], + "hidden": true + }, + { + "id": "CallArgument", + "type": "object", + "description": "Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.", + "properties": [ + { "name": "value", "type": "any", "optional": true, "description": "Primitive value, or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." }, + { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }, + { "name": "type", "optional": true, "hidden": true, "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." } + ] + }, + { + "id": "ExecutionContextId", + "type": "integer", + "description": "Id of an execution context." + }, + { + "id": "ExecutionContextDescription", + "type": "object", + "description": "Description of an isolated world.", + "properties": [ + { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." }, + { "name": "isDefault", "type": "boolean", "description": "Whether context is the default page context (as opposite to e.g. context of content script).", "hidden": true }, + { "name": "origin", "type": "string", "description": "Execution context origin.", "hidden": true}, + { "name": "name", "type": "string", "description": "Human readable name describing given context.", "hidden": true}, + { "name": "frameId", "type": "string", "description": "Id of the owning frame. May be an empty string if the context is not associated with a frame." } + ] + }, + { + "id": "ExceptionDetails", + "type": "object", + "description": "Detailed information on exception (or error) that was thrown during script compilation or execution.", + "properties": [ + { "name": "text", "type": "string", "description": "Exception text." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, + { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." }, + { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." }, + { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." }, + { "name": "stack", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." } + ] + }, + { + "id": "CallFrame", + "type": "object", + "description": "Stack entry for runtime errors and assertions.", + "properties": [ + { "name": "functionName", "type": "string", "description": "JavaScript function name." }, + { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." }, + { "name": "url", "type": "string", "description": "JavaScript script name or url." }, + { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." }, + { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." } + ] + }, + { + "id": "StackTrace", + "type": "object", + "description": "Call frames for assertions or error messages.", + "properties": [ + { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." }, + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." }, + { "name": "parent", "$ref": "StackTrace", "optional": true, "hidden": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." } + ] + } + ], + "commands": [ + { + "name": "evaluate", + "parameters": [ + { "name": "expression", "type": "string", "description": "Expression to evaluate." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, + { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." }, + { "name": "userGesture", "type": "boolean", "optional": true, "hidden": true, "description": "Whether execution should be treated as initiated by user in the UI." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."} + ], + "description": "Evaluates expression on global object." + }, + { + "name": "callFunctionOn", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." }, + { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." }, + { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." }, + { "name": "userGesture", "type": "boolean", "optional": true, "hidden": true, "description": "Whether execution should be treated as initiated by user in the UI." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Call result." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } + ], + "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object." + }, + { + "name": "getProperties", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." }, + { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." }, + { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "hidden": true }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the results." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." }, + { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself).", "hidden": true }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."} + ], + "description": "Returns properties of a given object. Object group of the result is inherited from the target object." + }, + { + "name": "releaseObject", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." } + ], + "description": "Releases remote object with given id." + }, + { + "name": "releaseObjectGroup", + "parameters": [ + { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." } + ], + "description": "Releases all remote objects that belong to a given group." + }, + { + "name": "run", + "hidden": true, + "description": "Tells inspected instance(worker or page) that it can run in case it was started paused." + }, + { + "name": "enable", + "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context." + }, + { + "name": "disable", + "hidden": true, + "description": "Disables reporting of execution contexts creation." + }, + { + "name": "setCustomObjectFormatterEnabled", + "parameters": [ + { + "name": "enabled", + "type": "boolean" + } + ], + "hidden": true + }, + { + "name": "compileScript", + "hidden": true, + "parameters": [ + { "name": "expression", "type": "string", "description": "Expression to compile." }, + { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }, + { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." }, + { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter is used to specify one of those contexts." } + ], + "returns": [ + { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Compiles expression." + }, + { + "name": "runScript", + "hidden": true, + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." }, + { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter is used to specify one of those contexts." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Run result." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Runs script with given id in a given context." + } + ], + "events": [ + { + "name": "executionContextCreated", + "parameters": [ + { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." } + ], + "description": "Issued when new execution context is created." + }, + { + "name": "executionContextDestroyed", + "parameters": [ + { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" } + ], + "description": "Issued when execution context is destroyed." + }, + { + "name": "executionContextsCleared", + "description": "Issued when all executionContexts were cleared in browser" + }, + { + "name": "inspectRequested", + "parameters": [ + { "name": "object", "$ref": "RemoteObject" }, + { "name": "hints", "type": "object" } + ], + "hidden": true + } + ] + }, + { + "domain": "Debugger", + "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.", + "dependencies": ["Runtime"], + "types": [ + { + "id": "BreakpointId", + "type": "string", + "description": "Breakpoint identifier." + }, + { + "id": "CallFrameId", + "type": "string", + "description": "Call frame identifier." + }, + { + "id": "Location", + "type": "object", + "properties": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." }, + { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." }, + { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." } + ], + "description": "Location in the source code." + }, + { + "id": "ScriptPosition", + "hidden": true, + "type": "object", + "properties": [ + { "name": "line", "type": "integer" }, + { "name": "column", "type": "integer" } + ], + "description": "Location in the source code." + }, + { + "id": "FunctionDetails", + "hidden": true, + "type": "object", + "properties": [ + { "name": "location", "$ref": "Location", "optional": true, "description": "Location of the function, none for native functions." }, + { "name": "functionName", "type": "string", "description": "Name of the function." }, + { "name": "isGenerator", "type": "boolean", "description": "Whether this is a generator function." }, + { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." } + ], + "description": "Information about the function." + }, + { + "id": "CallFrame", + "type": "object", + "properties": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." }, + { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." }, + { "name": "functionLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code." }, + { "name": "location", "$ref": "Location", "description": "Location in the source code." }, + { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." }, + { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }, + { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "hidden": true, "description": "The value being returned, if the function is at return point." } + ], + "description": "JavaScript call frame. Array of call frames form the call stack." + }, + { + "id": "Scope", + "type": "object", + "properties": [ + { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script"], "description": "Scope type." }, + { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." }, + { "name": "name", "type": "string", "optional": true, "hidden": true }, + { "name": "startLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code where scope starts" }, + { "name": "endLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code where scope ends" } + ], + "description": "Scope description." + }, + { + "id": "SetScriptSourceError", + "type": "object", + "properties": [ + { "name": "message", "type": "string", "description": "Compiler error message" }, + { "name": "lineNumber", "type": "integer", "description": "Compile error line number (1-based)" }, + { "name": "columnNumber", "type": "integer", "description": "Compile error column number (1-based)" } + ], + "description": "Error data for setScriptSource command. Contains uncompilable script source error.", + "hidden": true + }, + { + "id": "SearchMatch", + "type": "object", + "description": "Search match for resource.", + "properties": [ + { "name": "lineNumber", "type": "number", "description": "Line number in resource content." }, + { "name": "lineContent", "type": "string", "description": "Line with match content." } + ], + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received." + }, + { + "name": "disable", + "description": "Disables debugger for given page." + }, + { + "name": "setBreakpointsActive", + "parameters": [ + { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." } + ], + "description": "Activates / deactivates all breakpoints on the page." + }, + { + "name": "setSkipAllPauses", + "hidden": true, + "parameters": [ + { "name": "skipped", "type": "boolean", "description": "New value for skip pauses state." } + ], + "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)." + }, + { + "name": "setBreakpointByUrl", + "parameters": [ + { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." }, + { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." }, + { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." }, + { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } + ], + "returns": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, + { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." } + ], + "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads." + }, + { + "name": "setBreakpoint", + "parameters": [ + { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." }, + { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } + ], + "returns": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, + { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." } + ], + "description": "Sets JavaScript breakpoint at a given location." + }, + { + "name": "removeBreakpoint", + "parameters": [ + { "name": "breakpointId", "$ref": "BreakpointId" } + ], + "description": "Removes JavaScript breakpoint." + }, + { + "name": "continueToLocation", + "parameters": [ + { "name": "location", "$ref": "Location", "description": "Location to continue to." }, + { "name": "interstatementLocation", "type": "boolean", "optional": true, "hidden": true, "description": "Allows breakpoints at the intemediate positions inside statements." } + ], + "description": "Continues execution until specific location is reached." + }, + { + "name": "stepOver", + "description": "Steps over the statement." + }, + { + "name": "stepInto", + "description": "Steps into the function call." + }, + { + "name": "stepOut", + "description": "Steps out of the function call." + }, + { + "name": "pause", + "description": "Stops on the next JavaScript statement." + }, + { + "name": "resume", + "description": "Resumes JavaScript execution." + }, + { + "name": "searchInContent", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to search in." }, + { "name": "query", "type": "string", "description": "String to search for." }, + { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, + { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." } + ], + "description": "Searches for given string in script content." + }, + { + "name": "canSetScriptSource", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." } + ], + "description": "Always returns true." + }, + { + "name": "setScriptSource", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to edit." }, + { "name": "scriptSource", "type": "string", "description": "New content of the script." }, + { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true } + ], + "returns": [ + { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." }, + { "name": "stackChanged", "type": "boolean", "optional": true, "description": "Whether current call stack was modified after applying the changes.", "hidden": true }, + { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true }, + { "name": "compileError", "optional": true, "$ref": "SetScriptSourceError", "description": "Error data if any." } + ], + "description": "Edits JavaScript source live." + }, + { + "name": "restartFrame", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." } + ], + "returns": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." }, + { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." } + ], + "hidden": true, + "description": "Restarts particular call frame from the beginning." + }, + { + "name": "getScriptSource", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to get source for." } + ], + "returns": [ + { "name": "scriptSource", "type": "string", "description": "Script source." } + ], + "description": "Returns source for the script with given id." + }, + { + "name": "getFunctionDetails", + "hidden": true, + "parameters": [ + { "name": "functionId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the function to get details for." } + ], + "returns": [ + { "name": "details", "$ref": "FunctionDetails", "description": "Information about the function." } + ], + "description": "Returns detailed information on given function." + }, + { + "name": "setPauseOnExceptions", + "parameters": [ + { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." } + ], + "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>." + }, + { + "name": "evaluateOnCallFrame", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }, + { "name": "expression", "type": "string", "description": "Expression to evaluate." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."} + ], + "description": "Evaluates expression on a given call frame." + }, + { + "name": "setVariableValue", + "parameters": [ + { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." }, + { "name": "variableName", "type": "string", "description": "Variable name." }, + { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." }, + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of callframe that holds variable." } + ], + "hidden": true, + "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually." + }, + { + "name": "getBacktrace", + "returns": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }, + { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." } + ], + "hidden": true, + "description": "Returns call stack including variables changed since VM was paused. VM must be paused." + }, + { + "name": "setAsyncCallStackDepth", + "parameters": [ + { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." } + ], + "hidden": true, + "description": "Enables or disables async call stacks tracking." + }, + { + "name": "setBlackboxPatterns", + "parameters": [ + { "name": "patterns", "type": "array", "items": { "type": "string" }, "description": "Array of regexps that will be used to check script url for blackbox state." } + ], + "hidden": true, + "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful." + }, + { + "name": "setBlackboxedRanges", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script." }, + { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } } + ], + "hidden": true, + "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted." + } + ], + "events": [ + { + "name": "scriptParsed", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." }, + { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, + { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, + { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, + { "name": "endLine", "type": "integer", "description": "Last line of the script." }, + { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context.", "hidden": true }, + { "name": "hash", "type": "string", "hidden": true, "description": "Content hash of the script."}, + { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }, + { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true }, + { "name": "isLiveEdit", "type": "boolean", "optional": true, "description": "True, if this script is generated as a result of the live edit operation.", "hidden": true }, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true }, + { "name": "deprecatedCommentWasUsed", "type": "boolean", "optional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@ sourceMappingURL' was used."} + ], + "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger." + }, + { + "name": "scriptFailedToParse", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." }, + { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, + { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, + { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, + { "name": "endLine", "type": "integer", "description": "Last line of the script." }, + { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context.", "hidden": true }, + { "name": "hash", "type": "string", "hidden": true, "description": "Content hash of the script."}, + { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }, + { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true }, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true }, + { "name": "deprecatedCommentWasUsed", "type": "boolean", "optional": true, "hidden": true, "description": "True, if '//@ sourceURL' or '//@ sourceMappingURL' was used."} + ], + "description": "Fired when virtual machine fails to parse the script." + }, + { + "name": "breakpointResolved", + "parameters": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." }, + { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." } + ], + "description": "Fired when breakpoint is resolved to an actual script and location." + }, + { + "name": "paused", + "parameters": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }, + { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "CSPViolation", "debugCommand", "promiseRejection", "other" ], "description": "Pause reason." }, + { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." }, + { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs", "hidden": true }, + { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true } + ], + "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria." + }, + { + "name": "resumed", + "description": "Fired when the virtual machine resumed execution." + } + ] + }, + { + "domain": "Console", + "description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.", + "dependencies": ["Runtime"], + "types": [ + { + "id": "Timestamp", + "type": "number", + "description": "Number of seconds since epoch.", + "hidden": true + }, + { + "id": "ConsoleMessage", + "type": "object", + "description": "Console message.", + "properties": [ + { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation"], "description": "Message source." }, + { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info", "revokedError"], "description": "Message severity." }, + { "name": "text", "type": "string", "description": "Message text." }, + { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd"], "description": "Console message type." }, + { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, + { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." }, + { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." }, + { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." }, + { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." }, + { "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." }, + { "name": "networkRequestId", "type": "string", "optional": true, "description": "Identifier of the network request associated with this message." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp, when this message was fired.", "hidden": true }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Identifier of the context where this message was created", "hidden": true }, + { "name": "messageId", "type": "integer", "hidden": true, "optional": true, "description": "Message id." }, + { "name": "relatedMessageId", "type": "integer", "hidden": true, "optional": true, "description": "Related message id." } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification." + }, + { + "name": "disable", + "description": "Disables console domain, prevents further console messages from being reported to the client." + }, + { + "name": "clearMessages", + "description": "Clears console messages collected in the browser." + } + ], + "events": [ + { + "name": "messageAdded", + "parameters": [ + { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." } + ], + "description": "Issued when new console message is added." + }, + { + "name": "messageRepeatCountUpdated", + "parameters": [ + { "name": "count", "type": "integer", "description": "New repeat count value." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of most recent message in batch.", "hidden": true } + ], + "description": "Is not issued. Will be gone in the future versions of the protocol.", + "deprecated": true + }, + { + "name": "messagesCleared", + "description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation." + } + ] + }, + { + "domain": "Profiler", + "dependencies": ["Runtime", "Debugger"], + "hidden": true, + "types": [ + { + "id": "CPUProfileNode", + "type": "object", + "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.", + "properties": [ + { "name": "functionName", "type": "string", "description": "Function name." }, + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier." }, + { "name": "url", "type": "string", "description": "URL." }, + { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." }, + { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." }, + { "name": "hitCount", "type": "integer", "description": "Number of samples where this node was on top of the call stack." }, + { "name": "callUID", "type": "number", "description": "Call UID." }, + { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." }, + { "name": "deoptReason", "type": "string", "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."}, + { "name": "id", "type": "integer", "description": "Unique id of the node." }, + { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "description": "An array of source position ticks." } + ] + }, + { + "id": "CPUProfile", + "type": "object", + "description": "Profile.", + "properties": [ + { "name": "head", "$ref": "CPUProfileNode" }, + { "name": "startTime", "type": "number", "description": "Profiling start time in seconds." }, + { "name": "endTime", "type": "number", "description": "Profiling end time in seconds." }, + { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." }, + { "name": "timestamps", "optional": true, "type": "array", "items": { "type": "number" }, "description": "Timestamps of the samples in microseconds." } + ] + }, + { + "id": "PositionTickInfo", + "type": "object", + "description": "Specifies a number of samples attributed to a certain source position.", + "properties": [ + { "name": "line", "type": "integer", "description": "Source line number (1-based)." }, + { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." } + ] + } + ], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "setSamplingInterval", + "parameters": [ + { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." } + ], + "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started." + }, + { + "name": "start" + }, + { + "name": "stop", + "returns": [ + { "name": "profile", "$ref": "CPUProfile", "description": "Recorded profile." } + ] + } + ], + "events": [ + { + "name": "consoleProfileStarted", + "parameters": [ + { "name": "id", "type": "string" }, + { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." }, + { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argument to console.profile()." } + ], + "description": "Sent when new profile recodring is started using console.profile() call." + }, + { + "name": "consoleProfileFinished", + "parameters": [ + { "name": "id", "type": "string" }, + { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." }, + { "name": "profile", "$ref": "CPUProfile" }, + { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argunet to console.profile()." } + ] + } + ] + }, + { + "domain": "HeapProfiler", + "dependencies": ["Runtime"], + "hidden": true, + "types": [ + { + "id": "HeapSnapshotObjectId", + "type": "string", + "description": "Heap snapshot object id." + }, + { + "id": "SamplingHeapProfileNode", + "type": "object", + "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.", + "properties": [ + { "name": "functionName", "type": "string", "description": "Function name." }, + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier." }, + { "name": "url", "type": "string", "description": "URL." }, + { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." }, + { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." }, + { "name": "selfSize", "type": "number", "description": "Allocations size in bytes for the node excluding children." }, + { "name": "children", "type": "array", "items": { "$ref": "SamplingHeapProfileNode" }, "description": "Child nodes." } + ] + }, + { + "id": "SamplingHeapProfile", + "type": "object", + "description": "Profile.", + "properties": [ + { "name": "head", "$ref": "SamplingHeapProfileNode" } + ] + } + ], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "startTrackingHeapObjects", + "parameters": [ + { "name": "trackAllocations", "type": "boolean", "optional": true } + ] + }, + { + "name": "stopTrackingHeapObjects", + "parameters": [ + { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." } + ] + }, + { + "name": "takeHeapSnapshot", + "parameters": [ + { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." } + ] + }, + { + "name": "collectGarbage" + }, + { + "name": "getObjectByHeapObjectId", + "parameters": [ + { "name": "objectId", "$ref": "HeapSnapshotObjectId" }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." } + ] + }, + { + "name": "addInspectedHeapObject", + "parameters": [ + { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." } + ], + "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)." + }, + { + "name": "getHeapObjectId", + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." } + ], + "returns": [ + { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." } + ] + }, + { + "name": "startSampling", + "parameters": [ + { "name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes." } + ] + }, + { + "name": "stopSampling", + "returns": [ + { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Recorded sampling heap profile." } + ] + } + ], + "events": [ + { + "name": "addHeapSnapshotChunk", + "parameters": [ + { "name": "chunk", "type": "string" } + ] + }, + { + "name": "resetProfiles" + }, + { + "name": "reportHeapSnapshotProgress", + "parameters": [ + { "name": "done", "type": "integer" }, + { "name": "total", "type": "integer" }, + { "name": "finished", "type": "boolean", "optional": true } + ] + }, + { + "name": "lastSeenObjectId", + "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.", + "parameters": [ + { "name": "lastSeenObjectId", "type": "integer" }, + { "name": "timestamp", "type": "number" } + ] + }, + { + "name": "heapStatsUpdate", + "description": "If heap objects tracking has been started then backend may send update for one or more fragments", + "parameters": [ + { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."} + ] + } + ] + }] +}
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css b/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css index e816d827..b22cebb 100644 --- a/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css +++ b/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css
@@ -25,7 +25,7 @@ .platform-windows .monospace, .platform-windows .source-code { font-size: 12px !important; - font-family: Consolas, Lucida Console, monospace; + font-family: Consolas, Lucida Console, Courier New, monospace; } :host-context(.platform-linux) .monospace,
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h index c46b620..14e98fd 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h +++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
@@ -97,7 +97,7 @@ bool isAnchor() const final; bool isControl() const override; bool isControllingVideoElement() const; - bool isEditable() const override { return isTextControl(); } + bool isEditable() const override { return isNativeTextControl(); } bool isEmbeddedObject() const final; bool isFieldset() const final; bool isHeading() const final;
diff --git a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp index c1c839b..f8b979b 100644 --- a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp +++ b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.cpp
@@ -7,6 +7,7 @@ #include "bindings/core/v8/ScriptPromise.h" #include "core/dom/DOMException.h" #include "core/dom/ExceptionCode.h" +#include "core/frame/UseCounter.h" #include "modules/app_banner/AppBannerCallbacks.h" #include "modules/app_banner/BeforeInstallPromptEventInit.h" #include "public/platform/modules/app_banner/WebAppBannerClient.h" @@ -25,6 +26,7 @@ , m_userChoice(new UserChoiceProperty(executionContext, this, UserChoiceProperty::UserChoice)) , m_registered(false) { + UseCounter::count(executionContext, UseCounter::BeforeInstallPromptEvent); } BeforeInstallPromptEvent::BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPromptEventInit& init) @@ -47,6 +49,7 @@ ScriptPromise BeforeInstallPromptEvent::userChoice(ScriptState* scriptState) { + UseCounter::count(scriptState->getExecutionContext(), UseCounter::BeforeInstallPromptEventUserChoice); if (m_userChoice && m_client && m_requestId != -1) { if (!m_registered) { m_registered = true; @@ -57,13 +60,10 @@ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidStateError, "userChoice cannot be accessed on this event.")); } -const AtomicString& BeforeInstallPromptEvent::interfaceName() const -{ - return EventNames::BeforeInstallPromptEvent; -} - ScriptPromise BeforeInstallPromptEvent::prompt(ScriptState* scriptState) { + UseCounter::count(scriptState->getExecutionContext(), UseCounter::BeforeInstallPromptEventPrompt); + // |m_registered| will be true if userChoice has already been accessed // or prompt() has already been called. Return a rejected promise in both // these cases, as well as if we have a null client or invalid requestId. @@ -76,6 +76,17 @@ return ScriptPromise::castUndefined(scriptState); } +const AtomicString& BeforeInstallPromptEvent::interfaceName() const +{ + return EventNames::BeforeInstallPromptEvent; +} + +void BeforeInstallPromptEvent::preventDefault() +{ + Event::preventDefault(); + UseCounter::count(target()->getExecutionContext(), UseCounter::BeforeInstallPromptEventPreventDefault); +} + DEFINE_TRACE(BeforeInstallPromptEvent) { visitor->trace(m_userChoice);
diff --git a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.h b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.h index 8ef6dd4..dcc5bbe 100644 --- a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.h +++ b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.h
@@ -45,6 +45,7 @@ ScriptPromise prompt(ScriptState*); const AtomicString& interfaceName() const override; + void preventDefault() override; DECLARE_VIRTUAL_TRACE();
diff --git a/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp b/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp index af3b2fc..a3708fd 100644 --- a/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp +++ b/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
@@ -24,7 +24,7 @@ void BatteryDispatcher::queryNextStatus() { - m_monitor->QueryNextStatus(createBaseCallback(WTF::bind(&BatteryDispatcher::onDidChange, wrapPersistent(this)))); + m_monitor->QueryNextStatus(convertToBaseCallback(WTF::bind(&BatteryDispatcher::onDidChange, wrapPersistent(this)))); } void BatteryDispatcher::onDidChange(device::blink::BatteryStatusPtr batteryStatus)
diff --git a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp index bdef3f8..d4e555e 100644 --- a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp +++ b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
@@ -123,14 +123,14 @@ // Local BroadcastChannelClient for messages send from the browser to this channel. webmessaging::mojom::blink::BroadcastChannelClientAssociatedPtrInfo localClientInfo; m_binding.Bind(&localClientInfo, provider.associated_group()); - m_binding.set_connection_error_handler(createBaseCallback(WTF::bind(&BroadcastChannel::onError, wrapWeakPersistent(this)))); + m_binding.set_connection_error_handler(convertToBaseCallback(WTF::bind(&BroadcastChannel::onError, wrapWeakPersistent(this)))); // Remote BroadcastChannelClient for messages send from this channel to the browser. webmessaging::mojom::blink::BroadcastChannelClientAssociatedPtrInfo remoteClientInfo; mojo::AssociatedInterfaceRequest<webmessaging::mojom::blink::BroadcastChannelClient> remoteCientRequest; provider.associated_group()->CreateAssociatedInterface(mojo::AssociatedGroup::WILL_PASS_REQUEST, &remoteClientInfo, &remoteCientRequest); m_remoteClient.Bind(std::move(remoteClientInfo)); - m_remoteClient.set_connection_error_handler(createBaseCallback(WTF::bind(&BroadcastChannel::onError, wrapWeakPersistent(this)))); + m_remoteClient.set_connection_error_handler(convertToBaseCallback(WTF::bind(&BroadcastChannel::onError, wrapWeakPersistent(this)))); provider->ConnectToChannel(m_origin, m_name, std::move(localClientInfo), std::move(remoteCientRequest)); }
diff --git a/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp b/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp index fc15a2d..2b794e7 100644 --- a/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp +++ b/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp
@@ -32,30 +32,15 @@ #include "bindings/core/v8/ExceptionState.h" #include "core/dom/ExecutionContext.h" -#include "core/frame/UseCounter.h" #include "modules/encoding/Encoding.h" #include "wtf/text/CString.h" #include "wtf/text/TextEncodingRegistry.h" namespace blink { -TextEncoder* TextEncoder::create(ExecutionContext* context, const String& utfLabel, ExceptionState& exceptionState) +TextEncoder* TextEncoder::create(ExecutionContext* context, ExceptionState& exceptionState) { - WTF::TextEncoding encoding(utfLabel.stripWhiteSpace(&Encoding::isASCIIWhiteSpace)); - if (!encoding.isValid()) { - exceptionState.throwRangeError("The encoding label provided ('" + utfLabel + "') is invalid."); - return 0; - } - - String name(encoding.name()); - if (name != "UTF-8" && name != "UTF-16LE" && name != "UTF-16BE") { - exceptionState.throwRangeError("The encoding provided ('" + utfLabel + "') is not one of 'utf-8', 'utf-16', or 'utf-16be'."); - return 0; - } - - if (name == "UTF-16LE" || name == "UTF-16BE") - UseCounter::count(context, UseCounter::TextEncoderUTF16); - + WTF::TextEncoding encoding("UTF-8"); return new TextEncoder(encoding); } @@ -63,6 +48,8 @@ : m_encoding(encoding) , m_codec(newTextCodec(encoding)) { + String name(m_encoding.name()); + DCHECK_EQ(name, "UTF-8"); } TextEncoder::~TextEncoder() @@ -72,7 +59,7 @@ String TextEncoder::encoding() const { String name = String(m_encoding.name()).lower(); - ASSERT(name == "utf-8" || name == "utf-16le" || name == "utf-16be"); + DCHECK_EQ(name, "utf-8"); return name; }
diff --git a/third_party/WebKit/Source/modules/encoding/TextEncoder.h b/third_party/WebKit/Source/modules/encoding/TextEncoder.h index 02dc49b..5bb0a06 100644 --- a/third_party/WebKit/Source/modules/encoding/TextEncoder.h +++ b/third_party/WebKit/Source/modules/encoding/TextEncoder.h
@@ -47,7 +47,7 @@ class TextEncoder final : public GarbageCollectedFinalized<TextEncoder>, public ScriptWrappable { DEFINE_WRAPPERTYPEINFO(); public: - static TextEncoder* create(ExecutionContext*, const String& utfLabel, ExceptionState&); + static TextEncoder* create(ExecutionContext*, ExceptionState&); ~TextEncoder(); // Implement the IDL
diff --git a/third_party/WebKit/Source/modules/encoding/TextEncoder.idl b/third_party/WebKit/Source/modules/encoding/TextEncoder.idl index 736187a..e18d1093 100644 --- a/third_party/WebKit/Source/modules/encoding/TextEncoder.idl +++ b/third_party/WebKit/Source/modules/encoding/TextEncoder.idl
@@ -30,7 +30,7 @@ [ Exposed=(Window,Worker), - Constructor(optional DOMString utfLabel = "utf-8"), + Constructor(), ConstructorCallWith=ExecutionContext, RaisesException=Constructor, MeasureAs=TextEncoderConstructor
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp index 0052c318..51be8a0b 100644 --- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp +++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -423,14 +423,14 @@ m_geolocationPermission = PermissionRequested; frame->serviceRegistry()->connectToRemoteService( mojo::GetProxy(&m_permissionService)); - m_permissionService.set_connection_error_handler(createBaseCallback(WTF::bind(&Geolocation::onPermissionConnectionError, wrapWeakPersistent(this)))); + m_permissionService.set_connection_error_handler(convertToBaseCallback(WTF::bind(&Geolocation::onPermissionConnectionError, wrapWeakPersistent(this)))); // Ask the embedder: it maintains the geolocation challenge policy itself. m_permissionService->RequestPermission( mojom::blink::PermissionName::GEOLOCATION, getExecutionContext()->getSecurityOrigin()->toString(), UserGestureIndicator::processingUserGesture(), - createBaseCallback(WTF::bind(&Geolocation::onGeolocationPermissionUpdated, wrapPersistent(this)))); + convertToBaseCallback(WTF::bind(&Geolocation::onGeolocationPermissionUpdated, wrapPersistent(this)))); } void Geolocation::makeSuccessCallbacks() @@ -495,7 +495,7 @@ return; frame()->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_geolocationService)); - m_geolocationService.set_connection_error_handler(createBaseCallback(WTF::bind(&Geolocation::onGeolocationConnectionError, wrapWeakPersistent(this)))); + m_geolocationService.set_connection_error_handler(convertToBaseCallback(WTF::bind(&Geolocation::onGeolocationConnectionError, wrapWeakPersistent(this)))); if (m_enableHighAccuracy) m_geolocationService->SetHighAccuracy(true); queryNextPosition(); @@ -503,7 +503,7 @@ void Geolocation::queryNextPosition() { - m_geolocationService->QueryNextPosition(createBaseCallback(WTF::bind(&Geolocation::onPositionUpdated, wrapPersistent(this)))); + m_geolocationService->QueryNextPosition(convertToBaseCallback(WTF::bind(&Geolocation::onPositionUpdated, wrapPersistent(this)))); } void Geolocation::onPositionUpdated(mojom::blink::GeopositionPtr position)
diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp index ee46cf6..7601b5f 100644 --- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp +++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
@@ -92,7 +92,7 @@ // m_streamTrack->component()->source()->id() is the renderer "name" of the camera; // TODO(mcasas) consider sending the security origin as well: // scriptState->getExecutionContext()->getSecurityOrigin()->toString() - m_service->GetCapabilities(m_streamTrack->component()->source()->id(), createBaseCallback(WTF::bind(&ImageCapture::onCapabilities, wrapPersistent(this), wrapPersistent(resolver)))); + m_service->GetCapabilities(m_streamTrack->component()->source()->id(), convertToBaseCallback(WTF::bind(&ImageCapture::onCapabilities, wrapPersistent(this), wrapPersistent(resolver)))); return promise; } @@ -119,7 +119,7 @@ if (settings->has_zoom) settings->zoom = photoSettings.zoom(); - m_service->SetOptions(m_streamTrack->component()->source()->id(), std::move(settings), createBaseCallback(WTF::bind(&ImageCapture::onSetOptions, wrapPersistent(this), wrapPersistent(resolver)))); + m_service->SetOptions(m_streamTrack->component()->source()->id(), std::move(settings), convertToBaseCallback(WTF::bind(&ImageCapture::onSetOptions, wrapPersistent(this), wrapPersistent(resolver)))); return promise; } @@ -144,7 +144,7 @@ // m_streamTrack->component()->source()->id() is the renderer "name" of the camera; // TODO(mcasas) consider sending the security origin as well: // scriptState->getExecutionContext()->getSecurityOrigin()->toString() - m_service->TakePhoto(m_streamTrack->component()->source()->id(), createBaseCallback(WTF::bind(&ImageCapture::onTakePhoto, wrapPersistent(this), wrapPersistent(resolver)))); + m_service->TakePhoto(m_streamTrack->component()->source()->id(), convertToBaseCallback(WTF::bind(&ImageCapture::onTakePhoto, wrapPersistent(this), wrapPersistent(resolver)))); return promise; } @@ -184,7 +184,7 @@ Platform::current()->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_service)); - m_service.set_connection_error_handler(createBaseCallback(WTF::bind(&ImageCapture::onServiceConnectionError, wrapWeakPersistent(this)))); + m_service.set_connection_error_handler(convertToBaseCallback(WTF::bind(&ImageCapture::onServiceConnectionError, wrapWeakPersistent(this)))); }
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStream.idl b/third_party/WebKit/Source/modules/mediastream/MediaStream.idl index cfaa578..b24500b 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaStream.idl +++ b/third_party/WebKit/Source/modules/mediastream/MediaStream.idl
@@ -43,7 +43,7 @@ MediaStreamTrack getTrackById(DOMString trackId); [CallWith=ExecutionContext] MediaStream clone(); - readonly attribute boolean active; + [Measure] readonly attribute boolean active; attribute EventHandler onactive; attribute EventHandler oninactive;
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.cpp b/third_party/WebKit/Source/modules/nfc/NFC.cpp index 4a5388f..7463415 100644 --- a/third_party/WebKit/Source/modules/nfc/NFC.cpp +++ b/third_party/WebKit/Source/modules/nfc/NFC.cpp
@@ -444,7 +444,7 @@ { ThreadState::current()->registerPreFinalizer(this); frame->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_nfc)); - m_nfc.set_connection_error_handler(createBaseCallback(WTF::bind(&NFC::OnConnectionError, wrapWeakPersistent(this)))); + m_nfc.set_connection_error_handler(convertToBaseCallback(WTF::bind(&NFC::OnConnectionError, wrapWeakPersistent(this)))); m_nfc->SetClient(m_client.CreateInterfacePtrAndBind()); } @@ -495,7 +495,7 @@ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); m_requests.add(resolver); - auto callback = createBaseCallback(WTF::bind(&NFC::OnRequestCompleted, wrapPersistent(this), wrapPersistent(resolver))); + auto callback = convertToBaseCallback(WTF::bind(&NFC::OnRequestCompleted, wrapPersistent(this), wrapPersistent(resolver))); m_nfc->Push(std::move(message), nfc::NFCPushOptions::From(options), callback); return resolver->promise(); @@ -512,7 +512,7 @@ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); m_requests.add(resolver); - auto callback = createBaseCallback(WTF::bind(&NFC::OnRequestCompleted, wrapPersistent(this), wrapPersistent(resolver))); + auto callback = convertToBaseCallback(WTF::bind(&NFC::OnRequestCompleted, wrapPersistent(this), wrapPersistent(resolver))); m_nfc->CancelPush(mojo::toNFCPushTarget(target), callback); return resolver->promise();
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp index 294efb8b..386f6308 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -337,9 +337,9 @@ if (!details.hasShippingOptions()) return result; - for (size_t i = 0; i < details.shippingOptions().size(); ++i) { + for (int i = details.shippingOptions().size() - 1; i >= 0; --i) { if (details.shippingOptions()[i].hasSelected() && details.shippingOptions()[i].selected()) { - result = details.shippingOptions()[i].id(); + return details.shippingOptions()[i].id(); } } @@ -372,7 +372,7 @@ DCHECK(!m_paymentProvider.is_bound()); scriptState->domWindow()->frame()->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_paymentProvider)); - m_paymentProvider.set_connection_error_handler(createBaseCallback(WTF::bind(&PaymentRequest::OnError, wrapWeakPersistent(this)))); + m_paymentProvider.set_connection_error_handler(convertToBaseCallback(WTF::bind(&PaymentRequest::OnError, wrapWeakPersistent(this)))); m_paymentProvider->SetClient(m_clientBinding.CreateInterfacePtrAndBind()); m_paymentProvider->Show(mojo::WTFArray<mojom::blink::PaymentMethodDataPtr>::From(m_methodData), mojom::blink::PaymentDetails::From(m_details), mojom::blink::PaymentOptions::From(m_options));
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp index 7298ac3..b0525d2 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -78,10 +78,11 @@ { if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()->activeDOMObjectsAreStopped()) return; + ScriptState::Scope scope(m_resolver->getScriptState()); if (error.errorType == WebServiceWorkerError::ErrorTypeType) { m_resolver->reject(V8ThrowException::createTypeError(m_resolver->getScriptState()->isolate(), error.message)); } else { - m_resolver->reject(ServiceWorkerError::take(m_resolver.get(), error)); + m_resolver->reject(ServiceWorkerErrorForUpdate::take(m_resolver.get(), error)); } }
diff --git a/third_party/WebKit/Source/modules/vibration/VibrationController.cpp b/third_party/WebKit/Source/modules/vibration/VibrationController.cpp index d7932a1..20f493dd 100644 --- a/third_party/WebKit/Source/modules/vibration/VibrationController.cpp +++ b/third_party/WebKit/Source/modules/vibration/VibrationController.cpp
@@ -125,7 +125,7 @@ if (m_service) { m_isCallingVibrate = true; - m_service->Vibrate(m_pattern[0], createBaseCallback(WTF::bind(&VibrationController::didVibrate, wrapPersistent(this)))); + m_service->Vibrate(m_pattern[0], convertToBaseCallback(WTF::bind(&VibrationController::didVibrate, wrapPersistent(this)))); } } @@ -160,7 +160,7 @@ if (m_isRunning && !m_isCallingCancel && m_service) { m_isCallingCancel = true; - m_service->Cancel(createBaseCallback(WTF::bind(&VibrationController::didCancel, wrapPersistent(this)))); + m_service->Cancel(convertToBaseCallback(WTF::bind(&VibrationController::didCancel, wrapPersistent(this)))); } m_isRunning = false;
diff --git a/third_party/WebKit/Source/modules/vr/VRController.cpp b/third_party/WebKit/Source/modules/vr/VRController.cpp index 4913040a..88a2128 100644 --- a/third_party/WebKit/Source/modules/vr/VRController.cpp +++ b/third_party/WebKit/Source/modules/vr/VRController.cpp
@@ -47,7 +47,7 @@ } m_pendingGetDevicesCallbacks.append(std::move(callback)); - m_service->GetDisplays(createBaseCallback(WTF::bind(&VRController::onGetDisplays, wrapPersistent(this)))); + m_service->GetDisplays(convertToBaseCallback(WTF::bind(&VRController::onGetDisplays, wrapPersistent(this)))); } device::blink::VRPosePtr VRController::getPose(unsigned index)
diff --git a/third_party/WebKit/Source/modules/webusb/USB.cpp b/third_party/WebKit/Source/modules/webusb/USB.cpp index feedb57e..5bc70682 100644 --- a/third_party/WebKit/Source/modules/webusb/USB.cpp +++ b/third_party/WebKit/Source/modules/webusb/USB.cpp
@@ -56,7 +56,7 @@ { ThreadState::current()->registerPreFinalizer(this); frame.serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_deviceManager)); - m_deviceManager.set_connection_error_handler(createBaseCallback(WTF::bind(&USB::onDeviceManagerConnectionError, wrapWeakPersistent(this)))); + m_deviceManager.set_connection_error_handler(convertToBaseCallback(WTF::bind(&USB::onDeviceManagerConnectionError, wrapWeakPersistent(this)))); m_deviceManager->SetClient(m_clientBinding.CreateInterfacePtrAndBind()); } @@ -88,7 +88,7 @@ resolver->reject(DOMException::create(SecurityError, errorMessage)); } else { m_deviceManagerRequests.add(resolver); - m_deviceManager->GetDevices(nullptr, createBaseCallback(WTF::bind(&USB::onGetDevices, wrapPersistent(this), wrapPersistent(resolver)))); + m_deviceManager->GetDevices(nullptr, convertToBaseCallback(WTF::bind(&USB::onGetDevices, wrapPersistent(this), wrapPersistent(resolver)))); } } return promise; @@ -106,7 +106,7 @@ return promise; } frame->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_chooserService)); - m_chooserService.set_connection_error_handler(createBaseCallback(WTF::bind(&USB::onChooserServiceConnectionError, wrapWeakPersistent(this)))); + m_chooserService.set_connection_error_handler(convertToBaseCallback(WTF::bind(&USB::onChooserServiceConnectionError, wrapWeakPersistent(this)))); } String errorMessage; @@ -122,7 +122,7 @@ filters.append(convertDeviceFilter(filter)); } m_chooserServiceRequests.add(resolver); - m_chooserService->GetPermission(std::move(filters), createBaseCallback(WTF::bind(&USB::onGetPermission, wrapPersistent(this), wrapPersistent(resolver)))); + m_chooserService->GetPermission(std::move(filters), convertToBaseCallback(WTF::bind(&USB::onGetPermission, wrapPersistent(this), wrapPersistent(resolver)))); } return promise; }
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp index 200bee8d..425b80d 100644 --- a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp +++ b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
@@ -94,7 +94,7 @@ , m_configurationIndex(-1) { if (m_device) - m_device.set_connection_error_handler(createBaseCallback(WTF::bind(&USBDevice::onConnectionError, wrapWeakPersistent(this)))); + m_device.set_connection_error_handler(convertToBaseCallback(WTF::bind(&USBDevice::onConnectionError, wrapWeakPersistent(this)))); int configurationIndex = findConfigurationIndex(info().active_configuration); if (configurationIndex != -1) onConfigurationSelected(true /* success */, configurationIndex); @@ -143,7 +143,7 @@ } else { m_deviceStateChangeInProgress = true; m_deviceRequests.add(resolver); - m_device->Open(createBaseCallback(WTF::bind(&USBDevice::asyncOpen, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->Open(convertToBaseCallback(WTF::bind(&USBDevice::asyncOpen, wrapPersistent(this), wrapPersistent(resolver)))); } } return promise; @@ -159,7 +159,7 @@ } else { m_deviceStateChangeInProgress = true; m_deviceRequests.add(resolver); - m_device->Close(createBaseCallback(WTF::bind(&USBDevice::asyncClose, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->Close(convertToBaseCallback(WTF::bind(&USBDevice::asyncClose, wrapPersistent(this), wrapPersistent(resolver)))); } } return promise; @@ -181,7 +181,7 @@ } else { m_deviceStateChangeInProgress = true; m_deviceRequests.add(resolver); - m_device->SetConfiguration(configurationValue, createBaseCallback(WTF::bind(&USBDevice::asyncSelectConfiguration, wrapPersistent(this), configurationIndex, wrapPersistent(resolver)))); + m_device->SetConfiguration(configurationValue, convertToBaseCallback(WTF::bind(&USBDevice::asyncSelectConfiguration, wrapPersistent(this), configurationIndex, wrapPersistent(resolver)))); } } } @@ -203,7 +203,7 @@ } else { m_interfaceStateChangeInProgress.set(interfaceIndex); m_deviceRequests.add(resolver); - m_device->ClaimInterface(interfaceNumber, createBaseCallback(WTF::bind(&USBDevice::asyncClaimInterface, wrapPersistent(this), interfaceIndex, wrapPersistent(resolver)))); + m_device->ClaimInterface(interfaceNumber, convertToBaseCallback(WTF::bind(&USBDevice::asyncClaimInterface, wrapPersistent(this), interfaceIndex, wrapPersistent(resolver)))); } } return promise; @@ -227,7 +227,7 @@ setEndpointsForInterface(interfaceIndex, false); m_interfaceStateChangeInProgress.set(interfaceIndex); m_deviceRequests.add(resolver); - m_device->ReleaseInterface(interfaceNumber, createBaseCallback(WTF::bind(&USBDevice::asyncReleaseInterface, wrapPersistent(this), interfaceIndex, wrapPersistent(resolver)))); + m_device->ReleaseInterface(interfaceNumber, convertToBaseCallback(WTF::bind(&USBDevice::asyncReleaseInterface, wrapPersistent(this), interfaceIndex, wrapPersistent(resolver)))); } } return promise; @@ -250,7 +250,7 @@ setEndpointsForInterface(interfaceIndex, false); m_interfaceStateChangeInProgress.set(interfaceIndex); m_deviceRequests.add(resolver); - m_device->SetInterfaceAlternateSetting(interfaceNumber, alternateSetting, createBaseCallback(WTF::bind(&USBDevice::asyncSelectAlternateInterface, wrapPersistent(this), interfaceNumber, alternateSetting, wrapPersistent(resolver)))); + m_device->SetInterfaceAlternateSetting(interfaceNumber, alternateSetting, convertToBaseCallback(WTF::bind(&USBDevice::asyncSelectAlternateInterface, wrapPersistent(this), interfaceNumber, alternateSetting, wrapPersistent(resolver)))); } } return promise; @@ -264,7 +264,7 @@ auto parameters = convertControlTransferParameters(setup, resolver); if (parameters) { m_deviceRequests.add(resolver); - m_device->ControlTransferIn(std::move(parameters), length, 0, createBaseCallback(WTF::bind(&USBDevice::asyncControlTransferIn, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->ControlTransferIn(std::move(parameters), length, 0, convertToBaseCallback(WTF::bind(&USBDevice::asyncControlTransferIn, wrapPersistent(this), wrapPersistent(resolver)))); } } return promise; @@ -278,7 +278,7 @@ auto parameters = convertControlTransferParameters(setup, resolver); if (parameters) { m_deviceRequests.add(resolver); - m_device->ControlTransferOut(std::move(parameters), mojo::WTFArray<uint8_t>(), 0, createBaseCallback(WTF::bind(&USBDevice::asyncControlTransferOut, wrapPersistent(this), 0, wrapPersistent(resolver)))); + m_device->ControlTransferOut(std::move(parameters), mojo::WTFArray<uint8_t>(), 0, convertToBaseCallback(WTF::bind(&USBDevice::asyncControlTransferOut, wrapPersistent(this), 0, wrapPersistent(resolver)))); } } return promise; @@ -294,7 +294,7 @@ mojo::WTFArray<uint8_t> buffer = convertBufferSource(data); unsigned transferLength = buffer.size(); m_deviceRequests.add(resolver); - m_device->ControlTransferOut(std::move(parameters), std::move(buffer), 0, createBaseCallback(WTF::bind(&USBDevice::asyncControlTransferOut, wrapPersistent(this), transferLength, wrapPersistent(resolver)))); + m_device->ControlTransferOut(std::move(parameters), std::move(buffer), 0, convertToBaseCallback(WTF::bind(&USBDevice::asyncControlTransferOut, wrapPersistent(this), transferLength, wrapPersistent(resolver)))); } } return promise; @@ -306,7 +306,7 @@ ScriptPromise promise = resolver->promise(); if (ensureEndpointAvailable(direction == "in", endpointNumber, resolver)) { m_deviceRequests.add(resolver); - m_device->ClearHalt(endpointNumber, createBaseCallback(WTF::bind(&USBDevice::asyncClearHalt, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->ClearHalt(endpointNumber, convertToBaseCallback(WTF::bind(&USBDevice::asyncClearHalt, wrapPersistent(this), wrapPersistent(resolver)))); } return promise; } @@ -317,7 +317,7 @@ ScriptPromise promise = resolver->promise(); if (ensureEndpointAvailable(true /* in */, endpointNumber, resolver)) { m_deviceRequests.add(resolver); - m_device->GenericTransferIn(endpointNumber, length, 0, createBaseCallback(WTF::bind(&USBDevice::asyncTransferIn, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->GenericTransferIn(endpointNumber, length, 0, convertToBaseCallback(WTF::bind(&USBDevice::asyncTransferIn, wrapPersistent(this), wrapPersistent(resolver)))); } return promise; } @@ -330,7 +330,7 @@ mojo::WTFArray<uint8_t> buffer = convertBufferSource(data); unsigned transferLength = buffer.size(); m_deviceRequests.add(resolver); - m_device->GenericTransferOut(endpointNumber, std::move(buffer), 0, createBaseCallback(WTF::bind(&USBDevice::asyncTransferOut, wrapPersistent(this), transferLength, wrapPersistent(resolver)))); + m_device->GenericTransferOut(endpointNumber, std::move(buffer), 0, convertToBaseCallback(WTF::bind(&USBDevice::asyncTransferOut, wrapPersistent(this), transferLength, wrapPersistent(resolver)))); } return promise; } @@ -341,7 +341,7 @@ ScriptPromise promise = resolver->promise(); if (ensureEndpointAvailable(true /* in */, endpointNumber, resolver)) { m_deviceRequests.add(resolver); - m_device->IsochronousTransferIn(endpointNumber, mojo::WTFArray<uint32_t>(std::move(packetLengths)), 0, createBaseCallback(WTF::bind(&USBDevice::asyncIsochronousTransferIn, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->IsochronousTransferIn(endpointNumber, mojo::WTFArray<uint32_t>(std::move(packetLengths)), 0, convertToBaseCallback(WTF::bind(&USBDevice::asyncIsochronousTransferIn, wrapPersistent(this), wrapPersistent(resolver)))); } return promise; } @@ -352,7 +352,7 @@ ScriptPromise promise = resolver->promise(); if (ensureEndpointAvailable(false /* out */, endpointNumber, resolver)) { m_deviceRequests.add(resolver); - m_device->IsochronousTransferOut(endpointNumber, convertBufferSource(data), mojo::WTFArray<uint32_t>(std::move(packetLengths)), 0, createBaseCallback(WTF::bind(&USBDevice::asyncIsochronousTransferOut, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->IsochronousTransferOut(endpointNumber, convertBufferSource(data), mojo::WTFArray<uint32_t>(std::move(packetLengths)), 0, convertToBaseCallback(WTF::bind(&USBDevice::asyncIsochronousTransferOut, wrapPersistent(this), wrapPersistent(resolver)))); } return promise; } @@ -366,7 +366,7 @@ resolver->reject(DOMException::create(InvalidStateError, kOpenRequired)); } else { m_deviceRequests.add(resolver); - m_device->Reset(createBaseCallback(WTF::bind(&USBDevice::asyncReset, wrapPersistent(this), wrapPersistent(resolver)))); + m_device->Reset(convertToBaseCallback(WTF::bind(&USBDevice::asyncReset, wrapPersistent(this), wrapPersistent(resolver)))); } } return promise;
diff --git a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in index e0c6480..663fdfa 100644 --- a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in +++ b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
@@ -29,7 +29,6 @@ AppBanner status=stable AlwaysUseComplexText status=stable -ApplicationCache status=stable AudioOutputDevices status=stable AudioVideoTracks status=experimental BackgroundSync status=stable
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp index e85fa09..89fb58f 100644 --- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp +++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -221,7 +221,6 @@ gl->Flush(); gl->GenSyncTokenCHROMIUM(fenceSync, info.m_mailbox.syncToken); info.m_mailbox.validSyncToken = true; - info.m_mailbox.gpuMemoryBufferId = imageInfo.m_gpuMemoryBufferId; info.m_imageInfo = imageInfo; *outMailbox = info.m_mailbox; @@ -261,11 +260,7 @@ gl->TexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); gl->BindTexImage2DCHROMIUM(target, imageId); - GLint gpuMemoryBufferId = -1; - gl->GetImageivCHROMIUM(imageId, GC3D_GPU_MEMORY_BUFFER_ID, &gpuMemoryBufferId); - DCHECK_NE(-1, gpuMemoryBufferId); - - return Canvas2DLayerBridge::ImageInfo(imageId, textureId, gpuMemoryBufferId); + return Canvas2DLayerBridge::ImageInfo(imageId, textureId); } void Canvas2DLayerBridge::deleteCHROMIUMImage(ImageInfo info) @@ -1002,14 +997,10 @@ } #if USE_IOSURFACE_FOR_2D_CANVAS -Canvas2DLayerBridge::ImageInfo::ImageInfo(GLuint imageId, GLuint textureId, GLint gpuMemoryBufferId) - : m_imageId(imageId) - , m_textureId(textureId) - , m_gpuMemoryBufferId(gpuMemoryBufferId) +Canvas2DLayerBridge::ImageInfo::ImageInfo(GLuint imageId, GLuint textureId) : m_imageId(imageId), m_textureId(textureId) { DCHECK(imageId); DCHECK(textureId); - DCHECK_NE(-1, gpuMemoryBufferId); } bool Canvas2DLayerBridge::ImageInfo::empty()
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h index 108e35fa..8873fb2 100644 --- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h +++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -154,7 +154,7 @@ // All information associated with a CHROMIUM image. struct ImageInfo { ImageInfo() {} - ImageInfo(GLuint imageId, GLuint textureId, GLint gpuMemoryBufferId); + ImageInfo(GLuint imageId, GLuint textureId); // Whether this structure holds references to a CHROMIUM image. bool empty(); @@ -164,9 +164,6 @@ // The id of the texture bound to the CHROMIUM image. GLuint m_textureId = 0; - - // The id of the GpuMemoryBuffer backing the texture and CHROMIUM image. - GLint m_gpuMemoryBufferId = -1; }; #endif // USE_IOSURFACE_FOR_2D_CANVAS @@ -261,6 +258,7 @@ friend class Canvas2DLayerBridgeTest; friend class CanvasRenderingContext2DTest; + friend class HTMLCanvasPainterTestForSPv2; uint32_t m_lastImageId;
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp index 5c9c206..5e44fe9 100644 --- a/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp +++ b/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
@@ -33,8 +33,8 @@ return false; m_client->asyncRequestSurfaceCreation(m_surfaceId); - cc::SurfaceLayer::SatisfyCallback satisfyCallback = createBaseCallback(WTF::bind(&CanvasSurfaceLayerBridge::satisfyCallback, WTF::unretained(this))); - cc::SurfaceLayer::RequireCallback requireCallback = createBaseCallback(WTF::bind(&CanvasSurfaceLayerBridge::requireCallback, WTF::unretained(this))); + cc::SurfaceLayer::SatisfyCallback satisfyCallback = convertToBaseCallback(WTF::bind(&CanvasSurfaceLayerBridge::satisfyCallback, WTF::unretained(this))); + cc::SurfaceLayer::RequireCallback requireCallback = convertToBaseCallback(WTF::bind(&CanvasSurfaceLayerBridge::requireCallback, WTF::unretained(this))); m_surfaceLayer = cc::SurfaceLayer::Create(std::move(satisfyCallback), std::move(requireCallback)); m_surfaceLayer->SetSurfaceId(m_surfaceId, 1.f, gfx::Size(canvasWidth, canvasHeight));
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsTypes3D.h b/third_party/WebKit/Source/platform/graphics/GraphicsTypes3D.h index e98edcc..e648008 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsTypes3D.h +++ b/third_party/WebKit/Source/platform/graphics/GraphicsTypes3D.h
@@ -53,7 +53,6 @@ // GL_CHROMIUM_gpu_memory_buffer_image const unsigned GC3D_MAP_CHROMIUM = 0x78F1; const unsigned GC3D_SCANOUT_CHROMIUM = 0x78F2; -const unsigned GC3D_GPU_MEMORY_BUFFER_ID = 0x78FD; namespace blink {
diff --git a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp index 7decc30..257a80e 100644 --- a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp +++ b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
@@ -49,22 +49,25 @@ ? SkShader::kRepeat_TileMode : SkShader::kClamp_TileMode; SkShader::TileMode tileModeY = isRepeatY() ? SkShader::kRepeat_TileMode : SkShader::kClamp_TileMode; - int expandW = isRepeatX() ? 0 : 1; - int expandH = isRepeatY() ? 0 : 1; + int borderPixelX = isRepeatX() ? 0 : 1; + int borderPixelY = isRepeatY() ? 0 : 1; - // Create a transparent image 1 pixel wider and/or taller than the - // original, then copy the orignal into it. + // Create a transparent image 2 pixels wider and/or taller than the + // original, then copy the orignal into the middle of it. // FIXME: Is there a better way to pad (not scale) an image in skia? sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul( - m_tileImage->width() + expandW, m_tileImage->height() + expandH); + m_tileImage->width() + 2 * borderPixelX, m_tileImage->height() + 2 * borderPixelY); if (!surface) return SkShader::MakeColorShader(SK_ColorTRANSPARENT); SkPaint paint; paint.setXfermodeMode(SkXfermode::kSrc_Mode); - surface->getCanvas()->drawImage(m_tileImage, 0, 0, &paint); + surface->getCanvas()->drawImage(m_tileImage, borderPixelX, borderPixelY, &paint); - return surface->makeImageSnapshot()->makeShader(tileModeX, tileModeY, &localMatrix); + SkMatrix newLocalMatrix(localMatrix); + newLocalMatrix.postTranslate(-borderPixelX, -borderPixelY); + + return surface->makeImageSnapshot()->makeShader(tileModeX, tileModeY, &newLocalMatrix); } bool ImagePattern::isTextureBacked() const
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp index da950babf..7f85e9e 100644 --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -424,7 +424,7 @@ // TODO(jbroman): Don't discard rounded corners. compositorNode.clip = clipNode->clipRect().rect(); compositorNode.transform_id = compositorIdForTransformNode(clipNode->localTransformSpace()); - compositorNode.target_id = kRealRootNodeId; + compositorNode.target_transform_id = kRealRootNodeId; compositorNode.applies_local_clip = true; compositorNode.layers_are_clipped = true; compositorNode.layers_are_clipped_when_surfaces_disabled = true;
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp index d8f5af2..5385c455 100644 --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -308,7 +308,6 @@ frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->textureInfo.imageId != 0; frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->textureInfo.parameters.target; frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_size.height()); - frontColorBufferMailbox->mailbox.gpuMemoryBufferId = frontColorBufferMailbox->textureInfo.gpuMemoryBufferId; setBufferClearNeeded(true); // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it has live mailboxes @@ -485,7 +484,13 @@ m_antiAliasingMode = ScreenSpaceAntialiasing; } } - m_storageTextureSupported = m_webGLVersion > WebGL1 || m_extensionsUtil->supportsExtension("GL_EXT_texture_storage"); + // TODO(dshwang): enable storage texture on all platform. crbug.com/557848 + // Linux ATI bot fails WebglConformance.conformance_textures_misc_tex_image_webgl + // So use storage texture only if ScreenSpaceAntialiasing is enabled, + // because ScreenSpaceAntialiasing is much faster with storage texture. + m_storageTextureSupported = (m_webGLVersion > WebGL1 + || m_extensionsUtil->supportsExtension("GL_EXT_texture_storage")) + && m_antiAliasingMode == ScreenSpaceAntialiasing; m_sampleCount = std::min(4, maxSampleCount); m_gl->GenFramebuffers(1, &m_fbo); @@ -974,7 +979,6 @@ m_gl->ReleaseTexImage2DCHROMIUM(info->parameters.target, info->imageId); m_gl->DestroyImageCHROMIUM(info->imageId); info->imageId = 0; - info->gpuMemoryBufferId = -1; } } @@ -1006,19 +1010,14 @@ TextureParameters parameters = chromiumImageTextureParameters(); GLuint imageId = m_gl->CreateGpuMemoryBufferImageCHROMIUM(size.width(), size.height(), parameters.creationInternalColorFormat, GC3D_SCANOUT_CHROMIUM); - GLint gpuMemoryBufferId = -1; GLuint textureId = createColorTexture(parameters); - if (imageId) { m_gl->BindTexImage2DCHROMIUM(parameters.target, imageId); - m_gl->GetImageivCHROMIUM(imageId, GC3D_GPU_MEMORY_BUFFER_ID, &gpuMemoryBufferId); - DCHECK_NE(-1, gpuMemoryBufferId); } TextureInfo info; info.textureId = textureId; info.imageId = imageId; - info.gpuMemoryBufferId = gpuMemoryBufferId; info.parameters = parameters; clearChromiumImageAlpha(info); return info; @@ -1058,16 +1057,8 @@ if (info->imageId) { m_gl->BindTexture(info->parameters.target, info->textureId); m_gl->BindTexImage2DCHROMIUM(info->parameters.target, info->imageId); - - GLint gpuMemoryBufferId = -1; - m_gl->GetImageivCHROMIUM(info->imageId, GC3D_GPU_MEMORY_BUFFER_ID, &gpuMemoryBufferId); - DCHECK_NE(-1, gpuMemoryBufferId); - info->gpuMemoryBufferId = gpuMemoryBufferId; - clearChromiumImageAlpha(*info); } else { - info->gpuMemoryBufferId = -1; - // At this point, the texture still exists, but has no allocated // storage. This is intentional, and mimics the behavior of a texImage2D // failure.
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h index c6d86e4e..70d792f3 100644 --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
@@ -260,11 +260,6 @@ GLuint textureId = 0; GLuint imageId = 0; bool immutable = false; - - // A GpuMemoryBuffer is a concept that the compositor understands. and - // is able to operate on. The id is scoped to renderer process. - GLint gpuMemoryBufferId = -1; - TextureParameters parameters; };
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp index 2c55c92..50a62702b 100644 --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
@@ -108,14 +108,6 @@ *value = 1024; } - void GetImageivCHROMIUM(GLuint imageId, GLenum pname, GLint* data) override - { - if (pname == GC3D_GPU_MEMORY_BUFFER_ID) - *data = 1; - else - *data = -1; - } - void GenMailboxCHROMIUM(GLbyte* mailbox) override { ++m_currentMailboxByte;
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp index 12eeecba..cb0b833 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp
@@ -131,6 +131,7 @@ static String foreignLayerTypeAsDebugString(DisplayItem::Type type) { switch (type) { + DEBUG_STRING_CASE(ForeignLayerCanvas); DEBUG_STRING_CASE(ForeignLayerPlugin); DEBUG_STRING_CASE(ForeignLayerVideo); DEFAULT_CASE;
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h index 05778d1..72c2104f 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h +++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h
@@ -120,7 +120,8 @@ CachedDrawingLast = CachedDrawingFirst + DrawingLast - DrawingFirst, ForeignLayerFirst, - ForeignLayerPlugin = ForeignLayerFirst, + ForeignLayerCanvas = ForeignLayerFirst, + ForeignLayerPlugin, ForeignLayerVideo, ForeignLayerLast = ForeignLayerVideo,
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp index c2449e5..b2cd4f7d 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
@@ -35,7 +35,7 @@ for (auto& item : *displayItemClientsShouldKeepAlive) { CHECK(!item.value.contains(this)) << "Short-lived DisplayItemClient: " << item.value.get(this) - << ". See crbug.com/570030."; + << ". See crbug.com/609218."; } } liveDisplayItemClients->remove(this); @@ -61,7 +61,7 @@ void DisplayItemClient::endShouldKeepAlive() const { if (displayItemClientsShouldKeepAlive) { - for (auto item : *displayItemClientsShouldKeepAlive) + for (auto& item : *displayItemClientsShouldKeepAlive) item.value.remove(this); } }
diff --git a/third_party/WebKit/Source/platform/heap/CallbackStack.cpp b/third_party/WebKit/Source/platform/heap/CallbackStack.cpp index 7a13b0b3..9a25d1b 100644 --- a/third_party/WebKit/Source/platform/heap/CallbackStack.cpp +++ b/third_party/WebKit/Source/platform/heap/CallbackStack.cpp
@@ -3,32 +3,83 @@ // found in the LICENSE file. #include "platform/heap/CallbackStack.h" +#include "wtf/PtrUtil.h" #include "wtf/allocator/PageAllocator.h" +#include "wtf/allocator/Partitions.h" namespace blink { -size_t const CallbackStack::kMinimalBlockSize = WTF::kPageAllocationGranularity / sizeof(CallbackStack::Item); - -CallbackStack::Block::Block(Block* next, size_t blockSize) - : m_blockSize(blockSize) +CallbackStackMemoryPool& CallbackStackMemoryPool::instance() { - // Allocated block size must be a multiple of WTF::kPageAllocationGranularity. - ASSERT((m_blockSize * sizeof(Item)) % WTF::kPageAllocationGranularity == 0); - m_buffer = static_cast<Item*>(WTF::allocPages(nullptr, m_blockSize * sizeof(Item), WTF::kPageAllocationGranularity, WTF::PageAccessible)); - RELEASE_ASSERT(m_buffer); + DEFINE_STATIC_LOCAL(CallbackStackMemoryPool, memoryPool, ()); + return memoryPool; +} +void CallbackStackMemoryPool::initialize() +{ + m_freeListFirst = 0; + for (size_t index = 0; index < kPooledBlockCount - 1; ++index) { + m_freeListNext[index] = index + 1; + } + m_freeListNext[kPooledBlockCount - 1] = -1; + m_pooledMemory = static_cast<CallbackStack::Item*>(WTF::allocPages(nullptr, kBlockBytes * kPooledBlockCount, WTF::kPageAllocationGranularity, WTF::PageAccessible)); + CHECK(m_pooledMemory); +} + +void CallbackStackMemoryPool::shutdown() +{ + WTF::freePages(m_pooledMemory, kBlockBytes * kPooledBlockCount); + m_pooledMemory = nullptr; + m_freeListFirst = 0; +} + +CallbackStack::Item* CallbackStackMemoryPool::allocate() +{ + MutexLocker locker(m_mutex); + // Allocate from a free list if available. + if (m_freeListFirst != -1) { + size_t index = m_freeListFirst; + DCHECK(0 <= index && index < CallbackStackMemoryPool::kPooledBlockCount); + m_freeListFirst = m_freeListNext[index]; + m_freeListNext[index] = -1; + return m_pooledMemory + kBlockSize * index; + } + // Otherwise, allocate a new memory region. + CallbackStack::Item* memory = static_cast<CallbackStack::Item*>(WTF::Partitions::fastZeroedMalloc(kBlockBytes, "CallbackStackMemoryPool")); + CHECK(memory); + return memory; +} + +void CallbackStackMemoryPool::free(CallbackStack::Item* memory) +{ + MutexLocker locker(m_mutex); + int index = (reinterpret_cast<uintptr_t>(memory) - reinterpret_cast<uintptr_t>(m_pooledMemory)) / (kBlockSize * sizeof(CallbackStack::Item)); + // If the memory is a newly allocated region, free the memory. + if (index < 0 || static_cast<int>(kPooledBlockCount) <= index) { + WTF::Partitions::fastFree(memory); + return; + } + // Otherwise, return the memory back to the free list. + DCHECK_EQ(m_freeListNext[index], -1); + m_freeListNext[index] = m_freeListFirst; + m_freeListFirst = index; +} + +CallbackStack::Block::Block(Block* next) +{ + m_buffer = CallbackStackMemoryPool::instance().allocate(); #if ENABLE(ASSERT) clear(); #endif - m_limit = &(m_buffer[m_blockSize]); + m_limit = &(m_buffer[CallbackStackMemoryPool::kBlockSize]); m_current = &(m_buffer[0]); m_next = next; } CallbackStack::Block::~Block() { - WTF::freePages(m_buffer, m_blockSize * sizeof(Item)); + CallbackStackMemoryPool::instance().free(m_buffer); m_buffer = nullptr; m_limit = nullptr; m_current = nullptr; @@ -38,26 +89,11 @@ #if ENABLE(ASSERT) void CallbackStack::Block::clear() { - for (size_t i = 0; i < m_blockSize; i++) + for (size_t i = 0; i < CallbackStackMemoryPool::kBlockSize; i++) m_buffer[i] = Item(0, 0); } #endif -void CallbackStack::Block::decommit() -{ - reset(); - WTF::discardSystemPages(m_buffer, m_blockSize * sizeof(Item)); -} - -void CallbackStack::Block::reset() -{ -#if ENABLE(ASSERT) - clear(); -#endif - m_current = &m_buffer[0]; - m_next = nullptr; -} - void CallbackStack::Block::invokeEphemeronCallbacks(Visitor* visitor) { // This loop can tolerate entries being added by the callbacks after @@ -80,57 +116,61 @@ } #endif -CallbackStack::CallbackStack(size_t blockSize) - : m_first(new Block(nullptr, blockSize)) - , m_last(m_first) +std::unique_ptr<CallbackStack> CallbackStack::create() +{ + return wrapUnique(new CallbackStack()); +} + +CallbackStack::CallbackStack() + : m_first(nullptr) + , m_last(nullptr) { } CallbackStack::~CallbackStack() { - RELEASE_ASSERT(isEmpty()); - delete m_first; + CHECK(isEmpty()); m_first = nullptr; m_last = nullptr; } -void CallbackStack::clear() +void CallbackStack::commit() { - Block* next; - for (Block* current = m_first->next(); current; current = next) { - next = current->next(); - delete current; - } - m_first->reset(); + DCHECK(!m_first); + m_first = new Block(m_first); m_last = m_first; } void CallbackStack::decommit() { + if (!m_first) + return; Block* next; for (Block* current = m_first->next(); current; current = next) { next = current->next(); delete current; } - m_first->decommit(); - m_last = m_first; + delete m_first; + m_last = m_first = nullptr; } bool CallbackStack::isEmpty() const { - return hasJustOneBlock() && m_first->isEmptyBlock(); + return !m_first || (hasJustOneBlock() && m_first->isEmptyBlock()); } CallbackStack::Item* CallbackStack::allocateEntrySlow() { - ASSERT(!m_first->allocateEntry()); - m_first = new Block(m_first, m_first->blockSize()); + DCHECK(m_first); + DCHECK(!m_first->allocateEntry()); + m_first = new Block(m_first); return m_first->allocateEntry(); } CallbackStack::Item* CallbackStack::popSlow() { - ASSERT(m_first->isEmptyBlock()); + DCHECK(m_first); + DCHECK(m_first->isEmptyBlock()); for (;;) { Block* next = m_first->next(); @@ -169,7 +209,7 @@ { if (from == upto) return; - ASSERT(from); + DCHECK(from); // Recurse first so we get to the newly added entries last. invokeOldestCallbacks(from->next(), upto, visitor); from->invokeEphemeronCallbacks(visitor); @@ -177,6 +217,7 @@ bool CallbackStack::hasJustOneBlock() const { + DCHECK(m_first); return !m_first->next(); }
diff --git a/third_party/WebKit/Source/platform/heap/CallbackStack.h b/third_party/WebKit/Source/platform/heap/CallbackStack.h index 97fe828..5b83580 100644 --- a/third_party/WebKit/Source/platform/heap/CallbackStack.h +++ b/third_party/WebKit/Source/platform/heap/CallbackStack.h
@@ -8,6 +8,8 @@ #include "platform/heap/BlinkGC.h" #include "wtf/Allocator.h" #include "wtf/Assertions.h" +#include "wtf/Threading.h" +#include "wtf/ThreadingPrimitives.h" namespace blink { @@ -37,10 +39,10 @@ VisitorCallback m_callback; }; - explicit CallbackStack(size_t blockSize = kDefaultBlockSize); + static std::unique_ptr<CallbackStack> create(); ~CallbackStack(); - void clear(); + void commit(); void decommit(); Item* allocateEntry(); @@ -53,6 +55,7 @@ #if ENABLE(ASSERT) bool hasCallbackForObject(const void*); #endif + bool hasJustOneBlock() const; static const size_t kMinimalBlockSize; static const size_t kDefaultBlockSize = (1 << 13); @@ -61,15 +64,12 @@ class Block { USING_FAST_MALLOC(Block); public: - Block(Block* next, size_t blockSize); + explicit Block(Block* next); ~Block(); #if ENABLE(ASSERT) void clear(); #endif - void reset(); - void decommit(); - Block* next() const { return m_next; } void setNext(Block* next) { m_next = next; } @@ -109,17 +109,41 @@ Block* m_next; }; + CallbackStack(); Item* popSlow(); Item* allocateEntrySlow(); void invokeOldestCallbacks(Block*, Block*, Visitor*); - bool hasJustOneBlock() const; Block* m_first; Block* m_last; }; +class CallbackStackMemoryPool final { + USING_FAST_MALLOC(CallbackStackMemoryPool); +public: + // 2048 * 8 * sizeof(Item) = 256 KB (64bit) is pre-allocated for the + // underlying buffer of CallbackStacks. + static const size_t kBlockSize = 2048; + static const size_t kPooledBlockCount = 8; + static const size_t kBlockBytes = kBlockSize * sizeof(CallbackStack::Item); + + static CallbackStackMemoryPool& instance(); + + void initialize(); + void shutdown(); + CallbackStack::Item* allocate(); + void free(CallbackStack::Item*); + +private: + Mutex m_mutex; + int m_freeListFirst; + int m_freeListNext[kPooledBlockCount]; + CallbackStack::Item* m_pooledMemory; +}; + ALWAYS_INLINE CallbackStack::Item* CallbackStack::allocateEntry() { + DCHECK(m_first); Item* item = m_first->allocateEntry(); if (LIKELY(!!item)) return item;
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp index 4e2ead7..c6710fd 100644 --- a/third_party/WebKit/Source/platform/heap/Heap.cpp +++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -117,6 +117,7 @@ s_isLowEndDevice = base::SysInfo::IsLowEndDevice(); GCInfoTable::init(); + CallbackStackMemoryPool::instance().initialize(); } void ProcessHeap::resetHeapCounters() @@ -135,6 +136,7 @@ RELEASE_ASSERT(ThreadHeap::allHeaps().isEmpty()); } + CallbackStackMemoryPool::instance().shutdown(); GCInfoTable::shutdown(); ASSERT(ProcessHeap::totalAllocatedSpace() == 0); s_shutdownComplete = true; @@ -225,10 +227,10 @@ , m_safePointBarrier(wrapUnique(new SafePointBarrier())) , m_freePagePool(wrapUnique(new FreePagePool)) , m_orphanedPagePool(wrapUnique(new OrphanedPagePool)) - , m_markingStack(wrapUnique(new CallbackStack())) - , m_postMarkingCallbackStack(wrapUnique(new CallbackStack())) - , m_globalWeakCallbackStack(wrapUnique(new CallbackStack())) - , m_ephemeronStack(wrapUnique(new CallbackStack(CallbackStack::kMinimalBlockSize))) + , m_markingStack(CallbackStack::create()) + , m_postMarkingCallbackStack(CallbackStack::create()) + , m_globalWeakCallbackStack(CallbackStack::create()) + , m_ephemeronStack(CallbackStack::create()) { if (ThreadState::current()->isMainThread()) s_mainThreadHeap = this; @@ -437,6 +439,14 @@ } #endif +void ThreadHeap::commitCallbackStacks() +{ + m_markingStack->commit(); + m_postMarkingCallbackStack->commit(); + m_globalWeakCallbackStack->commit(); + m_ephemeronStack->commit(); +} + void ThreadHeap::decommitCallbackStacks() { m_markingStack->decommit(); @@ -515,6 +525,7 @@ // finalization that happens when the visitorScope is torn down). ThreadState::NoAllocationScope noAllocationScope(state); + state->heap().commitCallbackStacks(); state->heap().preGC(); StackFrameDepthScope stackDepthScope; @@ -586,6 +597,7 @@ ThreadState::NoAllocationScope noAllocationScope(state); + state->heap().commitCallbackStacks(); state->preGC(); // 1. Trace the thread local persistent roots. For thread local GCs we
diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h index 24dd654e..261b26e 100644 --- a/third_party/WebKit/Source/platform/heap/Heap.h +++ b/third_party/WebKit/Source/platform/heap/Heap.h
@@ -396,6 +396,7 @@ static int arenaIndexForObjectSize(size_t); static bool isNormalArenaIndex(int); + void commitCallbackStacks(); void decommitCallbackStacks(); RecursiveMutex m_threadAttachMutex;
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp index 4b975f75..c7a7988 100644 --- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp +++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -98,6 +98,7 @@ , m_gcMixinMarker(nullptr) , m_shouldFlushHeapDoesNotContainCache(false) , m_gcState(NoGCScheduled) + , m_threadLocalWeakCallbackStack(CallbackStack::create()) , m_isolate(nullptr) , m_traceDOMWrappers(nullptr) , m_invalidateDeadObjectsInWrappersMarkingDeque(nullptr) @@ -135,18 +136,11 @@ m_likelyToBePromptlyFreed = wrapArrayUnique(new int[likelyToBePromptlyFreedArraySize]); clearArenaAges(); - - // There is little use of weak references and collections off the main thread; - // use a much lower initial block reservation. - size_t initialBlockSize = isMainThread() ? CallbackStack::kDefaultBlockSize : CallbackStack::kMinimalBlockSize; - m_threadLocalWeakCallbackStack = new CallbackStack(initialBlockSize); } ThreadState::~ThreadState() { ASSERT(checkThread()); - delete m_threadLocalWeakCallbackStack; - m_threadLocalWeakCallbackStack = nullptr; for (int i = 0; i < BlinkGC::NumberOfArenas; ++i) delete m_arenas[i]; @@ -963,7 +957,8 @@ // should only process callbacks that's found to be reachable by // the latest GC, when it eventually gets to next perform // thread-local weak processing. - m_threadLocalWeakCallbackStack->clear(); + m_threadLocalWeakCallbackStack->decommit(); + m_threadLocalWeakCallbackStack->commit(); } void ThreadState::postGC(BlinkGC::GCType gcType)
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h index 16825dc..ad16e0ba 100644 --- a/third_party/WebKit/Source/platform/heap/ThreadState.h +++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
@@ -651,7 +651,7 @@ bool m_shouldFlushHeapDoesNotContainCache; GCState m_gcState; - CallbackStack* m_threadLocalWeakCallbackStack; + std::unique_ptr<CallbackStack> m_threadLocalWeakCallbackStack; // Pre-finalizers are called in the reverse order in which they are // registered by the constructors (including constructors of Mixin objects)
diff --git a/third_party/WebKit/Source/platform/mojo/MojoHelper.h b/third_party/WebKit/Source/platform/mojo/MojoHelper.h index 6493495..e37112b 100644 --- a/third_party/WebKit/Source/platform/mojo/MojoHelper.h +++ b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
@@ -5,22 +5,10 @@ #ifndef MojoHelper_h #define MojoHelper_h -#include "base/callback.h" #include "mojo/public/cpp/bindings/wtf_array.h" #include "platform/heap/HeapAllocator.h" -#include "wtf/Functional.h" #include <utility> -namespace blink { - -template <typename R, typename... Args> -base::Callback<R(Args...)> createBaseCallback(std::unique_ptr<Function<R(Args...)>> functor) -{ - return static_cast<base::Callback<R(Args...)>>(*functor); -} - -} // namespace blink - namespace mojo { // A |TypeConverter| that will create a |WTFArray<T>| containing a copy of the
diff --git a/third_party/WebKit/Source/platform/mojo/SecurityOriginStructTraits.h b/third_party/WebKit/Source/platform/mojo/SecurityOriginStructTraits.h index b632da4..fac5b4b 100644 --- a/third_party/WebKit/Source/platform/mojo/SecurityOriginStructTraits.h +++ b/third_party/WebKit/Source/platform/mojo/SecurityOriginStructTraits.h
@@ -23,7 +23,7 @@ } static uint16_t port(const RefPtr<::blink::SecurityOrigin>& origin) { - return origin->port(); + return origin->effectivePort(); } static bool unique(const RefPtr<::blink::SecurityOrigin>& origin) {
diff --git a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp index 0b5b7ce0..5bd5560 100644 --- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp +++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -35,7 +35,7 @@ void ProgrammaticScrollAnimator::notifyPositionChanged(const DoublePoint& offset) { - m_scrollableArea->scrollPositionChanged(offset, ProgrammaticScroll); + scrollPositionChanged(offset, ProgrammaticScroll); } void ProgrammaticScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp index 9a5b5efe..5602199 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -200,14 +200,13 @@ } void ScrollAnimator::adjustAnimationAndSetScrollPosition( - IntSize adjustment, ScrollType scrollType) + const DoublePoint& position, ScrollType scrollType) { - DoublePoint adjustedPos = m_scrollableArea->clampScrollPosition( - m_scrollableArea->scrollPositionDouble() + adjustment); + DoublePoint adjustedPos = m_scrollableArea->clampScrollPosition(position); IntSize actualAdjustment = roundedIntPoint(adjustedPos) - roundedIntPoint(m_scrollableArea->scrollPositionDouble()); - m_scrollableArea->setScrollPosition(adjustedPos, scrollType); + scrollPositionChanged(adjustedPos, scrollType); if (m_runState == RunState::Idle) { adjustImplOnlyScrollOffsetAnimation(actualAdjustment);
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h index bf9f80f1..64c6121 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h
@@ -59,7 +59,7 @@ // ScrollAnimatorCompositorCoordinator implementation. void tickAnimation(double monotonicTime) override; void cancelAnimation() override; - void adjustAnimationAndSetScrollPosition(IntSize adjustment, ScrollType) override; + void adjustAnimationAndSetScrollPosition(const DoublePoint& position, ScrollType) override; void takeOverCompositorAnimation() override; void resetAnimationState() override; void updateCompositorAnimations() override;
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.cpp index 1ed8f2c..e6f0cf7 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.cpp
@@ -88,7 +88,7 @@ void ScrollAnimatorBase::notifyPositionChanged() { - m_scrollableArea->scrollPositionChanged(m_currentPos, UserScroll); + scrollPositionChanged(m_currentPos, UserScroll); } DEFINE_TRACE(ScrollAnimatorBase)
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp index 9c7c007b..b013125 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp
@@ -293,11 +293,18 @@ updateImplOnlyCompositorAnimations(); } +void ScrollAnimatorCompositorCoordinator::scrollPositionChanged( + const DoublePoint& offset, ScrollType scrollType) +{ + getScrollableArea()->scrollPositionChanged(offset, scrollType); +} + void ScrollAnimatorCompositorCoordinator::adjustAnimationAndSetScrollPosition( - IntSize adjustment, ScrollType scrollType) { + const DoublePoint& position, ScrollType scrollType) +{ // Subclasses should override this and adjust the animation as necessary. - getScrollableArea()->setScrollPosition( - getScrollableArea()->scrollPositionDouble() + adjustment, scrollType); + DoublePoint adjustedPos = getScrollableArea()->clampScrollPosition(position); + scrollPositionChanged(adjustedPos, scrollType); } void ScrollAnimatorCompositorCoordinator::adjustImplOnlyScrollOffsetAnimation(
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h index a7a83e7a..d893baf 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
@@ -46,7 +46,7 @@ virtual void takeOverCompositorAnimation(); // Updates the scroll position of the animator's ScrollableArea by // adjustment and update the target of an ongoing scroll offset animation. - virtual void adjustAnimationAndSetScrollPosition(IntSize adjustment, ScrollType); + virtual void adjustAnimationAndSetScrollPosition(const DoublePoint& position, ScrollType); virtual void updateCompositorAnimations(); virtual ScrollableArea* getScrollableArea() const = 0; @@ -60,6 +60,8 @@ protected: explicit ScrollAnimatorCompositorCoordinator(); + void scrollPositionChanged(const DoublePoint& offset, ScrollType); + void adjustImplOnlyScrollOffsetAnimation(const IntSize& adjustment); IntSize implOnlyAnimationAdjustmentForTesting() { return m_implOnlyAnimationAdjustment; }
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp index 1a8fb974..c3436ce 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp
@@ -627,9 +627,8 @@ EXPECT_GT(pos.y(), 0); // Adjustment - IntSize adjustment = IntSize(10, -10); - animator->adjustAnimationAndSetScrollPosition(adjustment, AnchoringScroll); - EXPECT_EQ(pos + FloatSize(adjustment), animator->currentPosition()); + FloatPoint newPos = pos + FloatSize(10, -10); + animator->adjustAnimationAndSetScrollPosition(newPos, AnchoringScroll); EXPECT_EQ(FloatPoint(110, 90), animator->desiredTargetPosition()); // Animation finished
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp index 5a15ad7..a01daf6 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
@@ -193,9 +193,11 @@ switch (scrollType) { case CompositorScroll: - case AnchoringScroll: scrollPositionChanged(clampScrollPosition(position), scrollType); break; + case AnchoringScroll: + scrollAnimator().adjustAnimationAndSetScrollPosition(position, scrollType); + break; case ProgrammaticScroll: programmaticScrollHelper(position, behavior); break;
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h index bfc32cb..6284c86 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
@@ -44,6 +44,7 @@ class FloatPoint; class GraphicsLayer; class HostWindow; +class LayoutBox; class PlatformWheelEvent; class ProgrammaticScrollAnimator; struct ScrollAlignment; @@ -271,8 +272,11 @@ // Returns the widget associated with this ScrollableArea. virtual Widget* getWidget() { return nullptr; } + virtual LayoutBox* layoutBox() const { return nullptr; } + virtual bool isFrameView() const { return false; } virtual bool isPaintLayerScrollableArea() const { return false; } + virtual bool isRootFrameViewport() const { return false; } // Need to promptly let go of owned animator objects. EAGERLY_FINALIZE(); @@ -290,8 +294,7 @@ void resetScrollOriginChanged() { m_scrollOriginChanged = false; } // Needed to let the animators call scrollPositionChanged. - friend class ScrollAnimatorBase; - friend class ProgrammaticScrollAnimator; + friend class ScrollAnimatorCompositorCoordinator; void scrollPositionChanged(const DoublePoint&, ScrollType); bool horizontalScrollbarNeedsPaintInvalidation() const { return m_horizontalScrollbarNeedsPaintInvalidation; }
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp index c2bcdab1..330a8473 100644 --- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp +++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -185,7 +185,6 @@ function.appendArgument(array); function.appendArgument(property); function.appendArgument(groupName); - function.appendArgument(canAccessInspectedWindow()); function.appendArgument(forceValueType); function.appendArgument(generatePreview); bool hadException = false; @@ -198,7 +197,6 @@ V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "wrapObjectsInArray"); function.appendArgument(array); function.appendArgument(groupName); - function.appendArgument(canAccessInspectedWindow()); function.appendArgument(forceValueType); function.appendArgument(generatePreview); bool hadException = false; @@ -211,7 +209,6 @@ V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "wrapObject"); function.appendArgument(value); function.appendArgument(groupName); - function.appendArgument(canAccessInspectedWindow()); function.appendArgument(forceValueType); function.appendArgument(generatePreview); bool hadException = false; @@ -225,7 +222,6 @@ { v8::HandleScope handles(m_context->isolate()); V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "wrapTable"); - function.appendArgument(canAccessInspectedWindow()); function.appendArgument(table); if (columns.IsEmpty()) function.appendArgument(false); @@ -269,14 +265,6 @@ DCHECK(!hadException); } -bool InjectedScript::canAccessInspectedWindow() const -{ - v8::Local<v8::Context> callingContext = m_context->isolate()->GetCallingContext(); - if (callingContext.IsEmpty()) - return true; - return m_context->debugger()->client()->callingContextCanAccessContext(callingContext, m_context->context()); -} - v8::Local<v8::Value> InjectedScript::v8Value() const { return m_value.Get(m_context->isolate());
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h index 7dae28a..ab847ee 100644 --- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h +++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h
@@ -159,7 +159,6 @@ private: InjectedScript(InspectedContext*, v8::Local<v8::Object>, std::unique_ptr<InjectedScriptNative>); - bool canAccessInspectedWindow() const; v8::Local<v8::Value> v8Value() const; v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, const String16& groupName, bool forceValueType, bool generatePreview) const; v8::Local<v8::Object> commandLineAPI();
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js index 743cc06f..a310ea8 100644 --- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js +++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -222,72 +222,49 @@ /** * @param {*} object * @param {string} groupName - * @param {boolean} canAccessInspectedGlobalObject * @param {boolean} forceValueType * @param {boolean} generatePreview * @return {!RuntimeAgent.RemoteObject} */ - wrapObject: function(object, groupName, canAccessInspectedGlobalObject, forceValueType, generatePreview) + wrapObject: function(object, groupName, forceValueType, generatePreview) { - if (canAccessInspectedGlobalObject) - return this._wrapObject(object, groupName, forceValueType, generatePreview); - return this._fallbackWrapper(object); + return this._wrapObject(object, groupName, forceValueType, generatePreview); }, /** * @param {!Array<!Object>} array * @param {string} property * @param {string} groupName - * @param {boolean} canAccessInspectedGlobalObject * @param {boolean} forceValueType * @param {boolean} generatePreview */ - wrapPropertyInArray: function(array, property, groupName, canAccessInspectedGlobalObject, forceValueType, generatePreview) + wrapPropertyInArray: function(array, property, groupName, forceValueType, generatePreview) { for (var i = 0; i < array.length; ++i) { if (typeof array[i] === "object" && property in array[i]) - array[i][property] = this.wrapObject(array[i][property], groupName, canAccessInspectedGlobalObject, forceValueType, generatePreview); + array[i][property] = this.wrapObject(array[i][property], groupName, forceValueType, generatePreview); } }, /** * @param {!Array<*>} array * @param {string} groupName - * @param {boolean} canAccessInspectedGlobalObject * @param {boolean} forceValueType * @param {boolean} generatePreview */ - wrapObjectsInArray: function(array, groupName, canAccessInspectedGlobalObject, forceValueType, generatePreview) + wrapObjectsInArray: function(array, groupName, forceValueType, generatePreview) { for (var i = 0; i < array.length; ++i) - array[i] = this.wrapObject(array[i], groupName, canAccessInspectedGlobalObject, forceValueType, generatePreview); + array[i] = this.wrapObject(array[i], groupName, forceValueType, generatePreview); }, /** - * @param {*} object - * @return {!RuntimeAgent.RemoteObject} - */ - _fallbackWrapper: function(object) - { - var result = { __proto__: null }; - result.type = typeof object; - if (this.isPrimitiveValue(object)) - result.value = object; - else - result.description = toString(object); - return /** @type {!RuntimeAgent.RemoteObject} */ (result); - }, - - /** - * @param {boolean} canAccessInspectedGlobalObject * @param {!Object} table * @param {!Array.<string>|string|boolean} columns * @return {!RuntimeAgent.RemoteObject} */ - wrapTable: function(canAccessInspectedGlobalObject, table, columns) + wrapTable: function(table, columns) { - if (!canAccessInspectedGlobalObject) - return this._fallbackWrapper(table); var columnNames = null; if (typeof columns === "string") columns = [columns];
diff --git a/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp b/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp index c72cadc..8bcc475f 100644 --- a/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp +++ b/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp
@@ -95,7 +95,7 @@ v8::MicrotasksScope microtasks(m_isolate, v8::MicrotasksScope::kDoNotRunMicrotasks); v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(callFrame->Get(toV8StringInternalized(m_isolate, "details"))); - return v8::Local<v8::Object>::Cast(func->Call(m_isolate->GetCurrentContext(), callFrame, 0, nullptr).ToLocalChecked()); + return v8::Local<v8::Object>::Cast(func->Call(m_debuggerContext.Get(m_isolate), callFrame, 0, nullptr).ToLocalChecked()); } v8::MaybeLocal<v8::Value> JavaScriptCallFrame::evaluate(v8::Local<v8::Value> expression) @@ -103,7 +103,7 @@ v8::MicrotasksScope microtasks(m_isolate, v8::MicrotasksScope::kRunMicrotasks); v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); v8::Local<v8::Function> evalFunction = v8::Local<v8::Function>::Cast(callFrame->Get(toV8StringInternalized(m_isolate, "evaluate"))); - return evalFunction->Call(m_isolate->GetCurrentContext(), callFrame, 1, &expression); + return evalFunction->Call(m_debuggerContext.Get(m_isolate), callFrame, 1, &expression); } v8::MaybeLocal<v8::Value> JavaScriptCallFrame::restart() @@ -112,7 +112,7 @@ v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); v8::Local<v8::Function> restartFunction = v8::Local<v8::Function>::Cast(callFrame->Get(toV8StringInternalized(m_isolate, "restart"))); v8::Debug::SetLiveEditEnabled(m_isolate, true); - v8::MaybeLocal<v8::Value> result = restartFunction->Call(m_isolate->GetCurrentContext(), callFrame, 0, nullptr); + v8::MaybeLocal<v8::Value> result = restartFunction->Call(m_debuggerContext.Get(m_isolate), callFrame, 0, nullptr); v8::Debug::SetLiveEditEnabled(m_isolate, false); return result; } @@ -127,7 +127,7 @@ variableName, newValue }; - return setVariableValueFunction->Call(m_isolate->GetCurrentContext(), callFrame, PROTOCOL_ARRAY_LENGTH(argv), argv); + return setVariableValueFunction->Call(m_debuggerContext.Get(m_isolate), callFrame, PROTOCOL_ARRAY_LENGTH(argv), argv); } } // namespace blink
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp index 53ccca1..9f121df 100644 --- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp +++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
@@ -880,15 +880,15 @@ positions.reserve(inPositions->length()); for (size_t i = 0; i < inPositions->length(); ++i) { protocol::Debugger::ScriptPosition* position = inPositions->get(i); - if (position->getLine() < 0) { + if (position->getLineNumber() < 0) { *error = "Position missing 'line' or 'line' < 0."; return; } - if (position->getColumn() < 0) { + if (position->getColumnNumber() < 0) { *error = "Position missing 'column' or 'column' < 0."; return; } - positions.push_back(std::make_pair(position->getLine(), position->getColumn())); + positions.push_back(std::make_pair(position->getLineNumber(), position->getColumnNumber())); } for (size_t i = 1; i < positions.size(); ++i) { @@ -958,17 +958,12 @@ if (m_pausedContext.IsEmpty() || !m_pausedCallFrames.size()) return Array<CallFrame>::create(); ErrorString ignored; - InjectedScript* topFrameInjectedScript = m_session->findInjectedScript(&ignored, V8DebuggerImpl::contextId(m_pausedContext.Get(m_isolate))); - if (!topFrameInjectedScript) { - // Context has been reported as removed while on pause. - return Array<CallFrame>::create(); - } - v8::HandleScope handles(m_isolate); - v8::Local<v8::Context> context = topFrameInjectedScript->context()->context(); - v8::Context::Scope contextScope(context); + v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext(m_isolate); + v8::Context::Scope contextScope(debuggerContext); v8::Local<v8::Array> objects = v8::Array::New(m_isolate); + for (size_t frameOrdinal = 0; frameOrdinal < m_pausedCallFrames.size(); ++frameOrdinal) { const std::unique_ptr<JavaScriptCallFrame>& currentCallFrame = m_pausedCallFrames[frameOrdinal]; @@ -978,34 +973,42 @@ int contextId = currentCallFrame->contextId(); InjectedScript* injectedScript = contextId ? m_session->findInjectedScript(&ignored, contextId) : nullptr; - if (!injectedScript) - injectedScript = topFrameInjectedScript; - String16 callFrameId = RemoteCallFrameId::serialize(injectedScript->context()->contextId(), frameOrdinal); - if (hasInternalError(errorString, !details->Set(context, toV8StringInternalized(m_isolate, "callFrameId"), toV8String(m_isolate, callFrameId)).FromMaybe(false))) + String16 callFrameId = RemoteCallFrameId::serialize(contextId, frameOrdinal); + if (hasInternalError(errorString, !details->Set(debuggerContext, toV8StringInternalized(m_isolate, "callFrameId"), toV8String(m_isolate, callFrameId)).FromMaybe(false))) return Array<CallFrame>::create(); - v8::Local<v8::Value> scopeChain; - if (hasInternalError(errorString, !details->Get(context, toV8StringInternalized(m_isolate, "scopeChain")).ToLocal(&scopeChain) || !scopeChain->IsArray())) - return Array<CallFrame>::create(); - v8::Local<v8::Array> scopeChainArray = scopeChain.As<v8::Array>(); - if (!injectedScript->wrapPropertyInArray(errorString, scopeChainArray, toV8StringInternalized(m_isolate, "object"), V8InspectorSession::backtraceObjectGroup)) - return Array<CallFrame>::create(); - - if (!injectedScript->wrapObjectProperty(errorString, details, toV8StringInternalized(m_isolate, "this"), V8InspectorSession::backtraceObjectGroup)) - return Array<CallFrame>::create(); - - if (details->Has(context, toV8StringInternalized(m_isolate, "returnValue")).FromMaybe(false)) { - if (!injectedScript->wrapObjectProperty(errorString, details, toV8StringInternalized(m_isolate, "returnValue"), V8InspectorSession::backtraceObjectGroup)) + if (injectedScript) { + v8::Local<v8::Value> scopeChain; + if (hasInternalError(errorString, !details->Get(debuggerContext, toV8StringInternalized(m_isolate, "scopeChain")).ToLocal(&scopeChain) || !scopeChain->IsArray())) + return Array<CallFrame>::create(); + v8::Local<v8::Array> scopeChainArray = scopeChain.As<v8::Array>(); + if (!injectedScript->wrapPropertyInArray(errorString, scopeChainArray, toV8StringInternalized(m_isolate, "object"), V8InspectorSession::backtraceObjectGroup)) + return Array<CallFrame>::create(); + if (!injectedScript->wrapObjectProperty(errorString, details, toV8StringInternalized(m_isolate, "this"), V8InspectorSession::backtraceObjectGroup)) + return Array<CallFrame>::create(); + if (details->Has(debuggerContext, toV8StringInternalized(m_isolate, "returnValue")).FromMaybe(false)) { + if (!injectedScript->wrapObjectProperty(errorString, details, toV8StringInternalized(m_isolate, "returnValue"), V8InspectorSession::backtraceObjectGroup)) + return Array<CallFrame>::create(); + } + } else { + if (hasInternalError(errorString, !details->Set(debuggerContext, toV8StringInternalized(m_isolate, "scopeChain"), v8::Array::New(m_isolate, 0)).FromMaybe(false))) + return Array<CallFrame>::create(); + v8::Local<v8::Object> remoteObject = v8::Object::New(m_isolate); + if (hasInternalError(errorString, !remoteObject->Set(debuggerContext, toV8StringInternalized(m_isolate, "type"), toV8StringInternalized(m_isolate, "undefined")).FromMaybe(false))) + return Array<CallFrame>::create(); + if (hasInternalError(errorString, !details->Set(debuggerContext, toV8StringInternalized(m_isolate, "this"), remoteObject).FromMaybe(false))) + return Array<CallFrame>::create(); + if (hasInternalError(errorString, !details->Delete(debuggerContext, toV8StringInternalized(m_isolate, "returnValue")).FromMaybe(false))) return Array<CallFrame>::create(); } - if (hasInternalError(errorString, !objects->Set(context, frameOrdinal, details).FromMaybe(false))) + if (hasInternalError(errorString, !objects->Set(debuggerContext, frameOrdinal, details).FromMaybe(false))) return Array<CallFrame>::create(); } protocol::ErrorSupport errorSupport; - std::unique_ptr<Array<CallFrame>> callFrames = Array<CallFrame>::parse(toProtocolValue(context, objects).get(), &errorSupport); + std::unique_ptr<Array<CallFrame>> callFrames = Array<CallFrame>::parse(toProtocolValue(debuggerContext, objects).get(), &errorSupport); if (hasInternalError(errorString, !callFrames)) return Array<CallFrame>::create(); return callFrames;
diff --git a/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json b/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json index 9cbc9361..5a72748d 100644 --- a/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json +++ b/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json
@@ -347,8 +347,8 @@ "hidden": true, "type": "object", "properties": [ - { "name": "line", "type": "integer" }, - { "name": "column", "type": "integer" } + { "name": "lineNumber", "type": "integer" }, + { "name": "columnNumber", "type": "integer" } ], "description": "Location in the source code." },
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp index 7007f4b..c122b748 100644 --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -1040,7 +1040,7 @@ void ChromeClientImpl::registerViewportLayers() const { if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView()) - m_webView->page()->frameHost().visualViewport().registerLayersWithTreeView(m_webView->layerTreeView()); + m_webView->registerViewportLayersWithCompositor(); } void ChromeClientImpl::didUpdateTopControls() const
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp index 1ce4ec7..c126931 100644 --- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp +++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -911,11 +911,11 @@ switch (event.windowsKeyCode) { #if !OS(MACOSX) case 'A': - WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebString::fromUTF8("SelectAll")); + WebFrame::fromFrame(focusedCoreFrame())->toWebLocalFrame()->executeCommand(WebString::fromUTF8("SelectAll")); return WebInputEventResult::HandledSystem; case VKEY_INSERT: case 'C': - WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebString::fromUTF8("Copy")); + WebFrame::fromFrame(focusedCoreFrame())->toWebLocalFrame()->executeCommand(WebString::fromUTF8("Copy")); return WebInputEventResult::HandledSystem; #endif // Match FF behavior in the sense that Ctrl+home/end are the only Ctrl
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp index e143f82..57fa80b7 100644 --- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp +++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -903,10 +903,9 @@ LayoutBox* box = toLayoutBox(ownerElement->layoutObject()); - // Plugin frameRects are in absolute space within their frame. - FloatRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(frameRect()), UseTransforms).boundingBox(); - - LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace); + // Note: frameRect() for this plugin is equal to contentBoxRect, mapped to the containing view space, and rounded off. + // See LayoutPart.cpp::updateWidgetGeometryInternal. To remove the lossy effect of rounding off, use contentBoxRect directly. + LayoutRect unclippedAbsoluteRect(box->contentBoxRect()); box->mapToVisualRectInAncestorSpace(rootView, unclippedAbsoluteRect); // The frameRect is already in absolute space of the local frame to the plugin. @@ -922,11 +921,10 @@ LayoutRect unclippedLayoutLocalRect = layoutClippedLocalRect; layoutClippedLocalRect.intersect(LayoutRect(rootView->frameView()->visibleContentRect())); - // TODO(chrishtr): intentionally ignore transform, because the positioning of frameRect() does also. This is probably wrong. - unclippedIntLocalRect = box->absoluteToLocalQuad(FloatRect(unclippedLayoutLocalRect), TraverseDocumentBoundaries).enclosingBoundingBox(); + unclippedIntLocalRect = box->absoluteToLocalQuad(FloatRect(unclippedLayoutLocalRect), TraverseDocumentBoundaries | UseTransforms).enclosingBoundingBox(); // As a performance optimization, map the clipped rect separately if is different than the unclipped rect. if (layoutClippedLocalRect != unclippedLayoutLocalRect) - clippedLocalRect = box->absoluteToLocalQuad(FloatRect(layoutClippedLocalRect), TraverseDocumentBoundaries).enclosingBoundingBox(); + clippedLocalRect = box->absoluteToLocalQuad(FloatRect(layoutClippedLocalRect), TraverseDocumentBoundaries | UseTransforms).enclosingBoundingBox(); else clippedLocalRect = unclippedIntLocalRect; }
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp index b02db91..17e6630a5 100644 --- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp +++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -326,154 +326,6 @@ return 0; } -void WebRemoteFrameImpl::insertText(const WebString&) -{ - NOTREACHED(); -} - -void WebRemoteFrameImpl::setMarkedText(const WebString&, unsigned location, unsigned length) -{ - NOTREACHED(); -} - -void WebRemoteFrameImpl::unmarkText() -{ - NOTREACHED(); -} - -bool WebRemoteFrameImpl::hasMarkedText() const -{ - NOTREACHED(); - return false; -} - -WebRange WebRemoteFrameImpl::markedRange() const -{ - NOTREACHED(); - return WebRange(); -} - -bool WebRemoteFrameImpl::firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const -{ - NOTREACHED(); - return false; -} - -size_t WebRemoteFrameImpl::characterIndexForPoint(const WebPoint&) const -{ - NOTREACHED(); - return 0; -} - -bool WebRemoteFrameImpl::executeCommand(const WebString&) -{ - NOTREACHED(); - return false; -} - -bool WebRemoteFrameImpl::executeCommand(const WebString&, const WebString& value) -{ - NOTREACHED(); - return false; -} - -bool WebRemoteFrameImpl::isCommandEnabled(const WebString&) const -{ - NOTREACHED(); - return false; -} - -void WebRemoteFrameImpl::enableContinuousSpellChecking(bool) -{ -} - -bool WebRemoteFrameImpl::isContinuousSpellCheckingEnabled() const -{ - return false; -} - -void WebRemoteFrameImpl::requestTextChecking(const WebElement&) -{ - NOTREACHED(); -} - -void WebRemoteFrameImpl::removeSpellingMarkers() -{ - NOTREACHED(); -} - -bool WebRemoteFrameImpl::hasSelection() const -{ - NOTREACHED(); - return false; -} - -WebRange WebRemoteFrameImpl::selectionRange() const -{ - NOTREACHED(); - return WebRange(); -} - -WebString WebRemoteFrameImpl::selectionAsText() const -{ - NOTREACHED(); - return WebString(); -} - -WebString WebRemoteFrameImpl::selectionAsMarkup() const -{ - NOTREACHED(); - return WebString(); -} - -bool WebRemoteFrameImpl::selectWordAroundCaret() -{ - NOTREACHED(); - return false; -} - -void WebRemoteFrameImpl::selectRange(const WebPoint& base, const WebPoint& extent) -{ - NOTREACHED(); -} - -void WebRemoteFrameImpl::selectRange(const WebRange&) -{ - NOTREACHED(); -} - -void WebRemoteFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint& extent, WebFrame::TextGranularity granularity) -{ - NOTREACHED(); -} - -void WebRemoteFrameImpl::moveCaretSelection(const WebPoint&) -{ - NOTREACHED(); -} - -bool WebRemoteFrameImpl::setEditableSelectionOffsets(int start, int end) -{ - NOTREACHED(); - return false; -} - -bool WebRemoteFrameImpl::setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) -{ - NOTREACHED(); - return false; -} - -void WebRemoteFrameImpl::extendSelectionAndDelete(int before, int after) -{ - NOTREACHED(); -} - -void WebRemoteFrameImpl::setCaretVisible(bool) -{ - NOTREACHED(); -} - int WebRemoteFrameImpl::printBegin(const WebPrintParams&, const WebNode& constrainToNode) { NOTREACHED();
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h index 052dec55..82cde800 100644 --- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h +++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
@@ -82,33 +82,6 @@ void dispatchWillSendRequest(WebURLRequest&) override; WebURLLoader* createAssociatedURLLoader(const WebURLLoaderOptions&) override; unsigned unloadListenerCount() const override; - void insertText(const WebString&) override; - void setMarkedText(const WebString&, unsigned location, unsigned length) override; - void unmarkText() override; - bool hasMarkedText() const override; - WebRange markedRange() const override; - bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const override; - size_t characterIndexForPoint(const WebPoint&) const override; - bool executeCommand(const WebString&) override; - bool executeCommand(const WebString&, const WebString& value) override; - bool isCommandEnabled(const WebString&) const override; - void enableContinuousSpellChecking(bool) override; - bool isContinuousSpellCheckingEnabled() const override; - void requestTextChecking(const WebElement&) override; - void removeSpellingMarkers() override; - bool hasSelection() const override; - WebRange selectionRange() const override; - WebString selectionAsText() const override; - WebString selectionAsMarkup() const override; - bool selectWordAroundCaret() override; - void selectRange(const WebPoint& base, const WebPoint& extent) override; - void selectRange(const WebRange&) override; - void moveRangeSelection(const WebPoint& base, const WebPoint& extent, WebFrame::TextGranularity = CharacterGranularity) override; - void moveCaretSelection(const WebPoint&) override; - bool setEditableSelectionOffsets(int start, int end) override; - bool setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) override; - void extendSelectionAndDelete(int before, int after) override; - void setCaretVisible(bool) override; int printBegin(const WebPrintParams&, const WebNode& constrainToNode) override; float printPage(int pageToPrint, WebCanvas*) override; float getPrintPageShrink(int page) override;
diff --git a/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp b/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp index 0e707c4b..a785c99 100644 --- a/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp +++ b/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp
@@ -60,11 +60,6 @@ RuntimeEnabledFeatures::setTestFeaturesEnabled(enable); } -void WebRuntimeFeatures::enableApplicationCache(bool enable) -{ - RuntimeEnabledFeatures::setApplicationCacheEnabled(enable); -} - void WebRuntimeFeatures::enableAudioOutputDevices(bool enable) { RuntimeEnabledFeatures::setAudioOutputDevicesEnabled(enable);
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index 62a586d0d..05a2cb93 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2896,9 +2896,15 @@ return WebLocalFrameImpl::fromFrame(toLocalFrame(frame)); } -WebFrame* WebViewImpl::focusedFrame() +WebLocalFrame* WebViewImpl::focusedFrame() { - return WebFrame::fromFrame(focusedCoreFrame()); + Frame* frame = focusedCoreFrame(); + // TODO(yabinh): focusedCoreFrame() should always return a local frame, and + // the following check should be unnecessary. + // See crbug.com/625068 + if (!frame || !frame->isLocalFrame()) + return nullptr; + return WebLocalFrameImpl::fromFrame(toLocalFrame(frame)); } void WebViewImpl::setFocusedFrame(WebFrame* frame) @@ -4182,6 +4188,36 @@ return m_tabsToLinks; } +void WebViewImpl::registerViewportLayersWithCompositor() +{ + DCHECK(m_layerTreeView); + DCHECK(!page()->deprecatedLocalMainFrame()->contentLayoutItem().isNull()); + + PaintLayerCompositor* compositor = + page()->deprecatedLocalMainFrame()->contentLayoutItem().compositor(); + + DCHECK(compositor); + + // Get the outer viewport scroll layer. + WebLayer* scrollLayer = + compositor->scrollLayer() + ? compositor->scrollLayer()->platformLayer() + : nullptr; + + VisualViewport& visualViewport = page()->frameHost().visualViewport(); + + // TODO(bokan): This was moved here from when registerViewportLayers was a + // part of VisualViewport and maybe doesn't belong here. See comment inside + // the mehtod. + visualViewport.setScrollLayerOnScrollbars(scrollLayer); + + m_layerTreeView->registerViewportLayers( + visualViewport.overscrollElasticityLayer()->platformLayer(), + visualViewport.pageScaleLayer()->platformLayer(), + visualViewport.scrollLayer()->platformLayer(), + scrollLayer); +} + void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) { if (!m_layerTreeView) @@ -4201,7 +4237,7 @@ m_layerTreeView->setRootLayer(*m_rootLayer); // We register viewport layers here since there may not be a layer // tree view prior to this point. - visualViewport.registerLayersWithTreeView(m_layerTreeView); + registerViewportLayersWithCompositor(); updatePageOverlays(); // TODO(enne): Work around page visibility changes not being // propagated to the WebView in some circumstances. This needs to @@ -4217,7 +4253,7 @@ // attempt to paint too early in the next page load. m_layerTreeView->setDeferCommits(true); m_layerTreeView->clearRootLayer(); - visualViewport.clearLayersForTreeView(m_layerTreeView); + m_layerTreeView->clearViewportLayers(); } }
diff --git a/third_party/WebKit/Source/web/WebViewImpl.h b/third_party/WebKit/Source/web/WebViewImpl.h index af2b149..75da1eb 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.h +++ b/third_party/WebKit/Source/web/WebViewImpl.h
@@ -183,7 +183,7 @@ WebFrame* mainFrame() override; WebFrame* findFrameByName( const WebString& name, WebFrame* relativeToFrame) override; - WebFrame* focusedFrame() override; + WebLocalFrame* focusedFrame() override; void setFocusedFrame(WebFrame*) override; void focusDocumentView(WebFrame*) override; void setInitialFocus(bool reverse) override; @@ -425,6 +425,7 @@ } GraphicsLayer* rootGraphicsLayer(); + void registerViewportLayersWithCompositor(); PaintLayerCompositor* compositor() const; void scheduleAnimation(); CompositorAnimationTimeline* linkHighlightsTimeline() const { return m_linkHighlightsTimeline.get(); }
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp index 4fa92d16..bf4f4cd7a 100644 --- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp +++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -939,7 +939,7 @@ // the range and its end). Do a sanity check that the expected text is // selected mainFrame->executeScript(WebScriptSource("selectRange();")); - EXPECT_EQ("ir", mainFrame->selectionAsText().utf8()); + EXPECT_EQ("ir", mainFrame->toWebLocalFrame()->selectionAsText().utf8()); webViewImpl()->selectionBounds(baseRect, extentRect); WebPoint initialPoint(baseRect.x, baseRect.y); @@ -950,8 +950,8 @@ // the right and down one line. VisualViewport& visualViewport = frame()->page()->frameHost().visualViewport(); visualViewport.move(FloatPoint(60, 25)); - mainFrame->moveRangeSelection(initialPoint, endPoint); - EXPECT_EQ("t ", mainFrame->selectionAsText().utf8()); + mainFrame->toWebLocalFrame()->moveRangeSelection(initialPoint, endPoint); + EXPECT_EQ("t ", mainFrame->toWebLocalFrame()->selectionAsText().utf8()); } // Test that the scrollFocusedEditableElementIntoRect method works with the visual viewport.
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index 0b2963d..12fa421 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -3198,7 +3198,7 @@ WebRect baseRect; WebRect extentRect; - WebFrame* mainFrame = webViewHelper.webViewImpl()->mainFrame(); + WebLocalFrame* mainFrame = webViewHelper.webViewImpl()->mainFrame()->toWebLocalFrame(); size_t ix = mainFrame->characterIndexForPoint(WebPoint(320, 388)); EXPECT_EQ(2ul, ix); @@ -3212,7 +3212,7 @@ webViewHelper.initializeAndLoad(m_baseURL + "textbox.html", true); webViewHelper.resize(WebSize(640, 480)); - WebFrame* mainFrame = webViewHelper.webViewImpl()->mainFrame(); + WebLocalFrame* mainFrame = webViewHelper.webViewImpl()->mainFrame()->toWebLocalFrame(); mainFrame->executeScript(WebScriptSource("selectRange();")); WebRect oldRect; @@ -3667,7 +3667,7 @@ { FrameTestHelpers::WebViewHelper webViewHelper(this); webViewHelper.initializeAndLoad("about:blank", true); - WebFrame* frame = webViewHelper.webView()->mainFrame(); + WebLocalFrame* frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); // Generate a simple test case. const char simpleSource[] = "<p>Hello</p><p>World</p>"; @@ -3677,12 +3677,12 @@ WebString text = WebFrameContentDumper::dumpWebViewAsText(webViewHelper.webView(), std::numeric_limits<size_t>::max()); EXPECT_EQ("Hello\n\nWorld", text.utf8()); - const std::string html = WebFrameContentDumper::dumpAsMarkup(frame->toWebLocalFrame()).utf8(); + const std::string html = WebFrameContentDumper::dumpAsMarkup(frame).utf8(); // Load again with the output html. FrameTestHelpers::loadHTMLString(frame, html, testURL); - EXPECT_EQ(html, WebFrameContentDumper::dumpAsMarkup(frame->toWebLocalFrame()).utf8()); + EXPECT_EQ(html, WebFrameContentDumper::dumpAsMarkup(frame).utf8()); text = WebFrameContentDumper::dumpWebViewAsText(webViewHelper.webView(), std::numeric_limits<size_t>::max()); EXPECT_EQ("Hello\n\nWorld", text.utf8()); @@ -4130,12 +4130,12 @@ static std::string selectionAsString(WebFrame* frame) { - return frame->selectionAsText().utf8(); + return frame->toWebLocalFrame()->selectionAsText().utf8(); } TEST_P(ParameterizedWebFrameTest, SelectRange) { - WebFrame* frame; + WebLocalFrame* frame; WebRect startWebRect; WebRect endWebRect; @@ -4144,7 +4144,7 @@ FrameTestHelpers::WebViewHelper webViewHelper(this); initializeTextSelectionWebView(m_baseURL + "select_range_basic.html", &webViewHelper); - frame = webViewHelper.webView()->mainFrame(); + frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); EXPECT_EQ("Some test text for testing.", selectionAsString(frame)); webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); frame->executeCommand(WebString::fromUTF8("Unselect")); @@ -4156,7 +4156,7 @@ || selectionString == "Some test text for testing"); initializeTextSelectionWebView(m_baseURL + "select_range_scroll.html", &webViewHelper); - frame = webViewHelper.webView()->mainFrame(); + frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); EXPECT_EQ("Some offscreen test text for testing.", selectionAsString(frame)); webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); frame->executeCommand(WebString::fromUTF8("Unselect")); @@ -4180,7 +4180,7 @@ FrameTestHelpers::WebViewHelper webViewHelper(this); initializeTextSelectionWebView(m_baseURL + "select_range_iframe.html", &webViewHelper); frame = webViewHelper.webView()->mainFrame(); - WebFrame* subframe = frame->firstChild(); + WebLocalFrame* subframe = frame->firstChild()->toWebLocalFrame(); EXPECT_EQ("Some test text for testing.", selectionAsString(subframe)); webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); subframe->executeCommand(WebString::fromUTF8("Unselect")); @@ -4194,7 +4194,7 @@ TEST_P(ParameterizedWebFrameTest, SelectRangeDivContentEditable) { - WebFrame* frame; + WebLocalFrame* frame; WebRect startWebRect; WebRect endWebRect; @@ -4204,7 +4204,7 @@ // The selection range should be clipped to the bounds of the editable element. FrameTestHelpers::WebViewHelper webViewHelper(this); initializeTextSelectionWebView(m_baseURL + "select_range_div_editable.html", &webViewHelper); - frame = webViewHelper.webView()->mainFrame(); + frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); EXPECT_EQ("This text is initially selected.", selectionAsString(frame)); webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); @@ -4213,7 +4213,7 @@ // As above, but extending the selection to the bottom of the document. initializeTextSelectionWebView(m_baseURL + "select_range_div_editable.html", &webViewHelper); - frame = webViewHelper.webView()->mainFrame(); + frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); frame->selectRange(topLeft(startWebRect), bottomRightMinusOne(endWebRect)); @@ -4229,7 +4229,7 @@ // http://crbug.com/238334. TEST_P(ParameterizedWebFrameTest, DISABLED_SelectRangeSpanContentEditable) { - WebFrame* frame; + WebLocalFrame* frame; WebRect startWebRect; WebRect endWebRect; @@ -4239,7 +4239,7 @@ // The selection range should be clipped to the bounds of the editable element. FrameTestHelpers::WebViewHelper webViewHelper(this); initializeTextSelectionWebView(m_baseURL + "select_range_span_editable.html", &webViewHelper); - frame = webViewHelper.webView()->mainFrame(); + frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); EXPECT_EQ("This text is initially selected.", selectionAsString(frame)); webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); @@ -4248,7 +4248,7 @@ // As above, but extending the selection to the bottom of the document. initializeTextSelectionWebView(m_baseURL + "select_range_span_editable.html", &webViewHelper); - frame = webViewHelper.webView()->mainFrame(); + frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); webViewHelper.webView()->selectionBounds(startWebRect, endWebRect); frame->selectRange(topLeft(startWebRect), bottomRightMinusOne(endWebRect)); @@ -4266,7 +4266,7 @@ registerMockedHttpURLLoad("text_selection.html"); FrameTestHelpers::WebViewHelper webViewHelper(this); initializeTextSelectionWebView(m_baseURL + "text_selection.html", &webViewHelper); - WebFrame* frame = webViewHelper.webView()->mainFrame(); + WebLocalFrame* frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); // Select second span. We can move the start to include the first span. frame->executeScript(WebScriptSource("selectElement('header_2');")); @@ -4314,7 +4314,7 @@ registerMockedHttpURLLoad("text_selection.html"); FrameTestHelpers::WebViewHelper webViewHelper(this); initializeTextSelectionWebView(m_baseURL + "text_selection.html", &webViewHelper); - WebFrame* frame = webViewHelper.webView()->mainFrame(); + WebLocalFrame* frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); // Select first span. We can move the end to include the second span. frame->executeScript(WebScriptSource("selectElement('header_1');")); @@ -4716,7 +4716,7 @@ FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), m_baseURL + "select_range_basic.html"); // The frame starts with no selection. - WebFrame* frame = webViewHelper.webView()->mainFrame(); + WebLocalFrame* frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); ASSERT_TRUE(frame->hasSelection()); EXPECT_TRUE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); @@ -4747,7 +4747,7 @@ ASSERT_TRUE(frame->hasSelection()); EXPECT_FALSE(fakeSelectionLayerTreeView.getAndResetSelectionCleared()); - frame = webViewHelper.webView()->mainFrame(); + frame = webViewHelper.webView()->mainFrame()->toWebLocalFrame(); frame->executeCommand(WebString::fromUTF8("Unselect")); webViewHelper.webView()->updateAllLifecyclePhases(); ASSERT_FALSE(frame->hasSelection()); @@ -5144,7 +5144,7 @@ WebFrame* frame = webViewHelper.webView()->mainFrame(); // This test passes if this doesn't crash. - frame->moveCaretSelection(WebPoint(0, 0)); + frame->toWebLocalFrame()->moveCaretSelection(WebPoint(0, 0)); } class SpellCheckClient : public WebSpellCheckClient {
diff --git a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp index f5d7cb74..13a9031 100644 --- a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
@@ -315,7 +315,7 @@ runPendingTasks(); webView->mainFrame()->document().unwrap<Document>()->body()->getElementById("translated-plugin")->focus(); - EXPECT_TRUE(webView->mainFrame()->executeCommand("Copy")); + EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy")); EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer())); } @@ -336,7 +336,7 @@ // Make sure the right-click + Copy works in common scenario. webView->handleInputEvent(event); - EXPECT_TRUE(webView->mainFrame()->executeCommand("Copy")); + EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy")); EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer())); // Clear the clipboard buffer. @@ -349,7 +349,7 @@ // 2) document blurs the plugin, because it can. webView->clearFocusedElement(); // 3) Copy should still operate on the context node, even though the focus had shifted. - EXPECT_TRUE(webView->mainFrame()->executeCommand("Copy")); + EXPECT_TRUE(webView->mainFrame()->toWebLocalFrame()->executeCommand("Copy")); EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer())); } @@ -505,14 +505,13 @@ WebPluginContainerImpl* pluginContainerImpl = toWebPluginContainerImpl(pluginElement.pluginContainer()); DCHECK(pluginContainerImpl); - pluginContainerImpl->setFrameRect(IntRect(0, 0, 300, 300)); IntRect windowRect, clipRect, unobscuredRect; Vector<IntRect> cutOutRects; calculateGeometry(pluginContainerImpl, windowRect, clipRect, unobscuredRect, cutOutRects); - EXPECT_RECT_EQ(IntRect(10, 210, 300, 300), windowRect); - EXPECT_RECT_EQ(IntRect(0, 0, 240, 90), clipRect); - EXPECT_RECT_EQ(IntRect(0, 0, 240, 160), unobscuredRect); + EXPECT_RECT_EQ(IntRect(20, 220, 40, 40), windowRect); + EXPECT_RECT_EQ(IntRect(0, 0, 40, 40), clipRect); + EXPECT_RECT_EQ(IntRect(0, 0, 40, 40), unobscuredRect); // Cause the plugin's frame to be detached. webViewHelper.reset(); @@ -540,11 +539,9 @@ Vector<IntRect> cutOutRects; calculateGeometry(pluginContainerImpl, windowRect, clipRect, unobscuredRect, cutOutRects); - // TODO(chrishtr): these values should not be -1, they should be 0. They are -1 because WebPluginContainerImpl currently uses an IntRect for - // frameRect() to determine the position of the plugin, which results in a loss of precision if it is actually subpixel positioned. EXPECT_RECT_EQ(IntRect(0, 0, 40, 40), windowRect); - EXPECT_RECT_EQ(IntRect(-1, -1, 41, 41), clipRect); - EXPECT_RECT_EQ(IntRect(-1, -1, 41, 41), unobscuredRect); + EXPECT_RECT_EQ(IntRect(0, 0, 40, 40), clipRect); + EXPECT_RECT_EQ(IntRect(0, 0, 40, 40), unobscuredRect); // Cause the plugin's frame to be detached. webViewHelper.reset();
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp index 0f615b4..fdd36128 100644 --- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -1055,7 +1055,7 @@ { URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("input_field_populated.html")); WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "input_field_populated.html"); - WebFrame* frame = webView->mainFrame(); + WebLocalFrame* frame = webView->mainFrame()->toWebLocalFrame(); webView->setInitialFocus(false); frame->setEditableSelectionOffsets(4, 10);
diff --git a/third_party/WebKit/Source/wtf/Functional.h b/third_party/WebKit/Source/wtf/Functional.h index c23fdc7..caad8c2d 100644 --- a/third_party/WebKit/Source/wtf/Functional.h +++ b/third_party/WebKit/Source/wtf/Functional.h
@@ -229,9 +229,9 @@ return m_callback.Run(std::forward<Args>(args)...); } - explicit operator base::Callback<R(Args...)>() + friend base::Callback<R(Args...)> convertToBaseCallback(std::unique_ptr<Function> function) { - return m_callback; + return std::move(function->m_callback); } private:
diff --git a/third_party/WebKit/Tools/Scripts/update-test-expectations b/third_party/WebKit/Tools/Scripts/update-test-expectations new file mode 100755 index 0000000..c279cdc2 --- /dev/null +++ b/third_party/WebKit/Tools/Scripts/update-test-expectations
@@ -0,0 +1,18 @@ +#!/usr/bin/python +# +# 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. + +import sys + +from webkitpy.common import host +from webkitpy.layout_tests import update_test_expectations +from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestExpectationsFactory + +if __name__ == "__main__": + _host = host.Host() + return_code = update_test_expectations.main(_host, + BotTestExpectationsFactory(_host.builders), + sys.argv[1:]) + sys.exit(return_code)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builder_list.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builder_list.py index 617f587..8fbec506 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builder_list.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builder_list.py
@@ -42,8 +42,8 @@ The given dictionary maps builder names to dicts with the keys: "port_name": A fully qualified port name. "specifiers": TestExpectations specifiers for that config. Valid values are found in - TestExpectationsParser._configuration_tokens_list. - "is_try_builder": True for try bots, False for continuous waterfall builders. + TestExpectationsParser._configuration_tokens_list. specifiers is a list whose + first item is the version string and second item is the build type. Possible refactoring note: Potentially, it might make sense to use webkitpy.common.buildbot.Builder and add port_name and specifiers @@ -86,3 +86,17 @@ else: return builder_name return debug_builder_name + + def builder_name_for_specifiers(self, version, build_type): + """Returns the builder name for a give version and build type. + + Args: + version: A string with the OS version specifier. e.g. "win7", "precise", "mac10.10". + build_type: A string with the build type. e.g. "debug" or "release". + """ + for builder_name, info in sorted(self._builders.items()): + specifiers = info['specifiers'] + if specifiers[0].lower() == version.lower() and specifiers[1].lower() == build_type.lower(): + return builder_name + + return ''
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py index b875bd2..4bda1717 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py
@@ -227,6 +227,37 @@ unexpected_results_by_path[test_path] = sorted(map(exp_to_string, expectations)) return unexpected_results_by_path + def all_results_by_path(self): + """Returns all seen result types for each test. + + Returns a dictionary from each test path that has a result to a list of distinct, sorted result + strings. For example, if the test results are as follows: + + a.html IMAGE IMAGE PASS PASS PASS TIMEOUT PASS TEXT + b.html PASS PASS PASS PASS PASS PASS PASS PASS + c.html + + This method will return: + { + 'a.html': ['IMAGE', 'TEXT', 'TIMEOUT', 'PASS'], + 'b.html': ['PASS'], + } + """ + results_by_path = {} + for test_path, entry in self.results_json.walk_results(): + results_dict = entry.get(self.results_json.RESULTS_KEY, {}) + + result_types = self._all_types_in_results(results_dict) + + if not result_types: + continue + + # Distinct results as non-encoded strings. + result_strings = map(self.results_json.expectation_for_type, result_types) + + results_by_path[test_path] = sorted(result_strings) + return results_by_path + def expectation_lines(self, only_ignore_very_flaky): lines = [] for test_path, entry in self.results_json.walk_results():
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py index 99771a69..e742cfe 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
@@ -117,6 +117,33 @@ expectations = bot_test_expectations.BotTestExpectations(results_json, BuilderList(BUILDERS), set('test')) self.assertEqual(expectations.unexpected_results_by_path(), expectations_string) + def test_all_results_by_path(self): + test_data = { + 'tests': { + 'foo': { + 'multiple_pass.html': {'results': [[4, 'P'], [1, 'P'], [2, 'P']]}, + 'fail.html': {'results': [[2, 'Z']]}, + 'all_types.html': { + 'results': [[2, 'A'], [1, 'C'], [2, 'F'], [1, 'I'], [1, 'O'], [1, 'N'], [1, 'P'], [1, 'T'], + [1, 'Y'], [10, 'X'], [1, 'Z'], [1, 'K']] + }, + 'not_run.html': {'results': []}, + } + } + } + + results_json = self._results_json_from_test_data(test_data) + expectations = bot_test_expectations.BotTestExpectations(results_json, BuilderList(BUILDERS), set('test')) + results_by_path = expectations.all_results_by_path() + + expected_output = { + 'foo/multiple_pass.html': ['PASS'], + 'foo/fail.html': ['IMAGE+TEXT'], + 'foo/all_types.html': ['AUDIO', 'CRASH', 'IMAGE', 'IMAGE+TEXT', 'LEAK', 'MISSING', 'PASS', 'TEXT', 'TIMEOUT'] + } + + self.assertEqual(results_by_path, expected_output) + def test_basic(self): test_data = { 'tests': {
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py index fcaf50b..343eb47 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -488,7 +488,7 @@ result.is_skipped_outside_expectations_file = line1.is_skipped_outside_expectations_file or line2.is_skipped_outside_expectations_file return result - def to_string(self, test_configuration_converter, include_specifiers=True, include_expectations=True, include_comment=True): + def to_string(self, test_configuration_converter=None, include_specifiers=True, include_expectations=True, include_comment=True): parsed_expectation_to_string = dict([[parsed_expectation, expectation_string] for expectation_string, parsed_expectation in TestExpectations.EXPECTATIONS.items()]) @@ -1037,6 +1037,9 @@ def model(self): return self._model + def expectations(self): + return self._expectations + def get_needs_rebaseline_failures(self): return self._model.get_test_set(NEEDS_REBASELINE)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py new file mode 100644 index 0000000..dd7b722 --- /dev/null +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py
@@ -0,0 +1,291 @@ +# 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. + +"""Updates TestExpectations based on results in builder bots. + +Scans the TestExpectations file and uses results from actual builder bots runs +to remove tests that are marked as flaky but don't fail in the specified way. + +E.g. If a test has this expectation: + bug(test) fast/test.html [ Failure Pass ] + +And all the runs on builders have passed the line will be removed. + +Additionally, the runs don't all have to be Passing to remove the line; +as long as the non-Passing results are of a type not specified in the +expectation this line will be removed. For example, if this is the +expectation: + + bug(test) fast/test.html [ Crash Pass ] + +But the results on the builders show only Passes and Timeouts, the line +will be removed since there's no Crash results. +""" + +import argparse +import logging + +from webkitpy.layout_tests.models.test_expectations import TestExpectations + +_log = logging.getLogger(__name__) + + +def main(host, bot_test_expectations_factory, argv): + parser = argparse.ArgumentParser(epilog=__doc__, formatter_class=argparse.RawTextHelpFormatter) + parser.parse_args(argv) + + port = host.port_factory.get() + + logging.basicConfig(level=logging.INFO, format="%(message)s") + + expectations_file = port.path_to_generic_test_expectations_file() + if not host.filesystem.isfile(expectations_file): + _log.warn("Didn't find generic expectations file at: " + expectations_file) + return 1 + + remove_flakes_o_matic = RemoveFlakesOMatic(host, + port, + bot_test_expectations_factory) + + test_expectations = remove_flakes_o_matic.get_updated_test_expectations() + + remove_flakes_o_matic.write_test_expectations(test_expectations, + expectations_file) + return 0 + + +class RemoveFlakesOMatic(object): + def __init__(self, host, port, bot_test_expectations_factory): + self._host = host + self._port = port + self._expectations_factory = bot_test_expectations_factory + self._builder_results_by_path = {} + + def _can_delete_line(self, test_expectation_line): + """Returns whether a given line in the expectations can be removed. + + Uses results from builder bots to determine if a given line is stale and + can safely be removed from the TestExpectations file. (i.e. remove if + the bots show that it's not flaky.) There are also some rules about when + not to remove lines (e.g. never remove lines with Rebaseline + expectations, don't remove non-flaky expectations, etc.) + + Args: + test_expectation_line (TestExpectationLine): A line in the test + expectation file to test for possible removal. + + Returns: + True if the line can be removed, False otherwise. + """ + expectations = test_expectation_line.expectations + if len(expectations) < 2: + return False + + # Don't check lines that have expectations like NeedsRebaseline or Skip. + if self._has_unstrippable_expectations(expectations): + return False + + # Don't check lines unless they're flaky. i.e. At least one expectation is a PASS. + if not self._has_pass_expectation(expectations): + return False + + # The line can be deleted if the only expectation on the line that appears in the actual + # results is the PASS expectation. + for config in test_expectation_line.matching_configurations: + builder_name = self._host.builders.builder_name_for_specifiers(config.version, config.build_type) + + if not builder_name: + _log.error('Failed to get builder for config [%s, %s, %s]', + config.version, config.architecture, config.build_type) + # TODO(bokan): Matching configurations often give us bots that don't have a + # builder in builders.py's exact_matches. Should we ignore those or be conservative + # and assume we need these expectations to make a decision? + return False + + if builder_name not in self._builder_results_by_path.keys(): + _log.error('Failed to find results for builder "%s"' % builder_name) + return False + + results_by_path = self._builder_results_by_path[builder_name] + + # No results means the tests were all skipped or all results are passing. + if test_expectation_line.path not in results_by_path.keys(): + continue + + results_for_single_test = results_by_path[test_expectation_line.path] + + if self._expectations_that_were_met(test_expectation_line, results_for_single_test) != set(['PASS']): + return False + + return True + + def _has_pass_expectation(self, expectations): + return 'PASS' in expectations + + def _expectations_that_were_met(self, test_expectation_line, results_for_single_test): + """Returns the set of expectations that appear in the given results. + + e.g. If the test expectations is "bug(test) fast/test.html [Crash Failure Pass]" + and the results are ['TEXT', 'PASS', 'PASS', 'TIMEOUT'], then this method would + return [Pass Failure] since the Failure expectation is satisfied by 'TEXT', Pass + by 'PASS' but Crash doesn't appear in the results. + + Args: + test_expectation_line: A TestExpectationLine object + results_for_single_test: A list of result strings. + e.g. ['IMAGE', 'IMAGE', 'PASS'] + + Returns: + A set containing expectations that occured in the results. + """ + # TODO(bokan): Does this not exist in a more central place? + def replace_failing_with_fail(expectation): + if expectation in ('TEXT', 'IMAGE', 'IMAGE+TEXT', 'AUDIO'): + return 'FAIL' + else: + return expectation + + actual_results = {replace_failing_with_fail(r) for r in results_for_single_test} + + return set(test_expectation_line.expectations) & actual_results + + def _has_unstrippable_expectations(self, expectations): + """Returns whether any of the given expectations are considered unstrippable. + + Unstrippable expectations are those which should stop a line from being + removed regardless of builder bot results. + + Args: + expectations: A list of string expectations. + E.g. ['PASS', 'FAIL' 'CRASH'] + + Returns: + True if at least one of the expectations is unstrippable. False + otherwise. + """ + unstrippable_expectations = ('REBASELINE', 'NEEDSREBASELINE', + 'NEEDSMANUALREBASELINE', 'SLOW', + 'SKIP') + return any(s in expectations for s in unstrippable_expectations) + + def _get_builder_results_by_path(self): + """Returns a dictionary of results for each builder. + + Returns a dictionary where each key is a builder and value is a dictionary containing + the distinct results for each test. E.g. + + { + 'WebKit Linux': { + 'test1.html': ['PASS', 'IMAGE'], + 'test2.html': ['PASS'], + }, + 'WebKit Mac10.10': { + 'test1.html': ['PASS', 'IMAGE'], + 'test2.html': ['PASS', 'TEXT'], + } + } + """ + builder_results_by_path = {} + for builder_name in self._host.builders.all_builder_names(): + expectations_for_builder = ( + self._expectations_factory.expectations_for_builder(builder_name) + ) + + if not expectations_for_builder: + # This is not fatal since we may not need to check these + # results. If we do need these results we'll log an error later + # when trying to check against them. + _log.warn('Downloaded results are missing results for builder "%s"' % builder_name) + continue + + builder_results_by_path[builder_name] = ( + expectations_for_builder.all_results_by_path() + ) + return builder_results_by_path + + def _remove_associated_comments_and_whitespace(self, expectations, removed_index): + """Removes comments and whitespace from an empty expectation block. + + If the removed expectation was the last in a block of expectations, this method + will remove any associated comments and whitespace. + + Args: + expectations: A list of TestExpectationLine objects to be modified. + removed_index: The index in the above list that was just removed. + """ + was_last_expectation_in_block = (removed_index == len(expectations) + or expectations[removed_index].is_whitespace() + or expectations[removed_index].is_comment()) + + # If the line immediately below isn't another expectation, then the block of + # expectations definitely isn't empty so we shouldn't remove their associated comments. + if not was_last_expectation_in_block: + return + + did_remove_whitespace = False + + # We may have removed the last expectation in a block. Remove any whitespace above. + while removed_index > 0 and expectations[removed_index - 1].is_whitespace(): + removed_index -= 1 + expectations.pop(removed_index) + did_remove_whitespace = True + + # If we did remove some whitespace then we shouldn't remove any comments above it + # since those won't have belonged to this expectation block. For example, commented + # out expectations, or a section header. + if did_remove_whitespace: + return + + # Remove all comments above the removed line. + while removed_index > 0 and expectations[removed_index - 1].is_comment(): + removed_index -= 1 + expectations.pop(removed_index) + + # Remove all whitespace above the comments. + while removed_index > 0 and expectations[removed_index - 1].is_whitespace(): + removed_index -= 1 + expectations.pop(removed_index) + + def get_updated_test_expectations(self): + """Filters out passing lines from TestExpectations file. + + Reads the current TestExpectations file and, using results from the + build bots, removes lines that are passing. That is, removes lines that + were not needed to keep the bots green. + + Returns: + A TestExpectations object with the passing lines filtered out. + """ + + self._builder_results_by_path = self._get_builder_results_by_path() + + expectations_to_remove = [] + test_expectations = TestExpectations(self._port, include_overrides=False).expectations() + + for expectation in test_expectations: + if self._can_delete_line(expectation): + expectations_to_remove.append(expectation) + + for expectation in expectations_to_remove: + index = test_expectations.index(expectation) + test_expectations.remove(expectation) + + # Remove associated comments and whitespace if we've removed the last expectation under + # a comment block. Only remove a comment block if it's not separated from the test + # expectation line by whitespace. + self._remove_associated_comments_and_whitespace(test_expectations, index) + + return test_expectations + + def write_test_expectations(self, test_expectations, test_expectations_file): + """Writes the given TestExpectations object to the filesystem. + + Args: + test_expectations: The TestExpectations object to write. + test_expectations_file: The full file path of the Blink + TestExpectations file. This file will be overwritten. + """ + self._host.filesystem.write_text_file( + test_expectations_file, + TestExpectations.list_to_string(test_expectations, reconstitute_only_these=[]))
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py new file mode 100644 index 0000000..f6f273c7 --- /dev/null +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py
@@ -0,0 +1,967 @@ +# 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. + +import logging +import unittest +import StringIO + +from collections import OrderedDict + +from webkitpy.common.host_mock import MockHost +from webkitpy.common.system.filesystem_mock import MockFileSystem +from webkitpy.layout_tests.builder_list import BuilderList +from webkitpy.layout_tests.port.factory import PortFactory +from webkitpy.layout_tests.port.test import LAYOUT_TEST_DIR +from webkitpy.layout_tests.update_test_expectations import main +from webkitpy.layout_tests.update_test_expectations import RemoveFlakesOMatic + +logger = logging.getLogger() +logger.level = logging.DEBUG + + +class FakeBotTestExpectations(object): + + def __init__(self, results_by_path): + self._results = {} + + # Make the results distinct like the real BotTestExpectations + for path, results in results_by_path.iteritems(): + self._results[path] = list(set(results)) + + def all_results_by_path(self): + return self._results + + +class FakeBotTestExpectationsFactory(object): + + def __init__(self): + """ + The distinct results seen in at least one run of the test. + E.g. if the bot results for mytest.html are: + PASS PASS FAIL PASS TIMEOUT + then _all_results_by_builder would be: + { + 'WebKit Linux' : { + 'mytest.html': ['FAIL', 'PASS', 'TIMEOUT'] + } + } + """ + self._all_results_by_builder = {} + + def expectations_for_builder(self, builder): + if builder not in self._all_results_by_builder: + return None + + return FakeBotTestExpectations(self._all_results_by_builder[builder]) + + +class FakePortFactory(PortFactory): + + def __init__(self, host): + super(FakePortFactory, self).__init__(host) + self._all_build_types = () + self._all_systems = () + self._configuration_specifier_macros = { + 'mac': ['mac10.10'], + 'win': ['win7'], + 'linux': ['precise'] + } + + def get(self, port_name=None, options=None, **kwargs): + """Returns an object implementing the Port interface. + + This fake object will always return the 'test' port factory. + """ + port = super(FakePortFactory, self).get('test', None) + port.all_build_types = self._all_build_types + port.all_systems = self._all_systems + port.configuration_specifier_macros_dict = ( + self._configuration_specifier_macros) + return port + + +class UpdateTestExpectationsTest(unittest.TestCase): + + def setUp(self): + self._host = MockHost() + self._port = self._host.port_factory.get('test', None) + self._expectation_factory = FakeBotTestExpectationsFactory() + self._flake_remover = RemoveFlakesOMatic(self._host, + self._port, + self._expectation_factory) + self._port.configuration_specifier_macros_dict = { + 'mac': ['mac10.10'], + 'win': ['win7'], + 'linux': ['precise'] + } + filesystem = self._host.filesystem + self._write_tests_into_filesystem(filesystem) + + self._log_output = StringIO.StringIO() + self._stream_handler = logging.StreamHandler(self._log_output) + logger.addHandler(self._stream_handler) + + def tearDown(self): + logger.removeHandler(self._stream_handler) + self._log_output.close() + + def _write_tests_into_filesystem(self, filesystem): + test_list = ['test/a.html', + 'test/b.html', + 'test/c.html', + 'test/d.html', + 'test/e.html', + 'test/f.html', + 'test/g.html'] + for test in test_list: + path = filesystem.join(LAYOUT_TEST_DIR, test) + filesystem.write_binary_file(path, '') + + def _assert_expectations_match(self, expectations, expected_string): + self.assertIsNotNone(expectations) + stringified_expectations = "\n".join( + x.to_string() for x in expectations) + expected_string = "\n".join( + x.strip() for x in expected_string.split("\n")) + self.assertEqual(stringified_expectations, expected_string) + + def _parse_expectations(self, expectations): + """Parses a TestExpectation file given as string. + + This function takes a string representing the contents of the + TestExpectations file and parses it, producing the TestExpectations + object and sets it on the Port object where the script will read it + from. + + Args: + expectations: A string containing the contents of the + TestExpectations file to use. + """ + expectations_dict = OrderedDict() + expectations_dict['expectations'] = expectations + self._port.expectations_dict = lambda: expectations_dict + + def _define_builders(self, builders_dict): + """Defines the available builders for the test. + + Args: + builders_dict: A dictionary containing builder names to their + attributes, see BuilderList.__init__ for the format. + """ + self._host.builders = BuilderList(builders_dict) + + def test_dont_remove_non_flakes(self): + """Tests that lines that aren't flaky are not touched. + + Lines are flaky if they contain a PASS as well as at least one other + failing result. + """ + test_expectations_before = """ + # Even though the results show all passing, none of the + # expectations are flaky so we shouldn't remove any. + Bug(test) test/a.html [ Pass ] + Bug(test) test/b.html [ Timeout ] + Bug(test) test/c.html [ Failure Timeout ] + Bug(test) test/d.html [ Rebaseline ] + Bug(test) test/e.html [ NeedsManualRebaseline ] + Bug(test) test/f.html [ NeedsRebaseline ]""" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS"], + "test/b.html": ["PASS", "PASS"], + "test/c.html": ["PASS", "PASS"], + "test/d.html": ["PASS", "PASS"], + "test/e.html": ["PASS", "PASS"], + "test/f.html": ["PASS", "PASS"], + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match( + updated_expectations, test_expectations_before) + + def test_dont_remove_skip(self): + """Tests that lines with Skip are untouched. + + If a line is marked as Skip, it will eventually contain no results, + which is indistinguishable from "All Passing" so don't remove since we + don't know what the results actually are. + """ + test_expectations_before = """ + # Skip expectations should never be removed. + Bug(test) test/a.html [ Skip ] + Bug(test) test/b.html [ Skip ] + Bug(test) test/c.html [ Skip ]""" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS"], + "test/b.html": ["PASS", "IMAGE"], + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match( + updated_expectations, test_expectations_before) + + def test_dont_remove_rebaselines(self): + """Tests that lines with rebaseline expectations are untouched.""" + test_expectations_before = """ + # Even though the results show all passing, none of the + # expectations are flaky so we shouldn't remove any. + Bug(test) test/a.html [ Failure NeedsRebaseline Pass ] + Bug(test) test/b.html [ Failure Pass Rebaseline ] + Bug(test) test/c.html [ Failure NeedsManualRebaseline Pass ]""" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS"], + "test/b.html": ["PASS", "PASS"], + "test/c.html": ["PASS", "PASS"] + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match( + updated_expectations, test_expectations_before) + + def test_all_failure_types(self): + """Tests that all failure types are treated as failure.""" + test_expectations_before = ( + """Bug(test) test/a.html [ Failure Pass ] + Bug(test) test/b.html [ Failure Pass ] + Bug(test) test/c.html [ Failure Pass ] + Bug(test) test/d.html [ Failure Pass ] + # Remove these two since CRASH and TIMEOUT aren't considered + # Failure. + Bug(test) test/e.html [ Failure Pass ] + Bug(test) test/f.html [ Failure Pass ]""") + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "IMAGE"], + "test/b.html": ["PASS", "TEXT"], + "test/c.html": ["PASS", "IMAGE+TEXT"], + "test/d.html": ["PASS", "AUDIO"], + "test/e.html": ["PASS", "CRASH"], + "test/f.html": ["PASS", "TIMEOUT"], + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, ( + """Bug(test) test/a.html [ Failure Pass ] + Bug(test) test/b.html [ Failure Pass ] + Bug(test) test/c.html [ Failure Pass ] + Bug(test) test/d.html [ Failure Pass ]""")) + + def test_basic_one_builder(self): + """Tests basic functionality with a single builder. + + Test that flaky expectations with results from a single bot showing the + expected failure isn't occuring should be removed. Results with failures + of the expected type shouldn't be removed but other kinds of failures + allow removal. + """ + test_expectations_before = ( + """# Remove this since it's passing all runs. + Bug(test) test/a.html [ Failure Pass ] + # Remove this since, although there's a failure, it's not a timeout. + Bug(test) test/b.html [ Pass Timeout ] + # Keep since we have both crashes and passes. + Bug(test) test/c.html [ Crash Pass ]""") + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "IMAGE", "PASS"], + "test/c.html": ["PASS", "CRASH", "PASS"], + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, ( + """# Keep since we have both crashes and passes. + Bug(test) test/c.html [ Crash Pass ]""")) + + def test_all_failure_case(self): + """Tests that results with all failures are not treated as non-flaky.""" + test_expectations_before = ( + """# Keep since it's all failures. + Bug(test) test/a.html [ Failure Pass ]""") + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["IMAGE", "IMAGE", "IMAGE"], + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, ( + """# Keep since it's all failures. + Bug(test) test/a.html [ Failure Pass ]""")) + + def test_empty_test_expectations(self): + """Running on an empty TestExpectations file outputs an empty file.""" + test_expectations_before = "" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, "") + + def test_basic_multiple_builders(self): + """Tests basic functionality with multiple builders.""" + test_expectations_before = ( + """# Remove since it's passing on both builders. + Bug(test) test/a.html [ Failure Pass ] + # Keep since it's failing on the Mac builder. + Bug(test) test/b.html [ Failure Pass ] + # Keep since it's failing on the Linux builder. + Bug(test) test/c.html [ Failure Pass ]""") + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + "WebKit Mac10.10": { + "port_name": "mac-mac10.10", + "specifiers": ['Mac10.10', 'Release'] + }, + }) + + self._port.all_build_types = ('release',) + self._port.all_systems = (('mac10.10', 'x86'), + ('precise', 'x86_64')) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["AUDIO", "AUDIO", "AUDIO"], + }, + 'WebKit Mac10.10': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "IMAGE"], + "test/c.html": ["PASS", "PASS", "PASS"], + }, + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, ( + """# Keep since it's failing on the Mac builder. + Bug(test) test/b.html [ Failure Pass ] + # Keep since it's failing on the Linux builder. + Bug(test) test/c.html [ Failure Pass ]""")) + + def test_multiple_builders_and_platform_specifiers(self): + """Tests correct operation with platform specifiers.""" + test_expectations_before = ( + """# Keep since it's failing on Mac results. + Bug(test) [ Mac ] test/a.html [ Failure Pass ] + # Keep since it's failing on the Windows builder. + Bug(test) [ Linux Win ] test/b.html [ Failure Pass ] + # Remove since it's passing on both Linux and Windows builders. + Bug(test) [ Linux Win ] test/c.html [ Failure Pass ] + # Remove since it's passing on Mac results + Bug(test) [ Mac ] test/d.html [ Failure Pass ]""") + + self._define_builders({ + "WebKit Win7": { + "port_name": "win-win7", + "specifiers": ['Win7', 'Release'] + }, + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + "WebKit Mac10.10": { + "port_name": "mac-mac10.10", + "specifiers": ['Mac10.10', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('mac10.10', 'x86'), + ('win7', 'x86'), + ('precise', 'x86_64')) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["IMAGE", "PASS", "PASS"], + }, + 'WebKit Mac10.10': { + "test/a.html": ["PASS", "PASS", "IMAGE"], + "test/b.html": ["PASS", "IMAGE", "PASS"], + "test/c.html": ["PASS", "IMAGE", "PASS"], + "test/d.html": ["PASS", "PASS", "PASS"], + }, + 'WebKit Win7': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["IMAGE", "PASS", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["IMAGE", "PASS", "PASS"], + }, + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, ( + """# Keep since it's failing on Mac results. + Bug(test) [ Mac ] test/a.html [ Failure Pass ] + # Keep since it's failing on the Windows builder. + Bug(test) [ Linux Win ] test/b.html [ Failure Pass ]""")) + + def test_debug_release_specifiers(self): + """Tests correct operation of Debug/Release specifiers.""" + test_expectations_before = ( + """# Keep since it fails in debug. + Bug(test) [ Linux ] test/a.html [ Failure Pass ] + # Remove since the failure is in Release, Debug is all PASS. + Bug(test) [ Debug ] test/b.html [ Failure Pass ] + # Keep since there's a failure in Linux Release. + Bug(test) [ Release ] test/c.html [ Failure Pass ] + # Remove since the Release Linux builder is all passing. + Bug(test) [ Release Linux ] test/d.html [ Failure Pass ] + # Remove since all the Linux builders PASS. + Bug(test) [ Linux ] test/e.html [ Failure Pass ]""") + + self._define_builders({ + "WebKit Win7": { + "port_name": "win-win7", + "specifiers": ['Win7', 'Release'] + }, + "WebKit Win7 (dbg)": { + "port_name": "win-win7", + "specifiers": ['Win7', 'Debug'] + }, + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + "WebKit Linux (dbg)": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Debug'] + }, + }) + self._port.all_build_types = ('release', 'debug') + self._port.all_systems = (('win7', 'x86'), + ('precise', 'x86_64')) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "IMAGE", "PASS"], + "test/c.html": ["PASS", "IMAGE", "PASS"], + "test/d.html": ["PASS", "PASS", "PASS"], + "test/e.html": ["PASS", "PASS", "PASS"], + }, + 'WebKit Linux (dbg)': { + "test/a.html": ["PASS", "IMAGE", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["IMAGE", "PASS", "PASS"], + "test/e.html": ["PASS", "PASS", "PASS"], + }, + 'WebKit Win7 (dbg)': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["PASS", "IMAGE", "PASS"], + "test/e.html": ["PASS", "PASS", "PASS"], + }, + 'WebKit Win7': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "IMAGE"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["PASS", "IMAGE", "PASS"], + "test/e.html": ["PASS", "PASS", "PASS"], + }, + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, ( + """# Keep since it fails in debug. + Bug(test) [ Linux ] test/a.html [ Failure Pass ] + # Keep since there's a failure in Linux Release. + Bug(test) [ Release ] test/c.html [ Failure Pass ]""")) + + def test_preserve_comments_and_whitespace(self): + """Tests that comments and whitespace are preserved appropriately. + + Comments and whitespace should be kept unless all the tests grouped + below a comment are removed. In that case the comment block should also + be removed. + + Ex: + # This comment applies to the below tests. + Bug(test) test/a.html [ Failure Pass ] + Bug(test) test/b.html [ Failure Pass ] + + # <some prose> + + # This is another comment. + Bug(test) test/c.html [ Failure Pass ] + + Assuming we removed a.html and c.html we get: + # This comment applies to the below tests. + Bug(test) test/b.html [ Failure Pass ] + + # <some prose> + """ + test_expectations_before = """ + # Comment A - Keep since these aren't part of any test. + # Comment B - Keep since these aren't part of any test. + + # Comment C - Remove since it's a block belonging to a + # Comment D - and a is removed. + Bug(test) test/a.html [ Failure Pass ] + # Comment E - Keep since it's below a. + + + # Comment F - Keep since only b is removed + Bug(test) test/b.html [ Failure Pass ] + Bug(test) test/c.html [ Failure Pass ] + + # Comment G - Should be removed since both d and e will be removed. + Bug(test) test/d.html [ Failure Pass ] + Bug(test) test/e.html [ Failure Pass ]""" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["PASS", "IMAGE", "PASS"], + "test/d.html": ["PASS", "PASS", "PASS"], + "test/e.html": ["PASS", "PASS", "PASS"], + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, ( + """ + # Comment A - Keep since these aren't part of any test. + # Comment B - Keep since these aren't part of any test. + # Comment E - Keep since it's below a. + + + # Comment F - Keep since only b is removed + Bug(test) test/c.html [ Failure Pass ]""")) + + def test_no_results_on_builders(self): + """Tests that we remove a line that has no results on the builders. + + A test that has no results returned from the builders means that all + runs passed or were skipped. A Skip expectation in TestExpectations + shouldn't be removed but otherwise the test is passing. + """ + test_expectations_before = """ + # A Skip expectation probably won't have any results but we + # shouldn't consider those passing so this line should remain. + Bug(test) test/a.html [ Skip ] + # This line shouldn't be removed either since it's not flaky. + Bug(test) test/b.html [ Failure Timeout ] + # The lines below should be removed since they're flaky but all runs + # are passing. + Bug(test) test/c.html [ Failure Pass ] + Bug(test) test/d.html [ Pass Timeout ] + Bug(test) test/e.html [ Crash Pass ]""" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + self._port.all_build_types = ('release',) + self._port.all_systems = (('precise', 'x86_64'),) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + } + } + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + self._assert_expectations_match(updated_expectations, """ + # A Skip expectation probably won't have any results but we + # shouldn't consider those passing so this line should remain. + Bug(test) test/a.html [ Skip ] + # This line shouldn't be removed either since it's not flaky. + Bug(test) test/b.html [ Failure Timeout ]""") + + def test_log_missing_builders(self): + """Tests that we emit the appropriate error for a missing builder. + + If a TestExpectation has a matching configuration what we can't resolve + to a builder we should emit an Error. + """ + + test_expectations_before = """ + Bug(test) [ Win ] test/a.html [ Failure Pass ] + Bug(test) [ Linux ] test/b.html [ Failure Pass ] + # This one shouldn't emit an error since it's not flaky, we don't + # have to check the builder results. + Bug(test) test/c.html [ Failure ] + Bug(test) test/d.html [ Failure Pass ] + # This one shouldn't emit an error since it will only match the + # existing Linux Release configuration + Bug(test) [ Linux Release ] test/e.html [ Failure Pass ]""" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + }) + + # Three errors should be emitted: + # (1) There's no Windows builders so a.html will emit an error on the + # first missing one. + # (2) There's no Linux debug builder so b.html will emit an error. + # (3) c.html is missing will match both the Windows and Linux dbg + # builders which are missing so it'll emit an error on the first one. + self._port.all_build_types = ('release', 'debug') + self._port.all_systems = (('win7', 'x86'), + ('precise', 'x86_64')) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["PASS", "IMAGE", "PASS"], + "test/d.html": ["PASS", "PASS", "PASS"], + "test/e.html": ["PASS", "IMAGE", "PASS"], + } + } + + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + expected_errors = '\n'.join([ + 'Failed to get builder for config [win7, x86, release]', + 'Failed to get builder for config [precise, x86_64, debug]', + 'Failed to get builder for config [win7, x86, release]', + '']) + self.assertEqual(self._log_output.getvalue(), expected_errors) + + # Also make sure we didn't remove any lines if some builders were + # missing. + self._assert_expectations_match( + updated_expectations, test_expectations_before) + + def test_log_missing_results(self): + """Tests that we emit the appropriate error for missing results. + + If the results dictionary we download from the builders is missing the + results from one of the builders we matched we should have logged an + error. + """ + test_expectations_before = """ + Bug(test) [ Linux ] test/a.html [ Failure Pass ] + # This line won't emit an error since the Linux Release results + # exist. + Bug(test) [ Linux Release ] test/b.html [ Failure Pass ] + Bug(test) [ Release ] test/c.html [ Failure Pass ] + # This line is not flaky so we shouldn't even check the results. + Bug(test) [ Linux ] test/d.html [ Failure ]""" + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + "WebKit Linux (dbg)": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Debug'] + }, + "WebKit Win7": { + "port_name": "win-win7", + "specifiers": ['Win7', 'Release'] + }, + "WebKit Win7 (dbg)": { + "port_name": "win-win7", + "specifiers": ['Win7', 'Debug'] + }, + }) + + # Two warnings and two errors should be emitted: + # (1) A warning since the results don't contain anything for the Linux + # (dbg) builder + # (2) A warning since the results don't contain anything for the Win + # release builder + # (3) The first line needs and is missing results for Linux (dbg). + # (4) The third line needs and is missing results for Win Release. + self._port.all_build_types = ('release', 'debug') + self._port.all_systems = (('win7', 'x86'), + ('precise', 'x86_64')) + + self._parse_expectations(test_expectations_before) + self._expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "IMAGE", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["PASS", "PASS", "PASS"], + }, + 'WebKit Win7 (dbg)': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["PASS", "PASS", "PASS"], + }, + } + + updated_expectations = ( + self._flake_remover.get_updated_test_expectations()) + expected_errors = '\n'.join([ + 'Downloaded results are missing results for builder "WebKit Linux (dbg)"', + 'Downloaded results are missing results for builder "WebKit Win7"', + 'Failed to find results for builder "WebKit Linux (dbg)"', + 'Failed to find results for builder "WebKit Win7"', + '']) + self.assertEqual(self._log_output.getvalue(), expected_errors) + + # Also make sure we didn't remove any lines if some builders were + # missing. + self._assert_expectations_match( + updated_expectations, test_expectations_before) + + def test_harness_updates_file(self): + """Tests that the call harness updates the TestExpectations file. + """ + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + "WebKit Linux (dbg)": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Debug'] + }, + }) + + # Setup the mock host and port. + host = MockHost() + host.port_factory = FakePortFactory(host) + host.port_factory._all_build_types = ('release', 'debug') + host.port_factory._all_systems = (('precise', 'x86_64'),) + + # Write out a fake TestExpectations file. + test_expectation_path = ( + host.port_factory.get().path_to_generic_test_expectations_file()) + test_expectations = """ + # Remove since passing on both bots. + Bug(test) [ Linux ] test/a.html [ Failure Pass ] + # Keep since there's a failure on release bot. + Bug(test) [ Linux Release ] test/b.html [ Failure Pass ] + # Remove since it's passing on both builders. + Bug(test) test/c.html [ Failure Pass ] + # Keep since there's a failure on debug bot. + Bug(test) [ Linux ] test/d.html [ Failure ]""" + files = { + test_expectation_path: test_expectations + } + host.filesystem = MockFileSystem(files) + self._write_tests_into_filesystem(host.filesystem) + + # Write out the fake builder bot results. + expectation_factory = FakeBotTestExpectationsFactory() + expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "IMAGE", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["PASS", "PASS", "PASS"], + }, + 'WebKit Linux (dbg)': { + "test/a.html": ["PASS", "PASS", "PASS"], + "test/b.html": ["PASS", "PASS", "PASS"], + "test/c.html": ["PASS", "PASS", "PASS"], + "test/d.html": ["IMAGE", "PASS", "PASS"], + }, + } + + main(host, expectation_factory, []) + + self.assertEqual(host.filesystem.files[test_expectation_path], ( + """ # Keep since there's a failure on release bot. + Bug(test) [ Linux Release ] test/b.html [ Failure Pass ] + # Keep since there's a failure on debug bot. + Bug(test) [ Linux ] test/d.html [ Failure ]""")) + + def test_harness_no_expectations(self): + """Tests behavior when TestExpectations file doesn't exist. + + Tests that a warning is outputted if the TestExpectations file + doesn't exist.""" + + # Setup the mock host and port. + host = MockHost() + host.port_factory = FakePortFactory(host) + + # Write the test file but not the TestExpectations file. + test_expectation_path = ( + host.port_factory.get().path_to_generic_test_expectations_file()) + host.filesystem = MockFileSystem() + self._write_tests_into_filesystem(host.filesystem) + + # Write out the fake builder bot results. + expectation_factory = FakeBotTestExpectationsFactory() + expectation_factory._all_results_by_builder = {} + + self.assertFalse(host.filesystem.isfile(test_expectation_path)) + + return_code = main(host, expectation_factory, []) + + self.assertEqual(return_code, 1) + + expected_warning = ( + "Didn't find generic expectations file at: " + + test_expectation_path + "\n") + self.assertEqual(self._log_output.getvalue(), expected_warning) + self.assertFalse(host.filesystem.isfile(test_expectation_path)) + + def test_harness_remove_all(self): + """Tests that removing all expectations doesn't delete the file. + + Make sure we're prepared for the day when we exterminated flakes. + """ + + self._define_builders({ + "WebKit Linux": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Release'] + }, + "WebKit Linux (dbg)": { + "port_name": "linux-precise", + "specifiers": ['Precise', 'Debug'] + }, + }) + + # Setup the mock host and port. + host = MockHost() + host.port_factory = FakePortFactory(host) + host.port_factory._all_build_types = ('release', 'debug') + host.port_factory._all_systems = (('precise', 'x86_64'),) + + # Write out a fake TestExpectations file. + test_expectation_path = ( + host.port_factory.get().path_to_generic_test_expectations_file()) + test_expectations = """ + # Remove since passing on both bots. + Bug(test) [ Linux ] test/a.html [ Failure Pass ]""" + + files = { + test_expectation_path: test_expectations + } + host.filesystem = MockFileSystem(files) + self._write_tests_into_filesystem(host.filesystem) + + # Write out the fake builder bot results. + expectation_factory = FakeBotTestExpectationsFactory() + expectation_factory._all_results_by_builder = { + 'WebKit Linux': { + "test/a.html": ["PASS", "PASS", "PASS"], + }, + 'WebKit Linux (dbg)': { + "test/a.html": ["PASS", "PASS", "PASS"], + }, + } + + main(host, expectation_factory, []) + + self.assertTrue(host.filesystem.isfile(test_expectation_path)) + self.assertEqual(host.filesystem.files[test_expectation_path], '')
diff --git a/third_party/WebKit/public/platform/functional/WebFunction.h b/third_party/WebKit/public/platform/functional/WebFunction.h index fc3142d..0cfbd6a 100644 --- a/third_party/WebKit/public/platform/functional/WebFunction.h +++ b/third_party/WebKit/public/platform/functional/WebFunction.h
@@ -41,7 +41,7 @@ explicit WebFunction(std::unique_ptr<WTFFunction> c) { - m_callback = static_cast<base::Callback<R(Args...)>>(*c); + m_callback = convertToBaseCallback(std::move(c)); } #endif
diff --git a/third_party/WebKit/public/web/WebFrame.h b/third_party/WebKit/public/web/WebFrame.h index 0639c22..39f6dc6 100644 --- a/third_party/WebKit/public/web/WebFrame.h +++ b/third_party/WebKit/public/web/WebFrame.h
@@ -402,70 +402,6 @@ virtual bool isLoading() const; - // Editing ------------------------------------------------------------- - - virtual void insertText(const WebString& text) = 0; - - virtual void setMarkedText(const WebString& text, unsigned location, unsigned length) = 0; - virtual void unmarkText() = 0; - virtual bool hasMarkedText() const = 0; - - virtual WebRange markedRange() const = 0; - - // Returns the text range rectangle in the viepwort coordinate space. - virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0; - - // Returns the index of a character in the Frame's text stream at the given - // point. The point is in the viewport coordinate space. Will return - // WTF::notFound if the point is invalid. - virtual size_t characterIndexForPoint(const WebPoint&) const = 0; - - // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, - // Unselect, etc. See EditorCommand.cpp for the full list of supported - // commands. - virtual bool executeCommand(const WebString&) = 0; - virtual bool executeCommand(const WebString&, const WebString& value) = 0; - virtual bool isCommandEnabled(const WebString&) const = 0; - - // Spell-checking support. - virtual void enableContinuousSpellChecking(bool) = 0; - virtual bool isContinuousSpellCheckingEnabled() const = 0; - virtual void requestTextChecking(const WebElement&) = 0; - virtual void removeSpellingMarkers() = 0; - - // Selection ----------------------------------------------------------- - - virtual bool hasSelection() const = 0; - - virtual WebRange selectionRange() const = 0; - - virtual WebString selectionAsText() const = 0; - virtual WebString selectionAsMarkup() const = 0; - - // Expands the selection to a word around the caret and returns - // true. Does nothing and returns false if there is no caret or - // there is ranged selection. - virtual bool selectWordAroundCaret() = 0; - - // DEPRECATED: Use moveRangeSelection. - virtual void selectRange(const WebPoint& base, const WebPoint& extent) = 0; - - virtual void selectRange(const WebRange&) = 0; - - // Move the current selection to the provided viewport point/points. If the - // current selection is editable, the new selection will be restricted to - // the root editable element. - // |TextGranularity| represents character wrapping granularity. If - // WordGranularity is set, WebFrame extends selection to wrap word. - virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent, WebFrame::TextGranularity = CharacterGranularity) = 0; - virtual void moveCaretSelection(const WebPoint&) = 0; - - virtual bool setEditableSelectionOffsets(int start, int end) = 0; - virtual bool setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0; - virtual void extendSelectionAndDelete(int before, int after) = 0; - - virtual void setCaretVisible(bool) = 0; - // Printing ------------------------------------------------------------ // Reformats the WebFrame for printing. WebPrintParams specifies the printable
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h index a3c8948..eceed95 100644 --- a/third_party/WebKit/public/web/WebLocalFrame.h +++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -191,8 +191,63 @@ // extension debugging. virtual void setIsolatedWorldHumanReadableName(int worldID, const WebString&) = 0; + // Editing ------------------------------------------------------------- - // Selection -------------------------------------------------------------- + virtual void insertText(const WebString& text) = 0; + + virtual void setMarkedText(const WebString& text, unsigned location, unsigned length) = 0; + virtual void unmarkText() = 0; + virtual bool hasMarkedText() const = 0; + + virtual WebRange markedRange() const = 0; + + // Returns the text range rectangle in the viepwort coordinate space. + virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0; + + // Returns the index of a character in the Frame's text stream at the given + // point. The point is in the viewport coordinate space. Will return + // WTF::notFound if the point is invalid. + virtual size_t characterIndexForPoint(const WebPoint&) const = 0; + + // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, + // Unselect, etc. See EditorCommand.cpp for the full list of supported + // commands. + virtual bool executeCommand(const WebString&) = 0; + virtual bool executeCommand(const WebString&, const WebString& value) = 0; + virtual bool isCommandEnabled(const WebString&) const = 0; + + // Selection ----------------------------------------------------------- + + virtual bool hasSelection() const = 0; + + virtual WebRange selectionRange() const = 0; + + virtual WebString selectionAsText() const = 0; + virtual WebString selectionAsMarkup() const = 0; + + // Expands the selection to a word around the caret and returns + // true. Does nothing and returns false if there is no caret or + // there is ranged selection. + virtual bool selectWordAroundCaret() = 0; + + // DEPRECATED: Use moveRangeSelection. + virtual void selectRange(const WebPoint& base, const WebPoint& extent) = 0; + + virtual void selectRange(const WebRange&) = 0; + + // Move the current selection to the provided viewport point/points. If the + // current selection is editable, the new selection will be restricted to + // the root editable element. + // |TextGranularity| represents character wrapping granularity. If + // WordGranularity is set, WebFrame extends selection to wrap word. + virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent, WebFrame::TextGranularity = CharacterGranularity) = 0; + virtual void moveCaretSelection(const WebPoint&) = 0; + + virtual bool setEditableSelectionOffsets(int start, int end) = 0; + virtual bool setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0; + virtual void extendSelectionAndDelete(int before, int after) = 0; + + virtual void setCaretVisible(bool) = 0; // Moves the selection extent point. This function does not allow the // selection to collapse. If the new extent is set to the same position as @@ -203,6 +258,10 @@ // Spell-checking support ------------------------------------------------- virtual void replaceMisspelledRange(const WebString&) = 0; + virtual void enableContinuousSpellChecking(bool) = 0; + virtual bool isContinuousSpellCheckingEnabled() const = 0; + virtual void requestTextChecking(const WebElement&) = 0; + virtual void removeSpellingMarkers() = 0; // Content Settings -------------------------------------------------------
diff --git a/third_party/WebKit/public/web/WebRuntimeFeatures.h b/third_party/WebKit/public/web/WebRuntimeFeatures.h index 0829e55..6e88699 100644 --- a/third_party/WebKit/public/web/WebRuntimeFeatures.h +++ b/third_party/WebKit/public/web/WebRuntimeFeatures.h
@@ -67,7 +67,6 @@ BLINK_EXPORT static void enableOriginTrials(bool); BLINK_EXPORT static bool isOriginTrialsEnabled(); - BLINK_EXPORT static void enableApplicationCache(bool); BLINK_EXPORT static void enableAudioOutputDevices(bool); BLINK_EXPORT static void enableCanvas2dImageChromium(bool); BLINK_EXPORT static void enableCredentialManagerAPI(bool);
diff --git a/third_party/WebKit/public/web/WebView.h b/third_party/WebKit/public/web/WebView.h index fe067499..f7748f4 100644 --- a/third_party/WebKit/public/web/WebView.h +++ b/third_party/WebKit/public/web/WebView.h
@@ -194,7 +194,7 @@ // Focus --------------------------------------------------------------- - virtual WebFrame* focusedFrame() = 0; + virtual WebLocalFrame* focusedFrame() = 0; virtual void setFocusedFrame(WebFrame*) = 0; // Sets the provided frame as focused and fires blur/focus events on any
diff --git a/third_party/closure_compiler/closure_args.gni b/third_party/closure_compiler/closure_args.gni index 51f24efa..b1cd189 100644 --- a/third_party/closure_compiler/closure_args.gni +++ b/third_party/closure_compiler/closure_args.gni
@@ -5,6 +5,7 @@ # GYP version: third_party/closure_compiler/closure_args.gypi closure_args = [ "compilation_level=SIMPLE_OPTIMIZATIONS", + "extra_annotation_name=attribute", "extra_annotation_name=demo", "extra_annotation_name=element", @@ -13,6 +14,7 @@ "extra_annotation_name=homepage", "extra_annotation_name=status", "extra_annotation_name=submodule", + "jscomp_error=accessControls", "jscomp_error=ambiguousFunctionDecl", "jscomp_error=checkTypes", @@ -31,9 +33,12 @@ "jscomp_error=unknownDefines", "jscomp_error=uselessCode", "jscomp_error=visibility", + "language_in=ECMASCRIPT6_STRICT", "language_out=ECMASCRIPT5_STRICT", + "polymer_pass", + "source_map_format=V3", ]
diff --git a/third_party/closure_compiler/closure_args.gypi b/third_party/closure_compiler/closure_args.gypi index b116656..5496406 100644 --- a/third_party/closure_compiler/closure_args.gypi +++ b/third_party/closure_compiler/closure_args.gypi
@@ -2,9 +2,12 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# GN version: third_party/closure_compiler/closure_args.gni { 'closure_args': [ 'compilation_level=SIMPLE_OPTIMIZATIONS', + + # Keep this in sync with chrome/browser/web_dev_style/js_checker.py. 'extra_annotation_name=attribute', 'extra_annotation_name=demo', 'extra_annotation_name=element', @@ -13,6 +16,7 @@ 'extra_annotation_name=homepage', 'extra_annotation_name=status', 'extra_annotation_name=submodule', + 'jscomp_error=accessControls', 'jscomp_error=ambiguousFunctionDecl', 'jscomp_error=checkTypes', @@ -31,9 +35,12 @@ 'jscomp_error=unknownDefines', 'jscomp_error=uselessCode', 'jscomp_error=visibility', + 'language_in=ECMASCRIPT6_STRICT', 'language_out=ECMASCRIPT5_STRICT', + 'polymer_pass', + 'source_map_format=V3', ], 'default_disabled_closure_args': [
diff --git a/third_party/closure_compiler/roll_closure_compiler b/third_party/closure_compiler/roll_closure_compiler index 2f31c40..2dbe72d 100755 --- a/third_party/closure_compiler/roll_closure_compiler +++ b/third_party/closure_compiler/roll_closure_compiler
@@ -47,8 +47,7 @@ fi echo "Building Closure Compiler" -# TODO(dbeam): can we do less here? As in: build a more specific target. -mvn install -DskipTests=true +mvn install -DskipTests=true --projects com.google.javascript:closure-compiler if [[ "$?" -ne 0 ]]; then echo "Failed to build jar, copying nothing" >&2
diff --git a/third_party/libpng/README.chromium b/third_party/libpng/README.chromium index da2cce4b..36f0954 100644 --- a/third_party/libpng/README.chromium +++ b/third_party/libpng/README.chromium
@@ -22,5 +22,9 @@ https://github.com/glennrp/libpng/commit/3f46c67c6989f480bd932428aa1705f6625dbabf https://github.com/glennrp/libpng/commit/81f0273d54aa9de663253b197b3c8228d659cc36 - Fix performance regression in png encoding (and overflow handling in filter heuristic) - from upstream: + from upstream (crbug.com/619850): https://github.com/glennrp/libpng/commit/9c04f57cabbf736e91b831858d0eeecca703eabf + https://github.com/glennrp/libpng/commit/29135161d74e5f6f640ec1fc2ab3ceebc34e339b + *** Note that this second commit (29135161) has been reverted in upstream. They + feel that it is unnecessary. It increases code size (slightly) and changing + the compiler flags might accomplish the same optimization.
diff --git a/third_party/libpng/pngwutil.c b/third_party/libpng/pngwutil.c index 67bc644..ca8a03ad 100644 --- a/third_party/libpng/pngwutil.c +++ b/third_party/libpng/pngwutil.c
@@ -2278,6 +2278,28 @@ return (sum); } +static void /* PRIVATE */ +png_setup_sub_row_only(png_structrp png_ptr, const png_uint_32 bpp, + const png_size_t row_bytes) +{ + png_bytep rp, dp, lp; + png_size_t i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1; i < bpp; + i++, rp++, dp++) + { + *dp = *rp; + } + + for (lp = png_ptr->row_buf + 1; i < row_bytes; + i++, rp++, lp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); + } +} + static png_size_t /* PRIVATE */ png_setup_up_row(png_structrp png_ptr, const png_size_t row_bytes, const png_size_t lmins) @@ -2302,6 +2324,21 @@ return (sum); } +static void /* PRIVATE */ +png_setup_up_row_only(png_structrp png_ptr, const png_size_t row_bytes) +{ + png_bytep rp, dp, pp; + png_size_t i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_UP; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < row_bytes; + i++, rp++, pp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); + } +} static png_size_t /* PRIVATE */ png_setup_avg_row(png_structrp png_ptr, const png_uint_32 bpp, @@ -2335,6 +2372,27 @@ return (sum); } +static void /* PRIVATE */ +png_setup_avg_row_only(png_structrp png_ptr, const png_uint_32 bpp, + const png_size_t row_bytes) +{ + png_bytep rp, dp, pp, lp; + png_uint_32 i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_AVG; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); + } + + for (lp = png_ptr->row_buf + 1; i < row_bytes; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) + & 0xff); + } +} static png_size_t /* PRIVATE */ png_setup_paeth_row(png_structrp png_ptr, const png_uint_32 bpp, @@ -2389,6 +2447,48 @@ return (sum); } +static void /* PRIVATE */ +png_setup_paeth_row_only(png_structrp png_ptr, const png_uint_32 bpp, + const png_size_t row_bytes) +{ + png_bytep rp, dp, pp, cp, lp; + png_size_t i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + } + + for (lp = png_ptr->row_buf + 1, cp = png_ptr->prev_row + 1; i < row_bytes; + i++) + { + int a, b, c, pa, pb, pc, p; + + b = *pp++; + c = *cp++; + a = *lp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; + + *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); + } +} #endif /* WRITE_FILTER */ void /* PRIVATE */ @@ -2445,13 +2545,13 @@ if (PNG_SIZE_MAX/128 <= row_bytes) { - /* Overflow can occur in the calculation, just select the lowest set - * filter. - */ - filter_to_do &= -filter_to_do; - } - else if ((filter_to_do & PNG_FILTER_NONE) != 0 && - filter_to_do != PNG_FILTER_NONE) + /* Overflow can occur in the calculation, just select the lowest set + * filter. + */ + filter_to_do &= -filter_to_do; + } + else if ((filter_to_do & PNG_FILTER_NONE) != 0 && + filter_to_do != PNG_FILTER_NONE) { /* Overflow not possible and multiple filters in the list, including the * 'none' filter. @@ -2476,10 +2576,7 @@ if (filter_to_do == PNG_FILTER_SUB) /* It's the only filter so no testing is needed */ { - /* Passing PNG_SIZE_MAX here and below prevents the 'setup' function - * breaking out of the loop when lmins is exceeded. - */ - (void) png_setup_sub_row(png_ptr, bpp, row_bytes, PNG_SIZE_MAX); + png_setup_sub_row_only(png_ptr, bpp, row_bytes); best_row = png_ptr->try_row; } @@ -2505,7 +2602,7 @@ /* Up filter */ if (filter_to_do == PNG_FILTER_UP) { - (void) png_setup_up_row(png_ptr, row_bytes, PNG_SIZE_MAX); + png_setup_up_row_only(png_ptr, row_bytes); best_row = png_ptr->try_row; } @@ -2531,7 +2628,7 @@ /* Avg filter */ if (filter_to_do == PNG_FILTER_AVG) { - (void) png_setup_avg_row(png_ptr, bpp, row_bytes, PNG_SIZE_MAX); + png_setup_avg_row_only(png_ptr, bpp, row_bytes); best_row = png_ptr->try_row; } @@ -2557,7 +2654,7 @@ /* Paeth filter */ if ((filter_to_do == PNG_FILTER_PAETH) != 0) { - (void) png_setup_paeth_row(png_ptr, bpp, row_bytes, PNG_SIZE_MAX); + png_setup_paeth_row_only(png_ptr, bpp, row_bytes); best_row = png_ptr->try_row; }
diff --git a/tools/android/loading/request_track.py b/tools/android/loading/request_track.py index 89b4f35..454cbe07 100644 --- a/tools/android/loading/request_track.py +++ b/tools/android/loading/request_track.py
@@ -209,6 +209,7 @@ self.timing = None self.status = None self.status_text = None + self.response_headers_length = 0 self.encoded_data_length = 0 self.data_chunks = [] self.failed = False @@ -253,24 +254,20 @@ result.timing = Timing(request_time=result.timestamp) return result - def GetEncodedDataLength(self): + def GetResponseTransportLength(self): """Get the total amount of encoded data no matter whether load has finished or not. """ assert self.HasReceivedResponse() assert not self.from_disk_cache and not self.served_from_cache - assert self.protocol != 'about' - if self.failed: - # TODO(gabadie): Once crbug.com/622018 is fixed, remove this branch. - return 0 + assert self.protocol not in {'about', 'blob', 'data'} if self.timing.loading_finished != Timing.UNVAILABLE: encoded_data_length = self.encoded_data_length - assert encoded_data_length > 0 else: encoded_data_length = sum( [chunk_size for _, chunk_size in self.data_chunks]) assert encoded_data_length > 0 or len(self.data_chunks) == 0 - return encoded_data_length + return encoded_data_length + self.response_headers_length def GetHTTPResponseHeader(self, header_name): """Gets the value of a HTTP response header. @@ -736,7 +733,7 @@ _CopyFromDictToObject(redirect_response, r, (('headers', 'response_headers'), - ('encodedDataLength', 'encoded_data_length'), + ('encodedDataLength', 'response_headers_length'), ('fromDiskCache', 'from_disk_cache'), ('protocol', 'protocol'), ('status', 'status'), ('statusText', 'status_text'))) @@ -792,6 +789,7 @@ # Actual request headers are not known before reaching the # network stack. ('requestHeaders', 'request_headers'), + ('encodedDataLength', 'response_headers_length'), ('headers', 'response_headers'))) timing_dict = {} # Some URLs don't have a timing dict (e.g. data URLs), and timings for @@ -822,8 +820,6 @@ assert (status == RequestTrack._STATUS_RESPONSE or status == RequestTrack._STATUS_DATA) r.encoded_data_length = params['encodedDataLength'] - assert (r.encoded_data_length > 0 or r.protocol in {'about', 'data'} or - r.from_disk_cache or r.served_from_cache) r.timing.loading_finished = r._TimestampOffsetFromStartMs( params['timestamp']) self._requests_in_flight[request_id] = (r, RequestTrack._STATUS_FINISHED)
diff --git a/tools/android/loading/sandwich.py b/tools/android/loading/sandwich.py index 40419431..ffd7b00 100755 --- a/tools/android/loading/sandwich.py +++ b/tools/android/loading/sandwich.py
@@ -10,9 +10,11 @@ """ import argparse +import csv import json import logging import os +import re import sys from urlparse import urlparse import yaml @@ -115,8 +117,14 @@ help='Setup all NoState-Prefetch benchmarks.') # Setup Stale-While-Revalidate benchmarks subcommand. - subparsers.add_parser('setup-swr', parents=[sandwich_setup_parser], + swr_setup_parser = subparsers.add_parser('setup-swr', + parents=[sandwich_setup_parser], help='Setup all Stale-While-Revalidate benchmarks.') + swr_setup_parser.add_argument('-d', '--domains-csv', + type=argparse.FileType('r'), required=True, + help='Path of the CSV containing the pattern of domains in a ' + '`domain-patterns` column and a `usage` column in percent in how ' + 'likely they are in a page load.') # Run benchmarks subcommand (used in _RunBenchmarkMain). subparsers.add_parser('run', parents=[task_manager.CommandLineParser()], @@ -164,25 +172,46 @@ def _SetupStaleWhileRevalidateBenchmark(args): - del args # unused. + domain_regexes = [] + for row in csv.DictReader(args.domains_csv): + domain_patterns = json.loads('[{}]'.format(row['domain-patterns'])) + for domain_pattern in domain_patterns: + domain_pattern_escaped = r'(\.|^){}$'.format(re.escape(domain_pattern)) + domain_regexes.append({ + 'usage': float(row['usage']), + 'domain_regex': domain_pattern_escaped.replace(r'\?', r'\w*')}) return { - 'network_conditions': ['Regular3G', 'Regular2G'] + 'domain_regexes': domain_regexes, + 'network_conditions': ['Regular3G', 'Regular2G'], + 'usage_thresholds': [1, 3, 5, 10] } def _GenerateStaleWhileRevalidateBenchmarkTasks( common_builder, main_transformer, benchmark_setup): + # Compile domain regexes. + domain_regexes = [] + for e in benchmark_setup['domain_regexes']: + domain_regexes.append({ + 'usage': e['usage'], + 'domain_regex': re.compile(e['domain_regex'])}) + + # Build tasks. builder = sandwich_swr.StaleWhileRevalidateBenchmarkBuilder(common_builder) - for enable_swr in [False, True]: - builder.PopulateBenchmark(enable_swr, _MAIN_TRANSFORMER_LIST_NAME, - transformer_list=[main_transformer]) - for network_condition in benchmark_setup['network_conditions']: - transformer_list_name = network_condition.lower() - network_transformer = \ - sandwich_utils.NetworkSimulationTransformer(network_condition) - transformer_list = [main_transformer, network_transformer] + for network_condition in benchmark_setup['network_conditions']: + transformer_list_name = network_condition.lower() + network_transformer = \ + sandwich_utils.NetworkSimulationTransformer(network_condition) + transformer_list = [main_transformer, network_transformer] + builder.PopulateBenchmark( + 'no-swr', [], transformer_list_name, transformer_list) + for usage_threshold in benchmark_setup['usage_thresholds']: + benchmark_name = 'threshold{}'.format(usage_threshold) + selected_domain_regexes = [e['domain_regex'] for e in domain_regexes + if e['usage'] > usage_threshold] builder.PopulateBenchmark( - enable_swr, transformer_list_name, transformer_list) + benchmark_name, selected_domain_regexes, + transformer_list_name, transformer_list) _TASK_GENERATORS = {
diff --git a/tools/android/loading/sandwich_prefetch.py b/tools/android/loading/sandwich_prefetch.py index 0d261b80..456c697b 100644 --- a/tools/android/loading/sandwich_prefetch.py +++ b/tools/android/loading/sandwich_prefetch.py
@@ -77,60 +77,6 @@ return urlparse.urlunparse(parsed_url) -def _PatchWpr(wpr_archive): - """Patches a WPR archive to get all resources into the HTTP cache and avoid - invalidation and revalidations. - - Args: - wpr_archive: wpr_backend.WprArchiveBackend WPR archive to patch. - """ - # Sets the resources cache max-age to 10 years. - MAX_AGE = 10 * 365 * 24 * 60 * 60 - CACHE_CONTROL = 'public, max-age={}'.format(MAX_AGE) - - logging.info('number of entries: %d', len(wpr_archive.ListUrlEntries())) - patched_entry_count = 0 - for url_entry in wpr_archive.ListUrlEntries(): - response_headers = url_entry.GetResponseHeadersDict() - if 'cache-control' in response_headers and \ - response_headers['cache-control'] == CACHE_CONTROL: - continue - # Override the cache-control header to set the resources max age to MAX_AGE. - # - # Important note: Some resources holding sensitive information might have - # cache-control set to no-store which allow the resource to be cached but - # not cached in the file system. NoState-Prefetch is going to take care of - # this case. But in here, to simulate NoState-Prefetch, we don't have other - # choices but save absolutely all cached resources on disk so they survive - # after killing chrome for cache save, modification and push. - url_entry.SetResponseHeader('cache-control', CACHE_CONTROL) - - # TODO(gabadie): May need to extend Vary blacklist (referer?) - # - # All of these Vary and Pragma possibilities need to be removed from - # response headers in order for Chrome to store a resource in HTTP cache and - # not to invalidate it. - url_entry.RemoveResponseHeaderDirectives('vary', {'*', 'cookie'}) - url_entry.RemoveResponseHeaderDirectives('pragma', {'no-cache'}) - patched_entry_count += 1 - logging.info('number of entries patched: %d', patched_entry_count) - - -def _FilterOutDataAndIncompleteRequests(requests): - for request in filter(lambda r: not r.IsDataRequest(), requests): - # The protocol is only known once the response has been received. But the - # trace recording might have been stopped with still some JavaScript - # originated requests that have not received any responses yet. - if request.protocol is None: - assert not request.HasReceivedResponse() - continue - if request.protocol == 'about': - continue - if request.protocol not in {'http/0.9', 'http/1.0', 'http/1.1'}: - raise RuntimeError('Unknown request protocol {}'.format(request.protocol)) - yield request - - def _PatchCacheArchive(cache_archive_path, loading_trace_path, cache_archive_dest_path): """Patch the cache archive. @@ -153,7 +99,7 @@ cache_backend = chrome_cache.CacheBackend(cache_path, 'simple') cache_entries = set(cache_backend.ListKeys()) logging.info('Original cache size: %d bytes' % cache_backend.GetSize()) - for request in _FilterOutDataAndIncompleteRequests( + for request in sandwich_utils.FilterOutDataAndIncompleteRequests( trace.request_track.GetEvents()): # On requests having an upload data stream such as POST requests, # net::HttpCache::GenerateCacheKey() prefixes the cache entry's key with @@ -257,7 +203,8 @@ dependencies_lens, subresource_discoverer) whitelisted_urls = set() - for request in _FilterOutDataAndIncompleteRequests(discovered_requests): + for request in sandwich_utils.FilterOutDataAndIncompleteRequests( + discovered_requests): logging.debug('white-listing %s', request.url) whitelisted_urls.add(request.url) logging.info('number of white-listed resources: %d', len(whitelisted_urls)) @@ -289,37 +236,6 @@ logging.error('+ ' + url) -class _RequestOutcome: - All, ServedFromCache, NotServedFromCache, Post = range(4) - - -def _ListUrlRequests(trace, request_kind): - """Lists requested URLs from a trace. - - Args: - trace: (loading_trace.LoadingTrace) loading trace. - request_kind: _RequestOutcome indicating the subset of requests to output. - - Returns: - set([str]) - """ - urls = set() - for request_event in _FilterOutDataAndIncompleteRequests( - trace.request_track.GetEvents()): - if (request_kind == _RequestOutcome.ServedFromCache and - request_event.from_disk_cache): - urls.add(request_event.url) - elif (request_kind == _RequestOutcome.Post and - request_event.method.upper().strip() == 'POST'): - urls.add(request_event.url) - elif (request_kind == _RequestOutcome.NotServedFromCache and - not request_event.from_disk_cache): - urls.add(request_event.url) - elif request_kind == _RequestOutcome.All: - urls.add(request_event.url) - return urls - - class _RunOutputVerifier(object): """Object to verify benchmark run from traces and WPR log stored in the runner output directory. @@ -347,12 +263,14 @@ """Verifies a trace with the cache validation result and the benchmark setup. """ - effective_requests = _ListUrlRequests(trace, _RequestOutcome.All) - effective_post_requests = _ListUrlRequests(trace, _RequestOutcome.Post) - effective_cached_requests = \ - _ListUrlRequests(trace, _RequestOutcome.ServedFromCache) - effective_uncached_requests = \ - _ListUrlRequests(trace, _RequestOutcome.NotServedFromCache) + effective_requests = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.All) + effective_post_requests = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.Post) + effective_cached_requests = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.ServedFromCache) + effective_uncached_requests = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.NotServedFromCache) missing_requests = self._original_requests.difference(effective_requests) unexpected_requests = effective_requests.difference(self._original_requests) @@ -422,10 +340,12 @@ cache_keys = set( chrome_cache.CacheBackend(cache_directory, 'simple').ListKeys()) trace = loading_trace.LoadingTrace.FromJsonFile(cache_build_trace_path) - effective_requests = _ListUrlRequests(trace, _RequestOutcome.All) - effective_post_requests = _ListUrlRequests(trace, _RequestOutcome.Post) + effective_requests = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.All) + effective_post_requests = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.Post) effective_encoded_data_lengths = {} - for request in _FilterOutDataAndIncompleteRequests( + for request in sandwich_utils.FilterOutDataAndIncompleteRequests( trace.request_track.GetEvents()): if request.from_disk_cache or request.served_from_cache: # At cache archive creation time, a request might be loaded several times, @@ -434,10 +354,10 @@ if request.url in effective_encoded_data_lengths: effective_encoded_data_lengths[request.url] = max( effective_encoded_data_lengths[request.url], - request.GetEncodedDataLength()) + request.GetResponseTransportLength()) else: effective_encoded_data_lengths[request.url] = ( - request.GetEncodedDataLength()) + request.GetResponseTransportLength()) upload_data_stream_cache_entry_keys = set() upload_data_stream_requests = set() @@ -498,7 +418,7 @@ served_from_cache_bytes = 0 urls_hitting_network = set() response_sizes = {} - for request in _FilterOutDataAndIncompleteRequests( + for request in sandwich_utils.FilterOutDataAndIncompleteRequests( trace.request_track.GetEvents()): # Ignore requests served from the blink's cache. if request.served_from_cache: @@ -516,13 +436,13 @@ response_size = response_sizes[request.url] served_from_cache_bytes += response_size else: - response_size = request.GetEncodedDataLength() + response_size = request.GetResponseTransportLength() served_from_network_bytes += response_size response_sizes[request.url] = response_size # Make sure the served from blink's cache requests have at least one # corresponding request that was not served from the blink's cache. - for request in _FilterOutDataAndIncompleteRequests( + for request in sandwich_utils.FilterOutDataAndIncompleteRequests( trace.request_track.GetEvents()): assert (request.url in urls_hitting_network or not request.served_from_cache) @@ -537,12 +457,12 @@ len(cache_validation_result['successfully_cached_resources']), 'cache_recording.cached_subresource_count': len(cache_validation_result['expected_cached_resources']), - 'benchmark.subresource_count': len(_ListUrlRequests( - trace, _RequestOutcome.All)), + 'benchmark.subresource_count': len(sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.All)), 'benchmark.served_from_cache_count_theoretic': len(benchmark_setup['cache_whitelist']), - 'benchmark.served_from_cache_count': len(_ListUrlRequests( - trace, _RequestOutcome.ServedFromCache)), + 'benchmark.served_from_cache_count': len(sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.ServedFromCache)), 'benchmark.served_from_network_bytes': served_from_network_bytes, 'benchmark.served_from_cache_bytes': served_from_cache_bytes } @@ -594,7 +514,6 @@ @self.RegisterTask('common/webpages-patched.wpr', dependencies=[self._common_builder.original_wpr_task]) def BuildPatchedWpr(): - common_util.EnsureParentDirectoryExists(BuildPatchedWpr.path) shutil.copyfile( self._common_builder.original_wpr_task.path, BuildPatchedWpr.path) wpr_archive = wpr_backend.WprArchiveBackend(BuildPatchedWpr.path) @@ -615,7 +534,10 @@ json.dump(original_response_headers, file_output) # Patch WPR. - _PatchWpr(wpr_archive) + wpr_url_entries = wpr_archive.ListUrlEntries() + for wpr_url_entry in wpr_url_entries: + sandwich_utils.PatchWprEntryToBeCached(wpr_url_entry) + logging.info('number of patched entries: %d', len(wpr_url_entries)) wpr_archive.Persist() @self.RegisterTask('common/original-cache.zip', [BuildPatchedWpr])
diff --git a/tools/android/loading/sandwich_swr.py b/tools/android/loading/sandwich_swr.py index 46910c4..a902f4d 100644 --- a/tools/android/loading/sandwich_swr.py +++ b/tools/android/loading/sandwich_swr.py
@@ -2,10 +2,33 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +""" This module implements the Stale-While-Revalidate performance improvement +experiment on third parties' resources. + +The top level operations of the experiment are: + 1. Record WPR archive; + 2. Create a patched WPR archive so that all resource are getting cached; + 3. Record original cache using the patched WPR archive; + 4. Setup the benchmark producing the list of URL to enable SWR in a JSON file; + 5. Create the benchmark cache by: + - Remove No-Store resources; + - Adding the SWR header on resources that are experimentally required to + have it; + - Patch SWR header on resources that already had it to make sure the + the SWR freshness is not out of date; + - And restore all other headers so that response headers such as + Set-Cookie are still in the cache to avoid entropy caused by + different cookie values. + 6. Run the benchmark; + 7. Extract metrics into CSV files. +""" + import csv +import json import logging import os import shutil +from urlparse import urlparse import chrome_cache import common_util @@ -13,16 +36,54 @@ import request_track import sandwich_metrics import sandwich_runner +import sandwich_utils import task_manager +import wpr_backend -def _BuildPatchedCache(original_cache_run_path, original_cache_archive_path, - cache_archive_dest_path): - CACHE_CONTROL_VALUE = 'max-age=0,stale-while-revalidate=315360000' - trace_path = os.path.join( - original_cache_run_path, '0', sandwich_runner.TRACE_FILENAME) - trace = loading_trace.LoadingTrace.FromJsonFile(trace_path) - patch_count = 0 +def _ExtractRegexMatchingUrls(urls, domain_regexes): + urls_to_enable = set() + for url in urls: + if url in urls_to_enable: + continue + parsed_url = urlparse(url) + for domain_regex in domain_regexes: + if domain_regex.search(parsed_url.netloc): + urls_to_enable.add(url) + break + return urls_to_enable + + +def _BuildBenchmarkCache( + original_wpr_trace_path, urls_to_enable_swr, + original_cache_trace_path, original_cache_archive_path, + cache_archive_dest_path): + # Load trace that was generated at original cache creation. + logging.info('loading %s', original_wpr_trace_path) + trace = loading_trace.LoadingTrace.FromJsonFile(original_wpr_trace_path) + + # Lists URLs that should not be in the cache or already have SWR headers. + urls_should_not_be_cached = set() + urls_already_with_swr = set() + for request in trace.request_track.GetEvents(): + caching_policy = request_track.CachingPolicy(request) + if not caching_policy.IsCacheable(): + urls_should_not_be_cached.add(request.url) + elif caching_policy.GetFreshnessLifetimes()[1] > 0: + urls_already_with_swr.add(request.url) + # Trace are fat, kill this one to save up memory for the next one to load in + # this scope. + del trace + + # Load trace that was generated at original cache creation. + logging.info('loading %s', original_cache_trace_path) + trace = loading_trace.LoadingTrace.FromJsonFile(original_cache_trace_path) + + # Create cache contents. + delete_count = 0 + swr_patch_count = 0 + originaly_swr_patch_count = 0 + noswr_patch_count = 0 with common_util.TemporaryDirectory(prefix='sandwich_tmp') as tmp_path: cache_path = os.path.join(tmp_path, 'cache') chrome_cache.UnzipDirectoryContent(original_cache_archive_path, cache_path) @@ -31,18 +92,77 @@ for request in trace.request_track.GetEvents(): if request.url not in cache_keys: continue - caching_policy = request_track.CachingPolicy(request) - assert caching_policy.IsCacheable() - freshness = caching_policy.GetFreshnessLifetimes() - if freshness[0] == 0: + if request.url in urls_should_not_be_cached: + cache_backend.DeleteKey(request.url) + delete_count += 1 continue - request.SetHTTPResponseHeader('cache-control', CACHE_CONTROL_VALUE) + if request.url in urls_to_enable_swr: + request.SetHTTPResponseHeader( + 'cache-control', 'max-age=0,stale-while-revalidate=315360000') + request.SetHTTPResponseHeader( + 'last-modified', 'Thu, 23 Jun 2016 11:30:00 GMT') + swr_patch_count += 1 + elif request.url in urls_already_with_swr: + # Force to use SWR on resources that originally attempted to use it. + request.SetHTTPResponseHeader( + 'cache-control', 'max-age=0,stale-while-revalidate=315360000') + # The resource originally had SWR enabled therefore we don't + # Last-Modified to repro exactly the performance impact in case these + # headers were not set properly causing an invalidation instead of a + # revalidation. + originaly_swr_patch_count += 1 + else: + # Force synchronous revalidation. + request.SetHTTPResponseHeader('cache-control', 'max-age=0') + noswr_patch_count += 1 raw_headers = request.GetRawResponseHeaders() cache_backend.UpdateRawResponseHeaders(request.url, raw_headers) - patch_count += 1 chrome_cache.ZipDirectoryContent(cache_path, cache_archive_dest_path) - logging.info('Patched %d cached resources out of %d' % ( - patch_count, len(cache_keys))) + logging.info('patched %d cached resources with forced SWR', swr_patch_count) + logging.info('patched %d cached resources with original SWR', + originaly_swr_patch_count) + logging.info('patched %d cached resources without SWR', noswr_patch_count) + logging.info('deleted %d cached resources', delete_count) + + +def _ProcessRunOutputDir(benchmark_setup, runner_output_dir): + """Process benchmark's run output directory. + + Args: + cache_validation_result: Same as for _RunOutputVerifier + benchmark_setup: Same as for _RunOutputVerifier + runner_output_dir: Same as for SandwichRunner.output_dir + + Returns: + List of dictionary. + """ + run_metrics_list = [] + for repeat_id, repeat_dir in sandwich_runner.WalkRepeatedRuns( + runner_output_dir): + trace_path = os.path.join(repeat_dir, sandwich_runner.TRACE_FILENAME) + logging.info('processing trace: %s', trace_path) + trace = loading_trace.LoadingTrace.FromJsonFile(trace_path) + served_from_cache_urls = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.ServedFromCache) + matching_subresource_count_used_from_cache = ( + served_from_cache_urls.intersection( + set(benchmark_setup['urls_to_enable_swr']))) + run_metrics = { + 'url': trace.url, + 'repeat_id': repeat_id, + 'benchmark_name': benchmark_setup['benchmark_name'], + 'cache_recording.subresource_count': + len(benchmark_setup['effective_subresource_urls']), + 'cache_recording.matching_subresource_count': + len(benchmark_setup['urls_to_enable_swr']), + 'benchmark.matching_subresource_count_used_from_cache': + len(matching_subresource_count_used_from_cache) + } + run_metrics.update( + sandwich_metrics.ExtractCommonMetricsFromRepeatDirectory( + repeat_dir, trace)) + run_metrics_list.append(run_metrics) + return run_metrics_list class StaleWhileRevalidateBenchmarkBuilder(task_manager.Builder): @@ -54,99 +174,148 @@ common_builder.output_directory, common_builder.output_subdirectory) self._common_builder = common_builder - self._patched_cache_task = None + self._patched_wpr_path = None + self._original_cache_task = None + self._original_cache_trace_path = None self._PopulateCommonPipelines() def _PopulateCommonPipelines(self): """Creates necessary tasks to produce initial cache archives. Here is the full dependency tree for the returned task: - common/patched-cache.zip - depends on: common/original-cache.zip + depends on: common/original-cache.zip + depends on: common/webpages-patched.wpr depends on: common/webpages.wpr """ - @self.RegisterTask('common/original-cache.zip', + @self.RegisterTask('common/webpages-patched.wpr', dependencies=[self._common_builder.original_wpr_task]) + def BuildPatchedWpr(): + shutil.copyfile( + self._common_builder.original_wpr_task.path, BuildPatchedWpr.path) + wpr_archive = wpr_backend.WprArchiveBackend(BuildPatchedWpr.path) + wpr_url_entries = wpr_archive.ListUrlEntries() + for wpr_url_entry in wpr_url_entries: + sandwich_utils.PatchWprEntryToBeCached(wpr_url_entry) + logging.info('number of patched entries: %d', len(wpr_url_entries)) + wpr_archive.Persist() + + @self.RegisterTask('common/original-cache.zip', + dependencies=[BuildPatchedWpr]) def BuildOriginalCache(): runner = self._common_builder.CreateSandwichRunner() - runner.wpr_archive_path = self._common_builder.original_wpr_task.path + runner.wpr_archive_path = BuildPatchedWpr.path runner.cache_archive_path = BuildOriginalCache.path runner.cache_operation = sandwich_runner.CacheOperation.SAVE runner.output_dir = BuildOriginalCache.run_path runner.Run() BuildOriginalCache.run_path = BuildOriginalCache.path[:-4] + '-run' - @self.RegisterTask('common/patched-cache.zip', - dependencies=[BuildOriginalCache]) - def BuildPatchedCache(): - _BuildPatchedCache(BuildOriginalCache.run_path, BuildOriginalCache.path, - BuildPatchedCache.path) + self._original_cache_trace_path = os.path.join( + BuildOriginalCache.run_path, '0', sandwich_runner.TRACE_FILENAME) + self._patched_wpr_path = BuildPatchedWpr.path + self._original_cache_task = BuildOriginalCache - self._patched_cache_task = BuildPatchedCache - - def PopulateBenchmark(self, enable_swr, transformer_list_name, - transformer_list): + def PopulateBenchmark(self, benchmark_name, domain_regexes, + transformer_list_name, transformer_list): """Populate benchmarking tasks. Args: - enable_swr: Enable SWR patching or not. + benchmark_name: Name of the benchmark. + domain_regexes: Compiled regexes of domains to enable SWR. transformer_list_name: A string describing the transformers, will be used in Task names (prefer names without spaces and special characters). transformer_list: An ordered list of function that takes an instance of SandwichRunner as parameter, would be applied immediately before SandwichRunner.Run() in the given order. + Here is the full dependency of the added tree for the returned task: - <transformer_list_name>/{swr,worstcase}-metrics.csv - depends on: <transformer_list_name>/{swr,worstcase}-run/ - depends on: some tasks saved by PopulateCommonPipelines() + <transformer_list_name>/<benchmark_name>-metrics.csv + depends on: <transformer_list_name>/<benchmark_name>-run/ + depends on: common/<benchmark_name>-cache.zip + depends on: common/<benchmark_name>-setup.json + depends on: common/patched-cache.zip """ - additional_column_names = ['url', 'repeat_id'] + additional_column_names = [ + 'url', + 'repeat_id', + 'benchmark_name', - task_prefix = os.path.join(transformer_list_name, '') - if enable_swr: - task_prefix += 'swr' - else: - task_prefix += 'worstcase' + # Number of resources of the page. + 'cache_recording.subresource_count', - @self.RegisterTask(task_prefix + '-run/', [self._patched_cache_task]) + # Number of resources matching at least one domain regex, to give an + # idea in the CSV how much the threshold influence additional SWR uses. + 'cache_recording.matching_subresource_count', + + # Number of resources fetched from cache matching at least one domain + # regex, to give an actual idea if it is possible to have performance + # improvement on the web page (or not because only XHR), but also tells + # if the page loading time should see a performance improvement or not + # compared with a different thresholds. + 'benchmark.matching_subresource_count_used_from_cache'] + shared_task_prefix = os.path.join('common', benchmark_name) + task_prefix = os.path.join(transformer_list_name, benchmark_name) + + @self.RegisterTask(shared_task_prefix + '-setup.json', merge=True, + dependencies=[self._original_cache_task]) + def SetupBenchmark(): + logging.info('loading %s', self._original_cache_trace_path) + trace = loading_trace.LoadingTrace.FromJsonFile( + self._original_cache_trace_path) + logging.info('generating %s', SetupBenchmark.path) + effective_subresource_urls = sandwich_utils.ListUrlRequests( + trace, sandwich_utils.RequestOutcome.All) + urls_to_enable_swr = _ExtractRegexMatchingUrls( + effective_subresource_urls, domain_regexes) + logging.info( + 'count of urls to enable SWR: %s', len(urls_to_enable_swr)) + with open(SetupBenchmark.path, 'w') as output: + json.dump({ + 'benchmark_name': benchmark_name, + 'urls_to_enable_swr': [url for url in urls_to_enable_swr], + 'effective_subresource_urls': + [url for url in effective_subresource_urls] + }, output) + + @self.RegisterTask(shared_task_prefix + '-cache.zip', merge=True, + dependencies=[SetupBenchmark]) + def BuildBenchmarkCacheArchive(): + benchmark_setup = json.load(open(SetupBenchmark.path)) + _BuildBenchmarkCache( + original_wpr_trace_path=( + self._common_builder.original_wpr_recording_trace_path), + urls_to_enable_swr=set(benchmark_setup['urls_to_enable_swr']), + original_cache_trace_path=self._original_cache_trace_path, + original_cache_archive_path=self._original_cache_task.path, + cache_archive_dest_path=BuildBenchmarkCacheArchive.path) + + @self.RegisterTask(task_prefix + '-run/', [BuildBenchmarkCacheArchive]) def RunBenchmark(): runner = self._common_builder.CreateSandwichRunner() for transformer in transformer_list: transformer(runner) - runner.wpr_archive_path = self._common_builder.original_wpr_task.path + runner.wpr_archive_path = self._patched_wpr_path runner.wpr_out_log_path = os.path.join( RunBenchmark.path, sandwich_runner.WPR_LOG_FILENAME) - runner.cache_archive_path = self._patched_cache_task.path + runner.cache_archive_path = BuildBenchmarkCacheArchive.path runner.cache_operation = sandwich_runner.CacheOperation.PUSH runner.output_dir = RunBenchmark.path - if enable_swr: - runner.chrome_args.append('--enable-features=StaleWhileRevalidate2') + runner.chrome_args.append('--enable-features=StaleWhileRevalidate2') runner.Run() @self.RegisterTask(task_prefix + '-metrics.csv', [RunBenchmark]) def ExtractMetrics(): - run_metrics_list = [] - for repeat_id, repeat_dir in sandwich_runner.WalkRepeatedRuns( - RunBenchmark.path): - trace_path = os.path.join(repeat_dir, sandwich_runner.TRACE_FILENAME) - logging.info('processing trace: %s', trace_path) - trace = loading_trace.LoadingTrace.FromJsonFile(trace_path) - run_metrics = { - 'url': trace.url, - 'repeat_id': repeat_id, - } - run_metrics.update( - sandwich_metrics.ExtractCommonMetricsFromRepeatDirectory( - repeat_dir, trace)) - run_metrics_list.append(run_metrics) + benchmark_setup = json.load(open(SetupBenchmark.path)) + run_metrics_list = _ProcessRunOutputDir( + benchmark_setup, RunBenchmark.path) run_metrics_list.sort(key=lambda e: e['repeat_id']) with open(ExtractMetrics.path, 'w') as csv_file: writer = csv.DictWriter(csv_file, fieldnames=(additional_column_names + sandwich_metrics.COMMON_CSV_COLUMN_NAMES)) writer.writeheader() - for trace_metrics in run_metrics_list: - writer.writerow(trace_metrics) + for run_metrics in run_metrics_list: + writer.writerow(run_metrics) self._common_builder.default_final_tasks.append(ExtractMetrics)
diff --git a/tools/android/loading/sandwich_utils.py b/tools/android/loading/sandwich_utils.py index bbc2d9d..b5ec497 100644 --- a/tools/android/loading/sandwich_utils.py +++ b/tools/android/loading/sandwich_utils.py
@@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import os + import common_util import emulation import sandwich_runner @@ -25,6 +27,83 @@ return Transformer +def FilterOutDataAndIncompleteRequests(requests): + for request in filter(lambda r: not r.IsDataRequest(), requests): + # The protocol is only known once the response has been received. But the + # trace recording might have been stopped with still some JavaScript + # originated requests that have not received any responses yet. + if request.protocol is None: + assert not request.HasReceivedResponse() + continue + if request.protocol not in {'http/0.9', 'http/1.0', 'http/1.1'}: + raise RuntimeError('Unknown request protocol {}'.format(request.protocol)) + yield request + + +class RequestOutcome: + All, ServedFromCache, NotServedFromCache, Post = range(4) + + +def ListUrlRequests(trace, request_kind): + """Lists requested URLs from a trace. + + Args: + trace: (loading_trace.LoadingTrace) loading trace. + request_kind: RequestOutcome.* indicating the subset of requests to output. + + Returns: + set([str]) + """ + urls = set() + for request_event in FilterOutDataAndIncompleteRequests( + trace.request_track.GetEvents()): + if (request_kind == RequestOutcome.ServedFromCache and + request_event.from_disk_cache): + urls.add(request_event.url) + elif (request_kind == RequestOutcome.Post and + request_event.method.upper().strip() == 'POST'): + urls.add(request_event.url) + elif (request_kind == RequestOutcome.NotServedFromCache and + not request_event.from_disk_cache): + urls.add(request_event.url) + elif request_kind == RequestOutcome.All: + urls.add(request_event.url) + return urls + + +def PatchWprEntryToBeCached(wpr_url_entry): + """Patches a WprUrlEntry to ensure the resources to go into the HTTP cache and + avoid invalidation and revalidations. + + Args: + wpr_url_entry: Wpr url entry of the resource to put into the cache. + """ + MAX_AGE = 10 * 365 * 24 * 60 * 60 + CACHE_CONTROL = 'public, max-age={}'.format(MAX_AGE) + + # TODO(gabadie): may need to patch Last-Modified and If-Modified-Since. + # TODO(gabadie): may need to delete ETag. + # TODO(gabadie): may need to take care of x-cache. + # + # Override the cache-control header to set the resources max age to MAX_AGE. + # + # Important note: Some resources holding sensitive information might have + # cache-control set to no-store which allow the resource to be cached but + # not cached in the file system. NoState-Prefetch is going to take care of + # this case. But in here, to simulate NoState-Prefetch, we don't have other + # choices but save absolutely all cached resources on disk so they survive + # after killing chrome for cache save, modification and push. + wpr_url_entry.SetResponseHeader('cache-control', CACHE_CONTROL) + + # TODO(gabadie): May need to extend Vary blacklist (referer?) + # + # All of these Vary and Pragma possibilities need to be removed from + # response headers in order for Chrome to store a resource in HTTP cache and + # not to invalidate it. + wpr_url_entry.RemoveResponseHeaderDirectives('vary', {'*', 'cookie'}) + wpr_url_entry.RemoveResponseHeaderDirectives('pragma', {'no-cache'}) + + class SandwichCommonBuilder(task_manager.Builder): """A builder for a graph of tasks, each prepares or invokes a SandwichRunner. """ @@ -46,6 +125,7 @@ self.default_final_tasks = [] self.original_wpr_task = None + self.original_wpr_recording_trace_path = None def CreateSandwichRunner(self): """Create a runner for non benchmark purposes.""" @@ -62,7 +142,10 @@ runner = self.CreateSandwichRunner() runner.wpr_archive_path = BuildOriginalWpr.path runner.wpr_record = True - runner.output_dir = BuildOriginalWpr.path[:-4] + '-run' + runner.output_dir = BuildOriginalWpr.run_path runner.Run() + BuildOriginalWpr.run_path = BuildOriginalWpr.path[:-4] + '-run' self.original_wpr_task = BuildOriginalWpr + self.original_wpr_recording_trace_path = os.path.join( + BuildOriginalWpr.run_path, '0', sandwich_runner.TRACE_FILENAME)
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md index e1ae36e..ff096cc7 100644 --- a/tools/gn/docs/reference.md +++ b/tools/gn/docs/reference.md
@@ -1048,8 +1048,8 @@ ``` This target type allows you to run a script a single time to produce - or more output files. If you want to run a script once for each of a - set of input files, see "gn help action_foreach". + one or more output files. If you want to run a script once for each of + a set of input files, see "gn help action_foreach". ```
diff --git a/tools/gn/functions_target.cc b/tools/gn/functions_target.cc index 5cfd20b..4e162d5 100644 --- a/tools/gn/functions_target.cc +++ b/tools/gn/functions_target.cc
@@ -91,8 +91,8 @@ "action: Declare a target that runs a script a single time.\n" "\n" " This target type allows you to run a script a single time to produce\n" - " or more output files. If you want to run a script once for each of a\n" - " set of input files, see \"gn help action_foreach\".\n" + " one or more output files. If you want to run a script once for each of\n" + " a set of input files, see \"gn help action_foreach\".\n" "\n" "Inputs\n" "\n"
diff --git a/tools/grit/repack.gni b/tools/grit/repack.gni index 42087f9..7dd1520 100644 --- a/tools/grit/repack.gni +++ b/tools/grit/repack.gni
@@ -18,6 +18,7 @@ # File name (single string) of the output file. # # deps [optional] +# public_deps [optional] # visibility [optional] # Normal meaning. template("repack") { @@ -25,6 +26,7 @@ forward_variables_from(invoker, [ "deps", + "public_deps", "testonly", "visibility", ])
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 6cff409..46fde13 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -685,6 +685,8 @@ # shared library loading is fixed. 'android_cronet_tester': 'android_cronet_gn_debug_static_bot', 'android_n5x_swarming_rel': 'swarming_android_gn_release_trybot_arm64', + 'android_optional_gpu_tests_rel': + 'swarming_android_gn_release_trybot_arm64', 'android_swarming_rel': 'swarming_android_gn_release_trybot', 'cast_shell_android': 'android_cast_gn_debug_static_bot', 'linux_android_dbg_ng': 'swarming_android_gn_debug_trybot',
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index e11e037..9dbe3ba 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -154,6 +154,13 @@ <description>Please enter the description of this user action.</description> </action> +<action name="AboutFlags_document-passive-event-listeners"> + <owner>dtapuska@chromium.org</owner> + <description> + User enabled the PassiveDocumentEventListeners via chrome://flags. + </description> +</action> + <action name="AboutFlags_downloads-new-ui"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -13412,6 +13419,14 @@ </description> </action> +<action name="Signin_Signin_FromAutofillDropdown"> + <owner>mathp@chromium.org</owner> + <description> + Recorded on sign in start from access point + signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN. + </description> +</action> + <action name="Signin_Signin_FromAvatarBubbleSignin"> <owner>gogerald@chromium.org</owner> <description> @@ -13900,6 +13915,62 @@ <description>Please enter the description of this user action.</description> </action> +<action name="StatusArea_OS_Update_Default_Selected"> + <owner>bruthig@chromium.org</owner> + <owner>tbuckley@chromium.org</owner> + <description> + Counts the number of times the user selects the update row in the system + menu. + </description> +</action> + +<action name="StatusArea_SMS_Detailed"> + <owner>tbuckley@chromium.org</owner> + <owner>bruthig@chromium.org</owner> + <description> + Counts the number of times the user has opened the "SMS messages " + detailed view in the system menu. + </description> +</action> + +<action name="StatusArea_SMS_Detailed_DismissMsg"> + <owner>tbuckley@chromium.org</owner> + <owner>bruthig@chromium.org</owner> + <description> + Counts the number of times the user has dismissed an SMS message from the + SMS message detailed view in the system menu. + </description> +</action> + +<action name="StatusArea_SMS_Notification_DismissMsg"> + <owner>tbuckley@chromium.org</owner> + <owner>bruthig@chromium.org</owner> + <description> + Counts the number of times the user has dismissed an SMS message + notification. Note these notifications are managed by the system menu and + not the general notification center. + </description> +</action> + +<action name="StatusArea_ScreenCapture_Default_Stop"> + <owner>bruthig@chromium.org</owner> + <owner>tbuckley@chromium.org</owner> + <description> + Counts the number of times the user stops screen capturing via the screen + capture row in the system menu. + </description> +</action> + +<action name="StatusArea_ScreenCapture_Notification_Stop"> + <owner>bruthig@chromium.org</owner> + <owner>tbuckley@chromium.org</owner> + <description> + Counts the number of times the user stops screen capturing via the Screen + Capture notification. Note these notifications are managed by the system + menu and not the general notification center. + </description> +</action> + <action name="StatusArea_SignOut"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -14819,6 +14890,22 @@ <description>Starting the window overview mode.</description> </action> +<action name="WindowSelector_OverviewCloseButton"> + <owner>tdanderson@chromium.org</owner> + <owner>varkha@chromium.org</owner> + <description> + Using the 'X' button to close a window in the overview. + </description> +</action> + +<action name="WindowSelector_OverviewCloseKey"> + <owner>tdanderson@chromium.org</owner> + <owner>varkha@chromium.org</owner> + <description> + Using Ctrl+W shortcut to close a window in the overview. + </description> +</action> + <action name="WindowSelector_OverviewEnterKey"> <owner>tdanderson@chromium.org</owner> <owner>flackr@chromium.org</owner>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 34d789c3..5b4e8fc4 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -34700,6 +34700,9 @@ </histogram> <histogram name="NewTabPage.NumberOfMouseOvers"> + <obsolete> + Deprecated 2016-07. + </obsolete> <owner>beaudoin@chromium.org</owner> <summary> The total number of times the user hovered the mouse over Most Visited tile @@ -72936,8 +72939,8 @@ <int value="64" label="CONTEXT_MENUS_INTERNAL_ON_CLICKED"/> <int value="65" label="CONTEXT_MENUS_ON_CLICKED"/> <int value="66" label="COOKIES_ON_CHANGED"/> - <int value="67" label="COPRESENCE_ON_MESSAGES_RECEIVED"/> - <int value="68" label="COPRESENCE_ON_STATUS_UPDATED"/> + <int value="67" label="DELETED_COPRESENCE_ON_MESSAGES_RECEIVED"/> + <int value="68" label="DELETED_COPRESENCE_ON_STATUS_UPDATED"/> <int value="69" label="COPRESENCE_PRIVATE_ON_CONFIG_AUDIO"/> <int value="70" label="COPRESENCE_PRIVATE_ON_DECODE_SAMPLES_REQUEST"/> <int value="71" label="COPRESENCE_PRIVATE_ON_ENCODE_TOKEN_REQUEST"/> @@ -74185,8 +74188,8 @@ <int value="865" label="COPRESENCEPRIVATE_SENDSAMPLES"/> <int value="866" label="COPRESENCEPRIVATE_SENDDETECT"/> <int value="867" label="COPRESENCEPRIVATE_SENDINITIALIZED"/> - <int value="868" label="COPRESENCE_EXECUTE"/> - <int value="869" label="COPRESENCE_SETAPIKEY"/> + <int value="868" label="DELETED_COPRESENCE_EXECUTE"/> + <int value="869" label="DELETED_COPRESENCE_SETAPIKEY"/> <int value="870" label="FILESYSTEM_OBSERVEDIRECTORY"/> <int value="871" label="FILESYSTEM_UNOBSERVEENTRY"/> <int value="872" label="FILESYSTEM_GETOBSERVEDENTRIES"/> @@ -74228,7 +74231,7 @@ <int value="907" label="USB_GETUSERSELECTEDDEVICES"/> <int value="908" label="INPUTMETHODPRIVATE_GETINPUTMETHODCONFIG"/> <int value="909" label="WALLPAPERPRIVATE_GETSYNCSETTING"/> - <int value="910" label="COPRESENCE_SETAUTHTOKEN"/> + <int value="910" label="DELETED_COPRESENCE_SETAUTHTOKEN"/> <int value="911" label="CAST_CHANNEL_SETAUTHORITYKEYS"/> <int value="912" label="HOTWORDPRIVATE_STARTTRAINING"/> <int value="913" label="HOTWORDPRIVATE_FINALIZESPEAKERMODEL"/> @@ -74470,7 +74473,7 @@ <int value="1140" label="QUICKUNLOCKPRIVATE_SETMODES"/> <int value="1141" label="QUICKUNLOCKPRIVATE_GETACTIVEMODES"/> <int value="1142" label="QUICKUNLOCKPRIVATE_GETAVAILABLEMODES"/> - <int value="1143" label="WEBSTOREPRIVATE_ISEXTENSIONPENDINGAPPROVAL"/> + <int value="1143" label="WEBSTOREPRIVATE_ISPENDINGCUSTODIANAPPROVAL"/> </enum> <enum name="ExtensionIconState" type="int"> @@ -76542,6 +76545,11 @@ <int value="1432" label="PointerEventDispatch"/> <int value="1433" label="MIDIMessageEventReceivedTime"/> <int value="1434" label="SummaryElementWithDisplayBlockAuthorRule"/> + <int value="1435" label="V8MediaStream_Active_AttributeGetter"/> + <int value="1436" label="BeforeInstallPromptEvent"/> + <int value="1437" label="BeforeInstallPromptEventUserChoice"/> + <int value="1438" label="BeforeInstallPromptEventPreventDefault"/> + <int value="1439" label="BeforeInstallPromptEventPrompt"/> </enum> <enum name="FetchRequestMode" type="int"> @@ -81357,6 +81365,7 @@ <int value="-340622848" label="disable-javascript-harmony-shipping"/> <int value="-340255045" label="allow-nacl-socket-api"/> <int value="-328361990" label="enable-experimental-extension-apis"/> + <int value="-322937746" label="disable-desktop-capture-picker-new-ui"/> <int value="-322827131" label="tab-management-experiment-type-basil"/> <int value="-320820051" label="enable-zero-copy"/> <int value="-314910380" label="disable-distance-field-text"/> @@ -88621,6 +88630,7 @@ <int value="24" label="LOCAL_FILE"/> <int value="25" label="REMOTE_FILE"/> <int value="26" label="SAMPLED_UNSUPPORTED_FILE"/> + <int value="27" label="VERDICT_UNKNOWN"/> </enum> <enum name="SBClientDownloadCheckResult" type="int"> @@ -89783,6 +89793,7 @@ <int value="16" label="Recent tabs"/> <int value="17" label="Typed URL with unknown access point"/> <int value="18" label="Password bubble"/> + <int value="19" label="Autofill dropdown"/> </enum> <enum name="SigninAccountEquality" type="int">
diff --git a/tools/perf/benchmarks/system_health_smoke_test.py b/tools/perf/benchmarks/system_health_smoke_test.py index 897c622b..84f5922d 100644 --- a/tools/perf/benchmarks/system_health_smoke_test.py +++ b/tools/perf/benchmarks/system_health_smoke_test.py
@@ -116,6 +116,8 @@ # Only measure a single story so that this test cycles reasonably quickly. options.pageset_repeat = 1 options.page_repeat = 1 + # Enable browser logging in the smoke test only (crbug.com/625172). + options.logging_verbosity = 'non-verbose' return options
diff --git a/ui/base/cocoa/remote_layer_api.mm b/ui/base/cocoa/remote_layer_api.mm index 79d6f062..bbaf9f4 100644 --- a/ui/base/cocoa/remote_layer_api.mm +++ b/ui/base/cocoa/remote_layer_api.mm
@@ -5,7 +5,6 @@ #include "ui/base/cocoa/remote_layer_api.h" #include "base/command_line.h" -#include "base/mac/mac_util.h" #include "ui/base/ui_base_switches.h" #include <objc/runtime.h> @@ -13,10 +12,6 @@ namespace ui { bool RemoteLayerAPISupported() { - // This API only works on Mac OS 10.9 and later. - if (!base::mac::IsOSMavericksOrLater()) - return false; - static bool disabled_at_command_line = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableRemoteCoreAnimation); @@ -54,4 +49,3 @@ } } // namespace -
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h index 0709114..3965a50 100644 --- a/ui/base/x/x11_util.h +++ b/ui/base/x/x11_util.h
@@ -204,7 +204,7 @@ static const int kAllDesktops = -1; // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if // property not found. -bool GetWindowDesktop(XID window, int* desktop); +UI_BASE_X_EXPORT bool GetWindowDesktop(XID window, int* desktop); // Translates an X11 error code into a printable string. UI_BASE_X_EXPORT std::string GetX11ErrorString(XDisplay* display, int err);
diff --git a/ui/events/mojo/OWNERS b/ui/events/mojo/OWNERS new file mode 100644 index 0000000..08850f4 --- /dev/null +++ b/ui/events/mojo/OWNERS
@@ -0,0 +1,2 @@ +per-file *.mojom=set noparent +per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/ui/events/mojo/event_constants.mojom b/ui/events/mojo/event_constants.mojom index 445cffb..6ad8d67 100644 --- a/ui/events/mojo/event_constants.mojom +++ b/ui/events/mojo/event_constants.mojom
@@ -4,10 +4,9 @@ module ui.mojom; -// Denotes during which phase of event targeting that an accelerator will be -// notified of an event. PRE_TARGET will be notified instead of the target -// window. POST_TARGET will be notified after the target window, and only if the -// event was not consumed by the target. +// AcceleratorPhase specifies which phase of event matching the matcher should +// be considered for. See WindowTree for details on how it handles the +// AcceleratorPhase. enum AcceleratorPhase { PRE_TARGET, POST_TARGET,
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn index a9140a1..13fee93 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn
@@ -20,6 +20,12 @@ ] } +vector_icons_sources_gypi = + exec_script("//build/gypi_to_gn.py", + [ rebase_path("vector_icons_sources.gypi") ], + "scope", + [ "vector_icons_sources.gypi" ]) + vector_icons_cc_file = "$target_gen_dir/vector_icons.cc" vector_icons_h_file = "$target_gen_dir/vector_icons.h" @@ -416,208 +422,18 @@ action("aggregate_vector_icons") { script = "vector_icons/aggregate_vector_icons.py" - # TODO(estade): move all platform-specific icons into their own directories. - sources = [ - "vector_icons/account_box.icon", - "vector_icons/account_child_invert.icon", - "vector_icons/account_circle.icon", - "vector_icons/apps.icon", - "vector_icons/autologin.icon", - "vector_icons/bar_close.1x.icon", - "vector_icons/bar_close.icon", - "vector_icons/blocked_badge.icon", - "vector_icons/browser_tools.1x.icon", - "vector_icons/browser_tools.icon", - "vector_icons/browser_tools_error.1x.icon", - "vector_icons/browser_tools_error.icon", - "vector_icons/browser_tools_update.1x.icon", - "vector_icons/browser_tools_update.icon", - "vector_icons/browser_tools_warning.1x.icon", - "vector_icons/browser_tools_warning.icon", - "vector_icons/business.icon", - "vector_icons/check_circle.icon", - "vector_icons/checkbox_active.icon", - "vector_icons/checkbox_normal.icon", - "vector_icons/chrome_product.icon", - "vector_icons/close_all.icon", - "vector_icons/code.icon", - "vector_icons/combobox_arrow_mac_disabled.icon", - "vector_icons/combobox_arrow_mac_enabled.icon", - "vector_icons/cookie.icon", - "vector_icons/crashed_tab.icon", - "vector_icons/credit_card.1x.icon", - "vector_icons/credit_card.icon", - "vector_icons/eol.icon", - "vector_icons/error_circle.icon", - "vector_icons/extension.icon", - "vector_icons/extension_crashed.icon", - "vector_icons/file_download.icon", - "vector_icons/file_download_incognito.1x.icon", - "vector_icons/file_download_incognito.icon", - "vector_icons/file_download_shelf.icon", - "vector_icons/find_next.1x.icon", - "vector_icons/find_next.icon", - "vector_icons/find_prev.1x.icon", - "vector_icons/find_prev.icon", - "vector_icons/folder.1x.icon", - "vector_icons/folder.icon", - "vector_icons/folder_managed.1x.icon", - "vector_icons/folder_managed.icon", - "vector_icons/folder_supervised.1x.icon", - "vector_icons/folder_supervised.icon", - "vector_icons/fullscreen.icon", - "vector_icons/globe.icon", - "vector_icons/help_outline.icon", - "vector_icons/image.icon", - "vector_icons/incognito.1x.icon", - "vector_icons/incognito.icon", - "vector_icons/info_outline.icon", - "vector_icons/laptop.icon", - "vector_icons/location_bar_http.1x.icon", - "vector_icons/location_bar_http.icon", - "vector_icons/location_bar_https_invalid.1x.icon", - "vector_icons/location_bar_https_invalid.icon", - "vector_icons/location_bar_https_valid.1x.icon", - "vector_icons/location_bar_https_valid.icon", - "vector_icons/location_bar_https_valid_in_chip.1x.icon", - "vector_icons/location_bar_https_valid_in_chip.icon", - "vector_icons/location_bar_star.icon", - "vector_icons/location_bar_star_active.icon", - "vector_icons/location_on.icon", - "vector_icons/lock.icon", - "vector_icons/menu_check.1x.icon", - "vector_icons/menu_check.icon", - "vector_icons/menu_radio_empty.icon", - "vector_icons/menu_radio_selected.icon", - "vector_icons/midi.icon", - "vector_icons/mixed_content.icon", - "vector_icons/mode_edit.icon", - "vector_icons/my_location.icon", - "vector_icons/navigate_back.1x.icon", - "vector_icons/navigate_back.icon", - "vector_icons/navigate_forward.1x.icon", - "vector_icons/navigate_forward.icon", - "vector_icons/navigate_home.1x.icon", - "vector_icons/navigate_home.icon", - "vector_icons/navigate_reload.1x.icon", - "vector_icons/navigate_reload.icon", - "vector_icons/navigate_stop.1x.icon", - "vector_icons/navigate_stop.icon", - "vector_icons/notifications.icon", - "vector_icons/notifications_off.icon", - "vector_icons/omnibox_calculator.1x.icon", - "vector_icons/omnibox_calculator.icon", - "vector_icons/omnibox_extension_app.1x.icon", - "vector_icons/omnibox_extension_app.icon", - "vector_icons/omnibox_http.icon", - "vector_icons/omnibox_keyword_search.icon", - "vector_icons/omnibox_search.icon", - "vector_icons/omnibox_star.1x.icon", - "vector_icons/omnibox_star.icon", - "vector_icons/overflow_chevron.1x.icon", - "vector_icons/overflow_chevron.icon", - "vector_icons/paintbrush.icon", - "vector_icons/pdf.1x.icon", - "vector_icons/pdf.icon", - "vector_icons/photo_camera.icon", - "vector_icons/protocol_handler.icon", - "vector_icons/radio_button_active.icon", - "vector_icons/radio_button_normal.icon", - "vector_icons/remove_box.icon", - "vector_icons/remove_circle.icon", - "vector_icons/sad_tab.icon", - "vector_icons/settings.icon", - "vector_icons/shelf_applist.1x.icon", - "vector_icons/shelf_applist.icon", - "vector_icons/shelf_keyboard.1x.icon", - "vector_icons/shelf_keyboard.icon", - "vector_icons/shelf_notifications.1x.icon", - "vector_icons/shelf_notifications.icon", - "vector_icons/shelf_overflow.1x.icon", - "vector_icons/shelf_overflow.icon", - "vector_icons/shelf_overview.1x.icon", - "vector_icons/shelf_overview.icon", - "vector_icons/smartphone.icon", - "vector_icons/submenu_arrow.1x.icon", - "vector_icons/submenu_arrow.icon", - "vector_icons/supervisor_account.icon", - "vector_icons/sync_problem.icon", - "vector_icons/system_menu_accessibility.icon", - "vector_icons/system_menu_caps_lock.icon", - "vector_icons/system_menu_rotation_lock_auto.icon", - "vector_icons/system_menu_rotation_lock_locked.icon", - "vector_icons/system_menu_sms.icon", - "vector_icons/system_tray_accessibility.1x.icon", - "vector_icons/system_tray_accessibility.icon", - "vector_icons/system_tray_battery.1x.icon", - "vector_icons/system_tray_battery.icon", - "vector_icons/system_tray_battery_alert.1x.icon", - "vector_icons/system_tray_battery_alert.icon", - "vector_icons/system_tray_battery_bolt.1x.icon", - "vector_icons/system_tray_battery_bolt.icon", - "vector_icons/system_tray_battery_unreliable.1x.icon", - "vector_icons/system_tray_battery_unreliable.icon", - "vector_icons/system_tray_battery_x.1x.icon", - "vector_icons/system_tray_battery_x.icon", - "vector_icons/system_tray_caps_lock.1x.icon", - "vector_icons/system_tray_caps_lock.icon", - "vector_icons/system_tray_rotation_lock_locked.1x.icon", - "vector_icons/system_tray_rotation_lock_locked.icon", - "vector_icons/system_tray_update.1x.icon", - "vector_icons/system_tray_update.icon", - "vector_icons/system_tray_volume_mute.1x.icon", - "vector_icons/system_tray_volume_mute.icon", - "vector_icons/tab.icon", - "vector_icons/tab_audio.1x.icon", - "vector_icons/tab_audio.icon", - "vector_icons/tab_audio_muting.1x.icon", - "vector_icons/tab_audio_muting.icon", - "vector_icons/tab_bluetooth_connected.icon", - "vector_icons/tab_close_hovered_pressed.1x.icon", - "vector_icons/tab_close_hovered_pressed.icon", - "vector_icons/tab_close_normal.1x.icon", - "vector_icons/tab_close_normal.icon", - "vector_icons/tab_media_capturing.icon", - "vector_icons/tab_media_recording.icon", - "vector_icons/tab_usb_connected.1x.icon", - "vector_icons/tab_usb_connected.icon", - "vector_icons/tablet.icon", - "vector_icons/translate.icon", - "vector_icons/upgrade_menu_item.icon", - "vector_icons/videocam.icon", - "vector_icons/warning.icon", - "vector_icons/warning_badge.icon", - "vector_icons/web.icon", - "vector_icons/window_control_back.1x.icon", - "vector_icons/window_control_back.icon", - "vector_icons/window_control_close.1x.icon", - "vector_icons/window_control_close.icon", - "vector_icons/window_control_left_snapped.1x.icon", - "vector_icons/window_control_left_snapped.icon", - "vector_icons/window_control_maximize.1x.icon", - "vector_icons/window_control_maximize.icon", - "vector_icons/window_control_minimize.1x.icon", - "vector_icons/window_control_minimize.icon", - "vector_icons/window_control_restore.1x.icon", - "vector_icons/window_control_restore.icon", - "vector_icons/window_control_right_snapped.1x.icon", - "vector_icons/window_control_right_snapped.icon", - "vector_icons/zoom_minus.icon", - "vector_icons/zoom_plus.icon", - ] + inputs = vector_icons_sources_gypi.common outputs = [ vector_icons_cc_file, vector_icons_h_file, ] + response_file_contents = rebase_path(inputs, root_build_dir) + args = [ - # TODO(brettw) bug 535386: This should not take a directory as an input, - # but rather a response file listing the inputs or sometimes the build will - # be incorrect. In this case, Ninja won't be able to do proper dependency - # tracking since if a file is deleted, the command line will be the same - # and the action will not be re-run. "--working_directory=" + rebase_path("vector_icons/"), + "--file_list={{response_file_name}}", "--output_cc=" + rebase_path(vector_icons_cc_file, root_build_dir), "--output_h=" + rebase_path(vector_icons_h_file, root_build_dir), ]
diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp index 2114029..6e5f741 100644 --- a/ui/gfx/gfx.gyp +++ b/ui/gfx/gfx.gyp
@@ -13,57 +13,8 @@ 'dependencies': [ '<(DEPTH)/base/base.gyp:base', ], - 'defines': [ - 'GFX_IMPLEMENTATION', - ], - 'sources': [ - 'geometry/box_f.cc', - 'geometry/box_f.h', - 'geometry/cubic_bezier.cc', - 'geometry/cubic_bezier.h', - 'geometry/dip_util.cc', - 'geometry/dip_util.h', - 'geometry/insets.cc', - 'geometry/insets.h', - 'geometry/insets_f.cc', - 'geometry/insets_f.h', - 'geometry/matrix3_f.cc', - 'geometry/matrix3_f.h', - 'geometry/point.cc', - 'geometry/point.h', - 'geometry/point3_f.cc', - 'geometry/point3_f.h', - 'geometry/point_conversions.cc', - 'geometry/point_conversions.h', - 'geometry/point_f.cc', - 'geometry/point_f.h', - 'geometry/quad_f.cc', - 'geometry/quad_f.h', - 'geometry/rect.cc', - 'geometry/rect.h', - 'geometry/rect_conversions.cc', - 'geometry/rect_conversions.h', - 'geometry/rect_f.cc', - 'geometry/rect_f.h', - 'geometry/safe_integer_conversions.h', - 'geometry/scroll_offset.cc', - 'geometry/scroll_offset.h', - 'geometry/size.cc', - 'geometry/size.h', - 'geometry/size_conversions.cc', - 'geometry/size_conversions.h', - 'geometry/size_f.cc', - 'geometry/size_f.h', - 'geometry/vector2d.cc', - 'geometry/vector2d.h', - 'geometry/vector2d_conversions.cc', - 'geometry/vector2d_conversions.h', - 'geometry/vector2d_f.cc', - 'geometry/vector2d_f.h', - 'geometry/vector3d_f.cc', - 'geometry/vector3d_f.h', - ], 'includes': [ + 'gfx_geometry.gypi', '../../build/android/increase_size_for_speed.gypi', ], }, @@ -614,5 +565,27 @@ }, ], }], + ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', { + 'targets': [ + { + 'target_name': 'gfx_geometry_win64', + 'type': '<(component)', + 'dependencies': [ + '<(DEPTH)/base/base.gyp:base_win64', + ], + 'includes': [ + 'gfx_geometry.gypi', + ], + 'defines': [ + '<@(nacl_win64_defines)', + ], + 'configurations': { + 'Common_Base': { + 'msvs_target_platform': 'x64', + }, + }, + }, + ], + }], ], }
diff --git a/ui/gfx/gfx_geometry.gypi b/ui/gfx/gfx_geometry.gypi new file mode 100644 index 0000000..2378458 --- /dev/null +++ b/ui/gfx/gfx_geometry.gypi
@@ -0,0 +1,56 @@ +# 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. + +{ + 'defines': [ + 'GFX_IMPLEMENTATION', + ], + 'sources': [ + 'geometry/box_f.cc', + 'geometry/box_f.h', + 'geometry/cubic_bezier.cc', + 'geometry/cubic_bezier.h', + 'geometry/dip_util.cc', + 'geometry/dip_util.h', + 'geometry/insets.cc', + 'geometry/insets.h', + 'geometry/insets_f.cc', + 'geometry/insets_f.h', + 'geometry/matrix3_f.cc', + 'geometry/matrix3_f.h', + 'geometry/point.cc', + 'geometry/point.h', + 'geometry/point3_f.cc', + 'geometry/point3_f.h', + 'geometry/point_conversions.cc', + 'geometry/point_conversions.h', + 'geometry/point_f.cc', + 'geometry/point_f.h', + 'geometry/quad_f.cc', + 'geometry/quad_f.h', + 'geometry/rect.cc', + 'geometry/rect.h', + 'geometry/rect_conversions.cc', + 'geometry/rect_conversions.h', + 'geometry/rect_f.cc', + 'geometry/rect_f.h', + 'geometry/safe_integer_conversions.h', + 'geometry/scroll_offset.cc', + 'geometry/scroll_offset.h', + 'geometry/size.cc', + 'geometry/size.h', + 'geometry/size_conversions.cc', + 'geometry/size_conversions.h', + 'geometry/size_f.cc', + 'geometry/size_f.h', + 'geometry/vector2d.cc', + 'geometry/vector2d.h', + 'geometry/vector2d_conversions.cc', + 'geometry/vector2d_conversions.h', + 'geometry/vector2d_f.cc', + 'geometry/vector2d_f.h', + 'geometry/vector3d_f.cc', + 'geometry/vector3d_f.h', + ], +}
diff --git a/ui/gfx/gfx_nacl.gyp b/ui/gfx/gfx_nacl.gyp new file mode 100644 index 0000000..56b499bf --- /dev/null +++ b/ui/gfx/gfx_nacl.gyp
@@ -0,0 +1,40 @@ +# 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. + +{ + 'variables': { + 'chromium_code': 1, + # nacl_win64_target is for building the trusted Win64 NaCl broker. + 'nacl_win64_target': 0, + }, + 'includes': [ + '../../build/common_untrusted.gypi', + ], + 'conditions': [ + ['disable_nacl==0 and disable_nacl_untrusted==0', { + 'targets': [ + { + 'target_name': 'gfx_geometry_nacl', + 'type': 'none', + 'variables': { + 'nacl_untrusted_build': 1, + 'nlib_target': 'libgfx_geometry_nacl.a', + 'build_glibc': 0, + 'build_newlib': 0, + 'build_irt': 1, + 'build_pnacl_newlib': 0, + 'build_nonsfi_helper': 1, + }, + 'dependencies': [ + '../../base/base_nacl.gyp:base_nacl', + '../../base/base_nacl.gyp:base_nacl_nonsfi', + ], + 'includes': [ + 'gfx_geometry.gypi', + ], + }, + ], + }], + ], +}
diff --git a/ui/gfx/ipc/geometry/gfx_ipc_geometry.gyp b/ui/gfx/ipc/geometry/gfx_ipc_geometry.gyp index b7b72218..197fcecf 100644 --- a/ui/gfx/ipc/geometry/gfx_ipc_geometry.gyp +++ b/ui/gfx/ipc/geometry/gfx_ipc_geometry.gyp
@@ -7,7 +7,7 @@ 'chromium_code': 1, }, 'targets': [ - { + { # GN version: //ui/gfx/ipc 'target_name': 'gfx_ipc_geometry', 'type': '<(component)', @@ -17,17 +17,36 @@ '../../gfx.gyp:gfx', '../../gfx.gyp:gfx_geometry', ], - 'defines': [ - 'GFX_IPC_GEOMETRY_IMPLEMENTATION', - ], - 'include_dirs': [ - '../../..', - ], - 'sources': [ - 'gfx_param_traits.cc', - 'gfx_param_traits.h', - 'gfx_param_traits_macros.h', + 'includes': [ + 'gfx_ipc_geometry.gypi', ], }, ], + 'conditions': [ + ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', { + 'targets': [ + { + # GN version: //ui/gfx/ipc + 'target_name': 'gfx_ipc_geometry_win64', + 'type': '<(component)', + 'dependencies': [ + '../../../../base/base.gyp:base_win64', + '../../../../ipc/ipc.gyp:ipc_win64', + '../../gfx.gyp:gfx_geometry_win64', + ], + 'includes': [ + 'gfx_ipc_geometry.gypi', + ], + 'defines': [ + '<@(nacl_win64_defines)', + ], + 'configurations': { + 'Common_Base': { + 'msvs_target_platform': 'x64', + }, + }, + }, + ], + }], + ], }
diff --git a/ui/gfx/ipc/geometry/gfx_ipc_geometry.gypi b/ui/gfx/ipc/geometry/gfx_ipc_geometry.gypi new file mode 100644 index 0000000..616bb92 --- /dev/null +++ b/ui/gfx/ipc/geometry/gfx_ipc_geometry.gypi
@@ -0,0 +1,17 @@ +# 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. + +{ + 'defines': [ + 'GFX_IPC_GEOMETRY_IMPLEMENTATION', + ], + 'include_dirs': [ + '../../..', + ], + 'sources': [ + 'gfx_param_traits.cc', + 'gfx_param_traits.h', + 'gfx_ipc_geometry_export.h', + ], +}
diff --git a/ui/gfx/ipc/geometry/gfx_ipc_geometry_nacl.gyp b/ui/gfx/ipc/geometry/gfx_ipc_geometry_nacl.gyp new file mode 100644 index 0000000..5936b61 --- /dev/null +++ b/ui/gfx/ipc/geometry/gfx_ipc_geometry_nacl.gyp
@@ -0,0 +1,40 @@ +# 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. + +{ + 'variables': { + 'chromium_code': 1, + }, + 'includes': [ + '../../../../build/common_untrusted.gypi', + ], + 'conditions': [ + ['disable_nacl==0 and disable_nacl_untrusted==0', { + 'targets': [ + { + # GN version: //ui/gfx/ipc + 'target_name': 'gfx_ipc_geometry_nacl', + 'type': 'none', + 'variables': { + 'nacl_untrusted_build': 1, + 'nlib_target': 'libgfx_ipc_geometry_nacl.a', + 'build_glibc': 0, + 'build_newlib': 0, + 'build_irt': 1, + 'build_pnacl_newlib': 0, + 'build_nonsfi_helper': 1, + }, + 'dependencies': [ + '../../../../base/base_nacl.gyp:base_nacl', + '../../../../base/base_nacl.gyp:base_nacl_nonsfi', + '../../gfx_nacl.gyp:gfx_geometry_nacl', + ], + 'includes': [ + 'gfx_ipc_geometry.gypi', + ], + }, + ], + }], + ], +}
diff --git a/ui/gfx/vector_icons/aggregate_vector_icons.py b/ui/gfx/vector_icons/aggregate_vector_icons.py index 938f1a85..b40c29b 100644 --- a/ui/gfx/vector_icons/aggregate_vector_icons.py +++ b/ui/gfx/vector_icons/aggregate_vector_icons.py
@@ -6,24 +6,34 @@ import glob import optparse import os +import shlex import textwrap - -# TODO(brettw) bug 535386: This should not take a directory as an input, but -# rather a response file listing the inputs or sometimes the build will be -# incorrect. - -def AggregateVectorIcons(working_directory, output_cc, output_h): +def AggregateVectorIcons(working_directory, file_list, output_cc, output_h): """Compiles all .icon files in a directory into two C++ files. Args: working_directory: The path to the directory that holds the .icon files and C++ templates. + file_list: A file containing the list of vector icon files to process. + Used for GN only (this argument defaults to None for GYP). output_cc: The path that should be used to write the .cc file. output_h: The path that should be used to write the .h file. """ - icon_list = glob.glob(working_directory + "*.icon") + icon_list = [] + if file_list is None: + # TODO(GYP_GONE): |file_list| is only None for GYP builds (where response + # files are not supported), in which case we process all .icon files + # contained within |working_directory| and all of its descendant + # directories. This logic can be removed when GN is used everywhere. + # See crbug.com/535386. + for dirpath, dirnames, filenames in os.walk(working_directory): + icon_list.extend(glob.glob(os.path.join(dirpath, "*.icon"))) + else: + with open(file_list, 'r') as f: + file_list_contents = f.read() + icon_list = shlex.split(file_list_contents) input_header_template = open(os.path.join(working_directory, "vector_icons.h.template")) @@ -74,6 +84,10 @@ parser.add_option("--working_directory", help="The directory to look for template C++ as well as " "icon files.") + parser.add_option("--file_list", + help="A response file containing the list of icon files " + "to be processed (GN only). Defaults to None.", + default=None) parser.add_option("--output_cc", help="The path to output the CC file to.") parser.add_option("--output_h", @@ -82,6 +96,7 @@ (options, args) = parser.parse_args() AggregateVectorIcons(options.working_directory, + options.file_list, options.output_cc, options.output_h)
diff --git a/ui/gfx/vector_icons_sources.gypi b/ui/gfx/vector_icons_sources.gypi new file mode 100644 index 0000000..1e3207fd --- /dev/null +++ b/ui/gfx/vector_icons_sources.gypi
@@ -0,0 +1,196 @@ +# 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. + +{ + 'variables': { + 'common': [ + 'vector_icons/account_box.icon', + 'vector_icons/account_child_invert.icon', + 'vector_icons/account_circle.icon', + 'vector_icons/apps.icon', + 'vector_icons/autologin.icon', + 'vector_icons/bar_close.1x.icon', + 'vector_icons/bar_close.icon', + 'vector_icons/blocked_badge.icon', + 'vector_icons/browser_tools.1x.icon', + 'vector_icons/browser_tools.icon', + 'vector_icons/browser_tools_error.1x.icon', + 'vector_icons/browser_tools_error.icon', + 'vector_icons/browser_tools_update.1x.icon', + 'vector_icons/browser_tools_update.icon', + 'vector_icons/browser_tools_warning.1x.icon', + 'vector_icons/browser_tools_warning.icon', + 'vector_icons/business.icon', + 'vector_icons/check_circle.icon', + 'vector_icons/checkbox_active.icon', + 'vector_icons/checkbox_normal.icon', + 'vector_icons/chrome_product.icon', + 'vector_icons/close_all.icon', + 'vector_icons/code.icon', + 'vector_icons/combobox_arrow_mac_disabled.icon', + 'vector_icons/combobox_arrow_mac_enabled.icon', + 'vector_icons/cookie.icon', + 'vector_icons/crashed_tab.icon', + 'vector_icons/credit_card.1x.icon', + 'vector_icons/credit_card.icon', + 'vector_icons/eol.icon', + 'vector_icons/error_circle.icon', + 'vector_icons/extension.icon', + 'vector_icons/extension_crashed.icon', + 'vector_icons/file_download.icon', + 'vector_icons/file_download_incognito.1x.icon', + 'vector_icons/file_download_incognito.icon', + 'vector_icons/file_download_shelf.icon', + 'vector_icons/find_next.1x.icon', + 'vector_icons/find_next.icon', + 'vector_icons/find_prev.1x.icon', + 'vector_icons/find_prev.icon', + 'vector_icons/folder.1x.icon', + 'vector_icons/folder.icon', + 'vector_icons/folder_managed.1x.icon', + 'vector_icons/folder_managed.icon', + 'vector_icons/folder_supervised.1x.icon', + 'vector_icons/folder_supervised.icon', + 'vector_icons/fullscreen.icon', + 'vector_icons/globe.icon', + 'vector_icons/help_outline.icon', + 'vector_icons/image.icon', + 'vector_icons/incognito.1x.icon', + 'vector_icons/incognito.icon', + 'vector_icons/info_outline.icon', + 'vector_icons/laptop.icon', + 'vector_icons/location_bar_http.1x.icon', + 'vector_icons/location_bar_http.icon', + 'vector_icons/location_bar_https_invalid.1x.icon', + 'vector_icons/location_bar_https_invalid.icon', + 'vector_icons/location_bar_https_valid.1x.icon', + 'vector_icons/location_bar_https_valid.icon', + 'vector_icons/location_bar_https_valid_in_chip.1x.icon', + 'vector_icons/location_bar_https_valid_in_chip.icon', + 'vector_icons/location_bar_star.icon', + 'vector_icons/location_bar_star_active.icon', + 'vector_icons/location_on.icon', + 'vector_icons/lock.icon', + 'vector_icons/menu_check.1x.icon', + 'vector_icons/menu_check.icon', + 'vector_icons/menu_radio_empty.icon', + 'vector_icons/menu_radio_selected.icon', + 'vector_icons/midi.icon', + 'vector_icons/mixed_content.icon', + 'vector_icons/mode_edit.icon', + 'vector_icons/my_location.icon', + 'vector_icons/navigate_back.1x.icon', + 'vector_icons/navigate_back.icon', + 'vector_icons/navigate_forward.1x.icon', + 'vector_icons/navigate_forward.icon', + 'vector_icons/navigate_home.1x.icon', + 'vector_icons/navigate_home.icon', + 'vector_icons/navigate_reload.1x.icon', + 'vector_icons/navigate_reload.icon', + 'vector_icons/navigate_stop.1x.icon', + 'vector_icons/navigate_stop.icon', + 'vector_icons/notifications.icon', + 'vector_icons/notifications_off.icon', + 'vector_icons/omnibox_calculator.1x.icon', + 'vector_icons/omnibox_calculator.icon', + 'vector_icons/omnibox_extension_app.1x.icon', + 'vector_icons/omnibox_extension_app.icon', + 'vector_icons/omnibox_http.icon', + 'vector_icons/omnibox_keyword_search.icon', + 'vector_icons/omnibox_search.icon', + 'vector_icons/omnibox_star.1x.icon', + 'vector_icons/omnibox_star.icon', + 'vector_icons/overflow_chevron.1x.icon', + 'vector_icons/overflow_chevron.icon', + 'vector_icons/paintbrush.icon', + 'vector_icons/pdf.1x.icon', + 'vector_icons/pdf.icon', + 'vector_icons/photo_camera.icon', + 'vector_icons/protocol_handler.icon', + 'vector_icons/radio_button_active.icon', + 'vector_icons/radio_button_normal.icon', + 'vector_icons/remove_box.icon', + 'vector_icons/remove_circle.icon', + 'vector_icons/sad_tab.icon', + 'vector_icons/settings.icon', + 'vector_icons/shelf_applist.1x.icon', + 'vector_icons/shelf_applist.icon', + 'vector_icons/shelf_keyboard.1x.icon', + 'vector_icons/shelf_keyboard.icon', + 'vector_icons/shelf_notifications.1x.icon', + 'vector_icons/shelf_notifications.icon', + 'vector_icons/shelf_overflow.1x.icon', + 'vector_icons/shelf_overflow.icon', + 'vector_icons/shelf_overview.1x.icon', + 'vector_icons/shelf_overview.icon', + 'vector_icons/smartphone.icon', + 'vector_icons/submenu_arrow.1x.icon', + 'vector_icons/submenu_arrow.icon', + 'vector_icons/supervisor_account.icon', + 'vector_icons/sync_problem.icon', + 'vector_icons/system_menu_accessibility.icon', + 'vector_icons/system_menu_caps_lock.icon', + 'vector_icons/system_menu_rotation_lock_auto.icon', + 'vector_icons/system_menu_rotation_lock_locked.icon', + 'vector_icons/system_menu_sms.icon', + 'vector_icons/system_tray_accessibility.1x.icon', + 'vector_icons/system_tray_accessibility.icon', + 'vector_icons/system_tray_battery.1x.icon', + 'vector_icons/system_tray_battery.icon', + 'vector_icons/system_tray_battery_alert.1x.icon', + 'vector_icons/system_tray_battery_alert.icon', + 'vector_icons/system_tray_battery_bolt.1x.icon', + 'vector_icons/system_tray_battery_bolt.icon', + 'vector_icons/system_tray_battery_unreliable.1x.icon', + 'vector_icons/system_tray_battery_unreliable.icon', + 'vector_icons/system_tray_battery_x.1x.icon', + 'vector_icons/system_tray_battery_x.icon', + 'vector_icons/system_tray_caps_lock.1x.icon', + 'vector_icons/system_tray_caps_lock.icon', + 'vector_icons/system_tray_rotation_lock_locked.1x.icon', + 'vector_icons/system_tray_rotation_lock_locked.icon', + 'vector_icons/system_tray_update.1x.icon', + 'vector_icons/system_tray_update.icon', + 'vector_icons/system_tray_volume_mute.1x.icon', + 'vector_icons/system_tray_volume_mute.icon', + 'vector_icons/tab.icon', + 'vector_icons/tab_audio.1x.icon', + 'vector_icons/tab_audio.icon', + 'vector_icons/tab_audio_muting.1x.icon', + 'vector_icons/tab_audio_muting.icon', + 'vector_icons/tab_bluetooth_connected.icon', + 'vector_icons/tab_close_hovered_pressed.1x.icon', + 'vector_icons/tab_close_hovered_pressed.icon', + 'vector_icons/tab_close_normal.1x.icon', + 'vector_icons/tab_close_normal.icon', + 'vector_icons/tab_media_capturing.icon', + 'vector_icons/tab_media_recording.icon', + 'vector_icons/tab_usb_connected.1x.icon', + 'vector_icons/tab_usb_connected.icon', + 'vector_icons/tablet.icon', + 'vector_icons/translate.icon', + 'vector_icons/upgrade_menu_item.icon', + 'vector_icons/videocam.icon', + 'vector_icons/warning.icon', + 'vector_icons/warning_badge.icon', + 'vector_icons/web.icon', + 'vector_icons/window_control_back.1x.icon', + 'vector_icons/window_control_back.icon', + 'vector_icons/window_control_close.1x.icon', + 'vector_icons/window_control_close.icon', + 'vector_icons/window_control_left_snapped.1x.icon', + 'vector_icons/window_control_left_snapped.icon', + 'vector_icons/window_control_maximize.1x.icon', + 'vector_icons/window_control_maximize.icon', + 'vector_icons/window_control_minimize.1x.icon', + 'vector_icons/window_control_minimize.icon', + 'vector_icons/window_control_restore.1x.icon', + 'vector_icons/window_control_restore.icon', + 'vector_icons/window_control_right_snapped.1x.icon', + 'vector_icons/window_control_right_snapped.icon', + 'vector_icons/zoom_minus.icon', + 'vector_icons/zoom_plus.icon', + ], + }, +}
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc index 46d566e4..eca9cb0 100644 --- a/ui/gl/gl_context.cc +++ b/ui/gl/gl_context.cc
@@ -46,6 +46,7 @@ GLContext::GLContext(GLShareGroup* share_group) : share_group_(share_group), + current_virtual_context_(nullptr), state_dirtied_externally_(false), swap_interval_(1), force_swap_interval_zero_(false) { @@ -178,32 +179,72 @@ return false; } -bool GLContext::InitializeDynamicBindings() { +void GLContext::InitializeDynamicBindings() { DCHECK(IsCurrent(nullptr)); - bool initialized = InitializeDynamicGLBindings(GetGLImplementation(), this); - if (!initialized) - LOG(ERROR) << "Could not initialize dynamic bindings."; - return initialized; -} - -void GLContext::SetupForVirtualization() { - if (!virtual_gl_api_) { - virtual_gl_api_.reset(new VirtualGLApi()); - virtual_gl_api_->Initialize(&g_driver_gl, this); - } + InitializeDynamicGLBindingsGL(this); } bool GLContext::MakeVirtuallyCurrent( GLContext* virtual_context, GLSurface* surface) { - DCHECK(virtual_gl_api_); if (!ForceGpuSwitchIfNeeded()) return false; - return virtual_gl_api_->MakeCurrent(virtual_context, surface); + bool switched_real_contexts = GLContext::GetRealCurrent() != this; + GLSurface* current_surface = GLSurface::GetCurrent(); + if (switched_real_contexts || surface != current_surface) { + // MakeCurrent 'lite' path that avoids potentially expensive MakeCurrent() + // calls if the GLSurface uses the same underlying surface or renders to + // an FBO. + if (switched_real_contexts || !current_surface || + !virtual_context->IsCurrent(surface)) { + if (!MakeCurrent(surface)) { + return false; + } + } + } + + DCHECK_EQ(this, GLContext::GetRealCurrent()); + DCHECK(IsCurrent(NULL)); + DCHECK(virtual_context->IsCurrent(surface)); + + if (switched_real_contexts || virtual_context != current_virtual_context_) { +#if DCHECK_IS_ON() + GLenum error = glGetError(); + // Accepting a context loss error here enables using debug mode to work on + // context loss handling in virtual context mode. + // There should be no other errors from the previous context leaking into + // the new context. + DCHECK(error == GL_NO_ERROR || error == GL_CONTEXT_LOST_KHR) << + "GL error was: " << error; +#endif + + // Set all state that is different from the real state + if (virtual_context->GetGLStateRestorer()->IsInitialized()) { + GLStateRestorer* virtual_state = virtual_context->GetGLStateRestorer(); + GLStateRestorer* current_state = + current_virtual_context_ + ? current_virtual_context_->GetGLStateRestorer() + : nullptr; + if (current_state) + current_state->PauseQueries(); + virtual_state->ResumeQueries(); + + virtual_state->RestoreState( + (current_state && !switched_real_contexts) ? current_state : NULL); + } + current_virtual_context_ = virtual_context; + } + + virtual_context->SetCurrent(surface); + if (!surface->OnMakeCurrent(virtual_context)) { + LOG(ERROR) << "Could not make GLSurface current."; + return false; + } + return true; } void GLContext::OnReleaseVirtuallyCurrent(GLContext* virtual_context) { - if (virtual_gl_api_) - virtual_gl_api_->OnReleaseVirtuallyCurrent(virtual_context); + if (current_virtual_context_ == virtual_context) + current_virtual_context_ = nullptr; } void GLContext::SetRealGLApi() {
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h index ba921e3..ebc98fa 100644 --- a/ui/gl/gl_context.h +++ b/ui/gl/gl_context.h
@@ -31,7 +31,6 @@ class GLSurface; class GPUTiming; class GPUTimingClient; -class VirtualGLApi; struct GLVersionInfo; // Encapsulates an OpenGL context, hiding platform specific management. @@ -116,9 +115,6 @@ virtual bool WasAllocatedUsingRobustnessExtension(); - // Use this context for virtualization. - void SetupForVirtualization(); - // Make this context current when used for context virtualization. bool MakeVirtuallyCurrent(GLContext* virtual_context, GLSurface* surface); @@ -157,7 +153,7 @@ // Initialize function pointers to functions where the bound version depends // on GL version or supported extensions. Should be called immediately after // this context is made current. - bool InitializeDynamicBindings(); + void InitializeDynamicBindings(); // Returns the last real (non-virtual) GLContext made current. static GLContext* GetRealCurrent(); @@ -168,11 +164,10 @@ friend class base::RefCounted<GLContext>; // For GetRealCurrent. - friend class VirtualGLApi; friend class gpu::GLContextVirtual; scoped_refptr<GLShareGroup> share_group_; - std::unique_ptr<VirtualGLApi> virtual_gl_api_; + GLContext* current_virtual_context_; bool state_dirtied_externally_; std::unique_ptr<GLStateRestorer> state_restorer_; std::unique_ptr<GLVersionInfo> version_info_;
diff --git a/ui/gl/gl_context_cgl.cc b/ui/gl/gl_context_cgl.cc index 8c779ea..ece1b8e 100644 --- a/ui/gl/gl_context_cgl.cc +++ b/ui/gl/gl_context_cgl.cc
@@ -232,9 +232,7 @@ SetRealGLApi(); SetCurrent(surface); - if (!InitializeDynamicBindings()) { - return false; - } + InitializeDynamicBindings(); if (!surface->OnMakeCurrent(this)) { LOG(ERROR) << "Unable to make gl context current.";
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc index 98ac5cf5..77206a77 100644 --- a/ui/gl/gl_context_egl.cc +++ b/ui/gl/gl_context_egl.cc
@@ -132,9 +132,7 @@ SetRealGLApi(); SetCurrent(surface); - if (!InitializeDynamicBindings()) { - return false; - } + InitializeDynamicBindings(); if (!surface->OnMakeCurrent(this)) { LOG(ERROR) << "Could not make current.";
diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc index 3ca82fe..6978071 100644 --- a/ui/gl/gl_context_glx.cc +++ b/ui/gl/gl_context_glx.cc
@@ -114,10 +114,7 @@ SetRealGLApi(); SetCurrent(surface); - if (!InitializeDynamicBindings()) { - Destroy(); - return false; - } + InitializeDynamicBindings(); if (!surface->OnMakeCurrent(this)) { LOG(ERROR) << "Could not make current.";
diff --git a/ui/gl/gl_context_osmesa.cc b/ui/gl/gl_context_osmesa.cc index a7e3596..ff05eed 100644 --- a/ui/gl/gl_context_osmesa.cc +++ b/ui/gl/gl_context_osmesa.cc
@@ -83,9 +83,7 @@ OSMesaPixelStore(OSMESA_Y_UP, 0); SetCurrent(surface); - if (!InitializeDynamicBindings()) { - return false; - } + InitializeDynamicBindings(); if (!surface->OnMakeCurrent(this)) { LOG(ERROR) << "Could not make current.";
diff --git a/ui/gl/gl_context_stub.cc b/ui/gl/gl_context_stub.cc index a5d78e2..97a97d8 100644 --- a/ui/gl/gl_context_stub.cc +++ b/ui/gl/gl_context_stub.cc
@@ -16,8 +16,9 @@ } bool GLContextStub::MakeCurrent(GLSurface* surface) { - SetCurrent(surface); SetRealGLApi(); + SetCurrent(surface); + InitializeDynamicBindings(); return true; }
diff --git a/ui/gl/gl_context_wgl.cc b/ui/gl/gl_context_wgl.cc index 68775e3..6362856f 100644 --- a/ui/gl/gl_context_wgl.cc +++ b/ui/gl/gl_context_wgl.cc
@@ -103,9 +103,7 @@ SetRealGLApi(); SetCurrent(surface); - if (!InitializeDynamicBindings()) { - return false; - } + InitializeDynamicBindings(); if (!surface->OnMakeCurrent(this)) { LOG(ERROR) << "Could not make current.";
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc index 7d2210a5..3ef10a5 100644 --- a/ui/gl/gl_gl_api_implementation.cc +++ b/ui/gl/gl_gl_api_implementation.cc
@@ -521,14 +521,6 @@ return GLApiBase::glGetStringiFn(name, index); } -void RealGLApi::glFlushFn() { - GLApiBase::glFlushFn(); -} - -void RealGLApi::glFinishFn() { - GLApiBase::glFinishFn(); -} - void RealGLApi::InitializeFilteredExtensions() { if (disabled_exts_.size()) { filtered_exts_.clear(); @@ -566,126 +558,4 @@ NoContextGLApi::~NoContextGLApi() { } -VirtualGLApi::VirtualGLApi() - : real_context_(NULL), - current_context_(NULL) { -} - -VirtualGLApi::~VirtualGLApi() { -} - -void VirtualGLApi::Initialize(DriverGL* driver, GLContext* real_context) { - InitializeBase(driver); - real_context_ = real_context; - - DCHECK(real_context->IsCurrent(NULL)); - extensions_ = real_context->GetExtensions(); - extensions_vec_ = base::SplitString(extensions_, " ", base::TRIM_WHITESPACE, - base::SPLIT_WANT_ALL); -} - -bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) { - bool switched_contexts = g_current_gl_context_tls->Get() != this; - GLSurface* current_surface = GLSurface::GetCurrent(); - if (switched_contexts || surface != current_surface) { - // MakeCurrent 'lite' path that avoids potentially expensive MakeCurrent() - // calls if the GLSurface uses the same underlying surface or renders to - // an FBO. - if (switched_contexts || !current_surface || - !virtual_context->IsCurrent(surface)) { - if (!real_context_->MakeCurrent(surface)) { - return false; - } - } - } - - DCHECK_EQ(real_context_, GLContext::GetRealCurrent()); - DCHECK(real_context_->IsCurrent(NULL)); - DCHECK(virtual_context->IsCurrent(surface)); - - if (switched_contexts || virtual_context != current_context_) { -#if DCHECK_IS_ON() - GLenum error = glGetErrorFn(); - // Accepting a context loss error here enables using debug mode to work on - // context loss handling in virtual context mode. - // There should be no other errors from the previous context leaking into - // the new context. - DCHECK(error == GL_NO_ERROR || error == GL_CONTEXT_LOST_KHR) << - "GL error was: " << error; -#endif - - // Set all state that is different from the real state - GLApi* temp = GetCurrentGLApi(); - SetGLToRealGLApi(); - if (virtual_context->GetGLStateRestorer()->IsInitialized()) { - GLStateRestorer* virtual_state = virtual_context->GetGLStateRestorer(); - GLStateRestorer* current_state = current_context_ ? - current_context_->GetGLStateRestorer() : - nullptr; - if (switched_contexts || virtual_context != current_context_) { - if (current_state) - current_state->PauseQueries(); - virtual_state->ResumeQueries(); - } - - virtual_state->RestoreState( - (current_state && !switched_contexts) ? current_state : NULL); - } - SetGLApi(temp); - current_context_ = virtual_context; - } - SetGLApi(this); - - virtual_context->SetCurrent(surface); - if (!surface->OnMakeCurrent(virtual_context)) { - LOG(ERROR) << "Could not make GLSurface current."; - return false; - } - return true; -} - -void VirtualGLApi::OnReleaseVirtuallyCurrent(GLContext* virtual_context) { - if (current_context_ == virtual_context) - current_context_ = NULL; -} - -void VirtualGLApi::glGetIntegervFn(GLenum pname, GLint* params) { - switch (pname) { - case GL_NUM_EXTENSIONS: - *params = static_cast<GLint>(extensions_vec_.size()); - break; - default: - driver_->fn.glGetIntegervFn(pname, params); - break; - } -} - -const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { - switch (name) { - case GL_EXTENSIONS: - return reinterpret_cast<const GLubyte*>(extensions_.c_str()); - default: - return driver_->fn.glGetStringFn(name); - } -} - -const GLubyte* VirtualGLApi::glGetStringiFn(GLenum name, GLuint index) { - switch (name) { - case GL_EXTENSIONS: - if (index >= extensions_vec_.size()) - return NULL; - return reinterpret_cast<const GLubyte*>(extensions_vec_[index].c_str()); - default: - return driver_->fn.glGetStringiFn(name, index); - } -} - -void VirtualGLApi::glFlushFn() { - GLApiBase::glFlushFn(); -} - -void VirtualGLApi::glFinishFn() { - GLApiBase::glFinishFn(); -} - } // namespace gl
diff --git a/ui/gl/gl_gl_api_implementation.h b/ui/gl/gl_gl_api_implementation.h index a74e043..cb54c69 100644 --- a/ui/gl/gl_gl_api_implementation.h +++ b/ui/gl/gl_gl_api_implementation.h
@@ -70,9 +70,6 @@ void InitializeFilteredExtensions(); private: - void glFinishFn() override; - void glFlushFn() override; - // Filtered GL_EXTENSIONS we return to glGetString(i) calls. std::vector<std::string> disabled_exts_; std::vector<std::string> filtered_exts_; @@ -110,39 +107,6 @@ #include "gl_bindings_api_autogen_gl.h" }; -// Implementents the GL API using co-operative state restoring. -// Assumes there is only one real GL context and that multiple virtual contexts -// are implemented above it. Restores the needed state from the current context. -class VirtualGLApi : public GLApiBase { - public: - VirtualGLApi(); - ~VirtualGLApi() override; - void Initialize(DriverGL* driver, GLContext* real_context); - - // Sets the current virutal context. - bool MakeCurrent(GLContext* virtual_context, GLSurface* surface); - - void OnReleaseVirtuallyCurrent(GLContext* virtual_context); - - private: - // Overridden functions from GLApiBase - void glGetIntegervFn(GLenum pname, GLint* params) override; - const GLubyte* glGetStringFn(GLenum name) override; - const GLubyte* glGetStringiFn(GLenum name, GLuint index) override; - void glFinishFn() override; - void glFlushFn() override; - - // The real context we're running on. - GLContext* real_context_; - - // The current virtual context. - GLContext* current_context_; - - // The supported extensions being advertised for this virtual context. - std::string extensions_; - std::vector<std::string> extensions_vec_; -}; - } // namespace gl #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_
diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h index 53e9600..cf03b619 100644 --- a/ui/gl/gl_implementation.h +++ b/ui/gl/gl_implementation.h
@@ -46,11 +46,6 @@ typedef void* (*GLGetProcAddressProc)(const char* name); #endif -// Initialize function bindings that depend on the context for a GL -// implementation. -GL_EXPORT bool InitializeDynamicGLBindings(GLImplementation implementation, - GLContext* context); - // Initialize stub methods for drawing operations in the GL bindings. The // null draw bindings default to enabled, so that draw operations do nothing. GL_EXPORT void InitializeNullDrawGLBindings();
diff --git a/ui/gl/gl_implementation_android.cc b/ui/gl/gl_implementation_android.cc index 0ca23f8..0608b2e 100644 --- a/ui/gl/gl_implementation_android.cc +++ b/ui/gl/gl_implementation_android.cc
@@ -18,31 +18,6 @@ impls->push_back(kGLImplementationOSMesaGL); } -bool InitializeDynamicGLBindings(GLImplementation implementation, - GLContext* context) { - switch (implementation) { - case kGLImplementationEGLGLES2: - case kGLImplementationOSMesaGL: - InitializeDynamicGLBindingsGL(context); - break; - case kGLImplementationMockGL: - if (!context) { - scoped_refptr<GLContextStubWithExtensions> mock_context( - new GLContextStubWithExtensions()); - mock_context->SetGLVersionString("opengl es 3.0"); - InitializeDynamicGLBindingsGL(mock_context.get()); - } else { - InitializeDynamicGLBindingsGL(context); - } - break; - default: - NOTREACHED() << "InitializeDynamicGLBindings on Android"; - return false; - } - - return true; -} - bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { switch (GetGLImplementation()) { case kGLImplementationEGLGLES2:
diff --git a/ui/gl/gl_implementation_mac.cc b/ui/gl/gl_implementation_mac.cc index 25b0297..2a8ab0dc 100644 --- a/ui/gl/gl_implementation_mac.cc +++ b/ui/gl/gl_implementation_mac.cc
@@ -22,32 +22,6 @@ impls->push_back(kGLImplementationOSMesaGL); } -bool InitializeDynamicGLBindings(GLImplementation implementation, - GLContext* context) { - switch (implementation) { - case kGLImplementationOSMesaGL: - case kGLImplementationDesktopGL: - case kGLImplementationDesktopGLCoreProfile: - case kGLImplementationAppleGL: - InitializeDynamicGLBindingsGL(context); - break; - case kGLImplementationMockGL: - if (!context) { - scoped_refptr<GLContextStubWithExtensions> mock_context( - new GLContextStubWithExtensions()); - mock_context->SetGLVersionString("3.0"); - InitializeDynamicGLBindingsGL(mock_context.get()); - } else { - InitializeDynamicGLBindingsGL(context); - } - break; - default: - return false; - } - - return true; -} - bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { return false; }
diff --git a/ui/gl/gl_implementation_ozone.cc b/ui/gl/gl_implementation_ozone.cc index 2564c1a..717c018c 100644 --- a/ui/gl/gl_implementation_ozone.cc +++ b/ui/gl/gl_implementation_ozone.cc
@@ -17,30 +17,6 @@ impls->push_back(kGLImplementationOSMesaGL); } -bool InitializeDynamicGLBindings(GLImplementation implementation, - GLContext* context) { - switch (implementation) { - case kGLImplementationOSMesaGL: - case kGLImplementationEGLGLES2: - InitializeDynamicGLBindingsGL(context); - break; - case kGLImplementationMockGL: - if (!context) { - scoped_refptr<GLContextStubWithExtensions> mock_context( - new GLContextStubWithExtensions()); - mock_context->SetGLVersionString("3.0"); - InitializeDynamicGLBindingsGL(mock_context.get()); - } else { - InitializeDynamicGLBindingsGL(context); - } - break; - default: - return false; - } - - return true; -} - bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { switch (GetGLImplementation()) { case kGLImplementationEGLGLES2:
diff --git a/ui/gl/gl_implementation_win.cc b/ui/gl/gl_implementation_win.cc index 9a470c9..b5f8a74 100644 --- a/ui/gl/gl_implementation_win.cc +++ b/ui/gl/gl_implementation_win.cc
@@ -18,31 +18,6 @@ impls->push_back(kGLImplementationOSMesaGL); } -bool InitializeDynamicGLBindings(GLImplementation implementation, - GLContext* context) { - switch (implementation) { - case kGLImplementationOSMesaGL: - case kGLImplementationEGLGLES2: - case kGLImplementationDesktopGL: - InitializeDynamicGLBindingsGL(context); - break; - case kGLImplementationMockGL: - if (!context) { - scoped_refptr<GLContextStubWithExtensions> mock_context( - new GLContextStubWithExtensions()); - mock_context->SetGLVersionString("3.0"); - InitializeDynamicGLBindingsGL(mock_context.get()); - } else { - InitializeDynamicGLBindingsGL(context); - } - break; - default: - return false; - } - - return true; -} - bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { switch (GetGLImplementation()) { case kGLImplementationDesktopGL:
diff --git a/ui/gl/gl_implementation_x11.cc b/ui/gl/gl_implementation_x11.cc index de19d716..a59ee34 100644 --- a/ui/gl/gl_implementation_x11.cc +++ b/ui/gl/gl_implementation_x11.cc
@@ -19,31 +19,6 @@ impls->push_back(kGLImplementationOSMesaGL); } -bool InitializeDynamicGLBindings(GLImplementation implementation, - GLContext* context) { - switch (implementation) { - case kGLImplementationOSMesaGL: - case kGLImplementationDesktopGL: - case kGLImplementationEGLGLES2: - InitializeDynamicGLBindingsGL(context); - break; - case kGLImplementationMockGL: - if (!context) { - scoped_refptr<GLContextStubWithExtensions> mock_context( - new GLContextStubWithExtensions()); - mock_context->SetGLVersionString("3.0"); - InitializeDynamicGLBindingsGL(mock_context.get()); - } else { - InitializeDynamicGLBindingsGL(context); - } - break; - default: - return false; - } - - return true; -} - bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { switch (GetGLImplementation()) { case kGLImplementationDesktopGL:
diff --git a/ui/gl/gpu_timing_unittest.cc b/ui/gl/gpu_timing_unittest.cc index 18e2622..ce7d337 100644 --- a/ui/gl/gpu_timing_unittest.cc +++ b/ui/gl/gpu_timing_unittest.cc
@@ -60,7 +60,6 @@ surface_ = new GLSurfaceStub; context_->MakeCurrent(surface_.get()); gpu_timing_fake_queries_.Reset(); - GLSurfaceTestSupport::InitializeDynamicMockBindings(context_.get()); setup_ = true; }
diff --git a/ui/gl/test/gl_surface_test_support.cc b/ui/gl/test/gl_surface_test_support.cc index 92d05bd4..3097e8c 100644 --- a/ui/gl/test/gl_surface_test_support.cc +++ b/ui/gl/test/gl_surface_test_support.cc
@@ -86,9 +86,4 @@ InitializeOneOffImplementation(kGLImplementationMockGL, false); } -// static -void GLSurfaceTestSupport::InitializeDynamicMockBindings(GLContext* context) { - CHECK(InitializeDynamicGLBindings(kGLImplementationMockGL, context)); -} - } // namespace gl
diff --git a/ui/gl/test/gl_surface_test_support.h b/ui/gl/test/gl_surface_test_support.h index 42730dc8..c0039a4 100644 --- a/ui/gl/test/gl_surface_test_support.h +++ b/ui/gl/test/gl_surface_test_support.h
@@ -17,7 +17,6 @@ static void InitializeOneOffImplementation(GLImplementation impl, bool fallback_to_osmesa); static void InitializeOneOffWithMockBindings(); - static void InitializeDynamicMockBindings(GLContext* context); }; } // namespace gl
diff --git a/ui/login/account_picker/user_pod_row.css b/ui/login/account_picker/user_pod_row.css index 6f29c15..4ed29cb 100644 --- a/ui/login/account_picker/user_pod_row.css +++ b/ui/login/account_picker/user_pod_row.css
@@ -84,6 +84,24 @@ .user-image-pane { background-color: white; + height: 160px; + left: 10px; + position: absolute; + top: 10px; + transition: height 180ms ease-in-out, + left 180ms ease-in-out, + right 180ms ease-in-out, + top 180ms ease-in-out, + width 180ms ease-in-out; + width: 160px; + z-index: 3; +} + +.user-image-pane.pin-enabled { + height: 230px; + left: 20px; + top: 20px; + width: 230px; } html[dir=rtl] .user-image-pane { @@ -91,6 +109,11 @@ right: 10px; } +html[dir=rtl] .user-image-pane.pin-enabled { + left: auto; + right: 20px; +} + .user-image-container { align-items: center; display: flex; @@ -110,7 +133,6 @@ max-width: 160px; opacity: 0.7; position: absolute; - top: 10px; transition: max-height 180ms ease-in-out, max-width 180ms ease-in-out, top 180ms ease-in-out; @@ -119,7 +141,6 @@ html:not([screen=login-add-user]) .pod .user-image.pin-enabled { max-height: 230px; max-width: 230px; - top: 20px; } html:not([screen=login-add-user]) .pod.focused .user-image { @@ -139,14 +160,13 @@ color: white; display: block; font-size: small; - left: 10px; position: absolute; text-align: center; - top: 10px; + top: 0; transition: left 180ms ease-in-out, top 180ms ease-in-out, width 180ms ease-in-out; - width: 160px; + width: 100%; } .pod.signed-in .signed-in-indicator.pin-enabled {
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js index ab4f576..48a7073ad1 100644 --- a/ui/login/account_picker/user_pod_row.js +++ b/ui/login/account_picker/user_pod_row.js
@@ -843,6 +843,14 @@ }, /** + * Gets image pane element. + * @type {!HTMLDivElement} + */ + get imagePaneElement() { + return this.querySelector('.user-image-pane'); + }, + + /** * Gets image element. * @type {!HTMLImageElement} */ @@ -1129,8 +1137,8 @@ }, setPinVisibility: function(visible) { - var elements = [this, this.authElement, this.imageElement, - this.signInElement, this.pinContainer]; + var elements = [this, this.authElement, this.imagePaneElement, + this.imageElement, this.pinContainer]; for (var idx = 0; idx < elements.length; idx++) { var currentElement = elements[idx];
diff --git a/ui/ozone/platform/cast/BUILD.gn b/ui/ozone/platform/cast/BUILD.gn index b9b5f58a..23be42e 100644 --- a/ui/ozone/platform/cast/BUILD.gn +++ b/ui/ozone/platform/cast/BUILD.gn
@@ -42,6 +42,7 @@ deps = [ "//base", "//chromecast:chromecast_features", + "//chromecast/base:base", "//chromecast/graphics:libcast_graphics_1.0", "//ui/gfx", "//ui/gfx/geometry",
diff --git a/ui/ozone/platform/cast/DEPS b/ui/ozone/platform/cast/DEPS index 840c528..a967e61a 100644 --- a/ui/ozone/platform/cast/DEPS +++ b/ui/ozone/platform/cast/DEPS
@@ -1,4 +1,5 @@ include_rules = [ + "+chromecast/base/chromecast_switches.h", "+chromecast/chromecast_features.h", "+chromecast/public" ]
diff --git a/ui/ozone/platform/cast/surface_factory_cast.cc b/ui/ozone/platform/cast/surface_factory_cast.cc index f468e3b..9cd1fbb5 100644 --- a/ui/ozone/platform/cast/surface_factory_cast.cc +++ b/ui/ozone/platform/cast/surface_factory_cast.cc
@@ -10,8 +10,11 @@ #include <utility> #include "base/callback_helpers.h" +#include "base/command_line.h" #include "base/macros.h" #include "base/memory/ptr_util.h" +#include "base/strings/string_number_conversions.h" +#include "chromecast/base/chromecast_switches.h" #include "chromecast/public/cast_egl_platform.h" #include "chromecast/public/graphics_types.h" #include "third_party/skia/include/core/SkSurface.h" @@ -34,13 +37,20 @@ return chromecast::Size(size.width(), size.height()); } -// Initial display size to create, needed before first window is created. -gfx::Size GetInitialDisplaySize() { - return gfx::Size(1280, 720); -} - -// Hard lower bound on display resolution -gfx::Size GetMinDisplaySize() { +// Display resolution, set in browser process and passed by switches. +gfx::Size GetDisplaySize() { + base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); + int width, height; + if (base::StringToInt( + cmd_line->GetSwitchValueASCII(switches::kCastInitialScreenWidth), + &width) && + base::StringToInt( + cmd_line->GetSwitchValueASCII(switches::kCastInitialScreenHeight), + &height)) { + return gfx::Size(width, height); + } + LOG(WARNING) << "Unable to get initial screen resolution from command line," + << "using default 720p"; return gfx::Size(1280, 720); } @@ -79,8 +89,7 @@ display_type_(0), have_display_type_(false), window_(0), - display_size_(GetInitialDisplaySize()), - new_display_size_(GetInitialDisplaySize()), + display_size_(GetDisplaySize()), egl_platform_(std::move(egl_platform)), overlay_count_(0), previous_frame_overlay_count_(0) {} @@ -175,10 +184,6 @@ if (state_ == kUninitialized) { InitializeHardware(); } - if (new_display_size_ != display_size_) { - DestroyDisplayTypeAndWindow(); - display_size_ = new_display_size_; - } DCHECK_EQ(state_, kInitialized); if (!have_display_type_) { chromecast::Size create_size = FromGfxSize(display_size_); @@ -203,12 +208,8 @@ } bool SurfaceFactoryCast::ResizeDisplay(gfx::Size size) { - // set size to at least 1280x720 even if passed 1x1 - size.SetToMax(GetMinDisplaySize()); - if (have_display_type_ && size != display_size_) { - DestroyDisplayTypeAndWindow(); - } - display_size_ = size; + DCHECK_EQ(size.width(), display_size_.width()); + DCHECK_EQ(size.height(), display_size_.height()); return true; } @@ -230,8 +231,9 @@ std::unique_ptr<SurfaceOzoneEGL> SurfaceFactoryCast::CreateEGLSurfaceForWidget( gfx::AcceleratedWidget widget) { - new_display_size_ = gfx::Size(widget >> 16, widget & 0xFFFF); - new_display_size_.SetToMax(GetMinDisplaySize()); + // Verify requested widget dimensions match our current display size. + DCHECK_EQ(widget >> 16, display_size_.width()); + DCHECK_EQ(widget & 0xffff, display_size_.height()); return base::WrapUnique<SurfaceOzoneEGL>(new SurfaceOzoneEglCast(this)); }
diff --git a/ui/ozone/platform/cast/surface_factory_cast.h b/ui/ozone/platform/cast/surface_factory_cast.h index 388f37ca..334e16b 100644 --- a/ui/ozone/platform/cast/surface_factory_cast.h +++ b/ui/ozone/platform/cast/surface_factory_cast.h
@@ -66,7 +66,6 @@ bool have_display_type_; void* window_; gfx::Size display_size_; - gfx::Size new_display_size_; std::unique_ptr<chromecast::CastEglPlatform> egl_platform_; // Overlays scheduled in current and previous frames:
diff --git a/ui/views/controls/button/checkbox.cc b/ui/views/controls/button/checkbox.cc index c1db471..4feb92f 100644 --- a/ui/views/controls/button/checkbox.cc +++ b/ui/views/controls/button/checkbox.cc
@@ -15,6 +15,8 @@ #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/vector_icons_public.h" #include "ui/resources/grit/ui_resources.h" +#include "ui/views/animation/ink_drop_highlight.h" +#include "ui/views/animation/ink_drop_ripple.h" #include "ui/views/controls/button/label_button_border.h" #include "ui/views/painter.h" #include "ui/views/resources/grit/views_resources.h" @@ -32,6 +34,10 @@ if (UseMd()) { set_request_focus_on_press(false); + SetInkDropMode(InkDropMode::ON); + set_has_ink_drop_action_on_click(true); + // The "small" size is 21dp, the large size is 1.33 * 21dp = 28dp. + set_ink_drop_size(gfx::Size(21, 21)); } else { std::unique_ptr<LabelButtonBorder> button_border(new LabelButtonBorder()); // Inset the trailing side by a couple pixels for the focus border. @@ -152,6 +158,19 @@ UpdateImage(); } +std::unique_ptr<InkDropRipple> Checkbox::CreateInkDropRipple() const { + return CreateDefaultInkDropRipple(image()->bounds().CenterPoint()); +} + +std::unique_ptr<InkDropHighlight> Checkbox::CreateInkDropHighlight() const { + return nullptr; +} + +SkColor Checkbox::GetInkDropBaseColor() const { + return GetNativeTheme()->GetSystemColor( + ui::NativeTheme::kColorId_UnfocusedBorderColor); +} + gfx::ImageSkia Checkbox::GetImage(ButtonState for_state) const { if (UseMd()) { return gfx::CreateVectorIcon(
diff --git a/ui/views/controls/button/checkbox.h b/ui/views/controls/button/checkbox.h index 919c1415..65403946 100644 --- a/ui/views/controls/button/checkbox.h +++ b/ui/views/controls/button/checkbox.h
@@ -16,6 +16,9 @@ namespace views { +class InkDropHover; +class InkDropRipple; + // A native themed class representing a checkbox. This class does not use // platform specific objects to replicate the native platforms looks and feel. class VIEWS_EXPORT Checkbox : public LabelButton { @@ -45,6 +48,9 @@ void OnFocus() override; void OnBlur() override; void OnNativeThemeChanged(const ui::NativeTheme* theme) override; + std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; + std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; + SkColor GetInkDropBaseColor() const override; gfx::ImageSkia GetImage(ButtonState for_state) const override; // Set the image shown for each button state depending on whether it is
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc index 96e1152..b80998e95 100644 --- a/ui/views/mus/native_widget_mus.cc +++ b/ui/views/mus/native_widget_mus.cc
@@ -7,8 +7,10 @@ #include "base/callback.h" #include "base/macros.h" #include "base/message_loop/message_loop.h" +#include "base/run_loop.h" #include "base/threading/thread_task_runner_handle.h" #include "components/bitmap_uploader/bitmap_uploader.h" +#include "services/ui/common/gpu_service.h" #include "services/ui/public/cpp/property_type_converters.h" #include "services/ui/public/cpp/window.h" #include "services/ui/public/cpp/window_observer.h" @@ -29,6 +31,7 @@ #include "ui/base/view_prop.h" #include "ui/display/display.h" #include "ui/display/screen.h" +#include "ui/display/screen.h" #include "ui/events/event.h" #include "ui/gfx/canvas.h" #include "ui/gfx/path.h" @@ -327,7 +330,7 @@ return app_icon.GetRepresentation(1.f).sk_bitmap(); } -// Handles acknowledgement of an input event, either immediately when a nested +// Handles acknowledgment of an input event, either immediately when a nested // message loop starts, or upon destruction. class EventAckHandler : public base::MessageLoop::NestingObserver { public: @@ -365,6 +368,13 @@ DISALLOW_COPY_AND_ASSIGN(EventAckHandler); }; +void OnMoveLoopEnd(bool* out_success, + base::Closure quit_closure, + bool in_success) { + *out_success = in_success; + quit_closure.Run(); +} + } // namespace class NativeWidgetMus::MusWindowObserver : public ui::WindowObserver { @@ -528,7 +538,8 @@ context_factory_.reset( new SurfaceContextFactory(connector, window_, surface_type_)); aura::Env::GetInstance()->set_context_factory(context_factory_.get()); - } else { + } else if (!ui::GpuService::UseChromeGpuCommandBuffer()) { + // Only use the BitmapUploader when the mojo command buffer is being used. needs_bitmap_uploader = true; } @@ -536,10 +547,10 @@ if (needs_bitmap_uploader) { bitmap_uploader_.reset(new bitmap_uploader::BitmapUploader(window)); bitmap_uploader_->Init(connector); - prop_.reset( - new ui::ViewProp(window_tree_host_->GetAcceleratedWidget(), - bitmap_uploader::kBitmapUploaderForAcceleratedWidget, - bitmap_uploader_.get())); + prop_ = base::MakeUnique<ui::ViewProp>( + window_tree_host_->GetAcceleratedWidget(), + bitmap_uploader::kBitmapUploaderForAcceleratedWidget, + bitmap_uploader_.get()); } aura::Env::GetInstance()->set_context_factory(default_context_factory); @@ -805,14 +816,14 @@ // used safely in a world where we separate things with mojo. They should be // removed; not ported. void NativeWidgetMus::SetNativeWindowProperty(const char* name, void* value) { - // TODO(beng): push properties to ui::Window. - // NOTIMPLEMENTED(); + native_window_properties_[name] = value; } void* NativeWidgetMus::GetNativeWindowProperty(const char* name) const { - // TODO(beng): pull properties to ui::Window. - // NOTIMPLEMENTED(); - return nullptr; + auto it = native_window_properties_.find(name); + if (it == native_window_properties_.end()) + return nullptr; + return it->second; } TooltipManager* NativeWidgetMus::GetTooltipManager() const { @@ -1167,12 +1178,31 @@ const gfx::Vector2d& drag_offset, Widget::MoveLoopSource source, Widget::MoveLoopEscapeBehavior escape_behavior) { - // NOTIMPLEMENTED(); - return Widget::MOVE_LOOP_CANCELED; + ReleaseCapture(); + + base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); + base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); + base::RunLoop run_loop; + + ui::mojom::MoveLoopSource mus_source = + source == Widget::MOVE_LOOP_SOURCE_MOUSE + ? ui::mojom::MoveLoopSource::MOUSE + : ui::mojom::MoveLoopSource::TOUCH; + + bool success = false; + gfx::Point cursor_location = + display::Screen::GetScreen()->GetCursorScreenPoint(); + window_->PerformWindowMove( + mus_source, cursor_location, + base::Bind(OnMoveLoopEnd, &success, run_loop.QuitClosure())); + + run_loop.Run(); + + return success ? Widget::MOVE_LOOP_SUCCESSFUL : Widget::MOVE_LOOP_CANCELED; } void NativeWidgetMus::EndMoveLoop() { - // NOTIMPLEMENTED(); + window_->CancelWindowMove(); } void NativeWidgetMus::SetVisibilityChangedAnimationsEnabled(bool value) { @@ -1232,18 +1262,8 @@ void NativeWidgetMus::OnBoundsChanged(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) { - // Assume that if the old bounds was completely empty a move happened. This - // handles the case of a maximize animation acquiring the layer (acquiring a - // layer results in clearing the bounds). - if (old_bounds.origin() != new_bounds.origin() || - (old_bounds == gfx::Rect(0, 0, 0, 0) && !new_bounds.IsEmpty())) { - native_widget_delegate_->OnNativeWidgetMove(); - } - if (old_bounds.size() != new_bounds.size()) { - native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); - UpdateClientArea(); - UpdateHitTestMask(); - } + // This is handled in OnHost{Resized,Moved}() like DesktopNativeWidgetAura + // instead of here like in NativeWidgetAura. } gfx::NativeCursor NativeWidgetMus::GetCursor(const gfx::Point& point) { @@ -1346,6 +1366,18 @@ native_widget_delegate_->OnGestureEvent(event); } +void NativeWidgetMus::OnHostResized(const aura::WindowTreeHost* host) { + native_widget_delegate_->OnNativeWidgetSizeChanged( + host->window()->bounds().size()); + UpdateClientArea(); + UpdateHitTestMask(); +} + +void NativeWidgetMus::OnHostMoved(const aura::WindowTreeHost* host, + const gfx::Point& new_origin) { + native_widget_delegate_->OnNativeWidgetMove(); +} + void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { GetWidget()->Close(); }
diff --git a/ui/views/mus/native_widget_mus.h b/ui/views/mus/native_widget_mus.h index f4dd993d..2cdb0d4f 100644 --- a/ui/views/mus/native_widget_mus.h +++ b/ui/views/mus/native_widget_mus.h
@@ -220,6 +220,9 @@ void OnGestureEvent(ui::GestureEvent* event) override; // Overridden from aura::WindowTreeHostObserver: + void OnHostResized(const aura::WindowTreeHost* host) override; + void OnHostMoved(const aura::WindowTreeHost* host, + const gfx::Point& new_origin) override; void OnHostCloseRequested(const aura::WindowTreeHost* host) override; // Overridden from ui::InputEventHandler: @@ -264,6 +267,11 @@ // a separate class. std::unique_ptr<MusWindowObserver> mus_window_observer_; + // This is misnamed; The native widget interface offers something called + // "native window properties" which are properties which it stores locally, + // and this is used to unsafely pass void* pointers around chrome. + std::map<std::string, void*> native_window_properties_; + // Aura configuration. std::unique_ptr<SurfaceContextFactory> context_factory_; std::unique_ptr<WindowTreeHostMus> window_tree_host_;
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc index c9ac178..3936c25 100644 --- a/ui/views/mus/window_manager_connection.cc +++ b/ui/views/mus/window_manager_connection.cc
@@ -101,6 +101,10 @@ } } +const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { + return client_->GetRoots(); +} + WindowManagerConnection::WindowManagerConnection( shell::Connector* connector, const shell::Identity& identity)
diff --git a/ui/views/mus/window_manager_connection.h b/ui/views/mus/window_manager_connection.h index fe5869c..be8338a248 100644 --- a/ui/views/mus/window_manager_connection.h +++ b/ui/views/mus/window_manager_connection.h
@@ -67,6 +67,8 @@ void AddPointerWatcher(PointerWatcher* watcher); void RemovePointerWatcher(PointerWatcher* watcher); + const std::set<ui::Window*>& GetRoots() const; + private: friend class WindowManagerConnectionTest;
diff --git a/ui/views/mus/window_tree_host_mus.h b/ui/views/mus/window_tree_host_mus.h index fc0764ce..fa096fc 100644 --- a/ui/views/mus/window_tree_host_mus.h +++ b/ui/views/mus/window_tree_host_mus.h
@@ -29,6 +29,7 @@ public: WindowTreeHostMus(NativeWidgetMus* native_widget, ui::Window* window); ~WindowTreeHostMus() override; + NativeWidgetMus* native_widget() { return native_widget_; } private: // aura::WindowTreeHostPlatform:
diff --git a/ui/views/views.gyp b/ui/views/views.gyp index 29964e6..5dd8411 100644 --- a/ui/views/views.gyp +++ b/ui/views/views.gyp
@@ -463,6 +463,7 @@ 'widget/desktop_aura/desktop_window_tree_host_x11.h', 'widget/desktop_aura/x11_desktop_handler.cc', 'widget/desktop_aura/x11_desktop_handler.h', + 'widget/desktop_aura/x11_desktop_handler_observer.h', 'widget/desktop_aura/x11_desktop_window_move_client.cc', 'widget/desktop_aura/x11_desktop_window_move_client.h', 'widget/desktop_aura/x11_move_loop.h',
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc index 82ba30c8..f1cc3f6 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -568,10 +568,20 @@ } std::string DesktopWindowTreeHostX11::GetWorkspace() const { - int workspace_id; - if (ui::GetIntProperty(xwindow_, "_NET_WM_DESKTOP", &workspace_id)) - return base::IntToString(workspace_id); - return std::string(); + if (workspace_.empty()) + const_cast<DesktopWindowTreeHostX11*>(this)->UpdateWorkspace(); + return workspace_; +} + +bool DesktopWindowTreeHostX11::UpdateWorkspace() { + int workspace_int; + if (!ui::GetWindowDesktop(xwindow_, &workspace_int)) + return false; + std::string workspace_str = base::IntToString(workspace_int); + if (workspace_ == workspace_str) + return false; + workspace_ = workspace_str; + return true; } gfx::Rect DesktopWindowTreeHostX11::GetWorkAreaBoundsInScreen() const { @@ -1230,6 +1240,7 @@ if (is_always_on_top_) state_atom_list.push_back(atom_cache_.GetAtom("_NET_WM_STATE_ABOVE")); + workspace_.clear(); if (params.visible_on_all_workspaces) { state_atom_list.push_back(atom_cache_.GetAtom("_NET_WM_STATE_STICKY")); ui::SetIntProperty(xwindow_, "_NET_WM_DESKTOP", "CARDINAL", kAllDesktops); @@ -1996,12 +2007,14 @@ } case PropertyNotify: { ::Atom changed_atom = xev->xproperty.atom; - if (changed_atom == atom_cache_.GetAtom("_NET_WM_STATE")) + if (changed_atom == atom_cache_.GetAtom("_NET_WM_STATE")) { OnWMStateUpdated(); - else if (changed_atom == atom_cache_.GetAtom("_NET_FRAME_EXTENTS")) + } else if (changed_atom == atom_cache_.GetAtom("_NET_FRAME_EXTENTS")) { OnFrameExtentsUpdated(); - else if (changed_atom == atom_cache_.GetAtom("_NET_WM_DESKTOP")) - OnHostWorkspaceChanged(); + } else if (changed_atom == atom_cache_.GetAtom("_NET_WM_DESKTOP")) { + if (UpdateWorkspace()) + OnHostWorkspaceChanged(); + } break; } case SelectionNotify: {
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h index fa262f13..074d7776 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -185,6 +185,10 @@ // Called when |xwindow_|'s _NET_FRAME_EXTENTS property is updated. void OnFrameExtentsUpdated(); + // Makes a round trip to the X server to get the enclosing workspace for this + // window. Returns true iff |workspace_| was changed. + bool UpdateWorkspace(); + // Updates |xwindow_|'s minimum and maximum size. void UpdateMinAndMaxSize(); @@ -284,6 +288,9 @@ // |xwindow_|'s maximum size. gfx::Size max_size_in_pixels_; + // The workspace containing |xwindow_|. + std::string workspace_; + // The window manager state bits. std::set< ::Atom> window_properties_;
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc index 8ec4b1e..aa3c234 100644 --- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc +++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
@@ -8,6 +8,7 @@ #include <X11/Xlib.h> #include "base/message_loop/message_loop.h" +#include "base/strings/string_number_conversions.h" #include "ui/aura/env.h" #include "ui/aura/window_event_dispatcher.h" #include "ui/base/x/x11_foreign_window_manager.h" @@ -19,9 +20,10 @@ namespace { -const char* kAtomsToCache[] = { +const char* const kAtomsToCache[] = { "_NET_ACTIVE_WINDOW", - NULL + "_NET_CURRENT_DESKTOP", + nullptr }; // Our global instance. Deleted when our Env() is deleted. @@ -124,6 +126,29 @@ } } +void X11DesktopHandler::AddObserver(X11DesktopHandlerObserver* observer) { + observers_.AddObserver(observer); +} + +void X11DesktopHandler::RemoveObserver(X11DesktopHandlerObserver* observer) { + observers_.RemoveObserver(observer); +} + +std::string X11DesktopHandler::GetWorkspace() { + if (workspace_.empty()) + UpdateWorkspace(); + return workspace_; +} + +bool X11DesktopHandler::UpdateWorkspace() { + int desktop; + if (ui::GetCurrentDesktop(&desktop)) { + workspace_ = base::IntToString(desktop); + return true; + } + return false; +} + void X11DesktopHandler::set_wm_user_time_ms(Time time_ms) { if (time_ms != CurrentTime) { int64_t event_time_64 = time_ms; @@ -184,10 +209,7 @@ uint32_t X11DesktopHandler::DispatchEvent(const ui::PlatformEvent& event) { switch (event->type) { case PropertyNotify: { - // Check for a change to the active window. - CHECK_EQ(x_root_window_, event->xproperty.window); - ::Atom active_window_atom = atom_cache_.GetAtom("_NET_ACTIVE_WINDOW"); - if (event->xproperty.atom == active_window_atom) { + if (event->xproperty.atom == atom_cache_.GetAtom("_NET_ACTIVE_WINDOW")) { ::Window window; if (ui::GetXIDProperty(x_root_window_, "_NET_ACTIVE_WINDOW", &window) && window) { @@ -196,10 +218,15 @@ } else { x_active_window_ = None; } + } else if (event->xproperty.atom == + atom_cache_.GetAtom("_NET_CURRENT_DESKTOP")) { + if (UpdateWorkspace()) { + FOR_EACH_OBSERVER(views::X11DesktopHandlerObserver, observers_, + OnWorkspaceChanged(workspace_)); + } } break; } - case CreateNotify: OnWindowCreatedOrDestroyed(event->type, event->xcreatewindow.window); break;
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.h b/ui/views/widget/desktop_aura/x11_desktop_handler.h index 47a1ff1..b9c9060 100644 --- a/ui/views/widget/desktop_aura/x11_desktop_handler.h +++ b/ui/views/widget/desktop_aura/x11_desktop_handler.h
@@ -13,12 +13,14 @@ #include <vector> #include "base/macros.h" +#include "base/observer_list.h" #include "ui/aura/env_observer.h" #include "ui/events/platform/platform_event_dispatcher.h" #include "ui/events/platform/x11/x11_event_source.h" #include "ui/gfx/x/x11_atom_cache.h" #include "ui/gfx/x/x11_types.h" #include "ui/views/views_export.h" +#include "ui/views/widget/desktop_aura/x11_desktop_handler_observer.h" namespace base { template <typename T> struct DefaultSingletonTraits; @@ -35,6 +37,13 @@ // Returns the singleton handler. static X11DesktopHandler* get(); + // Adds/removes X11DesktopHandlerObservers. + void AddObserver(X11DesktopHandlerObserver* observer); + void RemoveObserver(X11DesktopHandlerObserver* observer); + + // Gets the current workspace ID. + std::string GetWorkspace(); + // Gets/sets the X11 server time of the most recent mouse click, touch or // key press on a Chrome window. int wm_user_time_ms() const { return wm_user_time_ms_; } @@ -81,6 +90,9 @@ // managed by Chrome. void OnWindowCreatedOrDestroyed(int event_type, XID window); + // Makes a round trip to the X server to get the current workspace. + bool UpdateWorkspace(); + // The display and the native X window hosting the root window. XDisplay* xdisplay_; @@ -105,6 +117,10 @@ bool wm_supports_active_window_; + base::ObserverList<X11DesktopHandlerObserver> observers_; + + std::string workspace_; + DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler); };
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler_observer.h b/ui/views/widget/desktop_aura/x11_desktop_handler_observer.h new file mode 100644 index 0000000..252ca21 --- /dev/null +++ b/ui/views/widget/desktop_aura/x11_desktop_handler_observer.h
@@ -0,0 +1,26 @@ +// 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_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_OBSERVER_H_ +#define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_OBSERVER_H_ + +#include <string> + +#include "ui/views/views_export.h" + +namespace views { + +class VIEWS_EXPORT X11DesktopHandlerObserver { + public: + // Called when the (platform-specific) workspace ID changes to + // |new_workspace|. + virtual void OnWorkspaceChanged(const std::string& new_workspace) = 0; + + protected: + virtual ~X11DesktopHandlerObserver() {} +}; + +} // namespace views + +#endif // UI_DISPLAY_DESKTOP_OBSERVER_H_
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc index 45ea0283..cf6ee51 100644 --- a/ui/views/widget/widget_unittest.cc +++ b/ui/views/widget/widget_unittest.cc
@@ -935,11 +935,7 @@ // Move, but don't change the size. widget->SetBounds(gfx::Rect(110, 110, 170, 100)); - // Currently fails on Mus. http://crbug.com/622575. - if (IsMus()) - EXPECT_FALSE(widget_bounds_changed()); - else - EXPECT_TRUE(widget_bounds_changed()); + EXPECT_TRUE(widget_bounds_changed()); reset(); // Moving to the same place does nothing.