Commit 95614e2e authored by danakj's avatar danakj Committed by Commit Bot

Don't refer to test_runner from content/shell/browser/

The test_runner is part of content/shell/renderer. Move the shared
constant that the browser side wants to use out to
content/shell/common/web_test/web_test_constants. Because the
common/web_test code is a separate build target now, we can have the
test_runner and content_shell_lib both depend on it.

R=avi@chromium.org

Bug: 866140
Change-Id: Ifcc484108e2982284d78977a0c70f24565c7dc8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132837Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755556}
parent ecfdb6a3
...@@ -48,6 +48,7 @@ source_set("android_shell_descriptors") { ...@@ -48,6 +48,7 @@ source_set("android_shell_descriptors") {
source_set("web_test_common") { source_set("web_test_common") {
testonly = true testonly = true
sources = [ sources = [
"common/web_test/web_test_constants.h",
"common/web_test/web_test_string_util.cc", "common/web_test/web_test_string_util.cc",
"common/web_test/web_test_string_util.h", "common/web_test/web_test_string_util.h",
"common/web_test/web_test_switches.cc", "common/web_test/web_test_switches.cc",
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "content/shell/browser/web_test/web_test_content_browser_client.h" #include "content/shell/browser/web_test/web_test_content_browser_client.h"
#include "content/shell/browser/web_test/web_test_content_index_provider.h" #include "content/shell/browser/web_test/web_test_content_index_provider.h"
#include "content/shell/browser/web_test/web_test_permission_manager.h" #include "content/shell/browser/web_test/web_test_permission_manager.h"
#include "content/shell/test_runner/web_test_delegate.h" #include "content/shell/common/web_test/web_test_constants.h"
#include "content/test/mock_platform_notification_service.h" #include "content/test/mock_platform_notification_service.h"
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h" #include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
...@@ -63,8 +63,8 @@ void SetDatabaseQuotaOnIOThread( ...@@ -63,8 +63,8 @@ void SetDatabaseQuotaOnIOThread(
scoped_refptr<storage::QuotaManager> quota_manager, scoped_refptr<storage::QuotaManager> quota_manager,
int32_t quota) { int32_t quota) {
DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(quota >= 0 || quota == test_runner::kDefaultDatabaseQuota); DCHECK(quota >= 0 || quota == kDefaultDatabaseQuota);
if (quota == test_runner::kDefaultDatabaseQuota) { if (quota == kDefaultDatabaseQuota) {
// Reset quota to settings with a zero refresh interval to force // Reset quota to settings with a zero refresh interval to force
// QuotaManager to refresh settings immediately. // QuotaManager to refresh settings immediately.
storage::QuotaSettings default_settings; storage::QuotaSettings default_settings;
......
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_SHELL_COMMON_WEB_TEST_WEB_TEST_CONSTANTS_H_
#define CONTENT_SHELL_COMMON_WEB_TEST_WEB_TEST_CONSTANTS_H_
namespace content {
constexpr int kDefaultDatabaseQuota = -1;
} // namespace content
#endif // CONTENT_SHELL_COMMON_WEB_TEST_WEB_TEST_CONSTANTS_H_
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "cc/paint/paint_canvas.h" #include "cc/paint/paint_canvas.h"
#include "content/shell/common/web_test/web_test_constants.h"
#include "content/shell/common/web_test/web_test_string_util.h" #include "content/shell/common/web_test/web_test_string_util.h"
#include "content/shell/test_runner/layout_dump.h" #include "content/shell/test_runner/layout_dump.h"
#include "content/shell/test_runner/mock_content_settings_client.h" #include "content/shell/test_runner/mock_content_settings_client.h"
...@@ -1537,7 +1538,7 @@ void TestRunner::Reset() { ...@@ -1537,7 +1538,7 @@ void TestRunner::Reset() {
if (delegate_) { if (delegate_) {
// Reset the default quota for each origin. // Reset the default quota for each origin.
delegate_->SetDatabaseQuota(kDefaultDatabaseQuota); delegate_->SetDatabaseQuota(content::kDefaultDatabaseQuota);
delegate_->SetDeviceColorSpace("reset"); delegate_->SetDeviceColorSpace("reset");
delegate_->SetDeviceScaleFactor(GetDefaultDeviceScaleFactor()); delegate_->SetDeviceScaleFactor(GetDefaultDeviceScaleFactor());
delegate_->SetBlockThirdPartyCookies(false); delegate_->SetBlockThirdPartyCookies(false);
......
...@@ -40,8 +40,6 @@ namespace test_runner { ...@@ -40,8 +40,6 @@ namespace test_runner {
class WebWidgetTestProxy; class WebWidgetTestProxy;
struct TestPreferences; struct TestPreferences;
constexpr int kDefaultDatabaseQuota = -1;
class WebTestDelegate { class WebTestDelegate {
public: public:
virtual ~WebTestDelegate() = default; virtual ~WebTestDelegate() = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment