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

Side by Side Diff: third_party/WebKit/Source/platform/testing/ScopedMockedURL.h

Issue 2680723002: Generalize ScopedRegisteredURL as ScoedMockedURL* (Closed)
Patch Set: remove one more unused class 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 2017 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 ScopedMockedURL_h
6 #define ScopedMockedURL_h
7
8 #include "public/platform/WebString.h"
9 #include "public/platform/WebURL.h"
10 #include "public/platform/WebURLResponse.h"
11
12 namespace blink {
13
14 namespace testing {
15
16 // Convenience classes that register a mocked URL on construction, and
17 // unregister it on destruction. This prevent mocked URL from leaking to other
18 // tests.
19 class ScopedMockedURL {
20 public:
21 explicit ScopedMockedURL(const WebURL&);
22 virtual ~ScopedMockedURL();
23
24 private:
25 WebURL m_url;
26 };
27
28 class ScopedMockedURLLoad : ScopedMockedURL {
29 public:
30 ScopedMockedURLLoad(
31 const WebURL& fullURL,
32 const WebString& filePath,
33 const WebString& mimeType = WebString::fromUTF8("text/html"));
34 ~ScopedMockedURLLoad() override = default;
35 };
36
37 } // namespace testing
38
39 } // namespace blink
40
41 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/testing/ScopedMockedURL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698