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

Unified Diff: Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.cpp

Issue 293403002: Introduce mock test system for navigator content utils (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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: Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.cpp
diff --git a/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5ca9412320a1ced11b48225f63e51fc9d656d31c
--- /dev/null
+++ b/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.cpp
@@ -0,0 +1,22 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "InternalsNavigatorContentUtils.h"
+
+#include "core/dom/Document.h"
+#include "core/testing/Internals.h"
+#include "modules/navigatorcontentutils/NavigatorContentUtils.h"
+#include "modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h"
+
+namespace WebCore {
+
+void InternalsNavigatorContentUtils::setNavigatorContentUtilsClientMock(Internals&, Document* document)
+{
+ ASSERT(document && document->page());
+ NavigatorContentUtils* navigatorContentUtils = NavigatorContentUtils::from(*document->page());
+ navigatorContentUtils->setClientForTest(adoptPtr(new NavigatorContentUtilsClientMock()));
+}
+
+} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698