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

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

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 #include "platform/testing/ScopedMockedURL.h"
6
7 #include "platform/testing/URLTestHelpers.h"
8 #include "public/platform/Platform.h"
9 #include "public/platform/WebURLLoaderMockFactory.h"
10
11 namespace blink {
12 namespace testing {
13
14 ScopedMockedURL::ScopedMockedURL(const WebURL& url) : m_url(url) {}
15
16 ScopedMockedURL::~ScopedMockedURL() {
17 Platform::current()->getURLLoaderMockFactory()->unregisterURL(m_url);
18 }
19
20 ScopedMockedURLLoad::ScopedMockedURLLoad(const WebURL& fullURL,
21 const WebString& filePath,
22 const WebString& mimeType)
23 : ScopedMockedURL(fullURL) {
24 URLTestHelpers::registerMockedURLLoad(fullURL, filePath, mimeType);
25 }
26
27 } // namespace testing
28 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698