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

Side by Side Diff: components/test_runner/mock_content_settings_client.h

Issue 2707183003: Move //components/test_runner back into //content/shell (Closed)
Patch Set: Trim DEPS Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_TEST_RUNNER_MOCK_CONTENT_SETTINGS_CLIENT_H_
6 #define COMPONENTS_TEST_RUNNER_MOCK_CONTENT_SETTINGS_CLIENT_H_
7
8 #include "base/macros.h"
9 #include "third_party/WebKit/public/web/WebContentSettingsClient.h"
10
11 namespace test_runner {
12
13 class LayoutTestRuntimeFlags;
14 class WebTestDelegate;
15
16 class MockContentSettingsClient : public blink::WebContentSettingsClient {
17 public:
18 // Caller has to guarantee that |layout_test_runtime_flags| lives longer
19 // than the MockContentSettingsClient being constructed here.
20 MockContentSettingsClient(LayoutTestRuntimeFlags* layout_test_runtime_flags);
21
22 ~MockContentSettingsClient() override;
23
24 // blink::WebContentSettingsClient:
25 bool allowImage(bool enabled_per_settings,
26 const blink::WebURL& image_url) override;
27 bool allowScript(bool enabled_per_settings) override;
28 bool allowScriptFromSource(bool enabled_per_settings,
29 const blink::WebURL& script_url) override;
30 bool allowStorage(bool local) override;
31 bool allowPlugins(bool enabled_per_settings) override;
32 bool allowRunningInsecureContent(bool enabled_per_settings,
33 const blink::WebSecurityOrigin& context,
34 const blink::WebURL& url) override;
35 bool allowAutoplay(bool default_value) override;
36
37 void SetDelegate(WebTestDelegate* delegate);
38
39 private:
40 WebTestDelegate* delegate_;
41
42 LayoutTestRuntimeFlags* flags_;
43
44 DISALLOW_COPY_AND_ASSIGN(MockContentSettingsClient);
45 };
46
47 } // namespace test_runner
48
49 #endif // COMPONENTS_TEST_RUNNER_MOCK_CONTENT_SETTINGS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698