Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: components/test_runner/test_runner.h

Issue 2338623004: Add Blink setting to block doc.written scripts on 2g-like networks (Closed)
Patch Set: Update test results after rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.h
diff --git a/components/test_runner/test_runner.h b/components/test_runner/test_runner.h
index 856dc80020deffcc06053a475a8a50075afe40a8..9be952257a5662262c41614d365a5d201bd0fa7e 100644
--- a/components/test_runner/test_runner.h
+++ b/components/test_runner/test_runner.h
@@ -18,6 +18,7 @@
#include "components/test_runner/layout_test_runtime_flags.h"
#include "components/test_runner/test_runner_export.h"
#include "components/test_runner/web_test_runner.h"
+#include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h"
#include "third_party/WebKit/public/platform/WebImage.h"
#include "v8/include/v8.h"
@@ -168,6 +169,10 @@ class TestRunner : public WebTestRunner {
bool ShouldDumpConsoleMessages() const;
+ blink::WebEffectiveConnectionType effective_connection_type() const {
+ return effective_connection_type_;
+ }
+
// A single item in the work queue.
class WorkItem {
public:
@@ -462,6 +467,12 @@ class TestRunner : public WebTestRunner {
// to test output.
void SetDumpConsoleMessages(bool value);
+ // Overrides the NetworkQualityEstimator's estimated network type. If |type|
+ // is TypeUnknown the NQE's value is used. Be sure to call this with
+ // TypeUnknown at the end of your test if you use this.
+ void SetEffectiveConnectionType(
+ blink::WebEffectiveConnectionType connection_type);
+
// Controls whether the mock spell checker is enabled.
void SetMockSpellCheckerEnabled(bool enabled);
@@ -640,6 +651,9 @@ class TestRunner : public WebTestRunner {
// True if we run a test in LayoutTests/imported/{csswg-test,wpt}/.
bool is_web_platform_tests_mode_;
+ // An effective connection type settable by layout tests.
+ blink::WebEffectiveConnectionType effective_connection_type_;
+
base::WeakPtrFactory<TestRunner> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(TestRunner);
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698