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

Unified Diff: components/test_runner/web_frame_test_proxy.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
Index: components/test_runner/web_frame_test_proxy.h
diff --git a/components/test_runner/web_frame_test_proxy.h b/components/test_runner/web_frame_test_proxy.h
index 15f3f01c05c0e1ea7e3e2f59049d2518b776ab07..8ee5a26e2bc8560308aed04eb873e3419f04ba0e 100644
--- a/components/test_runner/web_frame_test_proxy.h
+++ b/components/test_runner/web_frame_test_proxy.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "components/test_runner/test_runner_export.h"
#include "components/test_runner/web_frame_test_client.h"
+#include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebFrameClient.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -191,6 +192,14 @@ class WebFrameTestProxy : public Base, public WebFrameTestProxyBase {
suggestions);
}
+ blink::WebEffectiveConnectionType getEffectiveConnectionType() override {
+ if (test_client()->getEffectiveConnectionType() !=
+ blink::WebEffectiveConnectionType::TypeUnknown) {
+ return test_client()->getEffectiveConnectionType();
+ }
+ return Base::getEffectiveConnectionType();
+ }
+
void runModalAlertDialog(const blink::WebString& message) override {
test_client()->runModalAlertDialog(message);
}

Powered by Google App Engine
This is Rietveld 408576698